I want to run 2 gateways on a machine. Neither of which use the default installation. Can I use the sync_gateway_service_install.sh script to do this? Do I need to uninstall the sync_gateway that got installed by default, or do I just reconfigure it?
To run multiple SG instances on the same machine you will need to bind each instance to different ports (and/or different interface cards, with different IP’s) and separate log output.
To test this manually, stop the default SG service.
Then create two SG config files binding to different ports e.g.:
Thanks, I understand about the ports and have run 2 quite happily on my laptop. But installing 2 as services on ubuntu is where I’m struggling. The sync_gateway_service_install.sh hard codes the service name as sync_gateway. First step was to change the script so that a service name can be passed in. But even using 2 different service names the 2nd instance won’t start. In the access log it just says process already running.