Managed Databases
Learn how to provision, configure, and connect managed databases on your servers with TurboV.
1. Supported Database Engines
TurboV provisions production-grade database instances directly on your connected servers using optimized official images:
| Database Engine | Docker Image | Default Port | Storage Volume Path | Healthcheck Command |
|---|---|---|---|---|
| PostgreSQL | postgres:16-alpine | 5432 | /var/lib/postgresql/data | pg_isready -U <user> |
| MySQL | mysql:8 | 3306 | /var/lib/mysql | mysqladmin ping -u root -p<pass> |
| Redis | redis:7-alpine | 6379 | /data | redis-cli ping |
| MongoDB | mongo:7 | 27017 | /data/db | mongosh --eval 'db.adminCommand("ping")' |
Every database container is attached to the dedicated turbov Docker bridge network, ensuring zero interference with host ports.
2. Provisioning a Database
To create a new database:
- In the dashboard, navigate to Databases → Add Database (or within a project, click New Database).
- Choose your database engine (PostgreSQL, MySQL, Redis, or MongoDB).
- Select the target server where the database should run.
- Give the database a name (e.g.
primary-postgres) and specify an initial database name (e.g.production). - Click Create Database.
What Happens Behind the Scenes
- The agent creates a dedicated persistent Docker volume:
vol_<database_id>. - The agent launches the database container with cryptographically random passwords generated by the control plane.
- The agent monitors the health check until the database engine reports ready.
- The control plane stores credentials encrypted with AES-256-GCM envelope encryption.
3. Internal Network Resolution vs External Access
1. Internal Access (Recommended for Application Security)
By default, databases are not exposed to the public internet. Instead, they resolve privately over the Docker turbov bridge network:
[ Application Container: web ] ──(Private Bridge Network)──► [ db-postgres:5432 ]
- Connection string format:
postgres://postgres:SECURE_PASS@db-postgres:5432/production - No public ports are opened on the server firewall.
- Latency between your application and database is near-zero ($\le 0.5\text$).
2. External Access (For Local Development or GUI Tools)
If you need to connect to your database from your local machine using tools like TablePlus, DBeaver, or pgAdmin:
- Open your database in the dashboard and select Settings → External Access.
- Toggle Enable External Port.
- TurboV opens a dedicated high-range external port (or routes via Traefik TCP proxy with TLS).
- Copy the public connection string displayed in the dashboard.
4. Linking Databases to Applications
TurboV eliminates manually copying and pasting connection strings:
- Open your application environment settings.
- Under Linked Databases, select your database instance.
- TurboV automatically injects the appropriate environment variables:
- For PostgreSQL:
DATABASE_URL,POSTGRES_USER,POSTGRES_PASSWORD,POSTGRES_DB,POSTGRES_HOST,POSTGRES_PORT. - For Redis:
REDIS_URL,REDIS_HOST,REDIS_PORT,REDIS_PASSWORD. - For MySQL:
DATABASE_URL,MYSQL_HOST,MYSQL_PORT,MYSQL_USER,MYSQL_PASSWORD,MYSQL_DATABASE. - For MongoDB:
MONGODB_URI,MONGO_INITDB_ROOT_USERNAME,MONGO_INITDB_ROOT_PASSWORD.
- For PostgreSQL:
If you update database credentials or clone a database, linked applications are automatically updated.
5. Next Steps
- Explore your data and run queries using the in-dashboard Database Studio.
- Seed staging environments from production using Database Cloning.
- Protect critical data with automated Backups & Disaster Recovery.