Lurker News
DHH's "AI shed" idea got me thinking about getting a small $5–10/month VPS.

I'm a Linux guy and have on many points of my life have a personal server. So I like the idea of having something always on, but I’m not sure the maintenance is worth it when most things can just run on my laptop.
That said, I tend to do things myself and only later realize I could have automated or delegated them, so I may have a blind spot here.
If you have a cheap VPS or mini PC, what actually ended up being useful long-term? Anything that saved enough time or replaced enough subscriptions to justify keeping it around?

Comments (675) 300 threads

Show all comments

Showing thread 4 of 300

ahf8Aithaex7Nai1 reply#
I use Yggdrasil [0] to connect my computers. This ensures they are always connected within a flat, private IPv6 namespace. However, two computers cannot find each other if they are both behind NAT on different networks. At least one of them must be reachable by the other via TCP. That’s why I use the cheapest VPS I could find as a globally accessible Yggdrasil hub. I’ve been running it this way for many years now, and it works flawlessly. I can even assign names for the IPv6 addresses using regular DNS, which makes things very convenient.

I also run a few personal web services: Immich, Gitea, Bookstack, Jellyfin, and more. That cheap VPS couldn't handle it. I run the services on a computer in my home office. Caddy runs on the VPS with one proxy line per service. Data is, of course, exchanged via Yggdrasil. The domains for the various services all map to the VPS’s IP addresses. Caddy then handles the routing correctly. The system works simply. I can even run storage-intensive services like Jellyfin, and it only costs me a few euros for the VPS.
[0] https://yggdrasil-network.github.io/

tommica1 reply#
Can you tell how you configured the tool to accomplish this? It sounds very convenient!

Does it mean that the VPS has to be in-between all the traffic, or do we punch holes through the NAT for direct connections?

ahf8Aithaex7Nai2 replies#
> Can you tell how you configured the tool to accomplish this?

The Yggdrasil client is installed on every computer. I'm running Debian. I have no idea how well it works on Mac or Windows. Yggdrasil assigns a key pair to each computer.
On the VPS, the config is modified in two places:

    Listen: [
      tcp://[::]:51350
    ]
This makes the VPS listen for Yggdrasil connections.

    AllowedPublicKeys: [
      pubkey1
      pubkey2
      pubkey3
      ...
    ]
This ensures that it only accepts connections from the specified computers. You can also leave that part out. But then any Yggdrasil client out there could connect to your VPS.

Note that this is only the config for the VPS.
I only make one change to the config of the other computers:

    Peers: [
      tcp://hub.mydomain.tld:51350
    ]
This causes them to actively connect to the VPS.

> Does it mean that the VPS has to be in-between all the traffic, or do we punch holes through the NAT for direct connections?
It depends. If the computers can reach each other on a local network, the Yggdrasil clients will automatically find each other and connect. To do this, you wouldn't have had to change anything in the default configuration. you would simply have had to install and start the Yggdrasil client on the computers.
With NAT in between, they wouldn’t connect on their own. But since they’re configured to actively connect to the hub in any case, they can still see each other via the hub and exchange data even in this scenario. Yggdrasil handles routing and NAT traversal. If both paths are available (locally or via the VPS), Yggdrasil defaults to the local path. But in the general case (where all other computers are behind NAT), all traffic would go through the VPS.
Special case: If only one of the two computers is behind NAT and you want a direct connection, then the accessible computer corresponds to the VPS in the configuration above.

reacharavindh2 replies#
This is the first time I am hearing of yggdrasil. I currently have a similar setup using Tailscale. I always thought Wireguard was teh primitive here and Tailscale just made it more convenient in the pointy clicky way. Why Yggdrasil instead of Wireguard which at the outset sounds more standard solution for this need?

Continue this thread — 2 replies

tommica#
Neat, thanks for sharing! Seems very convenient!