CaddyServer 安装教程

CaddyServer 的安装非常简单,几行命令即可搞定。

Debian, Ubuntu, Raspbian 安装

$ sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
$ curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/cfg/gpg/gpg.155B6D79CA56EA34.key' | sudo apt-key add -
$ curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/cfg/setup/config.deb.txt?distro=debian&version=any-version' | sudo tee -a /etc/apt/sources.list.d/caddy-stable.list
$ sudo apt update
$ sudo apt install caddy

Fedora, RedHat, CentOS 安装

Fedora 或者 RHEL/CentOS 上打开终端,输入以下命令

$ dnf install 'dnf-command(copr)'
$ dnf copr enable @caddy/caddy
$ dnf install caddy

这样就安装好了,访问 IP 地址即可看到 Caddy 默认页面