Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pup enable-service gives me: Could not install service #66

Open
phocks opened this issue Dec 2, 2024 · 2 comments
Open

pup enable-service gives me: Could not install service #66

phocks opened this issue Dec 2, 2024 · 2 comments

Comments

@phocks
Copy link

phocks commented Dec 2, 2024

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?

@Hexagon
Copy link
Owner

Hexagon commented Dec 2, 2024

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.

@phocks
Copy link
Author

phocks commented Dec 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants