Cloudflare Tunnel is an online service that allows users to publish a local website on the Internet without requiring a fixed IP address for their own server.
If you’re using a RISC-V PC development board and want to deploy a website directly from it, making the website publicly accessible, you may have noticed the lack of documentation for installing Cloudflare Tunnel library on RISC-V architecture. This page offers a solution for setting up Cloudflare Tunnel on a RISC-V PC.
🧩 Operating Environment
Solution 1: Linux running on RISC-V PC
Solution 2: Linux running on x86/x64 and RISC-V PCs
⚠️ Issue
Lack of documentation to install Cloudflare tunnel library on RISC-V architecture.

Here are 2 solutions to install Cloudflare tunnel library on RISC-V architecture. If you’re more comfortable developing your own Cloudflare tunnel library for the RISC-V architecture, we recommend proceeding with the second solution.
- The first solution is the easiest solution. Cloudflare tunnel library has been compiled by the developer following the procedures mentioned in the second solution. Hence, you would just need to download the file to the specific directory and then extract it.
- The second solution is a bit more complicated. You would need to build your own RISC-V architecture Cloudflare tunnel library on an X86 or X64 Linux PC. Then, you would need to transfer the file to the specific directory on RISC-V Linux PC and then extract it.
✔️ Solution 1
On your RISC-V Linux PC, run the following commands in the terminal.
Go to tmp directory
cd tmp
Download cloudflare.zip by pasting the following command in the terminal
wget --no-check-certificate 'https://drive.google.com/uc?export=download&id=17qIE2Tm7NJQnHPPoOomRTjRsiU-jBSFb' -O cloudflare.zip
Decompress cloudflare.zip
unzip cloudflare.zip
Move cloudflared file to ‘/usr/local/bin/cloudflared’
Remove cloudflare.zip and the useless folder
mv /tmp/cloudflared/cloudflared /usr/local/bin/cloudflared rm cloudflare.zip rm -r cloudflared
Set execute permission to ‘cloudflared’ file
chmod +x /usr/local/bin/cloudflared
Check if Cloudflared can be run in the terminal
which cloudflared
Log in to Cloudflare on your browser
Click ‘Copy’ as shown in the figure below to copy the command with the token key

Paste it in RISC-V Linux’ PC’s terminal and press enter key to run the command
Click Tunnels on the left menu

Check if the connection status of your Cloudflare tunnel is HEALTHY

Solution 1 Done
Watch this video on YouTube for a step-by-step guide.
✔️ Solution 2
Part 1: run the following commands in the terminal on your X86 or X64 Linux PC.
Go to Downloads directory and update Linux package
cd
cd Downloads
sudo apt-get update
Download and install Go package by pasting the following command in the terminal
wget https://go.dev/dl/go1.24.7.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.24.7.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.profile
source ~/.profile
Check if Go package is properly installed
go version
Install git package
sudo apt-get install git
Download cloudflared source code by pasting the following command in the terminal
git clone https://github.com/cloudflare/cloudflared.git
cd cloudflared
Run these commands in the terminal
GOOS=linux GOARCH=riscv64 go build -o /tmp/cloudflared ./cmd/cloudflared
Check whether Cloudflare build architecture is RISC-V
cd ..
cd .. cd tmp file cloudflared
Make sure that the build architecture is RISC-V

You need to transfer this file ‘cloudflare‘ from /tmp on X86 or X64 PC to /tmp on RISC-V PC manually.
Part 2: Run the following commands in the terminal on your RISC-V Linux PC
Go to tmp directory and check if cloudflared file exists
cd .. cd tmp ls

Move ‘cloudflared’ file to ‘/usr/local/bin/cloudflared’
mv /tmp/cloudflared /usr/local/bin/cloudflared
Set execute permission to ‘cloudflared’ file
chmod +x /usr/local/bin/cloudflared
Check if Cloudflared can be run in the terminal
which cloudflared
Log in to Cloudflare on your browser. Click ‘Copy’ as shown in the figure below to copy the command with the token key.

Paste it in RISC-V Linux’ PC’s terminal and press the enter key to run the command.
Click Tunnels on the left menu

Check if the connection status of your Cloudflare tunnel is HEALTHY

Solution 2 Done
If there are any inquiries, please contact us through our Facebook page.