Databases
Create database instances and manage the databases inside them
Run PostgreSQL, MySQL, MariaDB or MongoDB with private connection URLs, managed storage and recovery. Create a Database instance under Data → Databases, or ask your agent to add one.
A Database instance supplies the engine, compute and storage. PostgreSQL can hold several Databases with separate credentials on that instance; adding one does not provision another Server.
| Engine | Version | Protection |
|---|---|---|
| PostgreSQL | 18 | Backups, point-in-time recovery, replicas and automatic failover |
| MySQL | 9 | Recovery backups and public access over TLS |
| MariaDB | 12 | Recovery backups and public access over TLS |
| MongoDB | 8 | Recovery backups and public access over TLS |
Availability
| Option | What you get |
|---|---|
| Shared | Databases and Caches share Data Capacity in their Account and Location. Instances on the same Server recover together after a failure, briefly pausing connections. |
| Dedicated | Each node gets its own Server and failure boundary. Recommended for production. |
New instances default to Shared where the Location offers Data Capacity, otherwise Dedicated. Both keep data on storage that follows the node when a Server is replaced. Dedicated PostgreSQL can add a standby or read replicas; see High Availability.
Shared Sizes
| Size | CPU / memory | Fits per 2 vCPU / 4 GB unit |
|---|---|---|
| Small | 0.5 vCPU / 875 MB | 4 |
| Medium | 1 vCPU / 1.75 GB | 2 |
| Large | 2 vCPU / 3.5 GB | 1 |
Small is the default; MongoDB starts at Medium. Memory uses decimal MB/GB. Each instance has its own disk. For custom sizes and engine minimums, see database_instance:create.
Create An Instance
Add a PostgreSQL instance named production with 20 GiB of storage and backups.
blossom database_instance:init
database_instance.yml:
database_instance:
name: production
engine: postgres
availability: shared
storage_gib: 20
backup_storage_id: blossom_managed
database_name: app_production
blossom database_instance:create --data database_instance.yml --follow
The selected Location determines where it runs. The estimate appears before allocation, and your Location’s capacity ceiling applies.
To use existing usernames or passwords, see Credentials.
Connect An Environment
Open Variables and Links → Manage connections on the Environment and
connect the Database. Every Service receives DATABASE_URL on its next deploy.
The Database and Environment must belong to the same Account and region.
For PostgreSQL, select a Database on the instance:
blossom database:list --database_instance database_instance-100
blossom environment_link:init
environment_link.yml:
environment_link:
environment_id: environment-100
target_type: Database
target_id: database-100
var_name: DATABASE_URL
blossom environment_link:create --data environment_link.yml
Other engines link with target_type: DatabaseInstance and the instance ID.
Use the supplied URL; its private hostname survives recovery. Public access
is opt-in and TLS-protected. See
Database And Cache Security.
External databases can use a manually configured connection URL; Blossom does not manage their backups or recovery.
Rotate The Password
blossom database_instance:credentials:rotate --id database_instance-100 --follow
Blossom updates the engine and restarts linked Environments with the new URL. The old password stops working and connections pause briefly. Update clients outside Environment Links yourself. For a chosen password, use password stdin.
Pricing
Shared instances fill whole Data Capacity units without a per-instance compute fee. Dedicated nodes, standbys and replicas have their own compute and disks. Compare regional rates in the calculator.
What You Get
A private connection URL in your App, storage that survives Server replacement, and engine-specific backup and recovery options.