This is my personal recipe to install Caddy & PHP 7.0 on a clean Debian 8 (Jessie) machine. I’m sharing this for people that want to quickly setup a Caddy server while remaining as much “vanilla” as possible. The script is tuned to my needs, so you’re more than welcome to modify it to yours
It also installs fail2ban, git and a few other small goodies that I consider pertinent adding. Check the source to know them
It also creates a “caddy” user. You can login by doing “su caddy”. Remote SSH doesn’t work unless you set a password (“passwd”). It also creates a systemd service and it’s set to start Caddy at boot. Awesome!
Example command for managing the service:
“service caddy stop”
Don’t forget to configure Caddyfile! It comes empty by default. Also, it installs plugins “git,ipfilter,realip,ratelimit”. You can easily change this by editing the script.
To upgrade Caddy:
curl https://getcaddy.com | bash -s yourplugins setcap cap_net_bind_service=+ep /usr/local/bin/caddy service caddy restart``` Couldn't be any easier :)