Hosting
Servers
Web Development Pricing
Resources
Get started → Log in
Home/Blog/PostgreSQL hosting in India

PostgreSQL hosting in India:
your own VPS or a managed database.

28 November 20268 min readBy the RapidServer team

Where can you host PostgreSQL in India?

You can self-host PostgreSQL on a KVM VPS in India or use a managed database service. On RapidServer, a Linux VPS with full root starts at ₹581/mo plus 18% GST in Mumbai (BOM1) or Delhi NCR (DEL1), and your data and daily backups stay in India. Install Postgres from Ubuntu or the official apt repository, keep it on localhost or a private network and back it up nightly.

Self-hosted PostgreSQL vs a managed database

A managed database is PostgreSQL run as a service: you pick a size and region, get a connection string, and the provider runs the server.

Self-hosted on a VPSManaged database
Who runs the serverYou, with full rootThe provider
SetupInstall, secure and back up yourselfPick a size and region, then connect
Versions, extensions, settingsAnything you can install or setWhat the service supports
BackupsYour own, plus daily VPS backups kept 7 daysAutomated; check retention and restores
UpdatesYou apply themThe provider, often in a maintenance window
Data locationMumbai (BOM1) or Delhi NCR (DEL1)The regions the service offers
CostThe VPS price, monthlyUsually by instance size, storage and backups

Choose managed if nobody on your team wants to run a database server. Self-host if you know Linux, need a particular version or extension, or want the database beside your app. In between, self-host and add our managed support at ₹1,499/mo for security patching, hardening and database stack tuning; your own copy of your data stays your job (see managed vs unmanaged VPS).

Install PostgreSQL on Ubuntu

SSH in as root (see SSH kya hai). PostgreSQL's Ubuntu download page offers two routes: Ubuntu's own apt install postgresql, which gives PostgreSQL 16 on Ubuntu 24.04 for the life of the release, or the official PostgreSQL apt repository for the newest major version, 19, released on 19 November 2026:

shell
sudo apt install -y postgresql-common
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
sudo apt update
sudo apt install postgresql-19

The server starts by itself, with its configuration in /etc/postgresql/19/main/. Create a login role, which prompts for a password, and a database for your app:

shell
sudo -u postgres createuser --pwprompt shopapp
sudo -u postgres createdb -O shopapp shop

Listen only on localhost or a private network

listen_addresses sets which network interfaces accept connections. The default, localhost, allows only connections from the server itself: right when the app runs on the same VPS. If the app runs on another RapidServer VPS in the same region, use the free private networking and add only the database server's private IP, shown here as 10.0.0.10:

/etc/postgresql/19/main/postgresql.conf
listen_addresses = 'localhost,10.0.0.10'

Avoid '*', which includes the public interface. This setting needs a restart: sudo systemctl restart postgresql.

pg_hba.conf basics

pg_hba.conf decides who may connect, from where, to which database and how they authenticate. PostgreSQL uses the first line that matches; if that login fails, later lines aren't tried. Ubuntu's default allows local system users by name (peer) and password logins from localhost. Add one line per app server, here 10.0.0.5, with the scram-sha-256 password method:

/etc/postgresql/19/main/pg_hba.conf
# TYPE  DATABASE  USER     ADDRESS       METHOD
host    shop      shopapp  10.0.0.5/32   scram-sha-256

/32 means that one address. Reload to apply: sudo -u postgres psql -c 'SELECT pg_reload_conf();'.

Firewall: allow only your app servers

Port 5432 shouldn't be reachable from the internet at all. With ufw, keep SSH open and allow 5432 only from your app servers:

shell
ufw allow OpenSSH
ufw allow from 10.0.0.5 to any port 5432 proto tcp
ufw enable

The client area's network firewall can hold the same rule. In Docker, published ports skip ufw, so bind Postgres to 127.0.0.1:5432:5432 or don't publish it. See our firewall guide.

Backups: pg_dump, pg_basebackup and daily VPS backups

PostgreSQL's backup chapter covers SQL dumps, file system backups and continuous archiving. pg_dump exports one database consistently without blocking readers or writers, and pg_dumpall --globals-only saves the roles:

pg_dump
mkdir -p /root/db-dumps
sudo -u postgres pg_dump -Fc shop > /root/db-dumps/shop-$(date +%F).dump
sudo -u postgres pg_dumpall --globals-only > /root/db-dumps/globals.sql

Its documentation adds that, except in simple cases, pg_dump isn't the right tool for regular production backups. There, pg_basebackup copies the whole running cluster without affecting other clients, and is the base for point-in-time recovery with WAL archiving:

pg_basebackup
install -d -o postgres -g postgres /var/backups/pg
sudo -u postgres pg_basebackup -D /var/backups/pg/base-$(date +%F) -Ft -z -P

Copy backups off the server and test a restore with pg_restore. Every RapidServer VPS also gets daily full-server backups kept 7 days and snapshots on demand: a safety net, not a replacement (see our VPS backup guide).

Keeping PostgreSQL updated

PostgreSQL releases a minor version at least every three months, and its versioning policy recommends always running the latest one. Minor upgrades need no dump and restore: take a snapshot, read the release notes, then run:

update
sudo apt update
sudo apt upgrade

Each major version is supported for 5 years. A major upgrade, such as 18 to 19, needs a dump and restore or pg_upgrade; on Ubuntu, pg_upgradecluster handles either. Rehearse it on a copy first.

Keeping PostgreSQL data in India

On a RapidServer VPS, your database runs in Mumbai (BOM1) or Delhi NCR (DEL1), and primary data and backups are stored in India, which simplifies DPDP Act and sector-specific residency requirements. Noida and Gurugram are served from DEL1; see latency by city. With a managed database, check its region and where backups and replicas live.

How much RAM does PostgreSQL need?

RAM matters most. PostgreSQL keeps frequently read data in shared_buffers and the operating system's file cache, so when your busy data fits in memory, far fewer reads hit the disk. Its resource settings suggest 25% of RAM for shared_buffers as a starting value on a dedicated database server. There is no fixed minimum: size by data, connections and queries, then watch the memory graphs in the client area.

UsePlanPer month
Development, staging or a small app with its databaseStardust: 2 vCPU, 4 GB RAM, 20 GB NVMe₹581
Production app and PostgreSQL on one serverFull Moon: 4 vCPU, 8 GB RAM, 160 GB NVMe₹1,723
A separate database server with more data in memoryEclipse: 8 vCPU, 16 GB RAM, 320 GB NVMe₹3,445

For steady, heavy load, Dedicated CPU plans reserve whole cores from ₹1,302/mo (see VPS vs VDS). Every plan has full root, costs the same in both cities, is billed monthly plus 18% GST, and moves up from the client area with the difference prorated.

Host PostgreSQL on a KVM VPS in India.

Dedicated vCPU, NVMe, full root and daily backups kept 7 days in Mumbai or Delhi NCR, ready a few minutes after payment, from ₹581/mo.

See VPS plans

Questions

What is the PostgreSQL hosting price in India?+
PostgreSQL is free, open source software, so self-hosting costs only the server: a RapidServer VPS starts at ₹581/mo, and Full Moon with 8 GB RAM costs ₹1,723/mo, plus 18% GST, billed monthly with daily backups kept for 7 days.
Can I get VPS hosting with PostgreSQL?+
Yes. With full root you install any PostgreSQL version from Ubuntu or the official apt repository, plus the extensions you need. The same VPS can also run MySQL, MariaDB or Redis.
Is a managed database better than PostgreSQL on a VPS?+
A managed database takes the server, patches and backups off your hands, within the settings it allows. A VPS gives full control for the price of the server; updates, backups and security are then yours, unless you add managed support.
Should PostgreSQL run on the same VPS as my app?+
For a small or medium app, one VPS is simpler: keep listen_addresses on localhost. Give the database its own VPS when it needs more RAM, and connect the two over free private networking in the same region.
Is my PostgreSQL data stored in India?+
Yes, on a RapidServer VPS: it runs in Mumbai (BOM1) or Delhi NCR (DEL1), and primary data and backups are stored in India. For a managed database, check its region.
VPS par PostgreSQL kaise install karein?+
Ubuntu VPS par root se login karke apt install postgresql chalaiye, ya naye version ke liye PostgreSQL ki official apt repository add kijiye. listen_addresses localhost par rakhiye, pg_hba.conf aur firewall me sirf app server ka IP allow kijiye aur roz backup lijiye. RapidServer par VPS ₹581/mo plus 18% GST se shuru hota hai aur payment ke kuch minute baad ready ho jata hai.

Host PostgreSQL on a VPS in India.

KVM VPS with dedicated vCPU, NVMe and full root in Mumbai or Delhi NCR, billed monthly in rupees with a GST invoice.