systemd.rst 1.6 KB
Newer Older
Agate's avatar
Agate committed
1 2 3
Systemd configuration
----------------------

Reg's avatar
Reg committed
4
Systemd offers a convenient way to manage your Funkwhale instance if you're
Agate's avatar
Agate committed
5 6
not using docker.

Reg's avatar
Reg committed
7
We'll see how to setup systemd to proprely start a Funkwhale instance.
Agate's avatar
Agate committed
8 9 10 11 12

First, download the sample unitfiles:

.. parsed-literal::

Agate's avatar
Agate committed
13 14 15 16
    curl -L -o "/etc/systemd/system/funkwhale.target" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale.target"
    curl -L -o "/etc/systemd/system/funkwhale-server.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale-server.service"
    curl -L -o "/etc/systemd/system/funkwhale-worker.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale-worker.service"
    curl -L -o "/etc/systemd/system/funkwhale-beat.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale-beat.service"
Agate's avatar
Agate committed
17 18 19

This will download three unitfiles:

Reg's avatar
Reg committed
20 21 22
- ``funkwhale-server.service`` to launch the Funkwhale web server
- ``funkwhale-worker.service`` to launch the Funkwhale task worker
- ``funkwhale-beat.service`` to launch the Funkwhale task beat (this is for recurring tasks)
Agate's avatar
Agate committed
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
- ``funkwhale.target`` to easily stop and start all of the services at once

You can of course review and edit them to suit your deployment scenario
if needed, but the defaults should be fine.

Once the files are downloaded, reload systemd:

.. code-block:: shell

    systemctl daemon-reload

And start the services:

.. code-block:: shell

    systemctl start funkwhale.target

You can check the statuses of all processes like this:

.. code-block:: shell

    systemctl status funkwhale-\*