REST API Access
Sync Gateway APIs are accessed on different TCP ports. This makes it easy to expose the Public REST API (port 4984) to endpoints while keeping the Admin REST API (port 4985) secure behind your firewall.
Prometheus Monitoring Support
This is a Developer Preview feature, not intended for production use; the API is uncommitted.
In addition to the Admin API’s
For more information on using Prometheus and Grafina with Sync Gateway — see our blog entry Monitoring Couchbase Sync Gateway with Prometheus and Grafana.
If you want to change the ports, you can do that in the configuration file, so:
To change the Public REST API port, set the
interfaceproperty in the configuration file.
To change the Admin REST API port, set the
adminInterfaceproperty in the configuration file.
The value of the property is a string consisting of a colon followed by a port number (for example,
You can also prepend a host name or numeric IP address before the colon to bind only to the network interface with that address.
As a useful special case, the IP address 127.0.0.1 binds to the loopback interface, making the port unreachable from any other host. This is the default setting for the admin interface.
Sync Gateway uses specific ports for communication with the outside world, mostly Couchbase Lite databases replicating to and from Sync Gateway — see Table 1 for details.
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.
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.