Connects Couchbase Lite to Couchbase Server
Go Python Shell Objective-C Batchfile Ruby Other
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.github Create (#2152) Oct 24, 2016
app/Sync Gateway Added Mac wrapper app in app/ subdirectory Oct 1, 2015
auth Logging: #3429 Convert existing log calls to new logging API (#3447) Apr 13, 2018
base Stats and slow query logging for view, n1ql queries (#3466) Apr 20, 2018
build Remove version from readme.txt (#3405) Apr 9, 2018
channels Fix handling of constant in expiry() (Fixes #3452) (#3453) Apr 16, 2018
db Re-enable vbucket-based test (#3486) Apr 20, 2018
docs [docs] changes: (#3374) Mar 26, 2018
examples #3472 add redaction example and snake_case new logging config options ( Apr 20, 2018
manifest Fixes issue #3360 Upgrade JQuery UI to at least 1.12.0 (#3482) Apr 20, 2018
rest For 2nd test bucket, use the same NumIndexReplicas as original test b… Apr 21, 2018
service #3448 Add --defaultLogFilePath flag to set fallback logFilePath (#3469) Apr 18, 2018
tools Example of stripping header lines from pprof (#3338) Feb 27, 2018
.drone.yml Move timeout flag to for -race tests (#3237) Jan 22, 2018
.gitignore Add sg-accel Win service wrapper; .gitignore cleanup Jan 19, 2016 Link to official Couchbase Code of Conduct Apr 3, 2017
LICENSE Update LICENSE Feb 14, 2017
Makefile Cleanup of Makefile and .gitignore Nov 10, 2015 Improve build instructions Jan 9, 2018 Added benchmark tests for default and explicit sync functions. (#2589) Jun 9, 2017 Feature/issue 2937 merge coverage report (#2998) Oct 31, 2017 Feature/issue 721 improve repo tool (#2122) Oct 6, 2016
main.go Logging: Another pass of finding old logs (#3460) Apr 17, 2018 Fix + improve docs Mar 30, 2017 Feature/issue 2747 dcp helo (#2786) Aug 8, 2017 Check if file exists before deleting Apr 13, 2017
sync_gateway.sublime-project Moves the sg_accel functionality into two new packages - sg_accel and… Mar 4, 2016 Support running generateChanges in one-shot mode (#3317) Feb 19, 2018 Fixes #2993 Add integration-with-xattr to code coverage job (#3024) Nov 6, 2017

Build Status Join the chat at Go Report Card codebeat badge License

Sync Gateway


  • Manages HTTP-based data access for Couchbase Lite mobile clients
  • Leverages Couchbase Server as it's horizontally scalable backing data store
  • Clustered into a horizontally scalable tier
  • Provides access control and data routing
  • Provides HTTP longpoll changes stream of all database mutations


Official product home page



Issue Tracker

Mailing List

Discussion Forum

Build pre-requisites

To build Sync Gateway from source, you must have the following installed:

  • Go 1.9 or later with your $GOPATH set to a valid directory
  • GCC

Install Go

See Installing Go

Install GCC

$ yum install gcc

Download and build via repo

This is the recommended approach. See the Extended Build Instructions to build with dependency pinning via the repo multi-repository tool.

Download and build via go get

Warning currently the go get style of building is broken due to upstream library changes, please use the Extended Build Instructions

Download and build the code in a single step via go get:

$ go get -u -t

After this operation completes you should have a new sync_gateway binary in $GOPATH/bin

NOTE: This build style is only suitable for development rather than deployment. There is a chance this might fail or have runtime errors due to using the latest version of all dependencies (whereas release builds use dependency pinning). Please file an issue if you run into problems.


Apache 2 license.