mongooseimctl live
or mongooseimctl foreground
is mostly useful for development or smoke testing a deployment (unless you're running inside a container). For real world use cases you should start the server in the background with mongooseimctl start
.
Back to the container - the best approach for containerised applications is to run them in the foreground, therefore in a container startup script use mongooseimctl foreground
.
Once the server is running (no matter how it was started) attaching a shell to troubleshoot issues can be done with mongooseimctl debug
. This is the command to use when you get the Protocol 'inet_tcp': the name mongooseim@localhost seems to be in use by another Erlang node
error. Be careful if it's a production environment - you can easily take the server down with access to this shell.
If you're just interested in watching logs, with no interactive access to the server internals that the shell offers, a simple tail -f /your-configured-mongooseim-log-dir/*
should be enough.
Ubuntu nowadays uses systemd for managing its services' lifetimes. A systemd .service
file can be found at https://github.com/esl/MongooseIM/blob/master/tools/pkg/platforms/debian_stretch/files/build/mongooseim.service - we use it for packaging into Debian/Ubuntu .deb packages.
mongooseim@localhost
for a production deployment. Instead, figure out a domain name for you service, get a DNS, and configure the server to[email protected]
. – erszcz