Self-host FoxSchema
The web app ships as a single container that serves both the UI and the API on one configurable port. Your database credentials and schema data never leave your infrastructure.
1. Quick start
Pull the prebuilt image
Multi-arch (amd64 + arm64). Covers 9 of 10 dialects — for IBM Db2 see the variant below.
Or build from source with Compose
2. The encryption key
APP_ENCRYPTION_KEY encrypts the database passwords you save. It is required — the app refuses to start without it in production. Generate one with openssl rand -hex 32.
3. Configuration
| Variable | Default | Purpose |
|---|---|---|
| PORT | 3001 | Host port published by compose — what you open in the browser. |
| API_PORT | 3001 | Port the app listens on inside the container. |
| APP_ENCRYPTION_KEY | — | Required. 32-byte key that encrypts saved DB passwords. |
| APP_DB_ENGINE | sqlite | FoxSchema's own metadata store: sqlite, postgres, or mysql. |
| APP_DB_URL | — | Metadata-store URL when the engine is postgres/mysql. |
| LOCAL_SINGLE_USER | true | true = no login (single user); false = real accounts. |
| AUTH_REQUIRED | false | true = every request needs a session (pair with accounts). |
| SSO_* | — | OAuth for Google / Microsoft / GitHub (see below). |
4. Where your data lives
Saved connections, migration history, and settings live in a SQLite file on the /data volume — keep the volume to keep your data. docker compose down preserves it; down -v deletes it.
On ephemeral-disk platforms (e.g. Cloud Run), point the metadata store at a managed database instead:
5. Access: single-user vs. team + SSO
For a shared or public deployment, enable real accounts with SSO (Google, GitHub, or Microsoft):
6. IBM Db2 variant
The common image excludes the ~1 GB IBM Db2 driver (no arm64 build exists). Db2 shows "driver not installed"; the other 9 dialects work. Need Db2? Build the Db2-enabled variant (linux/amd64 only):