Could sg-replicate use Sync Gateway's non-Admin port?


I’m thinking of using Sync Gateway for an application that would involve syncing selected data between Couchbase Servers owned by different users. This would be done using the sg-replicate tool, but I see that one of its limitations is that it requires access to Sync Gateway Admin port (4985).

It seems this would be a security risk in my application, as it could let one user modify another user’s Sync Gateway configuration? So I was wondering if it’s possible to change sg-replicate to use a non-Admin port instead?



You should be able to use sg-replicate against the Public REST API’s of two Sync Gateway instances.

The caveat is that only the document revisions visible to the specific user account you use on the source will be replicated to the target. On the target the sync function requireUser(), requireRole() and requireAccess() functions will behave based on the specific target user account.