Setting up Argo on Raspberry Pi


I have been trying to setup Cloudflare Tunnel on a Raspberry Pi. I have done the following so far

  1. Install cloudflared (running cloudflared version 2021.2.5 (built 2021-02-23-1951 UTC)

  2. Authenticated cloudflared (./cloudflared tunnel login)

  3. Created a tunnel (./cloudflared tunnel create snape)

  4. Created a configuration file (/etc/cloudflared/config.yml)

    credentials-file: /home/pi/.cloudflared/.json
    logfile: /var/log/cloudflared.log

  5. Ran it as a service (./cloudflared service install)

    ● cloudflared.service - Cloudflare Tunnel
    Loaded: loaded (/etc/systemd/system/cloudflared.service; disabled; vendor preset: enabled)
    Active: active (running) since Mon 2021-03-01 08:06:51 UTC; 5s ago
    Main PID: 8555 (cloudflared)
    Tasks: 10 (limit: 4915)
    Memory: 8.7M
    CPU: 1.050s
    CGroup: /system.slice/cloudflared.service
    └─8555 /home/pi/cloudflared/argo-tunnel/cloudflared --config /etc/cloudflared/config.yml --no-autoupdate tunnel run

In the logs I see the following

Mar 01 07:16:20 rak-gateway cloudflared[20133]: 2021-03-01T07:16:20Z INF Initial protocol h2mux
Mar 01 07:16:20 rak-gateway cloudflared[20133]: 2021-03-01T07:16:20Z INF Starting metrics server on
Mar 01 07:16:21 rak-gateway cloudflared[20133]: 2021-03-01T07:16:21Z INF Connection <ID1> registered connIndex=0 location=SIN
Mar 01 07:16:21 rak-gateway systemd[1]: Started Argo Tunnel.
Mar 01 07:16:22 rak-gateway cloudflared[20133]: 2021-03-01T07:16:22Z INF Connection <ID2> registered connIndex=1 location=NRT
Mar 01 07:16:23 rak-gateway cloudflared[20133]: 2021-03-01T07:16:23Z INF Connection <ID3> registered connIndex=2 location=SIN
Mar 01 07:16:24 rak-gateway cloudflared[20133]: 2021-03-01T07:16:24Z INF Connection <ID4> registered connIndex=3 location=NRT

However, my locally hosted website is not appearing at I’m getting the following error
# Error 1033
Ray ID: 6290eecbfe9ec345 • 2021-03-01 08:14:37 UTC
## Cloudflare Tunnel error

When I do the above and run manually on my Macbook, it works fine. But the logs are not saying “Connection registered connIndex=3 location=NRT” but rather “Connection established connIndex=1 location=NRT”

Any help would be much appreciated.

Also, I’m a bit confused regarding the pricing. We are expected around 100 RPI to be shipped to clients with the Cloudflare Tunnel installed for remote access. They all would be a subdomain under the main domain. Any help on what is the pricing structure? Is it 5$ per sub domain or 5$ per domain + usage (0.1$ per GB)
e.g. <ID>

Another point to add:
It works fine even on a RPI when I run manually. Just that the service mode didn’t work as described above.

This does not match the port # in your config.yml file. I’m not even sure what that test proves, as it sounds like you’re testing it internally (localhost) on your Pi.

I’m not sure what this has to do with your MacBook. Are you trying to do the same thing on my MacBook as you are on your Pi? But it works on the Mac, though not on the Pi?

As for pricing, I don’t think Cloudflare Tunnel uses Argo Smart Routing. It just hits the closest colo (Singapore and Japan in your case) and uses standard routing from there. So…no charge. Don’t even bother setting up Smart Routing in that zone, unless you actually want that feature and its associated costs.


Sorry for the typo. It is indeed 5300.

Yes, you are correct. I ran manually on a Macbook/RPI and it worked and I could access the website hosted on the raspberry pi remotely on the test URL. However, when installing cloudflared as a service, something was going wrong.

Got it. Would not activate Argo Smart Routing in that case.

1 Like

I managed to find the solution. I was missing the step to create the route. Doing that resolved the issue.

1 Like