The best way to be compatible with the official Jolla shop ("no daemon allowed" rule) and end-users desire (background daemon), while avoiding to have 2 completely different codepaths, would be : - always run the server in a separate process - (which also means : design some inter-process communication. DBUS ? simple webservice ? protocole buffers ?) - give the ability to start only that process ("OSMScout --daemon" or something) - for the version available on openrepos.net : pack a systemd ".service" file that only start the daemon in background - for the version avaiable on the shop : don't pack that file. When UI starts, it checks (see the IPC mentionned above) if there's a daemon process answering. If not, it launches the daemon as a child process / as just another thread of the main UI task. On the official version it means that the service will only be available while the UI is running (even if it uses a weird IPC instead of directly calling functions). On the openrepos version, people have the possibility to launch the daemon in background at boot ("systemctl enable OSMscout.service") and only launch the UI to monitor daemon activity.