6 Yggdrasil
oooo-ps edited this page 2025-06-28 06:40:44 +03:00

Make sure you have Yggdrasil router installed to continue.

Host options

Main address

Note

  • This method requires free port 1900 for the main Yggdrasil address
  • Keep in mind that you cannot launch a new service on the same host/port combination if it's already in use

The main address is the simplest way to start using the server:

sudo yggdrasilctl getself
  • copy IPv6 address value e.g. 200:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx

Subnet address

Tip

See also http://[222:a8e4:50cd:55c:788e:b0a5:4e2f:a92c]/yggdrasil:subnet_setting

Get your current subnet prefix for the current Yggdrasil instance key:

sudo yggdrasilctl getself
  • copy IPv6 subnet value e.g. 300:xxxx:xxxx:xxxx::

Create address using free 0200::/7 range, e.g. 300:xxxx:xxxx:xxxx::1

/bin/ip address add 300:xxxx:xxxx:xxxx::1/64 dev tun0
  • this address will be reset on the next Yggdrasil service (or system) restart

Persist settings

Add new address into yggdrasil.service:

[Service]
ExecStartPost=/bin/sleep 5s
ExecStartPost=/bin/ip address add 300:xxxx:xxxx:xxxx::1/64 dev tun0
  • to get current systemd service location, run sudo systemctl status yggdrasil
  • apply the changes:
    • sudo systemctl daemon-reload
    • sudo systemctl restart yggdrasil
  • check the new address is connected with ifconfig

Firewall

By using iptables with ufw, add following permission for port 1900:

sudo ufw allow from 0200::/7 to 300:xxxx:xxxx:xxxx::1 port 1900 proto tcp
  • check the rules was updated successfully: ufw status

Launch

Run the server from nexy user:

nexy --public /path/to/dir --bind [300:xxxx:xxxx:xxxx::1]:1900
  • replace /path/to/dir with your files location

Test

  • run netstat -tulpn | grep nexy or netstat -tulpna | grep nexy
  • open nex://[300:xxxx:xxxx:xxxx::1] in your browser