A deep dive into OpenSEO

By

Updated

Tagged: SEO, AI

How OpenSEO works: DataForSEO data, Cloudflare Workers, its audit crawler, MCP tools, the SAM agent, storage, and how to self-host it.

OpenSEO puts keyword research, competitor analysis, backlinks, site audits, and search visibility into a single app. You can use the hosted dashboard, wire up an AI agent over MCP, or self-host the open-source version.

The part I like is that all of this work stays inside one project. Your research sits right next to the site it belongs to, so an agent can pull fresh data, keep track of the business context, and write up a report you can review later.

The open-source repository is also a solid real-world codebase to study. It combines a React frontend with server functions, a relational database, object storage, durable background workflows, and stateful agents. I haven’t deployed it or run an SEO campaign with it myself, so here we’ll walk through how the pieces fit together and what you take on if you decide to run it yourself.

Open source application, external data

Even though the app is open source, most of its market data comes from DataForSEO, which is a paid commercial API. Cloning the repo doesn’t hand you a keyword database or a backlink index. When you self-host, you plug in your own DataForSEO credentials and pay them per request. What OpenSEO gives you is the workflow built around that data: project defaults, validation, saved research, tracking history, reports, agent tools, and the dashboard.

A few features talk to other services instead. Search Console pulls from Google’s API for any property you authorize, the built-in agent runs through OpenRouter, and JavaScript-rendered audits use Cloudflare Browser Run (with Context as an optional fallback). Standard HTML crawls just fetch pages directly from the site you’re auditing, with no LLM in the loop.

CapabilityMain source or execution path
Keyword and competitor researchDataForSEO APIs
Backlink researchDataForSEO’s backlink data
Rank observationsDataForSEO search-result collection
Search Console performanceGoogle’s API for an authorized property
Technical HTML checksOpenSEO’s crawler and analyzers
JavaScript-rendered pagesBrowser Run or Context, depending on deployment
Lighthouse checksDataForSEO integration
In-app agent reasoningOpenRouter model access
AI visibility collectionDataForSEO collection methods that differ by engine

The hosted version adds billing and usage tracking on top. Its pricing page has a $10/month base plan with $10 of included usage, plus extra usage purchases if you need more. Self-hosting skips that subscription, though you’ll still pay the upstream API providers and your own infrastructure costs.

The architecture from the outside

There are four ways into OpenSEO: you can open the web dashboard, point an external agent at /mcp, chat with the built-in SAM agent, or let Cloudflare’s scheduled handler trigger recurring jobs. Each path uses its own authentication and exposes its own set of tools, yet they all end up calling the same server-side features underneath.

Fig 1 · 1/5A request can reuse data or fetch it again
Choose an entry point

The main app is written in TypeScript using TanStack Start, React, and TanStack Router, with TanStack Query managing client-side server state and Tailwind handling styling. Server functions validate incoming input and call a feature service, keeping provider credentials strictly on the server.

Everything enters through src/server.ts, which routes web requests, MCP traffic, agent sessions, and scheduled work. Inside src/server/features/, the code splits by area: keywords, domains, backlinks, audits, projects, reports, integrations, and agents. Services implement product operations, repositories handle stored data, and shared clients talk to DataForSEO. That structure is why a button in the keyword UI and an MCP tool call run the exact same code. The site audit engine is the main exception, since it runs in a separate auxiliary Worker (we’ll look at that later).

If you want to browse the repo yourself, here’s where each piece lives:

AreaSource entry pointWhat to follow
Request dispatchsrc/server.tsApp, MCP, chat, and scheduled entry points
Research operationssrc/server/featuresProduct services and repositories
External SEO datasrc/server/lib/dataforseoProvider methods, envelopes, pricing, and retries
Durable executionsrc/server/workflowsAudit, ranking, and visibility orchestration
Audit stateAuditScratchpad.tsFrontier ownership and temporary SQLite state
MCPsrc/server/mcpAuthentication, schemas, transport, and tool wrappers
In-app agentsrc/server/features/samChat sessions, memory, tools, and model execution
SQL backendsrc/dbSchemas, provider selection, transactions, migrations
Infrastructuredeploy/alchemyResource provisioning and deployment modes

Why Cloudflare appears throughout the code

