DEV Community

Cover image for Connect Your Home to the Cloud with Tailscale
Josh Kasuboski
Josh Kasuboski

Posted on • Edited on • Originally published at joshkasuboski.com

1 1

Connect Your Home to the Cloud with Tailscale

I set up a Raspberry Pi kubernetes cluster to be accessible from the internet without configuring a port-forward on my router.

Tailscale

Tailscale will create a private network using Wireguard. Wireguard isn't really that difficult to configure on its own, but you do have to manually generate and distribute keys. Tailscale will take care of that for you and they also have some fallbacks for difficult networks. It doesn't look like any of my nodes are using a fallback option based on the dashboard.

Setting up Tailscale is as easy as installing it and running tailscale up. Until recently, this required you to login interactively. Tailscale now supports pre-authenticated keys which means you can automate the setup.

Installing on Raspberry PIs

I made kasuboski/tailscale-install to automate the installation and start of Tailscale on Raspberry PIs. I plan to expand it to work on more varied platforms in the future.

It's a PyInfra deploy that basically just adds the package and runs tailscale up with a key sourced from the environment. I was able to add my Raspberry Pi cluster to the network in around 5 minutes, using this.

Really in one command pyinfra pi1,pi2,pi3 install.py

Exposing to the internet

My cluster ingress is now slightly different than described here. Traffic from Linode now goes directly to the Kubernetes nodes on the port exposed by the nginx-ingress controller. This just removes the extra hop that was initially an internal haproxy running on a different Raspberry Pi.

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

Heroku

This site is powered by Heroku

Heroku was created by developers, for developers. Get started today and find out why Heroku has been the platform of choice for brands like DEV for over a decade.

Sign Up

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay