# 使用 Homebrew, apk, chocolatey, apt, dnf, MacPorts, Nix, pacman, zypper, scoop, winget 安装 caddy

查看 caddy 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:caddy
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install caddy
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install caddy
```

  证据: MacPorts ports tree: www/caddy/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add caddy
```

  证据: Alpine Linux edge package indexes: caddy from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install caddy
```

  证据: Debian stable package indexes: caddy from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install caddy
```

  证据: Fedora Rawhide package metadata: caddy from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#caddy
```

  证据: nixpkgs package indexes: pkgs/by-name/ca/caddy/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S caddy
```

  证据: Arch Linux sync databases: caddy from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install caddy
```

  证据: openSUSE Tumbleweed package metadata: caddy from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install caddy
```

  证据: Chocolatey community package catalog: caddy from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','bluej'

- Scoop (92%):

```sh
scoop install main/caddy
```

  证据: Scoop official bucket manifest trees: bucket/caddy.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id CaddyServer.Caddy -e
```

  证据: Windows Package Manager source index: CaddyServer.Caddy from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:caddy
- **软件包管理器:** Homebrew
- **版本:** 2.11.4
- **来源摘要:** Powerful, enterprise-ready, open source web server with automatic HTTPS
- **主页:** <https://caddyserver.com/>
- **仓库:** <https://github.com/caddyserver/caddy>
- **最后更新:** 2026-06-03T09:52:05Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- caddy (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.11.4
## 项目历史与用法

Caddy is a Go web server and reverse proxy best known for making automatic HTTPS the default behavior. Its modern identity is a self-contained server platform with a JSON-native configuration model, a human-friendly Caddyfile adapter, an admin API, and a module system.

### 项目历史

Caddy's README says Matthew Holt began the project in 2014 while studying computer science at Brigham Young University. The project name reflects its role as a helper that carries the mundane work of serving the Web and keeps multiple concerns organized in one place.

The project differentiated itself by turning HTTPS from an operational chore into the default path. Caddy's feature list highlights automatic HTTPS with Let's Encrypt and ZeroSSL, managed local CAs for internal names, multi-issuer fallback, HTTP/1.1, HTTP/2, HTTP/3, and a plugin/module architecture. Caddy 2.0 was released as production-ready on May 4, 2020, after a redesign around a modular core, JSON config, API-driven reloads, and config adapters.

### 采用历史

Caddy moved from developer-friendly web server to widely packaged infrastructure component because it solved TLS automation at the binary level. The official README states it has served trillions of requests and managed millions of TLS certificates, and GitHub shows a large contributor and user community.

Its packaging footprint reflects that adoption: the Homebrew input records Caddy across Homebrew, Debian, Ubuntu, Fedora, Arch, Alpine, Nix, MacPorts, Chocolatey, Scoop, winget, and openSUSE.

### 使用方式

Caddy is commonly used as an HTTPS static file server, reverse proxy, TLS terminator, local development server, and programmable HTTP platform. Users can run it with a Caddyfile, feed JSON through the admin API, adapt other config formats, or build custom binaries with modules using xcaddy.

### 为什么软件包爱好者会关心

Caddy matters to package nerds because it is a rare web server whose default install changes operational behavior: a plain binary can obtain and renew certificates, manage local trust, expose an API, and replace common nginx-plus-certbot setups with less glue. It also stresses packaging choices around service files, low-port binding, data directories, custom module builds, and reproducible Go binaries.

### 时间线

- 2014: Matthew Holt begins developing Caddy.
- 2015: Caddy becomes known for automatic HTTPS by default.
- 2020-05-04: Caddy 2.0.0 is released as production-ready.
- 2020s: Caddy's module architecture, admin API, Caddyfile adapter, and automatic certificate management become its core packaged identity.
- 2026: GitHub README reports v2.11.x releases and continued active development.

### Related projects

- Caddy is closely related to CertMagic, Let's Encrypt, ZeroSSL, xcaddy, and the Caddy module ecosystem. It is often compared with nginx, Apache httpd, Traefik, HAProxy, and certbot-based TLS automation stacks.

### 来源

- <https://caddyserver.com/docs/>
- <https://caddyserver.com/docs/architecture>
- <https://github.com/caddyserver/caddy#readme>
- <https://github.com/caddyserver/caddy/releases/tag/v2.0.0>
- source_facts.package-manager


## 安全说明

formula declares a Homebrew service.

- **Geiger 风险:** orange / 中
- formula declares a Homebrew service


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Linux: /etc/caddy/Caddyfile
- Unix: Caddyfile

## Credential files

- Linux: ~/.local/share/caddy
- macOS: ~/Library/Application Support/Caddy
- Unix: $XDG_DATA_HOME/caddy
- Windows: %AppData%\Caddy
## 其他软件包管理器记录

- Debian apt - caddy - 2.6.2-12+b3: normalized package name match | Debian stable package indexes: caddy from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Fast, lightweight web server with automatic HTTPS | https://github.com/caddyserver/caddy
- Nix - caddy: normalized package name match | nixpkgs package indexes: pkgs/by-name/ca/caddy/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - caddy - 2.6.2-6: normalized package name match | Ubuntu 24.04 LTS package indexes: caddy from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Fast, lightweight web server with automatic HTTPS | https://github.com/caddyserver/caddy
- apk - caddy - 2.11.4-r1: normalized package name match | Alpine Linux edge package indexes: caddy from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fast, multi-platform web server with automatic HTTPS | https://caddyserver.com/
- apk - caddy-openrc - 2.11.4-r1: normalized package name match | Alpine Linux edge package indexes: caddy-openrc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fast, multi-platform web server with automatic HTTPS (OpenRC init scripts) | https://caddyserver.com/
- dnf - caddy - 2.11.4-4.fc45: normalized package name match | Fedora Rawhide package metadata: caddy from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Web server with automatic HTTPS | https://caddyserver.com
- pacman - caddy - 2.11.4-1: normalized package name match | Arch Linux sync databases: caddy from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Fast web server with automatic HTTPS | https://github.com/caddyserver/caddy
- zypper - caddy - 2.11.4-1.3: normalized package name match | openSUSE Tumbleweed package metadata: caddy from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Fast, multi-platform web server with automatic HTTPS | https://caddyserver.com/
- zypper - caddy-bash-completion - 2.11.4-1.3: normalized package name match | openSUSE Tumbleweed package metadata: caddy-bash-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Bash Completion for caddy | https://caddyserver.com/
- zypper - caddy-fish-completion - 2.11.4-1.3: normalized package name match | openSUSE Tumbleweed package metadata: caddy-fish-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Fish Completion for caddy | https://caddyserver.com/
- zypper - caddy-zsh-completion - 2.11.4-1.3: normalized package name match | openSUSE Tumbleweed package metadata: caddy-zsh-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | ZSH Completion for caddy | https://caddyserver.com/
- MacPorts - caddy: normalized package name match | MacPorts ports tree: www/caddy/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - caddy: normalized package name match | Chocolatey community package catalog: caddy from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','bluej'
- Scoop - main/caddy: normalized package name match | Scoop official bucket manifest trees: bucket/caddy.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - CaddyServer.Caddy: normalized package name match | Windows Package Manager source index: CaddyServer.Caddy from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/caddy.yml](https://github.com/mxcl/pkgdb/blob/main/combined/caddy.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
