PostgreSQL
Hostim.dev offers managed PostgreSQL databases that you can add to any project. These databases are ready to use, secure by default, and require no manual setup.
Free tier
A free PostgreSQL plan is available with limited resources, great for development or small side projects.
Shared vs dedicated PostgreSQL
You can choose between two options:
- Shared PostgreSQL: Fast and affordable. Multiple users share the same server, but each database is isolated.
- Dedicated PostgreSQL: Your own isolated PostgreSQL server. Better for performance, reliability, and security.
Choose shared for testing, staging, or small apps. Choose dedicated for production.
How to add a PostgreSQL database
- Open your project in the dashboard
- Click Create Service -> New PostgreSQL
- Give your database a name
- Choose a plan (shared or dedicated and size)
- Click Create PostgreSQL
Hostim will provision the database and provide connection details.
Connection details
After creation, you'll see:
- Hostname
- Port
- Database
- Username and password
You can connect from any app in the same project using internal networking. Just use the credentials from the dashboard. External access is possible via Bastion SSH container.
Just like MySQL, PostgreSQL databases expose environment variables named after
the service. If you create a database called blog, you can use
BLOG_POSTGRESQL_HOST, BLOG_POSTGRESQL_PORT,
BLOG_POSTGRESQL_DATABASE, BLOG_POSTGRESQL_USER and
BLOG_POSTGRESQL_PASSWORD in your app configuration. Refer to them with
the $(VAR_NAME) syntax when defining other environment variables.
High availability and failover
Managed PostgreSQL runs as a replicated cluster with automatic failover on every plan, shared and dedicated alike. Each server runs a primary plus a hot standby kept in sync by streaming replication. If the primary fails, the standby is promoted automatically and the endpoint follows the new primary — no manual intervention, and it is included in the plan price with nothing to configure.
Backups
Managed PostgreSQL is backed up off-site for disaster recovery, on every plan. Self-service restore is not yet available — contact support if you need one.
You can also take your own dumps any time from the Bastion with pg_dump.
Managing PostgreSQL
You can:
- Scale database plan up or down
- Remove the database when no longer needed
Accessing PostgreSQL via SSH
You can also connect to your database using the Bastion container. This is useful for importing or exporting data using tools like psql or pg_dump.
More advanced features like metrics, slow query logs, a self-service UI for restore and export, external access and user-facing read replicas may be added in future versions.