What would be the best way to run boring proxy as a service in ubuntu (22.04)?
In a way i wouldn’t need to have a terminal open with it and would just start automatically when the server reboots.
Thanks
What would be the best way to run boring proxy as a service in ubuntu (22.04)?
In a way i wouldn’t need to have a terminal open with it and would just start automatically when the server reboots.
Thanks
Personally I use systemd for this sort of thing. There’s an example file in the repo but it’s probably out of date. If you’re running other things on the server with any sort of sensitive data, probably docker. We also have a dockerfile but it’s definitely out of date.
that makes sense. Thank you
Hiya! I’ve tried using the example service file in the repo to no avail. Followed the instructions in the README.md. The runuser -l boringproxy -c 'cd /home/boringproxy; /usr/local/bin/boringproxy server -admin-domain bp.example.com'
command works fine, but when I try to start the service, I get these errors:
May 26 03:08:56 hostname systemd[1]: Started boringproxy Admin Server.
May 26 03:08:56 hostname systemd[6568]: boringproxy-server.service: Failed to execute command: Permission denied
May 26 03:08:56 hostname systemd[6568]: boringproxy-server.service: Failed at step EXEC spawning /home/boringproxy/boringproxy: Permission denied
May 26 03:08:56 hostname systemd[1]: boringproxy-server.service: Main process exited, code=exited, status=203/EXEC
May 26 03:08:56 hostname systemd[1]: boringproxy-server.service: Failed with result 'exit-code'.
(The /home/boringproxy/boringproxy
line is because I was doing a second attempt from an installation in the boringproxy user’s home directory, since /usr/local/bin/boringproxy
was giving this error before.)
Any thoughts? Tried all kinds of chowning, chmoding, restoreconing… no luck!
Hey @cloopadoop, sorry for the late response. Is this still not working? Can you share the systemd service file you’re using?
@anders I ended up wiping the VPS and starting over and rather than creating a new user, just used the one that was set up from the base image (still non-root, and this is all the server is doing, figured it’d be fine). I’m just running a shell script on startup lolol.
Nothing wrong with that if it’s working. Running non-root is probably the most important thing. Feel free to ask additional questions.