Migrating Matrix Synapse Homeserver to AnubizHost
Matrix is end-to-end encrypted by default and a popular choice for privacy-focused communities. Synapse homeserver migrations require careful handling of PostgreSQL state, federation continuity, and media. This guide walks through moving Synapse to AnubizHost offshore VPS.
Need this done for your project?
We implement, you ship. Async, documented, done in days.
Inventory Synapse Setup
Note Synapse version, database (must be PostgreSQL for production), media storage path, homeserver.yaml location, and any custom modules. The signing key in homeserver.signing.key MUST be preserved - it identifies your homeserver to the federation.
Provision AnubizHost Target
Order offshore VPS with at least 4GB RAM (8GB+ for medium instances). Install Synapse from the official Debian repo or via pip. Install PostgreSQL 15. Configure nginx as TLS-terminating reverse proxy for /_matrix and /_synapse paths on ports 443 and 8448 (federation).
Database and Media Transfer
Dump Synapse PostgreSQL database: pg_dump -Fc synapse > synapse-db.dump. Restore on target. Rsync the media directory:
rsync -avHAX /var/lib/matrix-synapse/media/ \
root@NEW_IP:/var/lib/matrix-synapse/media/
For instances with terabytes of media, plan multi-hour transfers. Use AnubizHost storage VPS as media backend if media volume is very large.
Copy Configuration and Signing Keys
Copy homeserver.yaml, signing.key, and any module configs to the target. Update database connection in homeserver.yaml. Update any path references to match the target filesystem layout.
Start Synapse on the target. Verify with curl https://matrix.example.com/_matrix/client/versions. Federation test: federationtester.matrix.org.
DNS Cutover and Federation Verification
Update A records. The .well-known/matrix/server file (if hosted on a separate web server) should already point at matrix.example.com:8448 - no change needed. Re-issue TLS certs on the target.
Existing user clients reconnect automatically. Federation resumes once DNS propagates. Related reading: offshore VPS, anonymous hosting, Mastodon migration.
Related Services
Why Anubiz Host
Ready to get started?
Skip the research. Tell us what you need, and we'll scope it, implement it, and hand it back — fully documented and production-ready.