Skip to content

Enable a plik as systemd service

Eduardo Diaz edited this page Sep 1, 2022 · 4 revisions

Hi to enable you plik as a system service (not i a docker) create a file called:

you must use the user and the group that you want take on consideration that you must have write permisions on the directoy in order to write services.

/etc/systemd/system/plikd.service

[Unit]
Description=Plik File Sharing Service
After=network.target systemd-journald-dev-log.socket

[Service]
User=www-data
Group=www-data
ExecStart=/my_location/plik/server/plikd
WorkingDirectory=/my_location/plik/plik/server
Restart=on-failure
RestartSec=5
SuccessExitStatus=3 4
RestartForceExitStatus=3 4

# Hardening
ProtectSystem=full
PrivateTmp=true
SystemCallArchitectures=native
MemoryDenyWriteExecute=true
NoNewPrivileges=true

[Install]
WantedBy=multi-user.target

Afther of that you can enable the service:

systemctl enable plik

systemctl start plik

you can check plik with:

sysstemcl stop plik

Clone this wiki locally