BSD Ports

www/caddy 2.11.7_2 FreeBSD

Fast, highly configurable HTTP/1-2-3 web server with automatic TLS

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
Last update
Commit
d81b7ba3c3
License
APACHE20
Categories
www
Package size
13443.2 KiB, 51702.9 KiB installed

Description

Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go.

Features:

  • Easy configuration with the Caddyfile
  • Powerful configuration with JSON config
  • Dynamic configuration with a JSON API
  • Config adapters if you don't like JSON
  • Automatic HTTPS by default
    • ACME (Let's Encrypt) for public sites
    • Fully-managed local CA for internal names and IPs
    • Can coordinate with other Caddy instances in a cluster
  • HTTP/1.1, HTTP/2, and HTTP/3 support
  • Actually fun to use

In the other systems

SystemPortVersion
FreeBSDwww/caddy2.11.7_2
OpenBSDwww/caddy2.11.7
NetBSDwww/caddy2.11.3nb6
DragonFlywww/caddy2.9.1_1
MidnightBSDwww/caddy2.10.0

Install

Binary package:

pkg install caddy

From the ports tree:

cd /usr/ports/www/caddy/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	caddy>0:www/caddy

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest2.11.7_12.11.7_1-2.10.22.11.7_1
FreeBSD:14:quarterly2.11.4_52.11.4_5n/a2.10.0_22.11.4_5
FreeBSD:15:latest2.11.7_12.11.7_1n/a-2.10.2
FreeBSD:15:quarterly2.11.4_52.11.4_5n/an/an/a
FreeBSD:16:latest2.11.62.11.7_1n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

The Makefile names none itself; they come from USES and USE_*.

The full lists below include those, and their dependencies in turn.

Build dependencies 1

No port depends on this one.

Configuration

No options to configure.

USES
cpe go:modules
Service scripts
caddy
Conflicts with
caddy-custom

Message after installing

To enable caddy:

- Edit /usr/local/etc/caddy/Caddyfile
  See https://caddyserver.com/docs/
- Run 'service caddy enable'

Note while Caddy currently defaults to running as root:wheel, it is strongly
recommended to run the server as an unprivileged user, such as www:www --

- Use security/portacl-rc to enable privileged port binding:

  # pkg install security/portacl-rc
  # sysrc portacl_users+=www
  # sysrc portacl_user_www_tcp="http https"
  # sysrc portacl_user_www_udp="https"
  # service portacl enable
  # service portacl start

- Configure caddy to run as www:www

  # sysrc caddy_user=www caddy_group=www

- Note if Caddy has been started as root previously, files in
  /var/log/caddy, /var/db/caddy, and /var/run/caddy may require their ownership
  changing manually.

/usr/local/etc/rc.d/caddy has the following defaults:

- Server log: /var/log/caddy/caddy.log
  (runtime messages, NOT an access.log)
- Automatic SSL certificate storage: /var/db/caddy/data/caddy/
- Administration endpoint: //unix/var/run/caddy/caddy.sock
- Runs as root:wheel (this will change to www:www in the future)

The default locations for caddy runtime files have changed!

- Caddy's runtime log is now /var/log/caddy/caddy.log
  (was /var/log/caddy.log)

- Automatic SSL certs are now stored in /var/db/caddy/data/caddy
  (was /root/.local/share/caddy)

- Configuration autosaves are now stored in /var/db/caddy/config/caddy
  (was /root/.config/caddy)

You can change these defaults. See /usr/local/etc/rc.d/caddy

The default Caddy administration endpoint location has been changed from
localhost:2019 to a protected Unix domain socket located in
/var/run/caddy/caddy.sock

This can be overridden with the `caddy_admin` rc variable, or by specifiying
an alternative in the Caddyfile `admin` section, documented here:

  https://caddyserver.com/docs/caddyfile/options#admin

The previous default, particularly paired with the server running as root,
may have serious security implications for shared machines with untrusted
users.

It is STRONGLY RECOMMENDED to run Caddy as an unprivileged user, such as
www:www, rather than the current default of root:wheel.

If you have relied upon earlier defaults:

- Use security/portacl-rc to enable privileged port binding:

  # pkg install security/portacl-rc
  # sysrc portacl_users+=www
  # sysrc portacl_user_www_tcp="http https"
  # sysrc portacl_user_www_udp="https"
  # service portacl enable
  # service portacl start

- Stop the server, and update ownership on Caddy runtime files:

  # service caddy stop
  # chown -R www:www /var/db/caddy /var/log/caddy /var/run/caddy

Other changes may be necessary depending on your exact Caddy
configuration.

- Change the default runtime user, and restart the server:

  # sysrc caddy_user=www caddy_group=www
  # service caddy start

Files

distinfo 2
FileSizeSHA256
go/www_caddy/caddy-v2.11.7/v2.11.7.mod838562fdd786b2f9ced74c818132ebaeba320e25528ed316202902918afa73473b72
go/www_caddy/caddy-v2.11.7/v2.11.7.zip1.582297e+06c5b3a3304999625d751b2d2284cb037b9530bf563d1a62b720a7aa6765b0a5d9

Commit history 9

DateCommitCreditsLog message
d81b7ba3c3 Dag-Erling Smørgrav various: Bump Go ports for Go 1.26.10 / 1.27.3
031fc6bfbf Dag-Erling Smørgrav various: Bump Go ports
98c15b171c Adam Weinberger www/caddy: Update to 2.11.7
This is a bugfix release, and anyone who installed yesterday's 2.11.6 update should upgrade. Changes: https://github.com/caddyserver/caddy/releases/tag/v2.11.7
ed65a90555 Adam Weinberger www/caddy: Update to 2.11.6
Changes: https://github.com/caddyserver/caddy/releases/tag/v2.11.6 There are some breaking changes in this release, so you should read that list. They are primarily security-tightening changes and should be invisible to most users. If you were relying on uploading files in headers rather than the body, you'll want to make some changes.
dd0905142a Adam Weinberger many: Bump go ports for 1.26.8 and 1.27.1

The latest 5 of 9 in the history this site was built from.