How to install PostgreSQL on a Cloud VPS
Updated 7/18/2026
PostgreSQL is the world's most advanced open-source relational database, known for reliability, features and performance.
A database on your own server gives you low latency and full control over configuration and backups, without managed-service pricing.
One-click install on cloudlinux.ro
The fastest way: PostgreSQL installs automatically at the first boot of a new server.
- Create a Cloud VPS from the control panel.
- In the configuration step, pick PostgreSQL from the app catalog.
- Start the server. The install runs in the background for a few minutes and its status shows on the server page.
- Access details and generated passwords are saved on the server in
/root/app-credentials.txt. The app will be available on port 5432.
Manual install on any Ubuntu server
If you prefer doing it yourself, below is the exact script our automatic install runs. Execute it as root on a fresh Ubuntu server (24.04 recommended). It stops at the first error, and when it finishes you will find the access details in /root/app-credentials.txt.
export DEBIAN_FRONTEND=noninteractive
curl -fsSL https://get.docker.com | sh
DB_PASS=$(openssl rand -base64 24 | tr -dc 'A-Za-z0-9' | cut -c1-20)
docker volume create pg_data
docker run -d --name postgres --restart=always -p 5432:5432 \
-e POSTGRES_PASSWORD="$DB_PASS" -v pg_data:/var/lib/postgresql/data postgres:16
IP=$(hostname -I | awk '{print $1}')
printf 'PostgreSQL: %s:5432\nUtilizator: postgres\nParola: %s\nPortul este public, foloseste parola generata si restrictioneaza accesul daca nu ai nevoie de conexiuni externe.\n' "$IP" "$DB_PASS" > /root/app-credentials.txt
You can also save this script as a recipe in your account and reuse it on any new server.
Put this guide into practice on your own VPS
EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.
See pricingRelated tutorials
How to install Memos on a Cloud VPS
Complete Memos guide: one-click install on cloudlinux.ro or manual setup on any Ubuntu server, step by step.
Updated 11/29/2026ApplicationsHow to install Open Notebook on a Cloud VPS
Complete Open Notebook guide: one-click install on cloudlinux.ro or manual setup on any Ubuntu server, step by step.
Updated 11/29/2026ApplicationsHow to install Pocket ID on a Cloud VPS
Complete Pocket ID guide: one-click install on cloudlinux.ro or manual setup on any Ubuntu server, step by step.
Updated 11/29/2026