-
Notifications
You must be signed in to change notification settings - Fork 10
Setup Production with Caddy
RijulTP edited this page Sep 7, 2026
·
5 revisions
curl -fsSL https://raw.githubusercontent.com/HexmosTech/LiveReview/master/lrops.sh | sudo bash -s -- setup-production
These information can also be viewed via the lrops.sh help caddy command
curl -s ifconfig.me
# OR: curl -s ipinfo.io/ip
dig yourdomain.com
nslookup yourdomain.com
- Visit: https://www.whatsmydns.net/
- Enter your domain name
- Select "A" record type
- Confirm ALL locations show your server's IP
- Visit: https://dnschecker.org/
- Enter your domain and verify worldwide propagation
# Use different DNS servers to check consistency
dig @8.8.8.8 yourdomain.com # Google DNS
dig @1.1.1.1 yourdomain.com # Cloudflare DNS
dig @208.67.222.222 yourdomain.com # OpenDNS
- Don't proceed if DNS shows different IPs in different locations
- Wait for full global propagation (can take up to 48 hours)
- Ensure you're checking the RIGHT domain (not www. vs non-www)
- Verify both A record AND any CNAME records point correctly
# From another machine/location, test:
telnet yourdomain.com 80
telnet yourdomain.com 443
sudo ufw status
# Ensure ports 80 and 443 are allowed
- Verify inbound rules allow TCP ports 80 and 443 from 0.0.0.0/0
- Visit: https://www.yougetsignal.com/tools/open-ports/
- Enter your domain and test ports 80, 443
sudo ss -tlnp | grep ':80\|:443'
sudo netstat -tlnp | grep ':80\|:443'
- Stop them temporarily, OR
- Configure them as the reverse proxy (recommended)
- Domain resolves to correct IP globally (whatsmydns.net shows green)
- Ports 80 and 443 are open from internet (telnet/port checker works)
- No services currently using ports 80/443 (ss/netstat shows clear)
- LiveReview is running and accessible on ports 8888/8081 locally
curl http://localhost:8888/health # Should return OK
curl http://localhost:8081/ # Should return HTML
- Without proper DNS pointing to your server, SSL certificates cannot be obtained.
- Let's Encrypt and other CAs verify domain ownership by checking that your domain resolves to the requesting server.
- If DNS propagation is incomplete, wait - don't proceed
- If different regions show different IPs, contact your DNS provider
- If using Cloudflare, ensure proxy is disabled (gray cloud) for SSL setup
- Check TTL settings - lower TTL (300-900 seconds) speeds up changes
Run the following commands to get Caddy installed
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
sudo systemctl status caddy
sudo cp ~/livereview/config/caddy.conf.example /etc/caddy/Caddyfile
sudo sed -i 's/your-domain.com/your-actual-domain.org/g' /etc/caddy/Caddyfile
If your domain is livereview.google.com, then you have to replace your-actual-domain with your domain
So the command becomes
sudo sed -i 's/your-domain.com/livereview.google.com/g' /etc/caddy/Caddyfile
Run these commands
sudo systemctl enable caddy
sudo systemctl reload caddy
sudo systemctl status caddy
sudo journalctl -u caddy -f
curl https://yourdomain.com/