Couchbase sync without Internet

I would like to know how to go about using couchbase lite/couchbase server on a LAN without internet connection, but with Android tablets connected to PC by USB. We are using adb to push and pull files and send commands to tablet. I saw a similar thread on this forum about this from December ’14 [quote=“davit, post:1, topic:2326, full:true”]
Is there a way to replicate between tablet and laptop without internet access? Through USB or referencing the IP somehow?
[/quote] where @zgramana said sync using usb is something that was being worked on, but was not currently available. Does anyone know if that is something that is now possible? Or is there another way to go about this? Thanks!

The replication protocol currently uses HTTP so it requires an IP network. I don’t know how Android devices connect to PCs over USB, but if there’s some sort of IP tunnel involved, you could run replication through it by finding the IP address of the other device and making a URL from it.

You can use adb port forwarding to accomplish this:

1 Like

Thanks for both of your input. We already set up port forwarding between the tablet and the PC. I am sort of a noob at this so basically used this article as a model . So the socket connection is created on the PC using IP address “localhost” and a port number, and the ServerSocket is the tablet. If we were to use this connection between the tablet and the PC would we have to use the port forwarding “reverse” option so that the socket connection would be reversed?

Also, I am not sure what we would use as an IP address to create the URL to be used in the methods createPushReplication and createPullReplication if there is no router to act as DHCP server on our LAN, just tablets connected over USB. Thanks for any advice.