Skip to main content

Building Cloudflared agent from source on mips64 architecture

Are you trying to set up Cloudflared on your mips64 OS router, such as the UniFi Edge Router?

Unfortunately, Currently Cloudflare does not provide a binary for mips64 architecture. However, you can still build and install the Cloudflared agent from source. This guide will walk you through the steps to build and install Cloudflared on your mips64 router. Let's get started!


  • Go 1.20 or later
  • Git (optional, if you want to clone the repository)
  • SSH access to your router
  • Cloudflare account with a zone configured
  • Token from Cloudflare Tunnel page



Replace [router_username], [router_ip], and [token-from-cloudflare] with your actual values.

  1. Clone the Cloudflared repository:

    git clone
  2. Change to the cloned directory:

    cd cloudflared
  3. Build the binary for mips64 architecture:

    GOOS=linux GOARCH=mips64 go build

    This will create a binary named cloudflared in the current directory.

  4. Copy the binary to your router:

    scp cloudflared [router_username]@[router_ip]:/tmp/
  5. SSH into your router:

    ssh [router_username]@[router_ip]
  6. Change to the /tmp directory:

    cd /tmp
  7. Change the owner of the binary to root:

    sudo chown root:root cloudflared
  8. Make the binary executable:

    sudo chmod +x cloudflared
  9. Move the binary to a directory in your PATH:

    sudo mv cloudflared /usr/bin/
  10. Create the cloudflared config directory:

    sudo mkdir /etc/cloudflared
  11. Create the cloudflared config file:

    sudo vi /etc/cloudflared/config.yml
  12. Add the following content to config.yml file:

    proxy-dns: true
    proxy-dns-port: 8853
  13. Start the cloudflared service:

    sudo /usr/bin/cloudflared service install [token-from-cloudflare]

That's it! You have successfully installed Cloudflared on your mips64 router. You can now configure your router to use Cloudflare DNS.


Please note that after every firmware upgrade on your router, you will need to re-install Cloudflared on your router as the firmware upgrade will remove the binary from your router.