July 28, 2026 · 6 min read
Migrating Frameworx from managed Postgres to self-hosted Docker

Frameworx aggregates market, on-chain, prediction-market, and social signals into a single analysis surface. That means a lot of writes, a lot of scheduled jobs, and a bill that grew faster than the product did. Moving to a self-hosted stack cut cost and gave me control over the parts that actually mattered: connection limits, extensions, and backups.
What the stack looks like now
- Hostinger KVM2 VPS running Ubuntu with a hardened SSH + firewall baseline
- Docker Compose for Postgres, the API, and the worker processes
- Nginx as the TLS terminator with Certbot renewals on a timer
- Cloudflare in front for DNS, caching, and origin protection
- Nightly pg_dump to off-box storage with restore drills that I actually run
The part people skip
A backup you have never restored is a hope, not a backup. I keep a throwaway container that restores last night's dump and runs a handful of sanity queries. If it fails, I hear about it before a customer does.
docker compose exec -T db pg_dump -U app app | gzip > /backups/app-$(date +%F).sql.gzThe lesson from 15 years of network work applies cleanly to app infrastructure: design for the failure you can name, then measure whether the mitigation works.