Using the Command Line
Start a Sync Gateway instance using command line options and securely sync enterprise data from cloud to edge
Introduces the options available when running Sync Gateway from the command line
Related Deploy topics: Deploy | REST API Access | Configuration Properties
Overview
You can configure some Sync Gateway features by specifying command-line options when you start it.
For more comprehensive configuration, use a JSON configuration file - see: Configuration Properties.
Configuration
Configuration determines the runtime behavior of Sync Gateway, including server configuration and the database or set of databases with which a Sync Gateway instance can interact.
Command-line options can only specify a sub-set of the available configuration properties, and cannot be used to configure multiple databases. |
Two command-line options do not have corresponding configuration properties: -help
and -verbose
.
Option Format
When specifying command-line options use the format shown in Example 1
-
Command-line options are case-insensitive.
-
You can prefix command-line options with one hyphen (-) or with two hyphens (--).
-
For command-line options that take an argument, you specify the argument after an equal sign (=).
For example,-bucket=db
, or as a following item on the command line, for example,-bucket db
.
-
Format
-
List CLI Arguments
When specifying command-line options use this format:
sync_gateway [ -{option} ]
1 | Seperate multiple options by a comma or a space |
You can check the latest position by navigating to the folder containing the Sync Gateway executable and using:
$ ./sync_gateway -help (1)
1 | This command lists all Sync Gateway’s current command line arguments |
Available Options
The following command-line options can be used when starting Sync Gateway see Table 1
Deprecation Notice
The -bucket command line option, deprecated at Release 2.7, will be removed following release 2.8.Use the JSON configuration file option bucket — see this_db_bucket.
|
Option | Default | Description |
---|---|---|
|
127.0.0.1:4985 |
Port or TCP network address (IP address and the port) that the Admin REST API listens on. |
|
sync_gateway |
Deprecated Name of the Couchbase Server bucket. |
|
none |
Root CA certificate path |
|
none |
Client certificate path |
|
none |
URL of server that can return database configs |
|
sync_gateway |
Name of the Couchbase Server database to serve through the Public REST API. |
|
none |
Path to log files, as a fallback default value when |
|
none |
Customer/project identifier for stats reporting |
|
none |
Lists the available options and exits. |
|
:4984 |
Port or TCP network address (IP address and the port) that the Public REST API listens on. |
|
none |
Client certificate key path |
|
HTTP |
A comma-separated list of log keywords to be enabled. |
|
none |
Path to log files. |
|
default |
Name of the Couchbase Server pool in which to find buckets. |
|
false |
Pretty-print JSON responses to improve readability. This is useful for debugging, but reduces performance. |
|
Address to bind the profile interface to |
|
|
|
The URL of the database server |
|
Non-verbose logging |
Logs more information about requests. |