Graft Tailscale onto your Raspberry Pi's SD card and join it to your tailnet automatically on its very first boot. More background and details in the blog post announcing this project.
This script is designed to be run after you've flashed Ubuntu onto an SD card but before you've booted it in a Raspberry Pi for the first time. It assumes you are using Linux or macOS and have python3
installed but otherwise has no external dependencies.
- Clone this repository or download the
tailgraft.py
script. - Once the operating system is flashed, run the script with
sudo python3 tailgraft.py
. - Answer the prompts to configure Tailscale on your Raspberry Pi. One of the prompts will request an auth key, which you can generate from your Tailscale admin console.
When your Rasbperry Pi boots up, you should see it in your Admin console's Machines page and you should be able to use to Tailscale SSH to connect to it.
tailscale ssh ubuntu@<hostname>
Depending on your ACL configuration, you may be prompted to authenticate with Tailscale.
More details about how this script uses cloud-init
can be found in the companion blog post.
Issues and pull requests welcome!