### Install yggdrasil-go with emerge Source: https://yggdrasil-network.github.io/installation-linux-gentoo.html Installs the net-p2p/yggdrasil-go package using emerge with the --ask flag. ```bash sudo emerge --ask net-p2p/yggdrasil-go ``` -------------------------------- ### Install dirmngr Source: https://yggdrasil-network.github.io/installation-linux-deb.html Install dirmngr if it is not already available on some platforms, e.g. Raspberry Pi, before importing the repository key. ```bash sudo apt-get install dirmngr ``` -------------------------------- ### Install Yggdrasil from S3 repository Source: https://yggdrasil-network.github.io/installation-linux-deb.html Install Yggdrasil from the S3 repository. ```bash sudo apt-get install yggdrasil ``` -------------------------------- ### Start Yggdrasil launchd service (sudo launchctl load) Source: https://yggdrasil-network.github.io/installation-macos-pkg.html Loads the Yggdrasil launchd service to start it again after it has been unloaded. Requires sudo. The service will run automatically at startup and restart if killed. ```bash sudo launchctl load /Library/LaunchDaemons/yggdrasil.plist ``` -------------------------------- ### Enable and start Yggdrasil systemd service Source: https://yggdrasil-network.github.io/installation-linux-other.html Enables the yggdrasil service to start on boot and starts it immediately. ```bash sudo systemctl enable yggdrasil sudo systemctl start yggdrasil ``` -------------------------------- ### Enable and start Yggdrasil launchd service Source: https://yggdrasil-network.github.io/installation-macos-other.html Loads and starts the Yggdrasil launchd service. These commands must be run with sudo. ```bash sudo launchctl load /Library/LaunchDaemons/yggdrasil.plist sudo launchctl start /Library/LaunchDaemons/yggdrasil.plist ``` -------------------------------- ### Query peers with yggdrasilctl Source: https://yggdrasil-network.github.io/installation-windows.html Use this command to query Yggdrasil's runtime state, for example to list peers. The utility is installed in the same location as the installer. ```text "C:\Program Files\Yggdrasil\yggdrasilctl.exe" getPeers ``` -------------------------------- ### Use configuration file via file path Source: https://yggdrasil-network.github.io/configuration.html Starts Yggdrasil using a configuration file specified by a filesystem path. ```bash yggdrasil -useconffile /etc/yggdrasil.conf ``` -------------------------------- ### Use configuration file via stdin Source: https://yggdrasil-network.github.io/configuration.html Starts Yggdrasil using a configuration file provided through standard input. ```bash yggdrasil -useconf < /etc/yggdrasil.conf ``` -------------------------------- ### Install Yggdrasil .pkg via Terminal (sudo installer) Source: https://yggdrasil-network.github.io/installation-macos-pkg.html Use this command in Terminal.app to install the Yggdrasil macOS package. Replace /path/to/yggdrasil-xxx-macos.pkg with the actual path to the downloaded .pkg file. After installation, the configuration is generated automatically and the launchd service is installed and running. ```bash sudo installer -pkg /path/to/yggdrasil-xxx-macos.pkg -target / ``` -------------------------------- ### Install Yggdrasil on Fedora via COPR Source: https://yggdrasil-network.github.io/installation-linux-rpm.html Enable the COPR repository and install the Yggdrasil package using dnf. ```bash dnf copr enable neilalexander/yggdrasil-go dnf install yggdrasil ``` -------------------------------- ### Add repository and update apt Source: https://yggdrasil-network.github.io/installation-linux-deb.html Add the Yggdrasil repository to apt sources and update the package list. The repository also works over HTTPS; you will need to install apt-transport-https and edit the URL to start with https://. ```bash echo 'deb [signed-by=/usr/local/apt-keys/yggdrasil-keyring.gpg] http://neilalexander.s3.dualstack.eu-west-2.amazonaws.com/deb/ debian yggdrasil' | sudo tee /etc/apt/sources.list.d/yggdrasil.list sudo apt-get update ``` -------------------------------- ### Install vyatta-yggdrasil package with dpkg Source: https://yggdrasil-network.github.io/installation-linux-edgeos.html Install the vyatta-yggdrasil package on the EdgeRouter using dpkg. Requires SSH access as the ubnt user or another admin-level user. The package does not survive firmware upgrades; you must re-add the GPG key and reinstall after a system upgrade. ```bash sudo dpkg -i vyatta-yggdrasil-x.x.xxx-mipsel.deb ``` -------------------------------- ### Example NodeInfo JSON provided by default Source: https://yggdrasil-network.github.io/installation-linux-openwrt.html This JSON shows the basic NodeInfo that the Yggdrasil daemon provides to the mesh by default. It can be disabled in /etc/config/yggdrasil or LuCI admin. ```json "NodeInfo": { "kernel": "4.14.123", "hostname": "OpenWrt", "model": "Globalscale Marvell ESPRESSOBin Board", "board_name": "globalscale,espressobin" } ``` -------------------------------- ### Configuration file path Source: https://yggdrasil-network.github.io/installation-windows.html The Yggdrasil installer automatically generates a configuration file at this path if one does not exist. ```text %ALLUSERSPROFILE%\Yggdrasil\yggdrasil.conf ``` -------------------------------- ### yggdrasilctl getDHT and getPeers examples Source: https://yggdrasil-network.github.io/admin.html Basic usage of the yggdrasilctl utility to query the DHT and peer information. Each command is specified in field=value format. ```bash yggdrasilctl getDHT yggdrasilctl getPeers ``` -------------------------------- ### Configure Yggdrasil listener for TLS Source: https://yggdrasil-network.github.io/faq.html Example of a listener entry in the Listen section of the Yggdrasil configuration file to accept incoming peering connections over TLS. ```text tls://[::]:54321 ``` -------------------------------- ### Configure Yggdrasil listener for plain TCP Source: https://yggdrasil-network.github.io/faq.html Example of a listener entry in the Listen section of the Yggdrasil configuration file to accept incoming peering connections over plain TCP. ```text tcp://[::]:12345 ``` -------------------------------- ### Generate Yggdrasil configuration with tun0 interface Source: https://yggdrasil-network.github.io/installation-linux-edgeos.html Create the Yggdrasil interface (e.g., tun0) and generate the configuration automatically. After commit and save, Yggdrasil starts with default configuration including multicast peer discovery. ```bash configure set interfaces yggdrasil tun0 commit save ``` -------------------------------- ### Admin socket response JSON example Source: https://yggdrasil-network.github.io/admin.html Structure of a typical admin socket response. Always includes "request" and "status" fields, optionally includes "response" and "error". ```json { "request": { "request": "XXX", "foo": "bar", "baz": "qux" }, "response": { }, "status": "success" } ``` -------------------------------- ### Admin socket request JSON example Source: https://yggdrasil-network.github.io/admin.html Structure of a typical admin socket request. Must include a "request" field and can include optional fields like "keepalive". ```json { "request": "XXX", "foo": "bar", "baz": "qux" } ``` -------------------------------- ### Sync repositories with emerge Source: https://yggdrasil-network.github.io/installation-linux-gentoo.html Synchronizes the package repositories using emerge. Run after enabling the GURU repository. ```bash sudo emerge --sync ``` -------------------------------- ### Show Yggdrasil configuration with uci show Source: https://yggdrasil-network.github.io/installation-linux-openwrt.html Run this command to display currently configured Yggdrasil options on OpenWrt. ```bash uci show yggdrasil ``` -------------------------------- ### Enable GURU repository with eselect repository Source: https://yggdrasil-network.github.io/installation-linux-gentoo.html Enables the GURU repository using eselect repository. Requires sudo privileges. ```bash sudo eselect repository enable guru ``` -------------------------------- ### Connect to Xonotic server Source: https://yggdrasil-network.github.io/services.html In Xonotic, press the backtick key (`) to open the console and type or paste the connect command with the server's IPv6 address and port. ```text connect [201:ac2f:89eb:2afe:5f3d:9db9:a7e9:2f75]:26000 ``` -------------------------------- ### View Yggdrasil logs with journalctl Source: https://yggdrasil-network.github.io/faq.html Retrieve logs from the Yggdrasil service managed by systemd, as installed by the Debian package. ```bash journalctl -u yggdrasil ``` -------------------------------- ### Build Yggdrasil from source Source: https://yggdrasil-network.github.io/installation-linux-other.html Builds the Yggdrasil binaries from the cloned repository. The build produces 'yggdrasil' and 'yggdrasilctl' binaries. ```bash cd /path/to/yggdrasil-go ./build ``` -------------------------------- ### yggdrasilctl -endpoint examples Source: https://yggdrasil-network.github.io/admin.html Specifies the -endpoint parameter to connect to a remote Yggdrasil node via TCP or Unix socket. ```bash yggdrasilctl -endpoint=tcp://10.0.0.1:9001 getPeers yggdrasilctl -endpoint=unix:///var/run/yggdrasil.sock getDHT ``` -------------------------------- ### Copy Yggdrasil binaries to /usr/local/bin Source: https://yggdrasil-network.github.io/installation-linux-other.html Copies the built 'yggdrasil' and 'yggdrasilctl' binaries to /usr/local/bin using sudo. ```bash sudo cp {yggdrasil,yggdrasilctl} /usr/local/bin ``` -------------------------------- ### Peer URI schemes Source: https://yggdrasil-network.github.io/configuration.html Examples of peering URIs for connecting to Yggdrasil peers: direct TCP, TCP+TLS, QUIC, and via SOCKS proxy. ```text tcp://hostname:port ``` ```text tls://hostname:port ``` ```text quic://hostname:port ``` ```text socks://proxyhostname:proxyport/hostname:port ``` -------------------------------- ### Unmask yggdrasil-go when accept_keywords is a file Source: https://yggdrasil-network.github.io/installation-linux-gentoo.html Adds the ~amd64 keyword for net-p2p/yggdrasil-go when /etc/portage/package.accept_keywords is a file. Uses tee -a to append. ```bash echo "net-p2p/yggdrasil-go ~amd64" | sudo tee -a /etc/portage/package.accept_keywords ``` -------------------------------- ### Import and export repository key Source: https://yggdrasil-network.github.io/installation-linux-deb.html Create the apt-keys directory, fetch the repository key, and export it to the apt keyring. The key ID is 1C5162E133015D81A811239D1840CDAC6011C5EA. ```bash sudo mkdir -p /usr/local/apt-keys gpg --fetch-keys https://neilalexander.s3.dualstack.eu-west-2.amazonaws.com/deb/key.txt gpg --export 1C5162E133015D81A811239D1840CDAC6011C5EA | sudo tee /usr/local/apt-keys/yggdrasil-keyring.gpg > /dev/null ``` -------------------------------- ### Check Yggdrasil service status with systemctl Source: https://yggdrasil-network.github.io/faq.html Query systemd for the status of the Yggdrasil service, useful when logs are not directly visible after installing the Debian package. ```bash systemctl status yggdrasil ``` -------------------------------- ### Default firewall configuration for Yggdrasil Source: https://yggdrasil-network.github.io/installation-linux-edgeos.html Example firewall configuration that allows outgoing connections and ICMPv6, but drops unexpected incoming connections. Applies to the tun0 interface. ```bash configure set firewall ipv6-name YGG_IN default-action drop set firewall ipv6-name YGG_LOCAL default-action drop set firewall ipv6-name YGG_IN rule 10 action accept set firewall ipv6-name YGG_IN rule 10 state established enable set firewall ipv6-name YGG_IN rule 10 state related enable set firewall ipv6-name YGG_IN rule 20 action drop set firewall ipv6-name YGG_IN rule 20 state invalid enable set firewall ipv6-name YGG_IN rule 30 action accept set firewall ipv6-name YGG_IN rule 30 protocol icmpv6 set firewall ipv6-name YGG_LOCAL rule 10 action accept set firewall ipv6-name YGG_LOCAL rule 10 state established enable set firewall ipv6-name YGG_LOCAL rule 10 state related enable set firewall ipv6-name YGG_LOCAL rule 20 action drop set firewall ipv6-name YGG_LOCAL rule 20 state invalid enable set firewall ipv6-name YGG_LOCAL rule 30 action accept set firewall ipv6-name YGG_LOCAL rule 30 protocol icmpv6 set interfaces yggdrasil tun0 firewall in ipv6-name YGG_IN set interfaces yggdrasil tun0 firewall local ipv6-name YGG_LOCAL commit save ``` -------------------------------- ### Unmask yggdrasil-go when accept_keywords is a directory Source: https://yggdrasil-network.github.io/installation-linux-gentoo.html Adds the ~amd64 keyword for net-p2p/yggdrasil-go when /etc/portage/package.accept_keywords is a directory. Uses tee to write the line. ```bash echo "net-p2p/yggdrasil-go ~amd64" | sudo tee /etc/portage/package.accept_keywords/yggdrasil-go ``` -------------------------------- ### Stop Yggdrasil launchd service (sudo launchctl unload) Source: https://yggdrasil-network.github.io/installation-macos-pkg.html Unloads the Yggdrasil launchd service to stop it and prevent it from starting automatically. Requires sudo. The service will not run until it is loaded again. ```bash sudo launchctl unload /Library/LaunchDaemons/yggdrasil.plist ``` -------------------------------- ### Export private key to external file Source: https://yggdrasil-network.github.io/configuration.html Exports the private key from an existing configuration file to a separate file. ```bash yggdrasil -useconffile /etc/yggdrasil.conf -exportkey > yggdrasil.key ``` -------------------------------- ### Generate Yggdrasil configuration file Source: https://yggdrasil-network.github.io/installation-linux-other.html Generates an initial Yggdrasil configuration file and writes it to /etc/yggdrasil.conf. ```bash sudo yggdrasil -genconf > /etc/yggdrasil.conf ``` -------------------------------- ### radvd configuration for advertising a prefix Source: https://yggdrasil-network.github.io/configuration.html Configuration for /etc/radvd.conf to advertise a /64 prefix and a route to 200::/7 on the eth0 interface. Replace the prefix with your routed subnet from yggdrasilctl getSelf. ```plaintext interface eth0 { AdvSendAdvert on; prefix 300:1111:2222:3333::/64 { AdvOnLink on; AdvAutonomous on; }; route 200::/7 {}; }; ``` -------------------------------- ### Convert configuration from JSON to HJSON Source: https://yggdrasil-network.github.io/configuration.html Normalizes and converts a configuration file from JSON to HJSON format. ```bash yggdrasil -normaliseconf -useconffile /etc/yggdrasil.conf ``` -------------------------------- ### Run iPerf3 speed test over clearnet Source: https://yggdrasil-network.github.io/services.html Use iPerf3 with IPv4 to test speed against the clearnet server. ```bash iperf3 -4 -c ygg-uplink.thingylabs.io ``` -------------------------------- ### Check Yggdrasil peers with yggdrasilctl getPeers Source: https://yggdrasil-network.github.io/faq.html Use this command to verify if you have any active peers. Peer on port 0 is your own node; ports 1 and above are your active peers. ```bash yggdrasilctl getPeers ```