Full-service installer for the Caddy web server, including systemd.
Go to file
AJ ONeal 13ffcee315 move to own project 2017-04-20 18:04:57 -06:00
Library/LaunchDaemons move to own project 2017-04-20 18:04:57 -06:00
etc move to own project 2017-04-20 18:04:57 -06:00
README.md move to own project 2017-04-20 18:04:57 -06:00
install-caddy move to own project 2017-04-20 18:04:57 -06:00

README.md

Caddy Installer

Works on

  • Ubuntu Linux
  • macOS Sierra
  • probably lots of others

Supports

  • systemd (Ubuntu, Fedora, Arch, etc)
  • launchd (OS X, macOS, Darwin)

Install

Yes... you install the installer

curl -L https://git.daplie.com/Daplie/daplie-snippets/raw/master/caddy-installer/install-caddy -o install-caddy
sudo mv install-caddy /usr/local/bin/install-caddy
sudo chmod a+x /usr/local/bin/install-caddy

Usage

install-caddy --help

Usage: install-caddy [plugin1,plugin2,...]

Optional arguments (defaults shown)
  --os darwin      # any of windows darwin linux freebsd openbsd
  --arch amd64     # any of arm64 amd64 386 armv5 armv6l armv7l

Features:
DNS,awslambda,cors,expires,filemanager,filter,git,hugo,ipfilter,jsonp,jwt,locale,mailout,minify,multipass,prometheus,ratelimit,realip,search,upload,cloudflare,digitalocean,dnsimple,dyn,gandi,googlecloud,linode,namecheap,ovh,rfc2136,route53,vultr

Caveats

all platforms

go (in which caddy is written) doesn't support privilege deescalation (running on root to bind to port 80 and 443 and then switching to a non-root user).

This isn't usually a problem, however, because the launchers (systemd et al) usually do.

darwin / macOS / OS X

  • launchd doesn't support privilege deescalation
  • authbind doesn't work on recent versions of OS X

However, you can use ipfw to locally port-forward.

Also, launchd is a pain to configure. There's not much in the way of official documuntation... but there is some great unofficial documentation and LaunchControl (direct download) makes it actually quite easy. (ignore that the site looks like a 90s spam site - much like MakeMKV - it's actually legit)