Replies: 1 comment
-
Ports below 1024 are privileged and require permissions. A few options:
1. Use root (for example with sudo).
2. Add the cap_net_bind_service capability.
3. Use ports higher than 1024.
For 2 I think something like this should work:
sudo setcap 'cap_net_bind_service=+ep' $(which caddy)
I haven't tested it myself though; I pulled that from line from the v1
Caddy docs: https://github.com/caddyserver/caddy/blob/v1/dist/init/linux-systemd/README.md#instructions
A better method may be to use a systemd service with the capability set.
See https://github.com/caddyserver/dist/blob/master/init/caddy.service
If you go the service route here's more info on that:
https://caddyserver.com/docs/install#linux-service
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I've been following the installation guide and have been struggling to run Caddy on my VM instance.
I've configured a VM through Google Compute and have purchased a domain from Google Domains and added an A record. Confirmed that I've registered my A record correctly with a curl request:
I've also created a Caddyfile:
The issue that I've been having is running Caddy, specifically in granting permissions to listen to port 443. Example output below:
Any tips would be super welcome, and thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions