Documentation is English-only for now. The rest of the site follows your language.
Databases
PostgreSQL, MySQL 8+, and MariaDB 10.6+ — how to choose, connect, and migrate.
5 min read
You do not need to know SQL to run Justflows. Pick the database your host already offers, or use Postgres in Docker.
| Database | When to use it | URL scheme |
|---|---|---|
| PostgreSQL (default) | New installs. Bundled in the default Compose file. | postgres://… |
| MySQL 8+ | The host already provides MySQL. | mysql://… |
| MariaDB 10.6+ | The host already provides MariaDB. | mariadb://… |
Docker variants
# MySQL
docker compose -f docker/docker-compose.mysql.yml --env-file .env up
# MariaDB
docker compose -f docker/docker-compose.mariadb.yml --env-file .env upConnection settings
The wizard writes DB_DRIVER, DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD, and the matching DATABASE_URL. The server routes use the discrete values; core-backed subsystems also require DATABASE_URL. TLS is controlled by DB_SSL and DB_SSL_REJECT_UNAUTHORIZED.
Migrations
SQL lives in migrations/, with matching PostgreSQL and MySQL files (MariaDB uses the MySQL file). Migrations 0001 through 0036 are consolidated into a single 0036_baseline file per dialect. Fresh installs run the full baseline. Existing sites run only the parts they have not recorded yet, so a site on any earlier migration never replays steps it already applied. The baseline is then recorded once in _migrations, and later schema changes continue from 0037_tenancy, which adds multisite workspaces. Run them from the wizard, from Admin → Health, via POST /api/db/migrate (administrator), or justflows db migrate.
| Migration | Adds |
|---|---|
0037_tenancy | Multisite workspaces |
0038_quota_limits | Workspace and website limits |
0039_custom_domains · 0040_security_hardening · 0041_domain_provider_attachment | Custom domains and their verification |
0042_private_files | Private file storage for plugins |
0043_storage_quota_locks | The total storage cap |
0044_workspace_owner | The owner of each workspace |
0045_account_pages | The default account page |
0046_content_type_cache_control | Cache-Control per content type |
0047_taxonomy_content_types | Which content types use each taxonomy |
0048_job_queue | The durable plugin job queue |
Note
The @justflows/database package is the shared client for Postgres and MySQL/MariaDB (mysql2). Schema modules live there; the running admin uses the Express SQL routes in apps/server.
A workspace on a separate database uses the same driver as the installation. The installation database is migrated on boot; each separate database is migrated from Admin → Platform.