CBL 2.0 + CouchDB server + Syn Gateway

Hi all,

We are experimenting with CBL 2.0 db11 on mobile device and want o use replication.

Now, everywhere I search for info on coupling SG with CouchDB I see the response that replication is inherent in CouchDB. I’m fully aware of that.

My viewpoint is the use of CBL 2.0 that has a new replication protocol based on WebSockets. The replication guidelines for CBL 2.0db reads:

Since Couchbase Lite 2 developer builds support only the new protocol, to test replication you will need to run the corresponding developer build of Sync Gateway, which supports both.

We have a default installation of Sync Gateway with current sync-gateway-config.json

	"databases": {
		"users": {
			"server": "",
			"users": {
				"GUEST": {"disabled": false, "admin_channels": ["*"] 
		 "unsupported": {

But we get following error

Error opening database: 502 Unable to connect to Couchbase Server (connection refused). Please ensure it is running and reachable at the configured host and port. Detailed error: Ambiguous port without scheme -- rest.RunServer() at config.go:760

Anyone who can guide us or have experience with this setup?


Sorry if this sounds like a dumb question, but are you using CouchDB, or Couchbase Server?

I’m using a CouchDB server…

Sync Gateway only works with Couchbase Server. Couchbase Lite versions before 2.0 can work directly with CouchDB. 2.0 introduces a new sync protocol, and is no longer compatible with CouchDB. Have you considered the community edition of Couchbase Server?

Also, in the “server” entry, you need to specify the transport (e.g. “http://1270.0.1:5984”). That’s the source of the current error you’re reporting.

1 Like