1

I'm trying to write a user service:

$ systemctl --user start valheim.service
Failed to start valheim.service: Unit valheim.service has a bad unit file setting.
See user logs and 'systemctl --user status valheim.service' for details.

I minimized it slightly, with the same error resulting:

[Unit]
Description=Valheim Server
After=multi-user.target

[Service]
RemainAfterExit=True
ExecStart = /bin/ls

[Install]
WantedBy=default.target

Unfortunately, due to https://askubuntu.com/questions/1328245/how-to-fix-systemctl-status-not-working-as-non-root-user-in-20-04-upgrade, I can't seem to currently use systemctl status to further diagnose.

2

You need to remove the spaces around =:

ExecStart=/bin/ls
2
  • I think another issue I had, which I didn't specify in the original post, was that the valheim.service was a symbolic link. I used a hard link instead. – bbarker Mar 30 at 23:46
  • Symlinks work fine, I use them all the time for systemd services (global and user), so that shouldn’t have been a problem. – Stephen Kitt Mar 31 at 4:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.