Cloudflare Tunnel - installation - illegal instruction

I’m trying to install a tunnel to my (headless) Raspberry pi running Raspbian Buster (10).

Cloudflare installation succeeded, but when I enter the command sudo cloudflared service install with my key, I receive an “illegal instruction” message.

I searched the web for solutions, but cannot immediately find one.

Does this have somerhing to do with the raspberry pi running headless? If so, is there a way to install the tunnel/service headless?


Can you provide some more info? I managed to get cloudflared to install on a headless pi without many issues. (incl working tunnel)

What steps did you take? What where the results for each of them?

Hi Magicbeans,

Thanks for your response. Aq requested, here are the steps I took.

First some info on the system/objective: it’s an old rpi (1B) running Raspbian (Debian 10 buster) with node-red/mqtt for home automation. This works flawelessly as long as I’m on the LAN. However I want to make node-red accessibly from outside the LAN to ultimately connect google assistant to node-red.

First I registered a new domain at Freenom.
I registered the Freenom domain/website with Cloudflare and changed the nameservers per Cloudflare’s instruction. The domain/website is showing as active on my Cloudflare dashboard.
I registered my account with Cloudflare Zero Trust.
Under Access/Tunnel, I created a new tunnel and named the tunnel.
This brings you to a page where you can select the OS (Debian) and the architecture. Normally, this gives you the installation and registration commands to execute on the rpi. Since the architecture of my rpi (armhf) was not supported through the webpage, I copied the command but replaced the repository link with the one compatible with armhf architecture, like this:

curl -L --output cloudflared.deb &&

sudo dpkg -i cloudflared.deb &&

This installed Cloudflare 2022.9 on my rpi and was successfull.

Then I used the “sudo cloudflared service install” command extended with my token. That resulted in the illegal instruction error. Also just the command without my token results in the same error.

So I tried running the instructions for authenticating through the CLI:

sudo cloudflared tunnel login

According to the instructions, running this command will open a browser window and prompt you to log in to your Cloudflare account. After logging in to your account, select your hostname.

Obviously, since I’m running the rpi headless, I cannot open/see the browser window.

That’s where I’m stuck now.

Maybe relevant: I have a free Cloudflare account.

I did do this on a Pi Zero 2, but for other projects managed to install cloudflared on older linux versions so that might not be an issue.

Let’s go back to what you say here:

This installed Cloudflare 2022.9 on my rpi and was successfull.

So the issue is with the service, cloudflared itself is installed, that’s something. :+1:

Does running the login command, not give you the url to visit in the cli ?

What do you get when you do?
cloudflared tunnel --loglevel debug run

:bangbang: Do be careful what part of the logs you post, if you do as you can leak some sensitive info here by accident.

I found the solution.

Apparently it had something to do with the rpi architecture. The Cloudflare version I installed was for arm7 while the 1B runs on arm6, so I had to use the armel binary instead if the armhf binary.

For those facing a similar issue, these are the commands I used to make it work:

sudo cp ./cloudflared-linux-arm /usr/local/bin/cloudflared
sudo chmod +x /usr/local/bin/cloudflared
cloudflared -v

Afterwards I used the instructions provided by Cloudflare for installation through the dashboard, i.e.:

sudo cloudflared service install [your token]

Thanks for your help.

1 Like