Systemd Daemon - Gjum/morechunks-server GitHub Wiki

This page gives some help on running MoreChunks as a systemd service.

Create the morechunks user and give it permissions to the /opt/morechunks-server directory. Then put this in /lib/systemd/system/morechunks.service:

# MoreChunks systemd service by github.com/AngrySoundTech
[Unit]
Description=More Chunks Server

[Service]
Type=simple
User=morechunks
Restart=on-failure
Environment=MIX_ENV=prod
Environment=LANG=en_US.UTF-8

WorkingDirectory=/opt/morechunks-server
ExecStart=/usr/bin/elixir -S mix run --no-halt

[Install]
WantedBy=multi-user.target

Then you can use the usual systemd commands, for example systemctl enable morechunks and systemctl start morechunks.