Deployment guide

Yggdrasil

Overview

This guide covers the deployment and configuration of Yggdrasil on Ubuntu 24.04 on Azure using SecureAnyCloud Azure Marketplace images. Yggdrasil is an early-stage implementation of a fully end-to-end encrypted IPv6 mesh network. It is decentralised and self-arranging. Every node derives a permanent, cryptographic IPv6 address in the 0200::/7 range from its own key. Nodes automatically build a spanning tree between their peers, so any node can reach any other over the encrypted overlay without a central server and without an address plan.

The result is a flat private IPv6 network that follows your machines across NAT, changing IP addresses and different clouds. Services keep the same address wherever they run.

The image installs Yggdrasil 0.5.14 as a single static Go binary (yggdrasil plus the yggdrasilctl admin CLI). It runs under systemd as the yggdrasil.service overlay node. You administer the node with yggdrasilctl over a local Unix domain socket, so the management interface is never exposed to the network. The peering transport listens on port 9001 over TCP with TLS. It is the only network-facing surface the image opens besides SSH. There is no web interface and no database. The flat /etc/yggdrasil/yggdrasil.conf file is the whole node state.

Secure by default, with no known key. A node's key is its identity on the network. A shared or baked-in key would let anyone impersonate your node and would give every instance the same address. This image avoids that. On the first boot of every VM, a one-shot service generates a unique node key for this VM alone and writes the configuration with strict permissions. It derives this node's overlay IPv6 address, subnet and public key, records them in a root-only file, and only then starts the node. The admin socket is a local Unix socket, so it can never be reached from the network.

What you get:

  • Yggdrasil 0.5.14, installed from the official pinned, checksum-verified release and run under systemd as yggdrasil.service.
  • A self-arranging, end-to-end encrypted IPv6 overlay with a stable cryptographic address per node in the 0200::/7 range.
  • The peering transport on 0.0.0.0:9001 (TCP, TLS). It is the only network-facing port besides SSH.
  • A local Unix admin socket (/var/run/yggdrasil/yggdrasil.sock) that yggdrasilctl uses. It is never reachable from the network.
  • A unique per-instance node key generated on first boot. This node's overlay address, subnet and public key are written to /root/yggdrasil-credentials.txt (root only).

Prerequisites

Before you deploy this image, make sure you have:

  • An active Azure subscription, an SSH public key, and a VNet and subnet in the target region.
  • A subscription to the Yggdrasil listing on Azure Marketplace.
  • Network Security Group rules that allow TCP 22 (admin) and TCP 9001 (the peering transport) from the peers that will connect to this node.

Recommended virtual machine size: Standard_B2s (2 vCPU, 4 GB RAM) is ample for an overlay node or a small to medium network. Yggdrasil is a lightweight Go daemon. You only need larger sizes for very high-throughput routing.

1

Deploy from the Azure Portal

Search for Yggdrasil in the Marketplace, select the SecureAnyCloud publisher and choose Create. Configure the Network Security Group to allow TCP 9001 from the peers that will connect to this node, and TCP 22 for administration.

2

Deploy from the Azure CLI

RG="overlay-prod"; LOCATION="eastus"; VM_NAME="yggdrasil1" IMAGE_URN="sac1647283583153:yggdrasil-ubuntu-24-04:default:latest" SSH_KEY="$(cat ~/.ssh/id_rsa.pub)" az group create --name "$RG" --location "$LOCATION"
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:yggdrasil-ubuntu-24-04:default:latest
az vm create \
  --resource-group "$RG" --name "$VM_NAME" \
  --image "$IMAGE_URN" \
  --size Standard_B2s \
  --admin-username azureuser \
  --ssh-key-values "$SSH_KEY" \
  --public-ip-sku Standard
az vm open-port --resource-group "$RG" --name "$VM_NAME" --port 9001 --priority 1001
az vm open-port --resource-group "$RG" --name "$VM_NAME" --port 22 --priority 1002
3

First boot: retrieve your node identity

On first boot, the image generates a unique node key for this VM and renders /etc/yggdrasil/yggdrasil.conf with a peering listener and the local admin socket. It derives this node's overlay IPv6 address, subnet and public key from the key, and resolves this VM's address for the peer endpoint. It then writes the root-only credentials file and starts yggdrasil. This completes within seconds. SSH in as azureuser and read your node identity:

sudo cat /root/yggdrasil-credentials.txt

The file records this node's ipv6_address (its address inside the overlay), its ipv6_subnet (a /64 you can route to other machines), its public_key, and a peer_endpoint that your other machines connect to. The public_key and ipv6_address are safe to share, because they identify your node to peers. The node's private key stays in /etc/yggdrasil/yggdrasil.conf (root only) and is never shown.

If your VM sits behind a Standard SKU public IP that the platform metadata does not expose, the recorded peer_endpoint may show the VM's private address. In that case, substitute your VM's public IP when you peer to it from outside Azure.

4

Confirm the node is running

