Skip to content

Instantly share code, notes, and snippets.

@werty1st
Forked from HairAndBeardGuy/caddy-upstart-install.sh
Created November 20, 2018 17:50
Show Gist options
  • Save werty1st/fa50b78e3dbb9065b7f4fc37a5c26237 to your computer and use it in GitHub Desktop.
Save werty1st/fa50b78e3dbb9065b7f4fc37a5c26237 to your computer and use it in GitHub Desktop.
Install Caddy Server on Ubuntu 14.04 with Upstart
apt install curl
curl https://getcaddy.com | bash -s cors,expires,filemanager,git,hugo,ipfilter,jsonp,jwt,locale,mailout,minify,multipass,prometheus,ratelimit,realip,search,upload
chown root:root /usr/local/bin/caddy
chmod 755 /usr/local/bin/caddy
setcap 'cap_net_bind_service=+ep' /usr/local/bin/caddy
mkdir /etc/caddy
chown -R root:www-data /etc/caddy
mkdir /etc/ssl/caddy
chown -R www-data:root /etc/ssl/caddy
chmod 0770 /etc/ssl/caddy
touch /etc/caddy/Caddyfile
mkdir /var/www
chown www-data:www-data /var/www
chmod 555 /var/www
curl -L https://raw.githubusercontent.com/mholt/caddy/master/dist/init/linux-upstart/caddy.conf -o /etc/init/caddy.conf
chown root:root /etc/init/caddy.conf
chmod 744 /etc/init/caddy.conf
sudo service caddy start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment