How To Build Caddy From Source
Caddy is a fast, open-source and security-focused web server written in Go. Caddy includes modern features such as support for virtual hosts, minification of static files, and HTTP/2. Caddy is also the first web-server that can obtain and renew SSL/TLS certificates automatically using Let’s Encrypt.
- You need the latest version of Go installed on your Linode. Complete the steps in our guide on installing Go.
Install the latest version of
xcaddy, a command line tool that downloads and builds Caddy and its plugins for you easily.
Download and install
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/gpg.key' | sudo tee /etc/apt/trusted.gpg.d/caddy-xcaddy.asc curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-xcaddy.list sudo apt update sudo apt install xcaddy
- Create a folder named
caddyand go to the folder to install Caddy: mkdir ~/caddy cd ~/caddy
To build the latest version of Caddy without any plugins: xcaddy build
To install Caddy with plugins use the
--withoption. For example:
xcaddy build \ --with github.com/caddyserver/nginx-adapter \ --with email@example.com```
caddyexecutable from the
sudo mv caddy /usr/bin
To verify the installation of caddy type: caddy version An output similar to the following appears:
Caddy is now installed on your Linode. Read our guide on Installing and Configuring Caddy to learn more about Caddy.
You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.
This page was originally published on