# Where Are the Configuration Files Located in Open-SEO?

> Find Open-SEO configuration files easily. Learn where runtime, build-time, environment templates, Cloudflare Workers, database migrations, and Docker configs are located in the repo root.

- Repository: [Every App/open-seo](https://github.com/every-app/open-seo)
- Tags: api-reference
- Published: 2026-07-30

---

**Open-SEO stores all runtime and build-time configuration files in the repository root directory, using a flat structure that includes environment templates, Cloudflare Workers settings, database migration configs, and Docker deployment scripts.**

Open-SEO is an open-source SEO automation platform designed to run on Cloudflare Workers. According to the `every-app/open-seo` source code, every configuration file resides in the top-level directory, making it easy to locate and modify settings for local development, Docker containers, or Cloudflare deployments.

## Environment and Cloudflare Configuration

Open-SEO relies on two critical files for runtime variables and platform-specific settings.

### Environment Variables (.env.example)

The `.env.example` file serves as the template for all required environment variables. You must copy this file to a real `.env` before running the application. It contains placeholders for sensitive credentials like the DataForSEO API key and database URLs.

In `wrangler.jsonc`, Cloudflare-specific settings declare the worker name, compatibility flags, and KV namespace bindings:

```jsonc
// wrangler.jsonc – declares KV namespace and environment variables
{
  "name": "open-seo",
  "type": "javascript",
  "compatibility_date": "2024-01-01",
  "kv_namespaces": [{ "binding": "SEO_KV", "id": "xxxxxxxxxxxxxxxxxxxx" }],
  "vars": {
    "DATAFORSEO_API_KEY": "$DATAFORSEO_API_KEY"
  }
}

```

## Database and Build Configuration

The project uses separate configuration files to handle database migrations and the Vite build pipeline.

### Database Migration Files (drizzle.config.ts)

Open-SEO maintains two database configurations:
- **[`drizzle.config.ts`](https://github.com/every-app/open-seo/blob/main/drizzle.config.ts)** – Configures SQLite for local development
- **[`drizzle-prod.config.ts`](https://github.com/every-app/open-seo/blob/main/drizzle-prod.config.ts)** – Configures Postgres for production environments

These files define the schema locations and driver settings for the Drizzle ORM:

```ts
// drizzle.config.ts – selects the SQLite database for local development
import { defineConfig } from 'drizzle-orm';
import { sqlite } from 'drizzle-orm/sqlite';

export default defineConfig({
  schema: './drizzle/*.sql',
  out: './drizzle-pg',
  driver: sqlite('db.sqlite')
});

```

### Vite Build Settings (vite.config.ts)

The [`vite.config.ts`](https://github.com/every-app/open-seo/blob/main/vite.config.ts) file controls the development server and build process. It imports a custom plugin from [`vite-plugin-lean-worker-bundle.ts`](https://github.com/every-app/open-seo/blob/main/vite-plugin-lean-worker-bundle.ts) to handle Cloudflare Worker bundling:

```ts
// vite.config.ts – reads the env file and passes variables to the worker
import { defineConfig } from 'vite';
import leanWorker from './vite-plugin-lean-worker-bundle';

export default defineConfig({
  plugins: [leanWorker()],
});

```

## Docker and Self-Hosting Configuration

For self-hosted deployments, Open-SEO provides Docker-specific configuration files in the repository root.

### Container Orchestration (compose.yaml)

The [`compose.yaml`](https://github.com/every-app/open-seo/blob/main/compose.yaml) file defines the Docker-Compose setup, wiring the worker together with either a local SQLite or Postgres instance for development environments.

### Startup Scripts (docker-entrypoint.sh)

The [`docker-entrypoint.sh`](https://github.com/every-app/open-seo/blob/main/docker-entrypoint.sh) script reads environment variables from the `.env` file and launches the worker. This entrypoint is essential for Docker-based deployments:

```sh

# docker-entrypoint.sh – loads .env and starts the worker

#!/bin/sh
set -e
source /app/.env
wrangler dev --vars-from .env
exec "$@"

```

### Documentation (README.md and docs/*.md)

While not machine-readable configurations, the [`README.md`](https://github.com/every-app/open-seo/blob/main/README.md) and files in the `docs/` directory (such as [`docs/DATAFORSEO_API_KEY.md`](https://github.com/every-app/open-seo/blob/main/docs/DATAFORSEO_API_KEY.md)) contain human-readable guides listing required variables and setup instructions.

## How to Customize Open-SEO Configuration

To configure the application:

1. **Copy `.env.example` to `.env`** and insert your actual API keys and database URLs
2. **Modify `wrangler.jsonc`** if you need to change Cloudflare KV bindings or compatibility dates
3. **Select the appropriate Drizzle config** based on your environment (SQLite for local, Postgres for production)
4. **Run via Wrangler** (`wrangler publish`) for Cloudflare deployment or **Docker** (`docker compose up`) for local containers

The Vite and Drizzle configs are read automatically by their respective build tools, while `wrangler.jsonc` is processed exclusively during Cloudflare deployments.

## Summary

- All Open-SEO configuration files live in the repository root directory (`open-seo/`).
- **`.env.example`** provides the template for environment variables required to run the application.
- **`wrangler.jsonc`** controls Cloudflare Workers deployment settings and KV namespace bindings.
- **[`drizzle.config.ts`](https://github.com/every-app/open-seo/blob/main/drizzle.config.ts)** and **[`drizzle-prod.config.ts`](https://github.com/every-app/open-seo/blob/main/drizzle-prod.config.ts)** manage database migrations for SQLite and Postgres.
- **[`vite.config.ts`](https://github.com/every-app/open-seo/blob/main/vite.config.ts)** and the custom lean worker plugin handle the build pipeline.
- **[`docker-entrypoint.sh`](https://github.com/every-app/open-seo/blob/main/docker-entrypoint.sh)** and **[`compose.yaml`](https://github.com/every-app/open-seo/blob/main/compose.yaml)** enable self-hosted Docker deployments.

## Frequently Asked Questions

### Where do I set API keys in Open-SEO?

Copy the `.env.example` file to `.env` in the repository root and insert your DataforSEO API key and other credentials there. The application reads these variables at runtime, and the [`docker-entrypoint.sh`](https://github.com/every-app/open-seo/blob/main/docker-entrypoint.sh) script sources them automatically in Docker environments.

### What is the difference between drizzle.config.ts and drizzle-prod.config.ts?

The [`drizzle.config.ts`](https://github.com/every-app/open-seo/blob/main/drizzle.config.ts) file configures SQLite for local development and testing, while [`drizzle-prod.config.ts`](https://github.com/every-app/open-seo/blob/main/drizzle-prod.config.ts) configures Postgres for production deployments. Each file points to different database drivers and output directories to keep development and production data separate.

### How do I deploy Open-SEO to Cloudflare?

Ensure your `.env` file contains the required variables, then run `wrangler publish`. The `wrangler.jsonc` file in the repository root defines the worker name, compatibility date, and KV namespace bindings necessary for the deployment.

### Can I run Open-SEO without Docker?

Yes. You can run Open-SEO locally using `wrangler dev` after creating a `.env` file from the template. The Vite development server (configured in [`vite.config.ts`](https://github.com/every-app/open-seo/blob/main/vite.config.ts)) and Wrangler CLI handle the build and execution without requiring Docker containers.