OpenSEO is built around Cloudflare bindings. Instead of connecting over the network with hostnames and passwords, a binding gives a Worker direct access to a configured resource like a database or a storage bucket through its environment.

Because of that, you can’t just drop this app onto a generic Node server with a Postgres URL and expect it to run. Under the hood it uses D1 as the default relational database, R2 for object storage, KV for lightweight state, Cloudflare Workflows for durable background jobs, and SQLite-backed Durable Objects for specific stateful jobs.

Locally, Docker runs the Cloudflare development and preview runtime using local implementations of those bindings. If Cloudflare’s execution model or bindings feel new to you, I walk through them in my complete Cloudflare guide.

Follow a keyword request

Suppose you want to see which searches relate to a waiting-list tool. Your project already supplies the domain, location, and language, and you pick a seed keyword (or another research operation) with result limits and filters.

First, the server checks that you have access to the project, then the feature service translates your request into provider calls. Related keywords, domain keywords, search volume, and live search results are separate requests, so loading one page can trigger several calls. On the server side, the provider client attaches authentication and checks both the HTTP status and DataForSEO’s own result envelope, because an HTTP 200 can still carry a task-level failure.

Once the results come back, OpenSEO maps them into rows for the interface. Saving a keyword is a separate action that writes to the project’s saved list, so closing a tab won’t lose what you found. Agents work the same way: they pull results, pick out what matters, and explicitly save the keywords they want to keep.

The keyword service does a fair bit more than forward a seed to one endpoint. It normalizes and deduplicates seeds, then chooses the right provider path for the target market:

  • In automatic mode, it combines suggestions and ideas, removes duplicates, and falls back to related keywords when the first result is thin.
  • For countries outside one provider dataset’s coverage, it switches to a Google Ads path instead.
  • For local research, it starts with national ideas and swaps in local Google Ads metrics for selected fields without overwriting the national records.

That’s why the cache key has to include market, language, limit, mode, and local settings rather than only the keyword.

Domain and backlink features have their own scope limits too. Some upstream summary or history endpoints can’t represent a subfolder, so OpenSEO labels or omits that data instead of pretending a filter was applied.

Fig 2 · 1/5Keyword research combines several operations
Normalize the question

Location and language are part of every query. The same search returns different results in different countries, and changing the device or filters shifts both the data and what it costs to collect. OpenSEO keeps market defaults on the project and records the market next to saved or tracked items. Keep those settings steady within an investigation: tracking a small set of searches in a market you can serve beats pulling a massive international list with no clear use.

Fig 3 · 1/4A keyword needs its market settings
Start with a keyword

Caching and freshness

OpenSEO splits its data into three layers: a client cache so the dashboard doesn’t constantly reload, a provider-result cache so you don’t pay twice for the same API work, and saved project data as your durable record.

The provider cache lives in r2-cache.ts. It stores responses in R2 under deterministic keys built from the operation’s parameters, with an expiration timestamp in object metadata. When a read hits an expired object, the app treats it as a miss. That’s a soft TTL: the app stops reusing the payload, even though the file can still sit in storage. Research paths can also validate cached data against a schema, which catches a stale shape after a deployment.

Each operation has its own caching policy. A cached keyword list works fine for planning, whereas a scheduled rank check needs a fresh measurement. Before you act on a number, check when it was collected.

Fig 4 · 1/5A soft TTL decides whether cached data is reusable
Build the operation key

Where the data lives

Different pieces of data in OpenSEO have different shapes and lifetimes, so the app spreads them across several storage backends.

Fig 5 · 1/5Storage services have different jobs
Several kinds of state
StorageResponsibility
D1, or the optional Postgres backendUsers and organizations, projects, saved research, tracking configuration and results, integrations, report documents
R2Cached provider payloads, larger audit artifacts, generated exports
KVSelected progress and transient state; a separate namespace holds hosted MCP OAuth data
SAM Durable Object SQLitePersistent chat messages and agent state for a session
Audit scratchpad Durable Object SQLiteTemporary crawl frontier, seen URLs, link edges, and slim page state

Each backend matches how that data gets accessed. Project listings need indexed rows and relationships, cached responses are fetched as one object by key, and a crawl frontier needs tightly coordinated updates while a job runs. Reports also live in the relational database, not in R2.

