Sample Header Ad - 728x90

How to make caddy run in/from a directory as a service in Ubuntu 20.04.2?

0 votes
0 answers
28 views
I installed caddy with "sudo apt install caddy" and have everything setup and working, but I also want to run caddy automatically from boot. When I use
sudo systemctl enable caddy
and reboot, I get a 403 error from my website. To fix this I kill caddy and use
cd /home/user/Desktop/websida
then
sudo caddy run
, then it's fixed, no errors but I have to do this every time I boot, hence why I want it to run as a service but in another directory: /home/user/Desktop/websida
Asked by MR_MEME53 (1 rep)
Jul 1, 2025, 08:07 AM