Skip to main content

Caddy Setup

Caddyfile

If you don't have a domain name and configuring Caddy for an IP, you should know that SSL won't be supported so you will have to have config like below.

{
email your@email.address
}

http://production_host_ip {
respond /debug/* "Not Permitted" 403
reverse_proxy localhost:4000
}

If you have a domain name then Caddy can handle the SSL automatically but for that you need to change http://production_host_ip to my.example.domain.

Move the Caddyfile to Correct Location on Server

sudo mv ~/Caddyfile /etc/caddy/

Reload Caddy

sudo systemctl reload caddy

Domain Setup

Update DNS on your domain provider

Add given record: A my.domain.name 0.11.50.140

And then if you're using Caddy, change IP address in Caddyfile to Domain name (e.g. 0.11.50.140 to example.com).