Apiker projects deploy with Wrangler, exactly like any other Cloudflare Worker.
Deploy
npx wrangler deployThe build regenerates wrangler.toml from app.toml and .env first, so the deployed Worker always carries the bindings and variables those two files describe.
Adding a Durable Object
Durable Objects are versioned through migrations. Add the object to your init call and to src/objects.json, and the build registers the binding and appends a migration tag for you.
apiker.init({
routes,
exports,
objects: ["Common", "Users", "Logs"]
});Never remove or rename an object that already holds data. A rename is a new class to Cloudflare, and the data stays behind on the old one.
Environment variables
Features read their credentials from the Worker environment. Only the first two are always required.
- APIKER_SECRET_KEY — required. Signs JWTs and internal hashes.
- ADMP_SETUP_SECRET — required by the admin panel to claim the first admin account.
- BREVO_API_KEY — sending email.
- CLOUDFLARE_WAF_KEY — firewall bans at the Cloudflare edge.
- CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_EMAIL, CLOUDFLARE_API_KEY — the Cloudflare API client used to enumerate Durable Object instances.
- GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET — GitHub OAuth routes.
- ADMP_IP_WHITELIST, ADMP_ISP_WHITELIST, ADMP_CITY_WHITELIST — who may reach the admin panel.


