Sync Gateway Prerequsities

Couchbase Server

Before you can usefully use Sync Gateway, you must have an operational Couchbase Server installation. You will need to add a Bucket and an RBAC User for Sync Gateway (see: Configure Server for Sync Gateway).

Need Couchbase Server?

Go to our Downloads page if you need to get and install Couchbase Server.

Network Port Requirements

Sync Gateway uses specific ports for communication with the outside world, mostly Couchbase Lite databases replicating to and from Sync Gateway. The following table lists the ports used for different types of Sync Gateway network communication:

Table 1. Sync Gateway Network Port Requirements
Port Description

4984

Public port. External HTTP port used for replication with Couchbase Lite databases and other applications accessing the REST API on the Internet.

The Public REST API is used for client replication. The default port for the Public REST API is 4984.

4985

Admin port. Internal HTTP port for unrestricted access to the database and to run administrative tasks.

The Admin REST API is used to administer user accounts and roles. It can also be used to look at the contents of databases in superuser mode. The default port for the Admin REST API is 4985. By default, the Admin REST API is reachable only from localhost for safety reasons.

Couchbase Server Host Ports

For mobile deployment on premise or in the cloud (for example, AWS or Red Hat) open the following ports on the host to enable Couchbase Server to operate correctly:

  • 8091 to 8094 inclusive

  • 11207, 11210 and 11211

  • 18091 to 18093 inclusive.

Check that any firewall configuration allows communication on the specified ports.

Compatibility

SGW and Couchbase Server

Table 2. Sync Gateway/Couchbase Server Compatibility Matrix
Couchbase Server →

Sync Gateway ↓

4.0

4.1

4.5

4.6

5.0

5.1

5.5

6.0

1.3

feed_type: "DCP"

1.4

feed_type: "DCP"

1.5

shared_bucket_access: false

1.5

shared_bucket_access: true

2.0

shared_bucket_access: false

2.0

shared_bucket_access: true

2.1

shared_bucket_access: false

use_views: true

2.1

shared_bucket_access: true

2.1

use_views: false

2.5

shared_bucket_access: false

use_views: true

2.5

shared_bucket_access: true

2.5

use_views: false

For all of the above, the Couchbase Server bucket type must be Couchbase. Usage of Ephemeral and Memcached buckets with Couchbase Mobile is not supported.

SGW and Couchbase Lite

The table below summarizes the compatible versions of Couchbase Lite with Sync Gateway.

Table 3. Sync Gateway and Couchbase Lite Compatibility Matrix
Couchbase Lite →

Sync Gateway ↓

1.3

1.4

2.0

2.1

2.5 - 2.7

Release 1.3

Releases 1.4 and 1.5

Releases 2.0 and 2.1

Releases 2.5 to 2.7 with delta sync disabled

Releases 2.5 to 2.7 with delta sync enabled

Supported Operating Systems

Table 4. Supported Operating Systems for Development, Testing, and Production
Operating System Supported Versions

Red Hat Enterprise Linux (RHEL)

7.x and 8.x

CentOS

7.x and 8.x

Ubuntu

16.04 LTS

Debian

8.x

Windows Server

2010

2012 (64-bit)

2016 (64-bit)

Table 5. Supported Operating Systems for Development and Testing Only
Operating System Supported Versions

macOS

10.12.6 "High Sierra"

Cloud Support

Table 6. Supported Cloud Environments for Development, Testing, and Production
Operating System Supported Versions

Amazon Linux AMI

2017.09

2018.03

Docker (Docker Hub)

CentOS 7

OpenShift (RedHat Portal)

RHEL 7.2