-
-
Save HairAndBeardGuy/6a04f24fa2eca8b0ed0babe92c5c2ba7 to your computer and use it in GitHub Desktop.
Install Caddy Server on Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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://github.com/mholt/caddy/raw/master/dist/init/linux-systemd/caddy.service -o /etc/systemd/system/caddy.service | |
chown root:root /etc/systemd/system/caddy.service | |
chmod 744 /etc/systemd/system/caddy.service | |
systemctl daemon-reload | |
sudo systemctl enable caddy.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this, i've been looking for this script for a while!