
* docs: Getting Started -> Intro, new Getting Started Several other smaller improvements and clarifications. * Replace original Getting Started for now * Fix title Started in #263 - will handle new Introduction article another time
6.1 KiB
title |
---|
Install |
Install
This page describes various methods for installing Caddy on your system.
Official:
- Static binaries
- Debian, Ubuntu, Raspbian packages
- Fedora, RedHat, CentOS packages
- Arch Linux, Manjaro, Parabola packages
- Docker image
Community-maintained:
Static binaries
If installing onto a production system, we recommend using our official package for your distro if available below.
- Obtain a Caddy binary:
- from releases on GitHub (expand "Assets")
- from our download page
- by building from source (either with
go
orxcaddy
)
- Install Caddy as a system service. This is strongly recommended, especially for production servers.
Place the binary in one of your $PATH
(or %PATH%
on Windows) directories so you can run caddy
without typing the full path of the executable file. (Run echo $PATH
to see the list of directories that qualify.)
You can upgrade static binaries by replacing them with newer versions and restarting Caddy. The caddy upgrade
command can make this easy.
Debian, Ubuntu, Raspbian
Installing this package automatically starts and runs Caddy as a systemd service named caddy
. It also comes with an optional caddy-api
service which is not enabled by default, but should be used if you primarily configure Caddy via its API instead of config files.
Stable releases:
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
Testing releases (includes betas and release candidates):
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/testing/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-testing-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/testing/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-testing.list
sudo apt update
sudo apt install caddy
If you wish to use the packaged support files (systemd services, bash completion and default configuration) with a custom Caddy build, instructions can be found here.
Fedora, RedHat, CentOS
This package comes with both of Caddy's systemd service unit files, but does not enable them by default.
Fedora or RHEL/CentOS 8:
dnf install 'dnf-command(copr)'
dnf copr enable @caddy/caddy
dnf install caddy
RHEL/CentOS 7:
yum install yum-plugin-copr
yum copr enable @caddy/caddy
yum install caddy
Arch Linux, Manjaro, Parabola
This package comes with both of Caddy's systemd service unit files, but does not enable them by default.
pacman -Syu caddy
View Caddy in the Arch Linux repositories
Docker
docker pull caddy
Homebrew
Note: This is a community-maintained installation method.
brew install caddy
Webi
Note: This is a community-maintained installation method.
Linux and macOS:
curl -sS https://webi.sh/caddy | sh
Windows:
curl.exe https://webi.ms/caddy | powershell
You may need to adjust the Windows firewall rules to allow non-localhost incoming connections.
Chocolatey
Note: This is a community-maintained installation method.
choco install caddy
Ansible
Note: This is a community-maintained installation method.
ansible-galaxy install nvjacobo.caddy
View the Ansible role repository
Scoop
Note: This is a community-maintained installation method.
scoop install caddy
Termux
Note: This is a community-maintained installation method.
pkg install caddy