You'll need
- A server or virtual machine running Ubuntu 24.04 that stays on, with internet access. It needs to reach Cloudflare on port 7844, which most networks allow.
- A domain whose DNS is on Cloudflare. The free plan is enough.
- Your license key. Don't have one yet? Get a license.
- About 20 minutes. Our examples use
mining.example.com: use your own name instead.
Install MiningOps in tunnel mode
On the server, run the installer with
--tunnel. It installs the site and has it listen on127.0.0.1:3800, which only programs on the server itself can reach. It opens nothing in the firewall.curl -fsSL https://miningops.io/install.sh | sudo bash -s -- --key YOUR-KEY --domain mining.example.com --tunnel 3800
Use your full license key in place of
YOUR-KEY, and the address you want for the site in place ofmining.example.com. When it finishes, the installer prints a setup key for your first sign-in. Keep it for step 4.Create the tunnel
- Sign in to the Cloudflare dashboard and go to Networking → Tunnels.
- Select Create a tunnel, name it, for example
miningops, and select Create Tunnel. - Choose your server's system (Debian covers Ubuntu) and copy the install command Cloudflare shows.
- Run that command on the MiningOps server. It installs cloudflared and connects it to your tunnel.
- Wait until the dashboard shows the tunnel connected, then select Continue.
The command holds your tunnel's token. Anyone with it can run your tunnel, so don't paste it anywhere public.Cloudflare moves its menus now and then. If yours look different, search the dashboard for Tunnels.
Send your domain to MiningOps
In the tunnel, open Routes, select Add route, then Published application:
- Subdomain:
mining, and Domain: your domain. - Service URL:
http://localhost:3800, the same port you gave the installer.
Select Add route. Cloudflare creates the DNS record for you.
Usehttphere, nothttps: the tunnel carries the traffic encrypted, and Cloudflare serves your visitors HTTPS. Keep to one level of subdomain, likemining.example.com: deeper names need a paid certificate from Cloudflare.- Subdomain:
Create your admin account
Open
https://mining.example.comand create your admin account with the setup key from step 1. If you've lost it, read it on the server:sudo cat /opt/miningops/miningops-private/install-key.txt
The setup key works only until the first admin account exists.
Close the server to the internet
Everything now reaches MiningOps through the tunnel, so the server can refuse every incoming connection except SSH, which you use to manage it:
sudo ufw allow OpenSSH && sudo ufw enable
Allow SSH before you turn the firewall on, or you lock yourself out of a remote server. If you only manage the server from your own network, you can limit SSH to it.Check two Cloudflare settings
- SSL/TLS → Edge Certificates: turn on Always Use HTTPS, so anyone who types
http://is sent to the secure address. - Security → Bots: leave Bot Fight Mode off, and don't use I'm Under Attack mode for this domain. Both challenge anything that isn't a web browser, and your rigs' agents can't answer a challenge. On Cloudflare's free plan, Bot Fight Mode can't be switched off for single addresses.
- SSL/TLS → Edge Certificates: turn on Always Use HTTPS, so anyone who types
Optional: Cloudflare Access in front of the dashboard
MiningOps has its own sign-in, which locks out repeated wrong passwords for a while. For a second lock, you can put Cloudflare Access in front of the site, so only email addresses you allow even see the sign-in page.
If you do, add a Bypass for the addresses your rigs use, because a rig's agent can't sign in to Access. Each rig proves who it is with its own token instead:
https://mining.example.com/api.php, where rigs report and collect their commandshttps://mining.example.com/miningops-agent*, where they download the agent and its updates
If something doesn't work
- Cloudflare shows error 1033 or 502. The tunnel isn't connected, or it can't reach the site. On the server, check both services, and that the route's Service URL is
http://localhost:3800:
sudo systemctl status cloudflared miningops
- Rigs stay on "Waiting for agent". Check Bot Fight Mode and I'm Under Attack mode first, then the Access bypass if you use one. From a rig, this should print a line starting with
{"ok":true:
curl -s https://mining.example.com/health
Updating MiningOps later doesn't touch the tunnel: install new releases from Settings → Updates as usual.