Everything follows one central relationship: organization → project → feature data. Saved keywords, audit runs, and tracking history belong to a project, and crawled pages belong to an audit. Repository methods scope child lookups by both project and ID, so someone authorized for one project can’t fetch another project’s report by guessing its ID. Archiving a project hides it from view while keeping its history.

D1 and Postgres

D1 is the default database, though you can run Postgres instead through Cloudflare Hyperdrive. Drizzle is the query layer, with separate schemas and migrations for SQLite and Postgres kept in sync by schema-parity tests.

The two backends still behave differently underneath. runBatch uses D1’s batch operation on SQLite and a transaction on Postgres. On Postgres, every statement has to be built from the transaction handle, or it silently runs outside the transaction. Postgres clients are also scoped to one invocation through request-local context, so a Worker never reuses a socket from an earlier request. Hyperdrive is required here, because a database URL alone won’t work. If you want to see how that binding and connection pooling work, check out my Cloudflare Hyperdrive tutorial.

Switching to Postgres only swaps out the relational database. Workflows, agent storage, object storage, and the audit engine all stay as they are.

Fig 6 · 1/4One write contract, two database paths
Build related writes

You can authorize Search Console for your own site, not for a competitor’s, so market-research providers estimate competitor visibility from the data they collect. OpenSEO shows ranking keywords and pages, filters, referring domains, individual backlinks, history, and quality indicators, all backed by server-side pagination so a giant dataset never lands in the browser.

Don’t put much weight on a large backlink count by itself. Look at the source pages, check whether those links are relevant, and see if the opportunity makes sense for your audience. When you compare providers, stick to the same domain, market, and date, since their coverage and collection methods differ.

Rank tracking is a durable job

Each tracking configuration defines what keywords to check and in which market. On a schedule, a Cloudflare cron wakes up the dispatcher, grabs only the configurations that are due, and hands them off to a workflow to submit and collect the results.

DataForSEO runs its own async task system: OpenSEO submits a task, saves the task ID, and comes back for the results later. Cloudflare Workflows tracks where the job stands, while DataForSEO’s task queue handles the collection. Don’t let variable names like queued fool you, because Cloudflare Queues isn’t part of this setup. Running everything inside a workflow also means waiting on a provider never ties up a browser request.

Things still go wrong with async providers. A job can fire twice, or a provider task can finish after the app drops the connection. OpenSEO handles both with run guards, persisted task state, and reconciliation paths so the next run reuses what’s already paid for instead of submitting a duplicate task.

One caveat if you use the hosted version: scheduled rank tracking is paused there behind a hosted-only flag. Manual checks still work, and self-hosted setups ignore that flag, so check the hosted status before you count on it for unattended runs.

Claiming a schedule

The scheduler walks through due configurations in order and caps how much work it takes on in a single tick. It counts keyword and device combinations rather than raw keywords, since desktop and mobile run as separate tasks. To claim a slot, it uses a compare-and-swap update that only succeeds if the stored state still matches what the dispatcher just read. That stops two overlapping ticks, or a tick and a user editing a config, from grabbing the same run, and a failed workflow launch won’t spin into an endless retry loop.

Once the workflow is running, it saves observations batch by batch so a failure near the end doesn’t throw away earlier results. Scheduled checks go through queued provider tasks, while manual checks use live collection, with fallbacks when a task goes missing or fails. Keep in mind that a queued task followed by a live fallback can get billed twice. If the fallback fails too, OpenSEO keeps the last known observation rather than recording the keyword as not found.

Fig 7 · 1/5A schedule claim and a provider task queue have separate jobs
Find due configurations

The site audit engine

A site audit starts with a URL and a bounded scope, discovers pages, fetches and analyzes them, and builds results across the crawl. In a durable app, the tricky part of that loop is deciding what state needs to survive from one iteration to the next. I built a smaller version of this pattern in a tiny site-audit crawler with Workers and Queues.

OpenSEO puts the audit engine in its own auxiliary Worker. The main app kicks off SiteAuditWorkflow through a cross-script binding, then checks status or sends control operations over the same boundary. The reason for the split is memory: in-flight HTML and heavy Lighthouse payloads stay in a separate Worker heap where they can’t interfere with the main app, while both Workers share storage.

Fig 8 · 1/5The audit worker keeps temporary crawl state
Start an audit

The frontier and the scratchpad

As it crawls, OpenSEO maintains a frontier, which is the list of URLs it has discovered but hasn’t finished yet. It pulls candidates from the starting page, sitemaps, and links found along the way. URL normalization and policy rules filter out fragments, tracking parameters, alternative spellings, and external links so a crawl doesn’t balloon past its intended scope.

Each audit stores that working state in a SQLite-backed Durable Object acting as a scratchpad. It holds the frontier, the seen-set, the link edges, and a slim mirror of page data. Because one Durable Object owns all of it, Workers can advance the crawl without serializing the entire graph across every workflow step. Once the audit finishes, the scratchpad gets torn down, and a cleanup alarm removes abandoned ones, so any permanent results have to land in main storage first.

Fig 9 · 1/5A retry recovers its original chunk of URLs
Discover normalized URLs

Checkpoints and backpressure

The workflow works through bounded chunks of leased URLs. Each chunk has a stable identity, so a retry picks up the exact same lease instead of grabbing a fresh batch of pages, and writes back to the scratchpad are idempotent. Checkpoints only pass back small counters and status flags, never the full frontier or downloaded HTML.

If saving pages falls behind fetching, the crawler stops launching new requests rather than letting HTML pile up in memory. Its adaptive fetch window stays conservative. When a target server returns a 429, the crawler pauses new fetches using the site’s retry guidance or a fallback delay, and carries that throttle state into the next chunk.

Two limits are worth keeping in mind when you read the results: the link graph has a storage ceiling, and rendered-page analysis truncates very large HTML documents. Treat an orphan-page report as a snapshot of the graph the crawl saw. If the run hit a page cap, ran into blocked responses, or truncated a big page, a URL marked as orphaned might still have inbound links on the live site.

Fig 10 · 1/5Slow persistence pauses new page fetches
Start a small fetch window

Fetching and checking pages

A fetch won’t always hand back a normal web page. You might get a redirect, a CDN challenge, a rate-limit error page, or an image. OpenSEO classifies each response before running SEO checks so a blocked request doesn’t show up as a broken page with no heading and no text. When you audit a site you control, start with a small page budget and inspect those classifications first. If the crawl is full of access failures, fix crawler access before you touch any content.

From there, the checks split into two groups. Single-page checks look at one response at a time: title, description, headings, canonical URL, indexability directives, structured data, and social metadata. Whole-crawl checks rely on the link graph to catch duplicate titles, link relationships, and canonical conflicts. Even then, severity is your call, because a missing description on a utility page is nowhere near the same problem as an accidental noindex on a product page.

Rendering and Lighthouse

Client-rendered sites often hide their content until JavaScript runs, so OpenSEO includes a rendered audit path. On Cloudflare, it tries Browser Run first and falls back to Context. Docker doesn’t have the browser binding, so rendering there goes through Context credentials. Browser Run on Cloudflare requires a paid Workers plan, even when the rest of the app fits inside the free tier.

Lighthouse checks run through DataForSEO’s Lighthouse service. Those scores are lab results measured under that test’s conditions, so keep real-user measurements alongside them if you want field performance.

Fig 11 · 1/5Rendering depends on the selected crawl path and runtime
Inspect raw HTML

Recovering a stuck audit

Runtime limits, provider outages, and mid-crawl deployments can all cut an audit short before its final write. To clean up after them, the main app’s scheduled handler runs a stale-audit reconciler that spots stalled audits and updates their status, while the scratchpad’s cleanup alarm clears out their temporary state.

MCP is another application interface

OpenSEO exposes its tools through MCP, letting an external agent work directly against the same projects and data. I walked through that keyword workflow in Research keywords through OpenSEO MCP.

You might hand an agent a prompt like this:

Use the project for my waiting-list tool. Read its context first.
Find a small set of relevant search opportunities in the project's market.
Reuse existing research where possible. Tell me which fresh requests would
cost money before expanding the investigation. Save the selected keywords
and a report containing the evidence and the next actions.

The agent turns that request into tool calls, each backed by an input schema and server-side behavior. When debugging the output, check the tool parameters if it returned the wrong data, or check the agent’s instructions if the data is fine but the advice is weak.

Fig 12 · 1/5An external MCP agent can research and save reports
Connect an external agent

Identity on every tool call

Hosted MCP connections work with either the app’s OAuth system or API keys. The credential identifies the user, and every tool call verifies that user’s current access to the requested project. Because a user can belong to several organizations, the server pulls the organization from the authorized project instead of trusting the client, keeping both data and billing in the right place. That guard covers child records too: passing a report ID or tracking configuration ID only works if it belongs to that project. An API key accepted for MCP also can’t double as a browser session for account administration.

If you deploy behind Cloudflare Access, Access protects the app and the server validates its assertions. Even so, MCP clients need Managed OAuth configured with their callback addresses, because a working browser login won’t let an external client connect.

Local Docker mode skips application authentication altogether, and that includes its MCP endpoint.

My guide to MCP covers the protocol itself. OpenSEO is a good larger example because its tools reach paid operations, persistent data, and several organizations.

Fig 13 · 1/4Three deployments have different trust boundaries
Choose a deployment mode

Between requests, the MCP transport stays stateless. Durable state lives in projects and repositories, while the external agent keeps its own conversation. As the diagram above shows, a research tool never calls a report-writing tool on its own: the agent reads the result, writes a document, and sends a separate save request.

Spending boundaries

An agent can generate a lot of plausible research calls, and every one of them can cost money. Hand it a broad prompt like “research every competitor and every keyword” and you’ve removed all guardrails. Start small instead: pick one project, one market, and a few bounded questions, and tell the agent to reuse saved data before fetching anything new. Server-side metering still matters underneath all that, because it runs no matter how the model phrases its next call.

Project context

Each project can store business context: what the product does, who it serves, competitors, important pages, and bounded research-log summaries. Without it, every new agent session starts from scratch, guesses the same basics, and risks paying for the same research twice. Updates are validated and related writes grouped atomically, so the next agent never sees a half-applied edit.

Because it’s plain application state, you update it yourself whenever the product changes. Keep it short enough that you can review it quickly. For a self-hosted signup tool, for example, you’d record the signup workflow, double opt-in behavior, and intended users, while leaving out integrations or a managed service it doesn’t have. That keeps the agent’s topic ideas grounded in what the product does.

SAM, the built-in agent

SAM is OpenSEO’s built-in assistant. It shares feature services with the rest of the app, though it lives inside OpenSEO itself rather than connecting as an external MCP client.

Each chat session gets its own SQLite-backed Durable Object, tied to the user and project by a relational session record. The Worker authorizes both the live connection and message-history requests before routing them to the object, so knowing a session ID isn’t enough to read it. Model access goes through OpenRouter, which means self-hosting needs an OpenRouter key for SAM to work. Server-side tool wrappers supply the authorized project automatically, so the model can’t switch projects by changing a tool argument.

OpenSEO also bundles public skills into SAM, adapted for an environment with no filesystem or shell. SAM can explain what’s wrong, while changing a website’s code stays a job for an external coding agent. It has no report tools either, so its adapted skills return findings in chat, whereas external MCP clients can save reports.

As a conversation grows, SAM compacts and clips context because a Durable Object’s memory can run out before the model’s context window does. Messages persist, and if an inference gets interrupted, OpenSEO won’t replay it automatically since that could repeat paid tool calls. You just ask it to continue.

Fig 14 · 1/5SAM keeps a private chat beside shared project context
Authorize the conversation

Reports are sandboxed HTML

External agent workflows can save a self-contained HTML report right into a project. That’s much easier to read than a raw transcript, and it sticks around after the session ends. On the way in, the report service checks the HTML structure, enforces byte limits, and applies storage guardrails. Updates overwrite the previous report with no version history, and report listings pull metadata separately from the full HTML.

Since these reports combine crawled pages with model output, you have to treat the HTML as untrusted. OpenSEO serves each one inside a strict sandbox and attaches a Content Security Policy directly to the report response. Scripts, network requests, and form submissions are all blocked, and the report never runs on the app’s own origin, even if you open it outside the embedded viewer. The only exception is a single narrowly allowed script supplied by OpenSEO to handle printing.

Hosted installations support public share links for reports, while self-hosted setups disable them. If you’re on the hosted version, think carefully before turning a link on, because a polished report can still carry commercially sensitive research.

Fig 15 · 1/5A report can look rich while its HTML stays restricted
Treat the document as untrusted

