• 2 Posts
  • 6 Comments
Joined 1 year ago
cake
Cake day: June 16th, 2023

help-circle




  • Motorcycling. You’re old enough to not do the stupid shit that gets young riders killed.

    Take the MSF’s beginner course (or your country’s equivalent), spend more on your helmet, jacket and gloves than you do your first bike, and have fun. Spend as much on your helmet as you think your brain is worth.

    Remember, you’ll drop your bike, so start with a cheap used one. After a year (or less) with it you’ll have a better idea of what kind of riding you like, and that will inform your choice of second bike.

    You’ll drop that one too, by the way. Don’t sweat it. Maybe buy spare brake and clutch levers.

    Find a local moto community. Maybe get an intro to the Denizens of Doom. Heck, even a Facebook group can do the trick. You’ll meet new people and make new friends, while learning from people who’ve been riding for decades.

    If you survive your first year (you will), you’ll also have become a far better car driver. Riding without a safety cage around you does wonders for situational awareness and risk awareness.

    Last note: the car drivers are trying to kill you. They may not realize this, but you should. You’re invisible to them. Ride with a healthy dose of paranoia. But smile. You’re having fun.


  • Follow-up: I have Caddy working!

    Here’s my baseline before starting:

    • Services running on my NAS already configured
    • Domain names & DNS already hosted at Porkbun
    • Dynamic DNS in place using https://hub.docker.com/r/qmcgaw/ddns-updater
    • DNS includes wildcard support, so I can easily use anything.mydomain.net

    After briefly trying out a couple of somewhat ingrated Caddy projects others have done, I decided they were too specific to their set-ups and did not make my life easier. I tossed them out and went simple. I wanted something super easy to understand, and thus easy to troubleshoot.

    First I set it up in Docker. I created a really, really simple docker compose file:

    version: "3.7"
    
    services:
      caddy:
        image: caddy:alpine
        restart: unless-stopped
        ports:
          - "1080:80"       # Because Synology DSM reserves 80 for itself
          - "10443:443"     # Because Synology DSM reserves 443 for itself
          - "10443:443/udp" # Because Synology DSM reserves 443 for itself
        volumes:
          # next four lines are default
          # - $PWD/Caddyfile:/etc/caddy/Caddyfile
          # - $PWD/site:/srv
          # - caddy_data:/data
          # - caddy_config:/config
          - /var/docker/caddy/config/Caddyfile:/etc/caddy/Caddyfile
          - /var/web:/srv # serve this by default?
          - /var/docker/caddy/data:/data
          - /var/docker/caddy/config:/config
    
    volumes:
      data:
        external: true
      config:
        external: true
    
    

    (If the machine you are running Caddy on doesn’t reserve ports 80 and 443 for itself like Synology DSM does, you don’t need the ridiculous high ports I mapped. Just do 80:80 and 443:443.)

    Then I created a simple Caddyfile.

    web.fakeme.net, www.fakeme.net {
    	# This connects to the default Synology web service
    	reverse_proxy 192.168.2.15:80
    }
    
    

    This tells Caddy: When you get a request for web or www, send it to the machine at 192.168.2.15 using port 80.

    Then I added to it, one service at a time to make sure things worked at each step

    paperless.fakeme.net {
    	reverse_proxy 192.168.2.15:8008
    }
    
    whoami.fakeme.net {
    	reverse_proxy 192.168.2.15:8009
    }
    
    comics.fakeme.net {
    	reverse_proxy 192.168.2.15:8010
    }
    
    plex.fakeme.net {
    	reverse_proxy 192.168.2.15:32400
    }
    
    speedtest.fakeme.net {
    	reverse_proxy 192.168.2.15:8011
    }
    
    

    You’ll note I am doing nothing fancy here – no hostnames, no dynamic Docker container checks, none of that crap. It’s brittle but it is dead simple.

    Now that I have something simple working, I can get fancier if I feel like it.