veraldar
start
theme

veraldar / start / your trunk

Your own trunk

A small server you rent, at a provider and in a country you choose. Your phone and your computers all reach it. Your computers dial out to it, so nothing at home opens a port.

What you need

Install it

ON THE SERVER
curl -fsSLO https://github.com/veraldar/yggdrasil/releases/download/v0.9.1/trunk.sh
sudo bash trunk.sh --name trunk.example.org

It checks the server first, then downloads the trunk and checks it: the signature, then the checksum. It makes the server's key and gets a certificate that renews by itself. It turns the firewall on with only ssh, 443 and 80 open (if other services listen there, it says which and leaves the firewall as it is), turns on Debian's automatic security updates, and checks once a week for a newer signed release.

It ends with one connect line, wss://trunk.example.org/ap#pin=…,token=…. It is shown once. Paste it at home when install.sh asks (step 2), never in a command: the token in it is a secret. The server keeps only a fingerprint of it.

Lost the line? sudo bash trunk.sh --rotate-token prints a new one, and the old one stops working.

Good to know

Check the release yourself, before running anything
curl -fsSLO https://github.com/veraldar/yggdrasil/releases/download/v0.9.1/trunk.sh
curl -fsSLO https://github.com/veraldar/yggdrasil/releases/download/v0.9.1/SHA256SUMS
curl -fsSLO https://github.com/veraldar/yggdrasil/releases/download/v0.9.1/SHA256SUMS.sig
echo 'release@yggdrasil namespaces="yggdrasil-release" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJyKwTSmRf3Cy1cHpzKHl3teRvCQtgK8/dcFRvlNCDJg' >allowed_signers
ssh-keygen -Y verify -f allowed_signers -I release@yggdrasil -n yggdrasil-release -s SHA256SUMS.sig <SHA256SUMS
sha256sum --ignore-missing -c SHA256SUMS

It needs ssh-keygen, which every server you reach by ssh has. The same key is written into every script, which never fetches the key it checks with.

← startyour home computer →