This guide covers:
- Initial setup after clicking Deploy to Cloudflare
- Manual deploy with Wrangler
- How to connect the OpenSEO MCP server through Cloudflare Access
- How to update to the latest OpenSEO version
- How to add teammates
Click the deploy button, there are lots of fields on the deploy form, but you only need to do the below steps.
- Connect your Git provider (GitHub/GitLab).
- Leave the resource naming fields as default unless you have a reason to change them.
- Click
Create and Deploy. - Wait 1-2 minutes for deployment to finish.
If deploy fails with Cannot provision a KV Namespace with the title "open-seo" because it already exists, use the manual deploy with Wrangler flow instead.
In the Cloudflare dashboard:
- Go to
Compute->Workers & Pages-> your OpenSEO Worker. - Open
Settings. - In
Domains & Routes, enableCloudflare Accessfor theworkers.devroute. - Save the values shown by Cloudflare Access.
- In
Variables & Secrets, add:POLICY_AUD(from Access setup)TEAM_DOMAIN(domain fromJWKS_URL, for examplehttps://your-team.cloudflareaccess.com)DATAFORSEO_API_KEY
DataForSEO API responses are cached in R2 under the dataforseo-cache/ prefix. This step is optional, but recommended to automatically clean up expired cache objects:
npx wrangler r2 bucket lifecycle add open-seo dataforseo-cache-expiry dataforseo-cache/ --expire-days 7If you changed the R2 bucket name during deploy, replace open-seo with your bucket name.
Without a lifecycle rule, cached objects under dataforseo-cache/ will accumulate indefinitely and increase storage costs over time.
- Open your Worker URL again.
- Sign in with Cloudflare Access.
- OpenSEO should load after login.
If login fails, re-check the three secrets and Access toggle.
Use the same Cloudflare Access application that protects your OpenSEO Worker. Managed OAuth is required for MCP clients and is not enabled by default.
- Open Cloudflare Zero Trust.
- Go to
Access controls->Applications. - Find your OpenSEO application, then select
Edit. - Go to
Additional settings->OAuth. - Turn on
Managed OAuth. - In
Managed OAuth settings, allow the redirect URIs your MCP clients use:- Allow
localhost/ loopback clients — for CLI and desktop agents (Codex CLI, Claude Code) that registerhttp://localhost:PORT/callback. - Add HTTPS redirect URIs for web connectors (a path may end in
/*). - Without this, clients can't finish Dynamic Client Registration and log in but expose no tools.
- Allow
- Save.
MCP clients should connect to:
https://YOUR_WORKER_HOSTNAME/mcp
If your repo was created from the Cloudflare Deploy button, use this flow.
Run this once in your local repo:
git remote add upstream https://github.com/every-app/open-seo.git
git fetch upstreamgit fetch upstream
cp wrangler.jsonc wrangler.local.backup.jsonc
git checkout main
git reset --hard upstream/main
cp wrangler.local.backup.jsonc wrangler.jsonc
git add wrangler.jsonc
git commit -m "restore Cloudflare settings" || true
git push --force-with-lease origin mainWhy this is needed:
wrangler.jsonchas your Cloudflare resource IDs.- The update step keeps your IDs while pulling the newest OpenSEO code.
- Open Cloudflare Zero Trust.
- Go to Access -> Applications.
- Open your OpenSEO application.
- Edit the
Allowpolicy. - Add teammate emails (or your company email domain / group).
- Save.
Screenshots from the setup flow:
After saving, teammates can open your OpenSEO URL and sign in through Cloudflare Access. OpenSEO will use a shared workspace for everyone allowed by the policy.
Use this flow if the Deploy to Cloudflare button fails with Cannot provision a KV Namespace with the title "open-seo" because it already exists. The reliable path is to create Cloudflare resources yourself, put their IDs into wrangler.jsonc, then deploy with Wrangler.
Fork every-app/open-seo on GitHub if you want a repo you control for future updates, then clone it locally:
git clone https://github.com/YOUR_GITHUB_USER/open-seo.git
cd open-seo
corepack enable
pnpm installIf you do not need a fork, clone the upstream repo instead:
git clone https://github.com/every-app/open-seo.git
cd open-seo
corepack enable
pnpm installpnpm exec wrangler loginUse unique names so they do not collide with resources that already exist in your Cloudflare account. Replace YOUR_SUFFIX with something unique to you, for example your GitHub username or company name.
pnpm exec wrangler kv namespace create open-seo-YOUR_SUFFIX
pnpm exec wrangler kv namespace create open-seo-oauth-YOUR_SUFFIX
pnpm exec wrangler d1 create open-seo-YOUR_SUFFIX
pnpm exec wrangler r2 bucket create open-seo-YOUR_SUFFIXSave the IDs and names printed by Wrangler:
- The first KV namespace ID is for the
KVbinding. - The second KV namespace ID is for the
OAUTH_KVbinding. - The D1
database_idis for theDBbinding. - The R2 bucket name is for the
R2binding.
Open wrangler.jsonc and replace only your Cloudflare resource values. Keep the binding names exactly as shown below, because the application code expects those names.
Do not use wrangler deploy --update-config for this step. Edit wrangler.jsonc manually so "migrations_dir": "drizzle" stays in the D1 database config.
pnpm run deployIn the Cloudflare dashboard:
- Go to
Compute->Workers & Pages-> your OpenSEO Worker. - Open
Settings. - In
Domains & Routes, enableCloudflare Accessfor theworkers.devroute. - Save the values shown by Cloudflare Access.
Then set the same values as Worker secrets with Wrangler:
pnpm exec wrangler secret put TEAM_DOMAIN
pnpm exec wrangler secret put POLICY_AUD
pnpm exec wrangler secret put DATAFORSEO_API_KEYUse the domain from JWKS_URL for TEAM_DOMAIN, for example https://your-team.cloudflareaccess.com. Use the Access application audience value for POLICY_AUD.
DataForSEO API responses are cached in R2 under the dataforseo-cache/ prefix. This step is optional, but recommended to automatically clean up expired cache objects:
pnpm exec wrangler r2 bucket lifecycle add open-seo-YOUR_SUFFIX dataforseo-cache-expiry dataforseo-cache/ --expire-days 7- Open your Worker URL again.
- Sign in with Cloudflare Access.
- OpenSEO should load after login.
If login fails, re-check the three secrets, the Access toggle, and the binding values in wrangler.jsonc.