• 2 Posts
  • 3 Comments
Joined 2 years ago
cake
Cake day: December 12th, 2023

help-circle
  • podman ps shows the following:

    CONTAINER ID  IMAGE                                 COMMAND               CREATED         STATUS         PORTS                                                         NAMES
    daae60bdcc65  docker.io/library/caddy-caddy:latest  caddy run --confi...  47 minutes ago  Up 47 minutes  0.0.0.0:80->80/tcp, 0.0.0.0:5050->443/tcp, 2019/tcp, 443/udp  caddy
    

    netstat -tunpl shows the following:

    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
    tcp        0      0 0.0.0.0:5025            0.0.0.0:*               LISTEN      3270/sshd: /usr/sbi 
    tcp        0      0 0.0.0.0:5050            0.0.0.0:*               LISTEN      7342/conmon         
    tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      7342/conmon         
    tcp        0      0 10.89.0.1:53            0.0.0.0:*               LISTEN      7336/aardvark-dns   
    tcp6       0      0 :::5025                 :::*                    LISTEN      3270/sshd: /usr/sbi 
    udp        0      0 10.89.0.1:53            0.0.0.0:*                           7336/aardvark-dns 
    

    The only difference for the netstat command between Docker and Podman is that Podman show’s entries for aardvark-dns and Docker does not which is something I expect.



  • I finally got Caddy’s TLS working with a custom module to handle DNS challenges. Turns out all I had to do was wait 10-15 minutes and everything would sort itself out.

    Now on to the next puzzle. I started with Caddy in a Docker container and it’s working as intended. Now I want to replicate that in Rootful Podman Compose but I’m running into an issue. With the exact same setup (docker-compose.yml, Dockerfile and Caddyfile) I can get my TLS cert without issue but I can’t seem to connect to my website from any external browser. Not through my domain name or even through my home’s local network.

    Once I figure out how I can access my website, I’ll be one step closer to where I want to be. Next will be to get Rootless Podman working, then I can finally set up the file server and kiwix instance instead of the test page I am currently using.

    After that, I can finally spend time doing what I want to do and focus my time looking into the Gemeni Protocol.

    Down the road I’ll look into hosting an IRC server and Snikket instant messenger but that’s super low priority. I like tinkering with my Raspberry Pi and my constant backup/restores wouldn’t be good for reliability for such services.


  • I sat down and managed to get wildcard certs working.

    I figured I would leave my Caddyfile here in case anyone in the future needs a working reference. This is based off the Caddyfile mentioned in the original post.

    Caddy Reference

    Caddyfile
    # GLOBAL ENCRYPTION - DESEC.IO
    {
            acme_dns desec {
                    token "DeSEC.io Token Number"
            }
    }
    
    *.samplesite.ca {
            # SITE WIDE ENCRYPTION
            tls {
                    dns desec {
                            token "DeSEC.io Token Number"
                    }
            }
            # SUB DOMAIN #1
            @files host files.samplesite.ca
            handle @files {
                    root * /srv
                    file_server {
                            hide misc
                            browse
                    }
            }
            # FALLBACK FOR UNHANDLED DOMAINS
            handle {
                    abort
            }
    }