TAG
Tag: VPS
12 articles tagged VPS.
- VPS
Where to put apps on a VPS: the /opt/apps directory layout
A simple convention for app code on a VPS: keep each app in its own folder under /opt/apps, chown the parent folder once, and git clone, git pull and .env edits never need sudo again.
- Database
Migrate a PostgreSQL database between two VPS with pg_dump
Move an entire PostgreSQL database (schema and data) from a source VPS to a target VPS through your local machine: dump with pg_dump, restore in a single transaction, verify row counts, then cut over and roll back safely.
- Database
Connect to PostgreSQL on a VPS through an SSH tunnel
Use an SSH tunnel so your dev machine can reach PostgreSQL on a VPS without exposing port 5432 to the internet, plus the DATABASE_URL setup for local and production.
- VPS
Quick-check a VPS's specs with a single command
A one-line bash script that checks a VPS's OS, CPU, RAM, disk and network in about 15 seconds, plus reference tables that tell you whether each number is weak, fine or strong.
- Database
Tune VPS performance: swap, PostgreSQL and the DB pool
Speed up a 16GB Ubuntu VPS that runs many Docker containers next to PostgreSQL: add swap to keep the OOM Killer away, tune PostgreSQL for more RAM and SSD storage, then raise the app's connection pool.
- Integrations
Send email with the Brevo API when your VPS blocks SMTP
Send verification emails from a VPS through the Brevo HTTP API v3 (HTTPS, port 443) instead of blocked SMTP ports: verify the sender and domain (DKIM, SPF), grab the right API key, configure .env, and fix common errors.
- VPS
Automatic maintenance page with Caddy during Docker deploys
Use Caddy's handle_errors to catch the 502 Bad Gateway that appears while a container rebuilds and serve a static maintenance page automatically, with no manual on/off switch.
- Dev tools
Roll back a Git commit and update safely on a VPS
Take your project back to an older commit, force push to the remote, then reset the VPS to match without a merge conflict, then rebuild the service and clear caches.
- VPS
Set up Caddy as a reverse proxy on a VPS with Docker
Run Caddy as a Dockerized reverse proxy on a fresh VPS: create a shared network, write the Caddyfile and docker-compose file, get HTTPS automatically, then add new domains with a single zero-downtime reload.
- Database
Fix Docker containers that cannot reach PostgreSQL on a VPS
Docker picks a new network range every time you run docker-compose down and up, so PostgreSQL on the host rejects the container. Diagnose the subnet, open UFW and pg_hba.conf, then allow the whole 172.16.0.0/12 range to fix it once.
- Database
Set up PostgreSQL on a VPS securely
Install and configure PostgreSQL on an Ubuntu/Debian VPS for production: create a database and user, open remote access safely (SSL + pg_hba + UFW), and understand transaction isolation.
- VPS
Set up a new VPS: the essential secure steps
Bring up a fresh Ubuntu/Debian VPS safely: create a sudo user, log in with an SSH key, harden sshd, enable the UFW firewall, and disable ping.