
PostgreSQL
PostgreSQL database with persistent storage
Deploy PostgreSQL in 3 Steps
Connect Your VPS
Add your server credentials to Server Compass
Select PostgreSQL
Choose from our template library
Deploy & Configure
Fill in settings and click Deploy
PostgreSQL CLI Deployment
Deploy PostgreSQL the traditional way with SSH and Docker Compose.
SSH into Your Server
Launch your preferred terminal and connect to your VPS using SSH.
# Log into your server
ssh root@<your-server-ip>
# If using key-based auth
ssh -i ~/.ssh/my-key root@<your-server-ip>First time? Docker not installed? Run: curl -fsSL https://get.docker.com | sh
Create Working Directory
Prepare a directory for your application files and configuration.
# Create and navigate to project directory
mkdir -p ~/apps/postgresql
cd ~/apps/postgresqlConfigure Your Containers
Create the Docker Compose configuration file with these contents:
services:
postgres:
image: postgres:16-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=<your-postgres-password>
- POSTGRES_DB=app
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d app"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data:
PORTHost port to expose(default: 5432)POSTGRES_USERDatabase username(default: postgres)POSTGRES_PASSWORDDatabase passwordPOSTGRES_DBDatabase name(default: app)Deploy with Docker Compose
Launch the application stack using Docker Compose.
# Deploy the application
docker compose up -d
# Check container health
docker compose ps
# Monitor logs
docker compose logs -f --tail=100Open Required Ports
Enable external access by opening the necessary port.
# Allow the application port through firewall
sudo ufw allow 5432/tcp
sudo ufw reload
# Access your app at:
# http://your-server-ip:5432There's an easier way. Meet Server Compass.
Server Compass makes deploying PostgreSQL effortless. Visual setup, one-click deploy, done.
- Intuitive dashboard
- Deploy in 3 minutes
- Free SSL included
- Blue-green deploys
- Real-time logs
- Version history
After Deployment
After deploying PostgreSQL with Server Compass, complete these steps to finish setup
Test the database connection
Create additional users if needed
Configure backup schedules
Set up monitoring and alerts
Review and optimize PostgreSQL configuration for your workload
Consider setting up replication for high availability
Need help? Check out our documentation for detailed guides.
PostgreSQL FAQ
Common questions about self-hosting PostgreSQL
How do I deploy PostgreSQL with Server Compass?
Simply download Server Compass, connect to your VPS, and select PostgreSQL from the templates list. Fill in the required configuration and click Deploy. The entire process takes under 3 minutes.
What are the system requirements for PostgreSQL?
PostgreSQL requires a minimum of 256MB RAM. We recommend a VPS with at least 1024MB RAM for optimal performance. Any modern Linux server with Docker support will work.
Can I migrate my existing PostgreSQL data?
Yes! Server Compass provides volume mapping that allows you to import existing data. You can also use standard PostgreSQL backup and restore procedures.
How do I update PostgreSQL to the latest version?
Server Compass makes updates easy. Simply click the Update button in your deployment dashboard, and the latest PostgreSQL image will be pulled and deployed with zero downtime.
Is PostgreSQL free to self-host?
PostgreSQL is open-source software. You only pay for your VPS hosting (typically $5-20/month) and optionally Server Compass ($29 one-time). No subscription fees or per-seat pricing.
Ready to Self-Host PostgreSQL?
Download Server Compass and deploy PostgreSQL to your VPS in under 3 minutes. No Docker expertise required.
Download Server Compass



