RISC-V Architecture Support

Hi there! Just got a new device (Clockwork Pi uConsole) and I was hoping to install zerotier-one on it in order to connect to my existing zerotier network. Unfortunately, it’s a riscv64 device and the install failed!

cpi@demoncore:~$ curl -s https://install.zerotier.com | sudo bash

*** ZeroTier Service Quick Install for Unix-like Systems

*** Tested OSes / distributions:

***   MacOS (10.13+) (just installs ZeroTier One.pkg)
***   Debian Linux (7+)
***   RedHat/CentOS Linux (6+)
***   Fedora Linux (16+)
***   SuSE Linux (12+)
***   Mint Linux (18+)

*** Supported architectures vary by OS / distribution. We try to support
*** every system architecture supported by the target.

*** Please report problems to contact@zerotier.com and we will try to fix.

*** Detecting Linux Distribution

*** Found Ubuntu, creating /etc/apt/sources.list.d/zerotier.list
Hit:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease                         
Get:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease [119 kB]        
Get:3 https://raw.githubusercontent.com/clockworkpi/apt/main/debian stable InRelease [5408 B]
Get:4 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease [109 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease [110 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports jammy-updates/universe riscv64 Packages [686 kB]                        
Fetched 1029 kB in 15s (70.5 kB/s)                                                                                 
Reading package lists... Done
W: https://raw.githubusercontent.com/clockworkpi/apt/main/debian/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
gpg is already the newest version (2.2.27-3ubuntu2.1).
gpg set to manually installed.
The following packages were automatically installed and are no longer required:
  crda fonts-noto-cjk libpython3.9-minimal libpython3.9-stdlib libssl1.1 python3-debconf python3-debian python3.9
  python3.9-minimal socat
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 315 not upgraded.

*** Installing zerotier-one package...
Get:1 http://download.zerotier.com/debian/jammy jammy InRelease [20.5 kB]
Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy InRelease                                                         
Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease                                             
Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease               
Hit:5 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease                
Get:6 https://raw.githubusercontent.com/clockworkpi/apt/main/debian stable InRelease [5408 B]
Fetched 25.9 kB in 14s (1822 B/s)                                                                                  
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-riscv64/Packages' as repository 'http://download.zerotier.com/debian/jammy jammy InRelease' doesn't support architecture 'riscv64'
W: https://raw.githubusercontent.com/clockworkpi/apt/main/debian/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package zerotier-one

*** Package installation failed! Unfortunately there may not be a package
*** for your architecture or distribution. For the source go to:
*** https://github.com/zerotier/ZeroTierOne


Would love to see riscv64 supported in the future. Thanks!

Are you in a position to try to build it from the source code? There is a chance it will compile and work on RISC V without changes and the only thing that’s missing is a precompiled package because there is no build pipeline for RISC V (yet?).

1 Like

Oh! I didn’t realize Zerotier was open source. Yes, I’ll try compiling and then report back.

1 Like

starting to explore Risc-V in this area now, looking forward to seeing any movement on this area.

1 Like

I have compiled zerotier on a licheepi4a which is a 4 core riscv64 without any problems. I have also ran the test and they all look ok.

[info] sizeof(void *) == 8
[info] OSUtils::now() == 1708023268747
[info] hardware concurrency == 4
[info] sizeof(NetworkConfig) == 466424
[other] Testing hex/unhex... PASS
[other] Testing InetAddress encode/decode... feed:dead:babe:dead:beef:f00d:1234:5678/12345  
[other] Testing/fuzzing Dictionary... PASS (junk value to prevent optimization-out of test: -17645)
[crypto] getSecureRandom: c08ed3105af4e916d924b29e9e870f515dc9c812136b404afa2bed8754f2b8c6a1b5b87d1167981f6b83cceff2734cabf0512e87a08f2eede54fd1c193ce2817
[crypto] getSecureRandom: c8201abc01868eeb78e4af1d097d73a3f021aa7845ee156fb558652236ef0beb44e6f6a4b4a6ffb9963019b72e0c11474e2afdeb8e666101475f7e7b99707b87
[crypto] getSecureRandom: 09dd008a41c5ece12185e0c256292c9376cd8d8f38c37f5257e3e22eedd73f061e42ca94460414b5b02a283d345941dd847973c922dc926ded79a13921a1fae7
[crypto] Testing Salsa20... PASS
[crypto] Salsa20 SSE: DISABLED
[crypto] Benchmarking Salsa20/12... 195.244 MiB/second (f31ddbcdb3b69d0a5e19ba94a7e2facc)
[crypto] Benchmarking Salsa20/20... 125.98 MiB/second (24c619994ae7f1549136169c9072f3d7)
[crypto] Benchmarking AES-GMAC-SIV... 20.7227 MiB/second
[crypto] Testing SHA-512... PASS
[crypto] Testing Poly1305... PASS
[crypto] Benchmarking Poly1305... 407.396 MiB/second
[crypto] Testing C25519 and Ed25519 against test vectors... PASS
[crypto] Testing C25519 ECC key agreement... PASS
[crypto] Benchmarking C25519 ECC key agreement... 0.44ms per agreement.
[crypto] Testing Ed25519 ECC signatures... PASS
[crypto] Benchmarking Ed25519 ECC signatures... 57.52ms per signature.
[packet] Testing Packet encoder/decoder... (compressed: 77, decompressed: 1116) PASS
[identity] Validate known-good identity... PASS (114.5ms per validation)
[identity] Validate known-bad identity... PASS (i.e. it failed)
[identity] Generate identity... (took 2718ms): a2b685a4b1:0:bd98da59fc0844b461ea6082656ac550217d522cf9da246efacef7874b63685fe21a7f1a3d9faab11d9842b794672d538a0fe5bc4bb43a37048c4bfd81c2bc13:d1cbb6a9d5256b205506b999c8d9417989ae12976dc9b0d32c5ba41a205120d81c1597d6d0531d5016b31905882c116afc01e66d49b8a4bb71720099ac3f7922
[identity] Locally validate identity: PASS
[identity] Generate identity... (took 231ms): ef5c6d9d97:0:812cb13cf927f2f085a63d940f7668b4b8c7009fd54894b5d710a110c034da60527d16e523bb41e143c84ca04559f1764eb7dbca3e02673c01f2a3ae56abd00d:acb171e84a78b2c42aa4e6e4c7ddeeb0ee779273926fb316238c5467f31b5425e98e1bdf03f5be11d74f27290afbc5a437fe321547f29403084ce8dc06dea8e1
[identity] Locally validate identity: PASS
[identity] Generate identity... (took 117ms): 05d9c10e6a:0:687ff2329d5a0c1cb69c10781fa5f6faf63752108277a08e0b07ace51a5665728f8ed951492d09832fd6d9a643bcf0041f4d2f84426bee6f096ad0422f098131:612710a201221ee4d7324baf8aaa03707bf4da23ec88a018379290644d0457d0685b2ceb78ea40b44a991a20094a88a3139cc446fa29634f417cfb7125975534
[identity] Locally validate identity: PASS
[identity] Generate identity... (took 1138ms): 438c26f138:0:7e4348e0d69d968ee7996528a4471978cafa2c174e51d6f093b4c5f843e88635df019ed5622b8fcdc005a546e8dbb75676f0f8699aabe922d03e414d4fab4578:27511824d6e0a2e6354bdd0c1abc3344486431bcb2874797d351ef37f1f05620d38ed2febbccb5f5c2e521e622ce16cf5bfcc7c0c7f99d0bd76a6b9c8de57255
[identity] Locally validate identity: PASS
[identity] Serialize and deserialize (w/private): PASS
[identity] Serialize and deserialize (no private): PASS
[identity] Serialize and deserialize (ASCII w/private): PASS
[identity] Serialize and deserialize (ASCII no private): PASS
[certificate] Generating identity to act as authority... f9841bef5c
[certificate] Generating identities A and B... d6feb79b31, b19e2b6691
[certificate] Generating certificates A and B...
[certificate] Signing certificates A and B with authority...
[certificate] A agrees with B and B with A... yes, yes.
[certificate] Generating two certificates that should not agree...
[certificate] A agrees with B and B with A... no, no.
[phy] Creating phy endpoint...
[phy] Binding UDP listen socket to OK
[phy] Binding TCP listen socket to OK
[phy] Testing UDP send/receive... got 10000 packets, OK
[phy] Testing TCP... got 10 connect successes, 2 failures, and 10000000 bytes, OK

The main daemon runs correctly as well, and I’m currently reading the docs to get it connected to my network.

I also have a (in progress to become official) RISC-V lab so I can provide access to Github local runners or anything that is needed for testing and compiling.


I expected something different to join when building instead of the package.

I have just joined the network and I’m now able to connect to and from the other nodes as expected.

For those who want to start using it before it’s precompiled, is really easy to do.

git clone https://github.com/zerotier/ZeroTierOne.git
cd ZeroTierOne
make -j4
make selftest -j4        # optional
./zerotier-selftest      # optional
sudo cp zerotier-one /usr/sbin
sudo cp debian/zerotier-one.service /etc/systemd/system/
sudo systemctl enable zerotier-one
sudo systemctl start zerotier-one
sudo ./zerotier-cli info # optional
sudo ./zerotier-cli join 1234 # this is the id of your network

That’s it. Approve from the web interface like on any other arch, and you can now connect to and from nodes as usual. Note, the -j4 is for 4 core machines. There are 1 core to 64 core cpus to change it to make sense in your hardware.

Edit: Added as systemd service


Currently I try to get ZeroTier working on my VisionFive2. Can someone give me a hint how to get the tun interface to work? Do I have to compile the whole kernel with the correct option enabled?