Self-Hosting Guide
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 composeplugin). - At least 2 GB of RAM.
- Ports
8100(API) and3100(dashboard) free on the host, or setDATAFUSE_API_PORTandDATAFUSE_APP_PORTto different values.
One-command install
From the root of the repository you were given access to with your agreement:
./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:
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.
| Variable | Required | Description |
|---|---|---|
SECRET_KEY | yes | Secret used to sign JWTs. Generate with openssl rand -hex 32. |
ADMIN_PASSWORD | yes | Password for the initial admin account. |
POSTGRES_USER | yes | PostgreSQL user (internal to the Docker network). |
POSTGRES_PASSWORD | yes | PostgreSQL password. |
POSTGRES_DB | yes | PostgreSQL database name. |
NUXT_API_KEY | yes | API key the dashboard uses for server-to-server API calls. |
NUXT_JWT_SECRET | yes | JWT secret for the dashboard; set it equal to SECRET_KEY. |
NUXT_PUBLIC_API_BASE_URL | yes | Public API URL shown in docs and quickstart snippets in the browser. |
DATAFUSE_API_PORT | no | Host port for the API. Default 8100. |
DATAFUSE_APP_PORT | no | Host port for the dashboard. Default 3100. |
SELF_HOSTED | no | Set to true (the compose file already does this) to turn off cloud plan billing. Your commercial agreement sets the capacity you may use. |
ADMIN_EMAILS | no | Comma-separated allowlist for admin magic-link login. |
CORS_ORIGINS | no | Comma-separated browser origins allowed to call the API. |
MAILGUN_API_KEY | no | Optional Mailgun key for email. Leave blank to disable email. |
PLAYGROUND_LLM_* | no | Optional OpenAI-compatible endpoint for the built-in playground. |
SSO_* | no | Optional SSO settings. Leave SSO_ENABLED=false for local auth. |
PAYPAL_* | no | Optional billing settings. Leave blank for self-host. |
Upgrading
Pull the latest changes and rerun the install script:
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:
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:
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.