Last active
June 23, 2024 12:38
-
-
Save abhishek77in/7eac0dd2b2fb6a6d57113828a1ab27cb to your computer and use it in GitHub Desktop.
Script to install caddy on ubuntu 22.04 aws ec2
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
#!/bin/bash | |
sudo apt update | |
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https | |
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg | |
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list | |
sudo apt update | |
sudo apt install caddy | |
caddy version | |
sudo systemctl status caddy | |
sudo systemctl enable caddy | |
sudo systemctl restart caddy | |
sudo systemctl reload caddy | |
sudo ufw allow proto tcp from any to any port 80,443 | |
sudo ufw status | |
sudo ufw enable | |
sudo ufw app list | |
sudo ufw allow OpenSSH | |
sudo ufw allow ssh | |
sudo ufw allow 22 | |
sudo ufw show added | |
sudo timedatectl set-timezone Asia/Calcutta |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment