Thanks for the suggested solution. But it looks like reinventing the wheel. I would expect the snapd to do all the dirty job of daemonizing for me.
Also I cannot figure out why when running as a systemd-unit (Option 2), I cannot see logs with journalctl
(when running in a terminal, I do see the logs). I guess it might be due to strict confinement, but then it’s not obvious for me which interface I should connect.