Lock Down pg_hba.conf So Postgres Is Not Public
Rewrite pg_hba.conf with scram-sha-256, no 0.0.0.0/0, and one CIDR per role so PostgreSQL 16 rejects every host you did not explicitly name.
NetBay journal
40 practical Databases articles from Netbay Engineering — written for operators running Linux and Windows VPS in India.
40 articles in this topic
Rewrite pg_hba.conf with scram-sha-256, no 0.0.0.0/0, and one CIDR per role so PostgreSQL 16 rejects every host you did not explicitly name.
Version SQLite with a schema_migrations table and numbered SQL files so deploys apply ALTERs once, in order, without a heavy framework on the VPS.
Pick mariadb-dump or mysqldump on purpose, schedule a logical backup, and run a restore drill on a second host before you ever need it in an incident.
Set maxmemory before Redis eats the VPS, then pick allkeys-lru, volatile-ttl, or noeviction so the eviction policy matches cache, session, or queue data.
Change shared_buffers, effective_cache_size, max_connections, and work_mem first so PostgreSQL 16 uses RAM instead of guessing at factory defaults.
Put SQLite on a dedicated data directory with tight permissions, never in /tmp or a git checkout, so reboots and deploys cannot wipe it by accident.
Size the InnoDB buffer pool from real RAM, then change only the handful of knobs that actually move query latency on a single production VPS.
Choose RDB, AOF, or both on a small VPS by weighing restart durability against High-Speed SSD writes, fork cost, and how much data you can afford to lose.
Create a login role, an owner role, and a runtime role, then grant only the schemas and tables each one actually needs inside PostgreSQL 16.
Enable WAL mode, set a busy timeout, and keep a single writer so concurrent readers stay fast without SQLITE_BUSY storms on a production VPS.
Create MariaDB users with tight hosts, grant least privilege, and reach the server over SSH instead of exposing TCP 3306 to the public internet.
Lock Redis with requirepass or ACL users, keep 6379 off the public interface, and layer bind, auth, and a host firewall so scanners never get a PONG.