Server - marco1475/linux-htpc GitHub Wiki

Caddy

  1. Install caddy from AUR.

  2. Set up a directory for your server:

     mkdir ~/server && cd !$
    
  3. Create a Caddyfile in your server's directory:

     babylon5.vojtko.com
     gzip
    
  4. Give caddy permission to bind to port 80 and 443:

     sudo setcap cap_net_bind_service=+ep /usr/bin/caddy
    
  5. Ensure that iptables (and your router) allow connections to ports 80 and 443 to pass through:

     -A TCP -p tcp -m tcp --dport 80 -j ACCEPT
     -A TCP -p tcp -m tcp --dport 443 -j ACCEPT
    
  6. Start caddy:

     caddy