Confirm that yggdrasil.service is active and that yggdrasil -version reports 0.5.14. Then check that yggdrasilctl getSelf shows this node's overlay IPv6 address (in the 0200::/7 range), its subnet and its public key. All three are derived from the node's own key.

systemctl is-active yggdrasil.service yggdrasil -version sudo yggdrasilctl getSelf

Expected output resembles:

yggdrasil.service: active Build version: 0.5.14 IPv6 address: 202:2049:f8df:d093:85d7:be11:c005:fb3c IPv6 subnet: 302:2049:f8df:d093::/64 Public key: 3bf6c0e405ed8f45083dc7ff4098749b48225a96c7986071ef93e3ecf993b0d2
5

Inspect the overlay interface

Yggdrasil brings up a TUN interface (tun0) and assigns this node's overlay IPv6 address to it. The interface is up the moment the service starts, and the node answers on its own overlay address. To inspect it, run:

ip -6 addr show tun0
ADDR=$(sudo yggdrasilctl -json getSelf | python3 -c 'import sys,json;print(json.load(sys.stdin)["address"])') ping -6 -c 3 "$ADDR"

tun0 shows the node's 0200::/7 address with a state UNKNOWN line and the UP flag. This is normal for a point-to-point TUN device. Any other machine you peer into the overlay reaches this node on this same address.

6

Confirm the network surface and the local admin socket

The only network-facing surface besides SSH is the peering transport on :9001/tcp. The admin API that yggdrasilctl uses is a local Unix socket, never a TCP port, so it can never be reached from the network. The peer table is empty until you peer another machine in.

sudo ss -tlnH | grep 9001 ls -l /var/run/yggdrasil/yggdrasil.sock
sudo yggdrasilctl getPeers
7

Peer another machine into the overlay

To grow the overlay, install the free Yggdrasil client on another machine (or launch another of these images). Add this node's peer endpoint to that machine's Peers list. Read this node's peer_endpoint from /root/yggdrasil-credentials.txt (Step 3). It looks like tls://<public-ip>:9001.

On the other machine, edit its /etc/yggdrasil/yggdrasil.conf and add the endpoint to Peers. This is a configuration snippet for the other machine, not a command to run here:

Peers: [ tls://<peer-public-ip>:9001 ]

Then restart Yggdrasil on that machine. Once the link forms, each node can reach the other over its overlay IPv6 address. For example, run ping6 202:2049:f8df:d093:85d7:be11:c005:fb3c from the second machine to reach this node.

Every link is authenticated and encrypted with the node keys, so all traffic between the machines is end-to-end encrypted. You can add peers in either direction: point this node at a remote endpoint, or point remote nodes at this one. Yggdrasil has no bootstrap nodes. Traffic transits your peer links, so peer with nearby, well-connected nodes.

8

Secure by default

This image ships with no known key. The node key is the only thing that determines this node's overlay identity. The image generates it uniquely per VM at first boot and stores it in a root-only 0600 config file. The admin API is bound to a local Unix socket, so it can never be reached from the network. Every overlay link is encrypted with the node keys. The only network-facing surface besides SSH is the peering transport on port 9001.

ls -l /etc/yggdrasil/yggdrasil.conf
sudo cat /root/yggdrasil-credentials.txt

The config is -rw------- (root only), and AdminListen is a unix:// socket. The credentials file holds only your node's public identity (address, subnet, public key), never the private key.

9

Restrict who may peer

By default, a Yggdrasil node accepts incoming peerings from any node. All overlay traffic is still encrypted by node keys. To restrict who may form an inbound peering with this node, add the allowed peers' public keys to AllowedPublicKeys in /etc/yggdrasil/yggdrasil.conf and restart the service. When the list is not empty, only listed keys may peer in. This is a configuration snippet, not a command to run here:

AllowedPublicKeys: [ <peer-public-key> ]

Collect each peer's public key from its own yggdrasilctl getSelf output. This setting governs peering only. It is not a firewall for services you run over the overlay.

Troubleshooting

A peer will not connect. Confirm that the NSG allows TCP 9001 from the peer, and that the peer's Peers list uses this node's reachable endpoint (tls://<public-ip>:9001). Check sudo yggdrasilctl getPeers on both sides.

Check node health. sudo yggdrasilctl getSelf dumps this node's own overlay identity. sudo yggdrasilctl getPeers lists connected peers with latency. sudo systemctl status yggdrasil and sudo journalctl -u yggdrasil show service logs.

The overlay address is stable. A node's address is derived from its key, so it never changes for the life of the key. To change a node's address, generate a new key.

Support

SecureAnyCloud provides 24/7 technical support for this Yggdrasil image. Our engineers help with peering design, restricting who may connect with allowed public keys, and exposing and reaching services over the encrypted overlay. They also help with firewall and NSG rules, monitoring node and peer health with yggdrasilctl, and Yggdrasil version upgrades. Critical issues receive a one hour average response time. Contact sales@secureanycloud.com.

All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

Deploy on Azure

Launch Yggdrasil 0.5.14 on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure