Skip to content

Creating a Journey service using systemd

Adam Jacob Muller edited this page Jan 22, 2018 · 3 revisions

Systemd is poised to be the standard service manager for Debian (including Ubuntu). Here's a short tutorial on how to create a Journey service on a Linux system running systemd.

1. Create the journey.service file

Using nano as the editor:

sudo nano /lib/systemd/system/journey.service

Paste in the following text (and replace every occurrence of "youruser" with your own user name. Of course, if your Journey executable isn't located at /home/youruser/journey/journey you'll have to change that path):

NOTE: If you plan on running Journey only on ports higher than 1024, you may omit the AmbientCapabilities line below.

[Unit]
Description=Job that runs the Journey daemon

[Service]
ExecStart=/home/youruser/journey/journey -log=/home/youruser/journey/log.txt
AmbientCapabilities=CAP_NET_BIND_SERVICE
User=youruser

[Install]
WantedBy=multi-user.target

3. Configure the Journey service to start at boot

To let Journey start automatically after a reboot of your server, run:

sudo systemctl enable journey

Your Journey service is now ready. Start it by running:

sudo service journey start