pup icon indicating copy to clipboard operation
pup copied to clipboard

pup enable-service gives me: Could not install service

Open phocks opened this issue 1 year ago • 2 comments

I'm getting:

Could not install service, error: Failed to rollback changes: Could not remove '/root/.config/systemd/user/pup.service'. Error: 'Failed to reload daemon while rolling back.'

When trying to install the service. I'm on Ubuntu Server 24.04, fresh install. Any tips to fix?

phocks avatar Dec 02 '24 00:12 phocks

Are you running enable-service as root? You should either run as a non-privileged user (preferred, as pup installs itself as a user service), or use the --system switch to install pup as a system service. Docs at https://pup.56k.guru/usage/service/ .

Either way, i need to try this out and print a better error message, and make rollback work as intended. Would be nice to have some more details.

Hexagon avatar Dec 02 '24 20:12 Hexagon

Thanks @Hexagon! Using the --system switch worked for me. I was running as root and just trying the normal pup enable-service after doing the initial pup init --id "my-server" --autostart --cmd "deno run -A server.ts". I was running on Ubuntu Server 24.04 inside a LXC Linux Container with the Ubuntu Server 24.04 image. So yeah it's probably that I was running as root as I didn't have a non-root user set up in the container. Thanks for the help.

phocks avatar Dec 02 '24 23:12 phocks