Creating a user in couchGatewayConfig.json



I tried adding a user via the couchGatewayConfig.json - file like this:

{ "interface":":4984", "adminInterface":":4985", "log": ["CRUD", "REST+"], "databases": { "dict-demo": { "server": "", "bucket": "dict-demo", "users": { "TEST": {"password":"demo", "admin_channels":["*"], "all_channels":["*"]}, "GUEST": {"disabled": false, "password":"demo", "admin_channels":["*"], "all_channels":["*"]} }, "sync": `function(doc) {channel(doc.channels);}` } } }

GET and POST are both working using the GUEST user, but as soon as I add the user TEST to the .json, I can’t start the server anymore. The Error I am shown is
FATAL: Error opening database: Invalid config for user “TEST”: Invalid password – rest.RunServer() at config.go:268

Can somebody help me about this? How do I define users correctly?



Hi there Nadine, it looks like you are trying to set up a specific user “test” that has access to all channels. This specification should be done in the sync function, so something like:

“sync”: function(doc, oldDoc) { access ("test", doc.channel_name); }

A brief overview is available here (, and breakdown of a usable sync function is available here (

We are working on bettering our documentation detailing the sync function and the configuration file itself, let us know if you have any additional feedback.