1. Caddy version (caddy version
):
2.0.0
2. How I run Caddy:
a. System environment:
Windows 10 WSL Ubuntu 18.04
b. Command:
caddy
c. Service/unit/compose file:
N/A
N/A
N/A
3. The problem I’m having:
I am trying to install Caddy, following the directions here: https://caddyserver.com/docs/install
When trying to run:
sudo systemctl daemon-reload
sudo systemctl enable caddy
sudo systemctl start caddy
I get an error message (listed below).
What I want help with is how to substitute the systemctl
command with service
. More details in section 5.
4. Error messages and/or full log output:
System has not been booted with systemd as init system (PID 1). Can’t operate.
5. What I already tried:
WSL does not support systemd. A possible solution is to upgrade my WSL to WSL2 (requiring me to sign up for Windows 10 Insider Preview Build, which I would like to avoid going to an unstable release for my main computer). With WSL2, this can be used: https://github.com/arkane-systems/genie.
If possible, what I would like to do is use service start
to substitute systemctl
.
I’ve seen examples online of this with docker, mongodb, postgresql, etc: https://github.com/MicrosoftDocs/WSL/issues/457
I’ve tried to replicate those examples with sudo service start caddy
in /usr/bin/caddy
with no luck. I get a start: unrecognized service
error. To fix this error, I tried doing chmod -R 770 caddy
and chgrp -R caddy caddy
. It did not resolve the error: https://stackoverflow.com/questions/56985500/mysql-unrecognized-service