Moving a Synapse homeserver to a new server: what the move involves
Moving a Synapse homeserver to new hardware or a new cloud is mostly a data and identity transfer, not a software install. The Synapse binaries are the easy part. What has to survive the move intact is the signing key that identifies your server to other homeservers, the PostgreSQL database that holds accounts, rooms and device keys, the configuration files, and the local media store that may hold the only copy of user uploads. If any of these is copied wrongly, federation can fail or encrypted history can become unreadable, and those problems often appear days after cutover.
The effort depends on four things you should measure before scoping the work: the size of the PostgreSQL database, the size of the media store, the worker layout and how much of the current setup is hand-built. A small single-process server with a clean configuration is a short job. A server with many workers, Redis replication, reverse proxy rules and custom edits to the config is a longer one, because each component has to be moved, pointed at the new hosts and tested. Confirm the Synapse version you run and the PostgreSQL major version before you plan, since the Synapse upgrade notes set minimum platform versions and the target must support your data. Ask any partner to write down which of these inputs they assumed, so the scope and any quote can be checked against your environment.
Which parts of a Synapse setup map cleanly to new infrastructure
This table compares each part of a running Synapse setup with its equivalent on the new host and the note that matters during the move. Read it as a checklist: the rows marked as non-negotiable or exclusion steps are where federation and encryption most often break, while the rest mainly need to be re-pointed and verified.
| Component | Equivalent on the new host | Migration note |
|---|---|---|
| Config files (homeserver.yaml, conf.d) | Same files on VMs, or values mapped into the ESS Helm chart values or container config | Keep server_name unchanged. Changing it changes user and room identities. Confirm specifics in the Synapse configuration manual. |
| Signing key | Same key file copied to the same path with the same permissions | Non-negotiable. A new key makes other servers reject this server's signatures. Copy it before first start on the new host. |
| PostgreSQL database | A newly created PostgreSQL database with UTF8 encoding, C locale and template0, restored from a custom-format pg_dump | Do not restore into a database that already has tables. Confirm the supported PostgreSQL version against the Synapse upgrade notes. |
| e2e_one_time_keys_json table | Excluded from the dump, or truncated after restore | Restored one-time keys can be reissued and cause decryption errors. Skipping this step is the most common encryption failure on restore. |
| local_content media store | Same directory on the new host, or a mounted volume with matching paths in media_store_path | May be the only copy of user uploads. Copy it in full and confirm file counts before cutover. |
| Redis and workers | Redis and worker processes rebuilt on the new host, with the same worker configuration | Redis holds replication state rather than user data, so it is usually rebuilt, not restored. Confirm worker types against the workers documentation. |
| Reverse proxy and TLS | New proxy routes for client and federation traffic, with certificates issued for the new host | Traffic on port 8448 and port 443 must reach the new host before cutover. Test federation with an external tester. |
| Delegation records (DNS or .well-known) | Updated DNS and well-known responses pointing to the new host | Change delegation at cutover and keep the old host reachable for a period. Confirm TTL handling with your DNS provider. |
| Target platform (VMs, containers or ESS Helm) | Synapse on VMs, container images, or the Element Server Suite Helm chart | Each option changes file paths and secret handling. Confirm the layout for your chosen platform in the Synapse documentation before copying files. |
How to copy Synapse state for a new host
When the new host runs the same Synapse release and the same operating system family, the move is mostly a copy of known state. The Synapse backup guidance lists what that state is: configuration files, the signing key, the PostgreSQL database and the local media store. Confirm the exact procedure in the backup documentation before you start, because the order of database restore and key handling matters more than the copy itself.
- Copy the configuration and signing key: Move the config files and the signing key together so the server keeps the same identity on the network.
- Dump and restore PostgreSQL: Take a custom-format dump and restore it into a freshly created database with the encoding and locale the backup guidance specifies, not into a database that already has tables.
- Copy the local media store: Uploads may exist only on the old host, so copy the whole
local_contentdirectory and check its file count against the source. - Rebuild the service layer: Reinstall the same Synapse version, reverse proxy, TLS certificates and any workers on the new host, then start Synapse only after the database is in place.
- Verify before DNS changes: Test the federation listener, delegation records and a login from a client pointed at the new host through a local hosts entry.
Before changing DNS, confirm that the one-time keys table was handled as the backup guidance describes, because restored keys can cause decryption errors that appear only after users switch.
A container or Kubernetes target changes the storage model more than the Synapse configuration. Files that lived in a host directory now sit on volumes, and the database may run in a separate workload or service. The copy is still the same set of state, but the rebuild step includes volume provisioning, secrets for the signing key and database credentials, and ingress that serves the federation port. Confirm the chart or image version, the volume mount paths and the storage class with your platform team before the restore.
- Map state to volumes: Identify which paths hold configuration, the signing key, media and any worker sockets, and mount each one explicitly rather than relying on defaults.
- Keep the signing key as a secret: Load the key from a managed secret store, restrict read access, and confirm the pod reads the same key file the old host used.
- Restore the database outside the pod lifecycle: Restore into a database service that Synapse reaches over the network, and run the one-time keys step before the first start.
- Rebuild ingress for federation: Expose the federation port or delegation target on the ingress path you have chosen, and confirm that the health and admin endpoints are not public.
- Verify before DNS changes: Check pod logs for schema or signing key warnings, run a federation test against a second server, and confirm media uploads and downloads on the new volume.
The Kubernetes rollout should not begin serving production traffic until these checks pass in a staging namespace that mirrors the production hostname.
Moving to a new cloud usually means the database becomes a managed service with its own backup, network and parameter model. The Synapse state is the same, but the database restore path changes, and the managed service may not allow every setting the backup guidance expects. Ask the provider which PostgreSQL major versions it offers, how it handles extensions and locale, and whether you can create a database with the encoding and template the restore needs. PostgreSQL 14 is the earliest version that current Synapse releases require, so check that the managed version meets that floor.
- Confirm the database version and locale: Verify the managed PostgreSQL major version and that you can create the database with UTF8 encoding, the C locale and template0.
- Copy media and config to the new storage: Move the local media store and configuration to the new cloud's block or file storage, or plan an object storage move as a separate step.
- Keep the signing key in the new secret store: Transfer the signing key through a controlled channel and record who holds access after the move.
- Plan network paths and egress: Confirm that the new network allows federation traffic on the expected port, and that the database is reachable only from the Synapse hosts.
- Verify before DNS changes: Compare row counts for key tables between old and new databases, test a login and a message exchange, and confirm that the backup schedule on the managed service includes the database and the media store.
Ask the provider and your architect to confirm each of these points in writing before the cutover window is scheduled.
How the move runs: inventory, rehearsal, parallel run and cutover
This sequence moves a Synapse homeserver to new hardware or a new cloud while keeping the server name, signing identity and encrypted history intact. Each step ends with a check that tells the team whether it can move on.
Inventory configuration, keys, database and media
The operator who owns the current homeserver lists everything the new host must receive: the configuration files, the signing key, the PostgreSQL database and its size, and the local_content media store. Note the exact Synapse version in production and the PostgreSQL and Python versions it runs on. Confirm the server_name will not change, since it fixes how users and rooms are identified. The step is done when the inventory is written down, the signing key location is confirmed, and the team knows the total size of the data to transfer.
Match or deliberately plan the Synapse version
Decide whether the new host runs the same Synapse release as the old one or a newer release that the team has chosen on purpose. Check the platform floors in the upgrade notes, including the PostgreSQL and Python minimums for the target release, and confirm the new host meets them. Read every set of upgrade notes between the current and target versions. Rolling back after database schema changes can be difficult, so an upgrade should be tested in the rehearsal, not first attempted during cutover. The step is done when the target version is written in the change plan with its platform requirements checked.
Rehearse the restore on the new host
Build the new host with the same configuration and restore a fresh backup into it, following the Synapse backup guidance. Recreate the PostgreSQL database with UTF8 encoding, C locale and template0 instead of restoring into an existing database that already has tables. Restore the signing key and media store, then start Synapse in a test configuration that does not accept federation traffic. Confirm that the e2e_one_time_keys_json table was excluded from the dump or truncated after restore, as the backup guidance requires. The step is done when the homeserver starts cleanly, the database passes basic queries, and a test account can log in and read old rooms.
Run a parallel test without changing federation identity
Run the rehearsed server alongside the live one for testing while the public name still resolves to the old host. Keep the federation listener closed to the public internet, or restrict it to a short list of test domains using federation_domain_whitelist, and firewall the federation port as the configuration manual recommends. Test login, message sending, media upload and download, device verification and encrypted messages between test accounts. Compare user counts, room counts and recent event timestamps against the old database. The step is done when the test checklist passes and the team has recorded any differences to resolve before cutover.
Freeze writes and take the final backup
Schedule a cutover window with the users and administrators who depend on the server. Stop writes on the old host so no new events arrive after the final snapshot, then take a fresh backup of the configuration, signing key, database dump in custom format and media store. Record the time and checksums of each file. Confirm the final dump is newer than the rehearsal dump and transfer it to the new host. The step is done when the final backup is verified on the new host and the old host is confirmed quiet.
Restore final data and switch DNS and delegation
Restore the final backup into the new host using the same database procedure as the rehearsal, then start Synapse with federation enabled. Update DNS records and any well-known delegation or SRV settings so that the server name and federation port point to the new host, following the federation documentation. Check that the federation tester and a remote test account can reach the server, and that existing clients connect after their DNS caches expire. Keep the old host powered on and unchanged so it can be restored to service if a serious fault appears. The step is done when remote servers and clients reach the new host and core messaging works.
Verify the restore before decommissioning
Monitor the new server through the agreed observation period, reviewing logs, federation errors, database health and reports from users about failed decryption or missing history. Spot-check old encrypted rooms, media downloads and admin accounts against the inventory. Run a fresh backup on the new host and test a restore of it. Only when the restore check passes and the owner signs off should the old host be shut down, and its disks and backups kept under the retention rules that apply to your organization. The step is done when the written sign-off exists and the decommissioning record is filed.
Documented tools and export paths for the move
A Synapse move depends on three stores: the configuration and signing key, the PostgreSQL database, and the local media directory. Each has a documented export path, and the database path depends on whether the PostgreSQL major version changes during the move.
Custom-format database dump
Synapse's backup guidance uses pg_dump in custom format, which lets pg_restore rebuild the database in a controlled way. Dump the database while Synapse is stopped or at a known consistent point, and record the Synapse version and PostgreSQL version alongside the file. Confirm that the dump includes every schema Synapse created, and store it with the signing key so the two are restored together. A dump taken without the signing key cannot restore the server's identity.
Synapse backup guideFresh database with correct encoding
Restore into a newly created database rather than one that already has tables, because a restore into an existing schema can cause subtle inconsistencies. Create the database with UTF8 encoding, the C locale and template0 so the collation matches what Synapse expects. Locale mismatches are a common source of later database errors, so check the collation after creation and before restore.
Excluding one-time keys table
The e2e_one_time_keys_json table must be excluded from the dump or truncated after restore. If restored one-time keys are reissued, other devices can receive keys that have already been used, which produces decryption errors for encrypted rooms. Write this step into the runbook as a required action with a named owner, and verify it by checking the table is empty before Synapse starts on the new host.
Local media directory copy
The local_content media store is backed up separately from the database and may be the only copy of user uploads. Copy the directory with permissions and ownership preserved, and confirm that the media paths in the configuration match the new host. Compare file counts and total size between source and destination before cutover, and keep the source until the new server has run cleanly for a period you agree in advance.
Media backup notesLogical replication or pg_upgrade
If the PostgreSQL major version changes, pg_dump and restore is not the only route. pg_upgrade and logical replication both support major upgrades, and logical replication works across major versions with only several seconds of downtime according to PostgreSQL's upgrade documentation. Choose the path based on the downtime window, the database size and whether you can rehearse the cutover. Test whichever path you choose on a copy before the production move.
- Logical replication downtime
- Several seconds
Confirm the target PostgreSQL version
Synapse 1.143.0 and later require PostgreSQL 14 or newer. PostgreSQL 14 support ends November 12, 2026, so a move onto PostgreSQL 14 starts a version that will leave support soon after cutover. Confirm the target major version with your Synapse release and your PostgreSQL support policy before you choose the export path, and plan any follow-on upgrade as a separate change.
PostgreSQL versioning policyHow the old and new Synapse hosts split the move
The move starts with an inventory on the old host, then config, signing key, PostgreSQL dump and media copy travel to the new host as separate hand-offs. The signing key and the database sit inside a trust boundary because they hold the homeserver's identity and its encrypted history. The one-time keys table is excluded or truncated after restore, and verification must pass before DNS and delegation change and the old host is decommissioned.
Phases of the move, with the signing key and database inside the trust boundary.
What drives the cost and duration of moving Synapse
This table lists the factors that change how much work a Synapse move takes and who pays for it. Read each row to see whether the driver is a one-time project cost or an ongoing one, and use the last column to build the questions you put in a quote. The main takeaway is that database size, media store size and the downtime window usually set the schedule, while SSO and PostgreSQL version changes often add scope.
| Driver | Why it changes effort | One-time or recurring | What to ask for in a quote |
|---|---|---|---|
| Database size | Dump, transfer and restore time grow with the PostgreSQL database, and the restore must be rehearsed on the new host. | One-time | Estimated dump, transfer and restore hours from a rehearsal on a copy of your data |
| Media store size | The local_content media store may be the only copy of user uploads, so copying it often takes longer than the database. | One-time | Copy method, verification steps and whether a second sync runs at cutover |
| Workers and Redis use | Each worker process, the main process and Redis replication must be reconfigured and tested on the new hosts. | One-time, plus ongoing monitoring | List of worker types, Redis placement and the config changes included in scope |
| PostgreSQL version change | Moving to a new major version adds an upgrade step, and PostgreSQL 14 is the earliest version Synapse 1.143.0 and later accept. | One-time, with later minor updates recurring | Target major version, upgrade method and whether pg_upgrade or logical replication is used |
| SQLite still in use | A move that also converts SQLite to PostgreSQL adds a separate migration project with its own disk and downtime planning. | One-time | Whether the conversion is in scope and which migration path is proposed |
| Federated rooms and room count | Large or complex rooms take longer to verify and can slow the post-move catch-up of federation traffic. | One-time | Room count review and the monitoring window agreed after cutover |
| Downtime window | A short window forces a rehearsed, staged copy. A longer window allows a simpler cold copy with less parallel work. | One-time | Maximum acceptable outage, agreed rollback point and the test run plan |
| Reverse proxy and TLS setup | Changing hosts or IP addresses affects delegation, certificates, port 8448 federation and the proxy rules. | One-time, with certificate renewal recurring | Delegation and certificate changes, DNS changes and who controls the records |
| SSO or MAS changes | Moving identity to MAS or changing OIDC provider settings adds configuration, user mapping and login testing to the move. | One-time, with ongoing identity support | Whether authentication changes are in scope, and the login test cases to be signed off |
What usually goes wrong when Synapse changes hosts
Most failed Synapse moves trace back to a short list of mistakes: keys handled carelessly, a database restored over existing data, and identity settings changed mid-move. Each card below names one failure, why it hits this migration, and the check that prevents it.
Losing or regenerating the signing key
The signing key identifies your server to every other homeserver in federation. If the new host generates a fresh key, remote servers will see a different server identity and may reject or distrust events signed by the old one. Copy the existing signing key file with the config before first start, confirm the file permissions match the old host, and compare the key ID with what the old server reported before you cut DNS over.
Synapse backup docsRestoring into a non-empty database
Loading a dump into a database that already has tables can leave subtle inconsistencies that surface days later. A fresh install on the new host often creates tables automatically, so the restore may land on top of them. Drop and recreate the database before restoring. Recreate it with UTF8 encoding, the C locale and template0 so the restore matches the source, and check the table count after the load.
Wrong encoding or locale
A database created with the wrong encoding or collation can accept the restore without errors and still behave differently in queries and sorting. This is an easy mismatch to miss when the new PostgreSQL server uses host defaults. Check the encoding and collation of the new database against the documented values before restoring, and confirm the PostgreSQL major version on the new host is one Synapse supports for your release.
Reissued one-time keys breaking decryption
One-time keys are used once to establish encrypted sessions. If a restored dump brings back keys that were already claimed, the server can hand the same key to a second device, and clients can fail to decrypt messages. Exclude the e2e_one_time_keys_json table from the dump, or truncate it after restore, and ask users to expect a short period of key negotiation after the move.
Missing media that was the only copy
The local media store can hold the only copy of files users uploaded, and a move that copies only the database leaves those uploads as broken links. Include the local_content directory in the transfer, compare file counts and total size between hosts, and open a sample of older uploads from a client account after cutover. Confirm the media path in the new config matches where the files were placed.
Federation breaking after identity changes
Changing server_name, or the delegation records that point user IDs at a host, changes how users and rooms are identified. Rooms and accounts created under the old name do not follow the new one. Keep server_name identical, change only the hosts that serve it, and test federation from an outside server after DNS and the federation listener (port 8448 by default) are live. Keep the federation domain whitelist setting unchanged during the move so the server does not open or close federation by accident.
Synapse federation docsVersion mismatch that blocks rollback
Synapse database schema changes between releases can make it hard to return to an earlier version. If the new host runs a newer Synapse than the old one, a failed cutover may leave you with a database the old server cannot read. Match the Synapse version on both hosts during the move, read the upgrade notes for every release in between, and keep a verified dump taken before the cutover as the rollback point.
Synapse upgrade notesQuestions buyers ask before moving Synapse to a new server
How much does moving a Synapse homeserver cost and what drives the price?
Cost depends mostly on the environment, not on the copy itself. The main drivers are the number of hosts involved, the size of the PostgreSQL database and media store, whether the move crosses cloud accounts or networks you control, how many workers and reverse proxy or TLS pieces must be rebuilt, and how many rehearsal runs the cutover needs. Some costs are one-time (planning, the rehearsal, cutover and verification), while backups, monitoring and the new server's running costs recur. Ask any quote to list the environment inventory it assumes, the number of dry runs, who performs the database restore and key handling, and what is excluded, such as DNS changes or client communication. DeployOpen does not publish prices. A quote follows from a written scope.
How long does the downtime window need to be for a Synapse move?
The window depends mainly on how large the PostgreSQL database and the local media store are, and on how fast you can copy and restore them into the new environment. A small instance with little media can usually be moved in a far shorter window than a large one with years of uploads, because the dump, transfer and restore all scale with data size. Plan the window from measurements taken on your own system: time a test dump and restore, measure the media directory, and measure the transfer speed between hosts. Also budget time for DNS propagation, federation checks and client verification after cutover. Confirm these numbers in a rehearsal before you commit to a public window.
What does the work need from our team before it starts?
The work needs several things from your side before the first rehearsal. You need administrative access to the current homeserver, the new hosts, the PostgreSQL servers and the storage holding media, plus credentials for the reverse proxy and DNS zone that serves your server name. Someone must be able to locate and secure the signing key and config files, and the decision on who holds copies of backups must be made in advance. Agree change windows with the users or business owners, and name a contact who can approve the cutover. A written list of hosts, ports, firewall rules and any delegation records helps the engagement stay within the agreed scope.
Can our in-house team move Synapse to a new server without a partner?
An experienced Linux and PostgreSQL team can move Synapse in-house if it follows the Synapse backup documentation closely and rehearses the move. The risky steps are not the file copies. They are the database restore into a correctly created database (UTF8 encoding, C locale and template0), the handling of the signing key, and the exclusion or truncation of the e2e_one_time_keys_json table after restore. Those steps are easy to get wrong without a rehearsal. Ask whether your team has done a restore test, who will own the rollback decision, and who is on call during the window. DeployOpen can plan, implement and document the move on infrastructure you control, or support your team through it.
Do users have to re-verify their devices after the server move?
Users should not need to re-verify devices if the signing key, the database and the one-time key handling are carried over correctly. The Synapse backup guidance says the e2e_one_time_keys_json table should be excluded from the dump or truncated after restore, because otherwise restored one-time keys could be reissued and cause decryption errors. Keep the signing key identical to the original, since it signs server keys that other servers rely on. Verify in the rehearsal by logging in with a test account on an existing device, sending an encrypted message, and confirming that a second device can read it. If problems appear, check the one-time key handling before asking users to take any action.
How should we test the move before cutover?
Test with a full rehearsal on a copy of production data in a separate environment. Take a dump in PostgreSQL custom format, restore it into a freshly created database with the required encoding and locale, copy the config, signing key and local_content media store, and start Synapse against that copy. Then check that the homeserver starts cleanly, that a test account can log in, that encrypted messages decrypt on an existing device, that media previews load, and that federation works with a test remote server if your federation policy allows it. Record the timings of each step, which gives you the real downtime figure. Repeat the rehearsal until the steps are routine.
Will federation break if our server name or hosts change?
Federation is safe only when the server_name setting stays the same. server_name fixes how users and rooms are identified, so a change to it affects every identifier on the server. Federation runs on port 8448 by default, and delegation can serve user IDs such as @user:example.com from another host on port 443. Keep the same signing key and confirm that the new host answers on the federation port or through the delegation record before you cut over DNS. Restrict federation with the federation_domain_whitelist setting during testing if you need to limit traffic, and firewall the federation listener as the Synapse configuration manual recommends.
How DeployOpen scopes and delivers a Synapse relocation
DeployOpen plans and implements self-hosted open-source platforms inside the client's own infrastructure, so a Synapse relocation runs on your cloud account, data center or isolated network rather than on infrastructure we own. Before any work starts, the scope is agreed in writing: which hosts move, which PostgreSQL version and topology apply, how the media_store directory and signing key are handled, what downtime window is acceptable, and who on your side approves each cutover step. Most engagements are fixed-scope, so the deliverables and timelines are fixed in that agreement and a quote follows from it. Ask any partner to show how the written scope covers the e2e_one_time_keys_json handling and the federation listener, because those are the items that change the cutover plan most.
Delivery centers on a rehearsal restore. DeployOpen builds the target host, restores a recent backup into a freshly created database that uses UTF8 encoding, the C locale and template0, starts Synapse against a copy of the data, and checks federation, login, media access and encrypted-room behavior before the production cutover is scheduled. The cutover plan then sets out the order of steps, the rollback point and the checks that must pass before DNS or delegation changes go live. Your operators receive documentation covering the configuration as deployed, the backup job, the restore runbook and the post-cutover checks, written so your own team can run the next restore without us.
Support and retainers are available after cutover for patching, upgrades, monitoring and periodic restore tests. Those services are priced separately and do not start automatically. Confirm with any provider, including DeployOpen, which of the deliverables above are included in the fixed scope, which are optional, and how the post-cutover period is handled. Our work does not include certifications or attestations, and we do not promise specific outcomes for your deployment. For the upstream reference material used in the work, start with the Synapse backups documentation.

