Deploying Caddy Webserver is pretty easy and I’ve posted the instructions in my Media Server Series, specifically in the Plex post. Still, it makes sense to have some of the information used in those posts separated out into their own post. Just like my ssh post, I will start putting all of my Caddy information in here.
Installing Caddy on Ubuntu
At this point Caddy is downloaded and installed. There are a few things I included in the install, namely
http.prometheus. Feel free to drop
tls.dns.namecheap if you don’t use Namecheap.
http.notbots ensures that bots like Google and Yahoo don’t crawl your server.
http.prometheus will allow us to monitor the
http metrics of Caddy in the future.
Setting Caddy Up as a Service
Using Caddy as a Proxy
Let’s build the start of our
The configuration is pretty straightforward, but let’s walk through it, because we’ll be utilizing this configuration several times.
https://example.comis declaring the domain that we want Caddy to serve and also that we want it to be served over
gzipis a basic form of http compression to improve performance between your browser and Caddy
proxy / localhost:8080is where the magic happens. This tells Caddy that we want to forward requests from