List/start/stop Couchbase server and Sync Gateway services on Mac

I am running Couchbase server and sync gateway both on Mac Catalina. I can see both services are running by accessing the port 8091 and 4984.
However, when using “launchctl list | grep couchbase” I only see " com.couchbase.couchbase-server.2628" being listed, but not sync_gateway. On the other side, if I issue command “ls /Library/LaunchDaemons/ | grep couchbase”, I only see “” being listed.

Do couchbase server and sync gateway services run with different mechanism on Mac?
It seems that there is no command line on Mac to start / stop couchbase server, right?
How about command line for starting / stoping sync gateway service on Mac?

Sync Gateway can be run as a standalone binary, or installed as a service daemon.
macOS uses launchd as its init system, you can enable and disable the Sync Gateway service using the following commands:

sudo launchctl load -w /Library/LaunchDaemons/
sudo launchctl unload -w /Library/LaunchDaemons/

Do note that the Sync Gateway service is configured to automatically restart, so simply calling

sudo launchctl stop

will actually restart the service immediately.

1 Like

Really appreciate your detailed answer!