Search Console and Analytics

Connecting Search Console gives OpenSEO clicks, impressions, positions, and the query and page dimensions Google’s API supports for any property you authorize. You’re pulling first-party data here, though Google still shapes what you see through aggregation, API quotas, and omitted rows.

To self-host the Google integration, you’ll need a Google OAuth client, an exact callback URL, and an encryption secret for stored tokens. Back up that secret right alongside your database, because restored OAuth tokens can’t be decrypted without it.

Signing in with Google and granting access to Search Console or GA4 are separate grants. A data grant is tied to the specific user and Google account that connected it, and each project mapping points to a selected property plus the grant used to read it. Everyone else on the project reads through that connection. If the person who connected it revokes access or loses their Google permissions, reads break for everyone.

OpenSEO also includes GA4 integration. GA4 tracks activity on your site, while Search Console shows how your pages appear in Google Search.

Fig 16 · 1/5Google identity and Google data have separate consent
Login is a different grant

AI visibility

AI visibility tracks whether a brand shows up in answers to selected questions, and whether those answers cite your site. It’s useful when you log the exact conditions behind each run, and misleading if you treat it as one universal score for how often “AI recommends you”.

Inside a project, you define prompts and markets, collect answers across supported engines, and track mentions and citations over time. ChatGPT, Gemini, and Google AI Overviews run through DataForSEO’s scraper or search-result collection. Claude and Perplexity go through DataForSEO’s model-response APIs with web search turned on, so those answers come from an API call rather than a signed-in app session.

Fig 17 · 1/5AI visibility follows two different collection paths
Define an observation

Any collected answer can look different from what someone else sees depending on their location, account history, time, or wording.

Fig 18 · 1/5An estimate, a click and a mention measure different things
Different evidence answers different questions

OpenSEO separates two signals here: a mention checks whether the brand name appears in the text, while a citation checks whether the answer links to an owned domain. Those two often disagree. A generic brand word can be ambiguous, and a competitor’s page about your product won’t count as your citation. Always read the underlying answers before reacting to a trend.

Comparing runs also requires comparable inputs. If one run checks ten prompts and the next checks fifty, the aggregate shifts just because the sample changed. OpenSEO compares matching prompt, engine, market, and brand cells and applies answer-coverage thresholds, so a failed collection isn’t counted as brand absence. Still, the prompt list is yours, so the data only reflects the questions you picked. Start with a few customer questions that matter to your product, keep the conditions stable between runs, and review the cited pages.

Fig 19 · 1/5An AI trend needs the same questions and enough answers
Define a comparison cell

Retrying a failed read from your own database costs almost nothing. Retrying an external research task is a different story, because you can trigger billable work twice even when the first response never arrived.

OpenSEO’s provider client splits HTTP failures from task-envelope failures, bounds request time, and avoids blindly replaying timeouts. Hosted requests add credit accounting through Autumn, which estimates or reserves usage up front and reconciles provider-reported costs later. Self-hosted installs skip that layer, and DataForSEO bills your account directly.

Because no transaction spans your database, the provider’s task system, a workflow, and credit accounting, recovery relies on identifiers, recorded state, and reconciliation. “The request failed” might mean the provider rejected it, or that the job finished and the response got lost on the way back. Those two cases have very different retry and billing consequences.

If you self-host, set provider spending controls right away and start with small limits. Scheduled runs and AI agents both multiply requests faster than you expect.

Fig 20 · 1/5A paid request crosses accounting boundaries
Choose the billing mode

Run it locally with Docker

If you want to try OpenSEO on one machine, Docker is the way to go. On macOS, use Docker Desktop or another Docker environment with Compose support.

Start by cloning the repository and copying its environment template:

git clone https://github.com/every-app/open-seo.git
cd open-seo
cp .env.example .env

Open .env and set DATAFORSEO_API_KEY to the Base64 credentials from DataForSEO’s API access page. Base64 only encodes your API login and password, so treat that string like any other secret.

You can also opt out of anonymous self-hosting telemetry:

OPENSEO_TELEMETRY_DISABLED=1

Now start the published container image:

docker compose up -d
docker compose logs -f open-seo

