Skip to content

Environment Variables and Secrets

This page summarizes the main configuration entries used by Cloudflare Admin.

Worker Plain Variables

These values usually live in wrangler.worker.jsonc under vars:

VariableDescriptionRequired
ADMIN_TOKENReserved admin tokenNo
ENCRYPTION_SECRETUsed for credential encryption and password-related security logicYes
MAIL_API_URLMail sending API endpointYes
MAIL_FROM_NAMEMail sender nameNo
SUPER_ADMIN_EMAILSuper admin email addressYes
MAIL_CODE_EXPIRE_MINUTESVerification code expiration timeNo
MAIL_CODE_RESEND_INTERVAL_SECONDSCooldown for resending codesNo
ALLOWED_ORIGINAllowed CORS originYes
RATE_LIMIT_MAXMax requests per rate limit windowNo
RATE_LIMIT_WINDOW_MSRate limit window durationNo

Worker Secrets

VariableDescriptionRequired
MAIL_API_TOKENMail API Bearer tokenYes
MAIL_API_CUSTOM_AUTHMail API x-custom-auth header valueYes

Frontend and Runtime Configuration

ItemDescription
VITE_API_BASE_URLBootstrap URL used by the frontend to fetch runtime config during startup
apiBaseUrlActual runtime business API URL stored in KV under system:runtime-config

Production Addresses

  • Frontend: https://cfadmin.letssl.cn/
  • API: https://cloudflare-admin-worker-api.letssl.cn
  • Docs: https://cf-admin-doc.letssl.cn

Local Development Files

  • wrangler.worker.jsonc
  • wrangler.jsonc
  • .dev.vars
  • .dev.vars.example

Built with Vue 3, Cloudflare Worker and VitePress.