Peertube runner systemd

I cannot figure this out:
I have installed runner in several ubuntu instances. Pretty plain setups.
When running as shell command everything is just fine and seems to be working well.
But I need these to auto start - doing the setup by the guide. Some installations work, most new ones are not, the service fails.
Here is what I have done:
root@vps:~# useradd -m -d /srv/prunner -s /bin/bash -p prunner prunner
root@vps:~# nano /etc/systemd/system/prunner.service (I add the text listed)
root@vps:~# systemctl daemon-reload
root@vps:~# systemctl enable prunner.service
Created symlink /etc/systemd/system/multi-user.target.wants/prunner.service → /etc/systemd/system/prunner.service.
root@vps:~# systemctl restart prunner.service

All seems good:
But when I run status - I get a failure

root@vps:~# systemctl status prunner.service
× prunner.service - PeerTube runner daemon
Loaded: loaded (/etc/systemd/system/prunner.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Thu 2025-03-06 17:33:04 UTC; 13s ago
Duration: 12ms
Process: 9507 ExecStart=peertube-runner server (code=exited, status=203/EXEC)
Main PID: 9507 (code=exited, status=203/EXEC)
CPU: 10ms

Mar 06 17:33:04 vps systemd[1]: prunner.service: Scheduled restart job, restart counter is at 5.
Mar 06 17:33:04 vps systemd[1]: prunner.service: Start request repeated too quickly.
Mar 06 17:33:04 vps systemd[1]: prunner.service: Failed with result ‹ exit-code ›.
Mar 06 17:33:04 vps systemd[1]: Failed to start prunner.service - PeerTube runner daemon.

I am sure this is something simple, but I am not a linux guru to figure this out.
Any ideas?

Have you created the configuration file?

If yes, no syntax error in it?

You can try to use journalctl -u prunner to have more logs, and maybe have a message telling exactly what is the error.

I have run the journalctl command and it just give the same error as above.
This is the exact text created with the nano command used in the working and not working systems:

[Unit]

Description=PeerTube runner daemon

After=network.target

[Service]

Type=simple

Environment=NODE_ENV=production

User=prunner

Group=prunner

ExecStart=peertube-runner server

WorkingDirectory=/srv/prunner

SyslogIdentifier=prunner

Restart=always

; Some security directives.

; Mount /usr, /boot, and /etc as read-only for processes invoked by this service.

ProtectSystem=full

; Sets up a new /dev mount for the process and only adds API pseudo devices

; like /dev/null, /dev/zero or /dev/random but not physical devices. Disabled

; by default because it may not work on devices like the Raspberry Pi.

PrivateDevices=false

; Ensures that the service process and all its children can never gain new

; privileges through execve().

NoNewPrivileges=true

; This makes /home, /root, and /run/user inaccessible and empty for processes invoked

; by this unit. Make sure that you do not depend on data inside these folders.

ProtectHome=true

; Drops the sys admin capability from the daemon.

CapabilityBoundingSet=~CAP_SYS_ADMIN

[Install]

WantedBy=multi-user.target

Yes, but have you created the configuration file, as explained in the link i gave? (CLI tools guide | PeerTube documentation)

File /srv/prunner/.config/peertube-runner-nodejs/instance-1/config.toml

That config.toml file is normally created automatically (in shell mode) by the « peertube-runner server » and then I would edit it.
But interestingly the systemd version « systemctl start prunner.service » does not even create the folders. .config .cache .local in prunner. ???
So I tried copying those 3 working folders/files from shell (root) running into prunner.
Still no luck.
But maybe the fact that those folders are not created is a clue to someone smarter?
Is this some permissions issue or something maybe?

hum, indeed i think you are right. I did not create a new runner since a very long time…

Are you sure there is no other error when using journalctl?
Maybe there is a debug mode that has more verbose logs. I don’t remember.

The crazy part is that I can run peertube-runner server & and everything works great, I just want it to auto start…

Maybe you can try to comment directives under Some security directives, to see if this could be related.

Especially the ProtectHome=true directive, which could be related to the way you created the user.