By default, Compose pulls ghcr.io/every-app/open-seo:latest and maps the app to 127.0.0.1:3001, so you can open localhost:3001. Expect the first boot to take a while as it validates config, applies migrations, and builds the app. Later restarts reuse that build as long as nothing changed.

Once it’s up, check its health:

curl --fail http://localhost:3001/api/health

That checks your config and database. Provider calls, Google connections, and model integrations still need their own tests.

One security detail to keep in mind: the Compose setup forces AUTH_MODE=local_noauth, which injects a local admin identity with no login. That’s why the port binds only to loopback. Don’t expose it publicly, and if you put a reverse proxy or tunnel in front of it, add real authentication first. ALLOWED_HOST only lets a hostname past Vite’s host checks. For shared internet-facing use, deploy to Cloudflare instead.

The named open_seo_data volume mounts /app/.wrangler, which holds all your local state. Removing a container leaves the volume intact, but a Compose command that removes volumes deletes your projects for good.

Because the preview runtime doesn’t emit cron events, the container runs a local scheduler to trigger scheduled handlers. Schedules only fire while the container is running, so a laptop that sleeps overnight won’t track anything.

When you’re ready to update, back up first, then pull the new image and recreate the service:

docker compose pull
docker compose up -d

Pin an image tag you’ve tested when you need a repeatable deployment, and keep in mind an older image might not read a database after a newer migration. The project’s Docker guide covers optional variables and operational commands. My free Docker Handbook covers volumes, networking, and Compose.

Deploy it to Cloudflare

The supported Cloudflare path provisions everything with Alchemy, the infrastructure code included in the repo. It creates the storage resources and Workers, applies migrations, and sets up a Cloudflare Access application for you.

Fig 21 · 1/5Local and cloud deployments have different boundaries
Choose an operating model

Before you start, you need a Cloudflare account with R2 enabled (which can require a payment method even within free allowances), a recent Node, pnpm, and your DataForSEO credentials.

Inside your clone, install dependencies:

corepack enable
pnpm install

Next, log in and bootstrap:

pnpm alchemy login
pnpm alchemy cloudflare bootstrap

Your login needs the Access permissions listed in the self-hosting guide. Bootstrap creates Alchemy’s state store in your Cloudflare account.

Now copy the dedicated template:

cp deploy/.env.selfhost.example .env.selfhost

Set DATAFORSEO_API_KEY and ACCESS_ALLOWED_EMAILS in that file. The email list controls who gets through the Access gate, so keep the file private.

When that’s ready, deploy:

pnpm deploy:selfhost --yes

If you already have a Cloudflare Access configuration, you can pass it in through TEAM_DOMAIN and POLICY_AUD instead. Pick one place to own that policy (either the infrastructure code or your own Access dashboard), because a later deploy can overwrite manual changes you made in the dashboard.

Open the printed Worker URL, sign in through Access, and test the dashboard along with one small provider request. Everyone allowed through Access shares one workspace and sees every project in it. That works well for a small trusted team, though it’s a poor fit for an agency that needs isolated client portals.

To connect external MCP clients, set up Access Managed OAuth with the right redirect addresses and point them to your deployment’s /mcp endpoint, following the operations guide.

Stick with this workflow instead of trying a generic one-command Worker upload. The main app and the audit Worker rely on cross-script bindings, storage, workflow registrations, and Access settings that all have to stay consistent.

Add integrations gradually

Don’t wire everything up at once. Verify the base app first so that if anything breaks, you have fewer moving parts to debug.

Start with one small research request and confirm the market and provider activity. Next, connect Search Console (with the OAuth callback set exactly and the encryption secret saved), and add OpenRouter if you want SAM. Try a bounded HTML audit before enabling browser rendering, and turn on schedules last. Start with a few observations and check that they still finish after you close the browser.

You can use this as a quick reference as you bring each piece online:

Verify OpenSEO integrations graduallyStart with a bounded research request, then add Search Console and optional model access. Verify an HTML audit before browser rendering and scheduled observations.One project andresearch requestCheck market andprovider activityConnect SearchConsole if neededAdd OpenRouter forSAM if neededTry a bounded HTMLauditAdd rendering andschedules gradually

Backups and recovery

On Docker, stop the service before backing up the runtime volume and your private config. That keeps you from copying database files mid-write.

