Managed databases and services
On this page
Dokwe calls a managed database, cache, or queue a service. Each service runs in its own container with its own data volume and a password that Dokwe generates and stores encrypted.
Supported engines#
| Engine | Image Dokwe runs | Internal port |
|---|---|---|
| PostgreSQL | postgres:16-alpine (or pgvector/pgvector:pg16) | 5432 |
| MySQL | mariadb:11.4 | 3306 |
| Microsoft SQL Server | mcr.microsoft.com/mssql/server:2022-latest | 1433 |
| Redis | redis:7-alpine | 6379 |
| MongoDB | mongo:4.4 | 27017 |
| RabbitMQ | rabbitmq:3.13-management-alpine | 5672 (AMQP), 15672 (management UI) |
The MySQL option runs MariaDB 11.4, which speaks the MySQL wire protocol. MongoDB runs 4.4, because newer releases need AVX CPU support that some hosts lack.
pgvector#
Turn on pgvector when you create a Postgres service, or later on a running one, to get vector similarity search. Dokwe switches to the pgvector/pgvector:pg16 image, which keeps the same Postgres 16 data format. AI chat RAG sources need pgvector.
Create a service#
1. Open Services and choose New service.
2. Pick an engine, enter a name, and optionally a slug.
3. Pick where it runs: Dokwe Platform or one of your online servers (see /docs/byos).
4. Choose Create service.dokwe services create my-db
# Choose a type when prompted: postgres, mysql, or redisThe container is named fd-svc-<slug>, and the database name defaults to the slug with underscores for hyphens. The status moves from creating to running once the container is up.
The CLI offers Postgres, MySQL, and Redis, and always creates the service on Dokwe Platform. Use the dashboard for the other engines, for pgvector, or to place a service on your own server.
Adopt an existing Postgres#
If Postgres already runs on one of your servers, or on a host it can reach, choose Adopt existing and enter the host, port, admin user, and password. The server's agent checks the connection first. Dokwe stores the credentials and can back the database up, but never installs, starts, or stops it. Only Postgres can be adopted.
Manage a service from the CLI#
dokwe services # list services (add --json for raw output)
dokwe services info my-db # details, connection URIs, credentials
dokwe services stop my-db
dokwe services start my-db
dokwe services delete my-db # asks for confirmationPass the slug or the ID. Deleting a service removes its container and data volume. For an adopted service, it removes only Dokwe's record.
Connect your app#
The Connection tab and dokwe services info show these connection strings:
- Internal URI: uses the host name
fd-svc-<slug>on Dokwe's Docker network. Use this from container apps on the same host as the service. - Loopback URI: uses
127.0.0.1and the service's external port. Use this from native apps on the same host. - External URI: uses the server's public IP and external port (from the 30000–39999 range). Services on your own server always get one. Services on Dokwe Platform get one only if the platform operator has opened external access. Otherwise it is empty.
RabbitMQ services also show a management UI URL when they have an external address.
Dokwe doesn't add these values to your app automatically. Copy the URI you need into an environment variable, such as DATABASE_URL, on your project. See Environment variables.
The one exception is templates. When a template needs a database, Dokwe creates the service on the same server as the app and wires the connection details in for you.
Postgres services can hold extra databases, which you create and drop from the dashboard. The Query Console tab is available for Postgres, MySQL, SQL Server, and MongoDB.
Backups#
Backups are available for Postgres, MySQL, and MongoDB, and the service must be running. Open the Backups tab to:
- Take a backup. Add an optional label. Dokwe runs
pg_dump(custom format),mysqldump, ormongodump(gzipped archive) and stores the dump encrypted (AES-256-GCM) on the control plane. - Download a backup. You get the decrypted dump:
.dumpfor Postgres,.sqlfor MySQL,.archive.gzfor MongoDB. - Import a dump file from your machine. Imports are limited to 10 MB.
- Restore a backup into the same service or another service with the same engine.
For Postgres, you can choose which database to back up or restore into. That database must already exist on the target. Adopted services support Postgres backups only.
A restore overwrites the target. Before it starts, Dokwe takes a pre_restore snapshot of the target automatically. If that snapshot fails, the restore doesn't run.
Automatic backups#
Postgres, MySQL and MongoDB services can be backed up on a schedule. Automatic backups are off until you turn them on in the Backups tab, and changing the schedule needs an owner or admin.
- How often: daily on every plan, at a time you choose (WAT). Business can also pick every 6 hours or weekly.
- How many are kept: Free keeps the last 3, Team 14 and Business 30. Older automatic backups are removed; backups you take by hand, and the snapshot taken before a restore, don't count toward the limit.
- Where they're kept: for a service on your own server, on that server, encrypted. You can also keep a copy on a second connected server. For a service on Dokwe's servers, on Dokwe, encrypted.
Standby replicas#
The HA / Standby tab lets you keep a standby copy of a Postgres, MySQL, or MongoDB service. It doesn't appear for adopted services.
- Mode:
scheduledcopies the primary to the standby with a dump-and-restore on a fixed interval. The interval is 5 minutes to 7 days (default 24 hours). - Location: on the same host, or on one of your online servers.
- Sync now runs a copy right away. Recent runs and the standby's health appear on the tab.
- Promote makes the standby the primary. On the same host, apps keep using
fd-svc-<slug>without changes. On a different server, you need to point your apps at that server's address yourself.
Today the primary must run on Dokwe Platform to set up a standby. Standbys for services that run on your own server aren't available yet.
Want Postgres with a REST API, auth, and realtime on top? See Dokwe DB.