I need to run a snap app as a multi-instance service. Each instance will be run with a separate config.
Option 1. Add a daemon to snapcraft.yml. It looks like multi-instance daemons aren’t supported.
Option 2. Create my own systemd service:
[Unit]
Description=My Service %I
After=network-online.target
[Service]
ExecStart=snap run app --config %i.conf
Restart=always
[Install]
WantedBy=multi-user.target
But it this case, I don’t see logs, when I run journalctl -u myservice.service
. The same issue is described here.
So I had to stick with Option 2, but I cannot view logs, which is unfortunate.