On Cloudflare, a database export only covers relational data, so plan separately for important R2 objects, relevant KV state, and durable chat state. The audit scratchpad is disposable. Always save the token-encryption key (stored OAuth tokens are unusable without it), and keep a deployment revision with each backup, since SQLite and Postgres maintain separate migration histories.

Test your restore in a separate environment with schedules disabled, or the restored instance could start paying for duplicate observations. Be careful with the infrastructure destroy command too, since it can delete the stage’s stored data along with its Workers.

Fig 22 · 1/5Recovery needs more than a database export
Inventory durable state

What will limit it as usage grows?

A bigger SQL database fixes only some of the bottlenecks. Every fresh research operation still carries provider latency and cost, and crawl cost climbs with pages, link edges, HTML size, rendering, and Lighthouse runs. Cached objects and saved reports also need retention rules so storage stays under control.

Watch the main Worker, the audit Worker, workflow state, and provider errors separately, because the dashboard can look fast while collection is failing. Measure a deployment with real limits before relying on it to serve an agency’s whole portfolio unattended.

OpenSEO versus the alternatives

OptionWhen it makes senseMain trade-off
OpenSEO self-hostedCustom workflows, owned app state, inspectable code, and agent toolsYou run the app yourself and pay each provider directly
OpenSEO hostedThe same product without maintaining its infrastructureSubscription, usage accounting, service availability, and less deployment control
AhrefsEstablished competitor and backlink research backed by its own datasetA different dataset, product model, and subscription cost to weigh
SemrushA broad marketing and SEO suite with many built-in workflowsScope and cost can be overkill for a small project
Screaming Frog SEO SpiderDetailed technical crawling from a desktop appDoesn’t replace a hosted research and agent workspace
Search ConsoleDirect data on how your own site appears in Google SearchCovers only properties you own, not competitor research
Direct DataForSEO integrationFull control over API requests for a focused custom toolYou build storage, UI, access control, reporting, and recovery yourself

Ahrefs Site Explorer runs on its own data collection, so compare a handful of specific queries side by side before treating OpenSEO as a replacement. Semrush covers a lot more marketing workflows, which is only worth paying for if you’ll use them. Screaming Frog runs on macOS, Windows, and Linux, and it’s the better fit when the main task is a detailed technical crawl.

For an existing site, start with Search Console. Bring in outside market data only when you hit a question it can’t answer. Going straight to DataForSEO works well for a narrow internal tool, like a single recurring report. Once you also need projects, authentication, agents, reports, tracking history, and an interface for other people, OpenSEO already has most of that code written.

How I would use OpenSEO

Start with one small project and a few specific questions.

Look at the searches that already bring people to your site first. Google Search Console gives you that, or Searchglass if you’d rather pull clicks and impressions from the terminal. On my own sites, I already keep those reports, the crawl, and follow-up checks in SEO Bot (the terminal commands are in how to run SEO checks from the terminal). Where OpenSEO fits into a setup like that is the piece those tools don’t cover: competitor and market data stored right next to the project.

Next, check a few comparable products and their search results for questions you can answer from real product knowledge. Don’t ask an agent to build a publishing calendar from search volume alone. Volume points to demand, not whether your product solves someone’s problem.

Save the useful keywords with their market settings, keep the project context factual, and let an external agent turn the research into a report with links to the evidence and a short list of actions. After reviewing it, make one change, like rewriting a confusing page or fixing an indexing issue, and watch the relevant queries with a small tracking set. Keep AI visibility as a separate experiment with a stable prompt list, and read the answers yourself before trusting any trend.

Run it with Docker first. If it turns out to be useful across devices or for a trusted team, move to the Cloudflare deployment and test a restore before depending on scheduled jobs.

The limits matter just as much. Self-hosting puts the app code in your hands, while market data and model features still depend on DataForSEO, OpenRouter, and Google, and every request costs money. The Cloudflare dependency goes deep too, so moving to another runtime means replacing workflows, durable state, bindings, and storage.

Don’t put separate clients in one self-hosted workspace either, because everyone behind Access sees everything. For a single technical crawl, a desktop crawler is still the easier choice, and for a quick check on this blog, Search Console usually has the answer already.

If you’d rather build a focused SEO tool instead, the MIT-licensed code is a good base to fork after you read the data providers’ terms.

Want me to talk about your product? You can sponsor this site.

Related posts about seo: