Cloudflare is used for two separate things:
- Workers deployment for the web app
- Optional DNS updates for the Minecraft server and panel domains
Do not mix these credentials up.
You do not need a Cloudflare-managed custom domain to run mc-aws. The panel can run on Cloudflare Workers' *.workers.dev URL, and the Minecraft server can use either DuckDNS or raw public IP mode.
- Create or sign in to a Cloudflare account.
- Add your domain to Cloudflare.
- Change your registrar nameservers to the Cloudflare nameservers.
- Wait for Cloudflare to show the zone as active.
Cloudflare docs:
Use separate hostnames unless you have a specific reason not to:
- Panel URL:
https://panel.example.com - Minecraft domain:
mc.example.com
The setup wizard asks for the Minecraft domain as CLOUDFLARE_MC_DOMAIN.
The setup wizard asks for the panel URL as NEXT_PUBLIC_APP_URL.
This token is for runtime DNS updates. It is not the token used to deploy Workers.
- Open Cloudflare dashboard.
- Go to My Profile -> API Tokens.
- Create a token using Edit zone DNS or a custom token.
- Scope it to the specific zone.
- Give it
Zone -> DNS -> Editpermission. - Copy the token.
Cloudflare docs:
- Open your domain in Cloudflare.
- Go to the domain overview page.
- Copy the Zone ID.
The current deploy flow can create missing DNS records. If you already have a Minecraft DNS record, you can provide its record ID. Otherwise leave it empty during the wizard if prompted.
Workers deployment uses Wrangler OAuth:
pnpm exec wrangler loginThe deploy script also attempts login if Wrangler is not authenticated.
The setup wizard asks for:
CLOUDFLARE_DNS_API_TOKENCLOUDFLARE_ZONE_IDCLOUDFLARE_RECORD_IDif you already have oneCLOUDFLARE_MC_DOMAINNEXT_PUBLIC_APP_URL
- Use
wrangler loginfor Workers deployment. - Use
CLOUDFLARE_DNS_API_TOKENfor runtime DNS updates. - Do not export
CLOUDFLARE_DNS_API_TOKENglobally in your shell. It can confuse Wrangler auth.