yourdomain.com instead of a hostname:port address? This guide shows you how to point your own domain at a Daki server using Cloudflare as a free reverse proxy. Cloudflare handles HTTPS for you and forwards visitors to the custom port your app listens on.
Custom domains require a paid plan. They rely on a publicly accessible port, and only paid plans (Bronze, Silver, Gold, and game server plans) include public ports. Free Tier servers cannot receive inbound connections, so a custom domain cannot work there. See App & Bot Hosting Plans and Network & Allocations.
What you’ll learn
- Why a custom domain on Daki needs a reverse proxy like Cloudflare
- How to point your domain at your server with a proxied DNS record
- How to enable free HTTPS for your domain
- How to forward traffic to your app’s port with an Origin Rule
- An advanced alternative using Cloudflare Tunnel (
cloudflared)
Prerequisites
- A paid plan server with a public port — see App & Bot Hosting Plans
- A domain name you own (registered at any registrar, e.g. Namecheap, GoDaddy, IONOS, Cloudflare Registrar)
- A free Cloudflare account
- A web app (HTTP/HTTPS) that is running and listening on your server’s allocation port
Why You Need Cloudflare
Daki uses shared IP addresses across its nodes, and your app listens on a non-standard port (the allocation assigned to your server). Two problems follow:- Visitors expect to reach
https://yourdomain.comon the standard HTTPS port (443) — notyourdomain.com:4129. - You want a valid HTTPS certificate without managing one yourself.
This method works for HTTP/HTTPS web apps (websites, APIs, dashboards, webhooks). It does not work for raw TCP/UDP services such as most game servers — Cloudflare’s standard proxy only handles HTTP(S). For non-HTTP services, use the Cloudflare Tunnel method below or contact support.
Find Your Server’s IP and Port
You’ll need two values from the Network tab in the Portal:| Value | Where to find it | Example |
|---|---|---|
| Server IP | The IP address your server’s hostname resolves to (shown in the Network tab). If only a hostname is shown, you can resolve it — e.g. ping eu-node1.daki.cc — or ask support. | 203.0.113.10 |
| Allocation port | The port shown next to your hostname in the Network tab. Your app must listen on this port. | 4129 |
Part 1: Cloudflare Setup
Add your domain to Cloudflare
- Create a free account at dash.cloudflare.com (or log in).
- Click Add a site and enter your domain (e.g.
yourdomain.com). - Select the Free plan when prompted.
- Cloudflare will give you two nameservers (e.g.
xxx.ns.cloudflare.com). - Log in to your domain registrar, find the nameserver / DNS settings for your domain, and replace the existing nameservers with the two provided by Cloudflare.
Nameserver changes can take anywhere from a few minutes to 24 hours to propagate. Cloudflare emails you once your domain is active. You can continue with the next steps in the meantime.
Create a DNS record
In the Cloudflare dashboard for your domain, go to DNS → Records and click Add record:
Click Save.
| Field | Value |
|---|---|
| Type | A |
| Name | @ (this represents the root domain, yourdomain.com) |
| IPv4 address | Your server IP (example: 203.0.113.10) |
| Proxy status | Proxied (orange cloud ☁️) |
Configure SSL/TLS
- Go to SSL/TLS → Overview.
- Set the encryption mode to Flexible.
If your app terminates its own TLS (i.e. it serves HTTPS directly on its port), choose Full instead. Be aware that Flexible does not encrypt the connection between Cloudflare and your server; for sensitive traffic, prefer Full with HTTPS on your app.
Part 2: Forward Traffic to Your App’s Port
Because your app runs on a custom port (e.g.4129) rather than the standard 80/443, you need to tell Cloudflare which port to use when it connects to your server. An Origin Rule does exactly that — it rewrites the destination port for incoming requests.
Once DNS has propagated, your app is now reachable at
https://yourdomain.com — Cloudflare serves it over HTTPS and forwards traffic to your server on port 4129.Verify It Works
- Make sure your server is running and your app is listening on the allocation port (check the Console tab).
- Open
https://yourdomain.comin your browser. - You should see your app load over HTTPS with a valid padlock.
Advanced Alternative: Cloudflare Tunnel (cloudflared)
Instead of opening a public port and pointing an A record at your server, you can runcloudflared — Cloudflare’s tunnel client — alongside your app. It opens an outbound connection to Cloudflare and forwards traffic to your app locally, so your server’s IP and port stay hidden and you need neither a DNS A record nor an Origin Rule.
How the Daki environment shapes this. The Startup tab gives you two commands — an install command (runs once on setup/reinstall) and a startup command (runs on every boot) — and you can open a shell by temporarily setting the startup command to
bash. But your server is a container, not a full Linux VM: there is no apt, you can’t register a system service, and a tunnel you start by hand in the console dies when the server restarts. The reliable approach is therefore to make the tunnel part of your app’s own startup — download the cloudflared binary at and launch it as a child process next to your app, controlled by an environment variable.Create the tunnel
- In the Cloudflare Zero Trust dashboard, go to Networks → Tunnels and click Create a tunnel, then choose Cloudflared.
- Give it a name and copy the tunnel token that Cloudflare displays (the long string after
--tokenin its install command). - Add a Public Hostname to the tunnel:
- Domain:
yourdomain.com - Service:
http://localhost:4129(your app’s local port)
- Domain:
Store the token in .env
Add the token to your server’s
.env file (see Environment Variables) so it never ends up in your source code:Start the tunnel from your code
Add a small launcher that downloads
cloudflared on first run and starts it next to your app, then set that launcher as your startup command. It only starts the tunnel when CLOUDFLARE_TUNNEL_TOKEN is set, so the same code runs fine locally without one.- Node.js (start.js)
- Python / other (start.sh)
Save as
start.js, then set your startup command to node start.js:| Cloudflare Proxy (Parts 1–2) | Cloudflare Tunnel (cloudflared) | |
|---|---|---|
| Setup difficulty | Easier (dashboard only) | More advanced (bundled into your app’s startup) |
| Exposes server IP/port | Hidden behind proxy | Fully hidden (outbound only) |
| Needs public port / Origin Rule | Yes | No |
| Uses server resources | None on your server | Runs an extra process |
Common Issues
The site doesn't load at all
The site doesn't load at all
DNS may still be propagating. Nameserver changes can take up to 24 hours (usually much less). Confirm in Cloudflare that your domain status is Active and that the A record exists and is Proxied (orange cloud). You can check propagation with a tool like dnschecker.org.
Error 522 / 523 — Connection timed out / Origin unreachable
Error 522 / 523 — Connection timed out / Origin unreachable
Cloudflare can’t reach your app. Check, in order:
- Your server is running and the app has fully started (check the Console tab).
- The Origin Rule rewrites the port to your exact allocation port.
- The A record IP matches your server’s IP.
- Your app binds to
0.0.0.0, not127.0.0.1/localhost.
Too many redirects / ERR_TOO_MANY_REDIRECTS
Too many redirects / ERR_TOO_MANY_REDIRECTS
This is usually an SSL mode mismatch. If your app forces HTTPS but Cloudflare connects to it over HTTP, you get a redirect loop. Either set your app to serve plain HTTP (and use Flexible), or have your app serve HTTPS and switch Cloudflare to Full under SSL/TLS → Overview.
It works on http:// but not https://
It works on http:// but not https://
Make sure your DNS record is Proxied (orange cloud) and that SSL/TLS mode is set (Flexible or Full). With a grey cloud (DNS only), Cloudflare’s SSL is bypassed.
My game server / non-HTTP service won't work
My game server / non-HTTP service won't work
Cloudflare’s standard proxy only handles HTTP/HTTPS. For raw TCP/UDP services like most game servers, this method won’t apply. Connect to your server using its hostname and port directly (see Network & Allocations), or contact support about other options.
Do I have to use Cloudflare?
Do I have to use Cloudflare?
No — Cloudflare is the simplest free option, but any reverse proxy that can forward to a custom port works (e.g. a tunnel via
cloudflared, or your own Nginx/Caddy in front of the app). Cloudflare is recommended because it provides free SSL, hides your server IP, and requires no extra software on your server for the proxy method.Next Steps
- Network & Allocations — Find your hostname and port, and add more allocations.
- App & Bot Hosting Plans — Upgrade to a paid plan to get a public port.
- Environment Variables — Read your port from an env var in code.
- Getting Help — Contact support if you get stuck.