PostgreSQL has been around since 1996 and is still the first choice for most serious developers. Here's why — and how to get one running on StackNode in under a minute.
PostgreSQL (often just called "Postgres") is an open-source relational database. It stores data in tables with rows and columns — the same model you'd recognize from any SQL database — but it goes far beyond the basics. Postgres supports complex queries, JSON documents, full-text search, custom data types, and a huge library of extensions, all in a single system.
It's fully ACID-compliant, meaning every transaction is Atomic, Consistent, Isolated, and Durable. In plain terms: your data won't get corrupted, even if the server crashes mid-write.
SQLite is great for local development and embedded use cases — it's a file, not a server. But it doesn't handle concurrent writes well and isn't suitable for a real application with multiple users hitting the database at once.
MySQL is a solid choice, but Postgres has pulled ahead over the years in terms of standards compliance, JSON support, and extension ecosystem. A few things Postgres does that MySQL handles poorly or not at all:
Postgres works well as the primary database for almost any application. Some specific use cases where it especially shines:
Once your container is running, connect from your app using a standard connection string:
postgresql://admin:yourpassword@your-container-ip:5432/app
Or use psql directly from the terminal for interactive queries:
psql -h your-container-ip -U admin -d app
On StackNode, if you deploy without a public IP, your database stays on a private bridge network — only other containers on your account can reach it. That's the recommended setup for production. If you need external access (e.g. from your local machine or a BI tool), allocate a public IP when deploying.
Postgres stores all its data under /var/lib/postgresql/data. On StackNode, you mount a volume at that path — the deploy form below sets this up automatically. Your data survives container restarts, redeployments, and even if you delete and recreate the container, as long as you remount the same volume.
Each volume is 10 GB, which is more than enough for most projects. For larger datasets you can always attach multiple volumes to different tablespace paths.
The official Postgres image reads three environment variables on first startup to initialize the database:
POSTGRES_USER — the superuser name (default: postgres)POSTGRES_PASSWORD — required, the superuser passwordPOSTGRES_DB — the name of the default database to createChange these in the deploy form below before deploying. Make sure to use a strong password — especially if you attach a public IP.
The form below deploys a PostgreSQL 16 container with a persistent volume pre-configured. Adjust the container name, credentials, and IP setting, then hit Deploy. You'll be redirected to the dashboard where you can monitor startup.
PostgreSQL 16
Persistent volume pre-configured. Ready in seconds.
Don't have an account yet?
Sign up for free — every new account gets $0.10 credit, no credit card required. Enough to run a Postgres instance for a day.
Create free account