Documentation

Self-Hosting Guide

Run DataFuse on your own infrastructure with Docker Compose, under a paid commercial license.

Self-hosting DataFuse

The self-hosted stack runs the API, the dashboard, and PostgreSQL with Docker Compose. It is the same product you would run in the cloud, but on hardware you control.

Self-hosting is a paid product. You need a signed commercial agreement with DataFuse before you install or run it: there is no free, trial or non-commercial self-hosted edition. Access to the software is provided with your agreement. Contact [email protected] to get one.

Requirements

  • Docker 24 or newer.
  • Docker Compose v2 (the docker compose plugin).
  • At least 2 GB of RAM.
  • Ports 8100 (API) and 3100 (dashboard) free on the host, or set DATAFUSE_API_PORT and DATAFUSE_APP_PORT to different values.

One-command install

From the root of the repository you were given access to with your agreement:

bash
./scripts/selfhost.sh

The script creates .env.selfhost from .env.selfhost.example if it does not exist, replacing every placeholder secret with a freshly generated value, then builds and starts the stack and prints the URLs.

Manual install

If you prefer to control each step:

bash
cp .env.selfhost.example .env.selfhost
# edit .env.selfhost and replace every `change-me` value with real secrets,
# for example: openssl rand -hex 32

docker compose -f docker-compose.selfhost.yml --env-file .env.selfhost up -d --build

The dashboard is then available at http://localhost:3100 and the API at http://localhost:8100 (with docs at http://localhost:8100/api/docs).

Configuration

Set these variables in .env.selfhost before starting the stack. Values marked change-me must be replaced with real secrets.

VariableRequiredDescription
SECRET_KEYyesSecret used to sign JWTs. Generate with openssl rand -hex 32.
ADMIN_PASSWORDyesPassword for the initial admin account.
POSTGRES_USERyesPostgreSQL user (internal to the Docker network).
POSTGRES_PASSWORDyesPostgreSQL password.
POSTGRES_DByesPostgreSQL database name.
NUXT_API_KEYyesAPI key the dashboard uses for server-to-server API calls.
NUXT_JWT_SECRETyesJWT secret for the dashboard; set it equal to SECRET_KEY.
NUXT_PUBLIC_API_BASE_URLyesPublic API URL shown in docs and quickstart snippets in the browser.
DATAFUSE_API_PORTnoHost port for the API. Default 8100.
DATAFUSE_APP_PORTnoHost port for the dashboard. Default 3100.
SELF_HOSTEDnoSet to true (the compose file already does this) to turn off cloud plan billing. Your commercial agreement sets the capacity you may use.
ADMIN_EMAILSnoComma-separated allowlist for admin magic-link login.
CORS_ORIGINSnoComma-separated browser origins allowed to call the API.
MAILGUN_API_KEYnoOptional Mailgun key for email. Leave blank to disable email.
PLAYGROUND_LLM_*noOptional OpenAI-compatible endpoint for the built-in playground.
SSO_*noOptional SSO settings. Leave SSO_ENABLED=false for local auth.
PAYPAL_*noOptional billing settings. Leave blank for self-host.

Upgrading

Pull the latest changes and rerun the install script:

bash
git pull
./scripts/selfhost.sh

The API container runs database migrations on every start (alembic upgrade heads), so the schema is updated automatically. The compose file pins the postgres:16-alpine image and named volume, so your data survives recreations and upgrades.

Backups

Back up the PostgreSQL database:

bash
docker compose -f docker-compose.selfhost.yml exec postgres pg_dump -U datafuse datafuse > backup.sql

Replace datafuse with your POSTGRES_USER and POSTGRES_DB values if you changed them. Restore with:

bash
docker compose -f docker-compose.selfhost.yml exec -T postgres psql -U datafuse datafuse < backup.sql

Usage limits

Self-hosting is a paid commercial deployment. Your agreement defines the capacity you are licensed for, and the maintenance, updates, and support you receive. When SELF_HOSTED=true (the default in the self-hosted compose file), the cloud plan meters are switched off and usage is still counted, so you and DataFuse can see it against your licensed capacity. Contact [email protected] before deploying DataFuse anywhere.

License

DataFuse is proprietary software under the DataFuse Commercial License. It is not open source and it is not free to use. You may install, run, copy, or modify it only under a signed, paid commercial agreement with DataFuse, which covers licensing, maintenance, updates, and support. There is no free, trial, or non-commercial right to run it. The full terms are in the LICENSE file supplied with the software. Contact [email protected] for an agreement.