Key Takeaway
- 💬 A Matrix chat server on Hostinger gives your family or team a chat app you own — same feel as WhatsApp or Messenger, but the history, the accounts, and the data live on your VPS, not a company’s ad machine.
- 🧰 The full setup is one evening: Synapse (the server) in Docker, Element (the app) on phones and browser, HTTPS via your domain — copy-paste steps below, plus the exact VPS size to pick.
- 💰 Math that matters: Hostinger KVM 1 covers a family-sized server (~10-20 users) for roughly the price of two streaming subscriptions — no per-user fees, ever, and exportable backups.
- 🔒 OFW angle: your chat history survives the phone you lose at the airport, the SIM you swap, and the account lockouts — because your family’s messages were never one company’s property to begin with.
- 🔗 Part of the self-hosting cluster: Jellyfin for media, Paperless-ngx for documents, Vaultwarden for passwords — Matrix completes the private-home stack.

Table of Contents
Every family group chat is a rented room. You furnished it with a decade of photos, voice notes from grandparents, the exact voice message of your kid’s first word — and the landlord can change the rent, the rules, or the locks without asking. When Meta changed its terms, when WhatsApp broke exports, when an account got hacked and wiped, millions of families discovered their shared history was never really theirs. A Matrix chat server — the most battle-tested open chat protocol — flips the custody: the room is yours, the building is your VPS, and the apps your relatives already know how to use (Element looks and feels like every modern chat app) just point at your address instead of someone else’s.
This guide builds a complete Matrix chat server on Hostinger in one evening: Synapse for the server, Element for the apps, HTTPS for the door lock, and backups for the fire safe. The copy-paste blocks are exact. Total cost: a KVM VPS from about $7-9 a month. Total monthly fees per family member: zero.
Why a Matrix Chat Server (and What Element Is)
Matrix is an open protocol — like email, anyone can run a server and the servers can talk to each other. Synapse is the reference server implementation; Element is its flagship app (web, Android, iOS). You get the modern chat grammar — rooms, threads, voice notes, photos, read receipts, reactions, encryption — without the advertising business model that funds every free chat app. Two deployment choices matter and this guide decides them for you:
Federation off by default. A private family server doesn’t need to talk to the wider Matrix network. Keeping federation disabled shrinks your attack surface and makes your moderation story simple: your VPS, your people, your rules. (One setting change turns it on later if you ever want bridge-to-other-networks or public rooms.)
Docker, not bare metal. The container setup upgrades cleanly, snapshots easily, and matches the rest of the self-hosting cluster’s patterns — the same discipline as the Jellyfin build.
Step 1: Pick the VPS That Fits Your Family
Matrix is light until it isn’t — media is the weight. The honest ladder:
- KVM 1 (2 vCPU/4GB, ~$6.49 intro) — up to ~15 active users, photo-heavy chats fine with 40GB disk. The pick for a family server.
- KVM 2 (8GB) — two households sharing, or video-file-heavy rooms.
- KVM 4 — a small business team with bots and bridges; overkill for family use.
Pick Ubuntu 24.04, a data center near your family’s heaviest users (Singapore or Mumbai for PH-side latency), and point a subdomain like chat.yourdomain.com at the VPS IP.
Step 2: Install Docker and Compose
SSH in (Hostinger’s browser terminal works), then paste:
sudo apt update && sudo apt -y upgrade
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER
# log out and back in, then verify:
docker --version && docker compose versionStep 3: Generate Synapse Config
sudo mkdir -p /opt/matrix/data
docker run -it --rm \
-v /opt/matrix/data:/data \
-e SYNAPSE_SERVER_NAME=chat.yourdomain.com \
-e SYNAPSE_REPORT_STATS=no \
matrixdotorg/synapse:latest generateThis writes homeserver.yaml and a signing key into /opt/matrix/data. Open the config and set your admin password hash later via the register step below.
Step 4: The Docker Compose File
sudo nano /opt/matrix/docker-compose.ymlservices:
synapse:
image: matrixdotorg/synapse:latest
container_name: synapse
restart: unless-stopped
volumes:
- /opt/matrix/data:/data
ports:
- "8008:8008"
caddy:
image: caddy:latest
container_name: caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- /opt/matrix/Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
volumes:
caddy_data:sudo nano /opt/matrix/Caddyfilechat.yourdomain.com {
reverse_proxy /_matrix/* synapse:8008
reverse_proxy /_synapse/* synapse:8008
}cd /opt/matrix && sudo docker compose up -d
# watch it come up:
sudo docker compose logs -f synapseStep 5: Create Your Matrix Chat Server Admin User
docker exec -it synapse register_new_matrix_user -c /data/homeserver.yaml http://localhost:8008 -aSet username and a long password. This account administers the server: creates rooms, registers family members (registration stays closed to strangers by default — your server only accepts people you add), and manages quotas.
Step 6: Install Element and Connect the Family
Phones: install Element X (iOS/Android), enter chat.yourdomain.com as homeserver, sign in. Desktops: the same at app.element.io with custom homeserver, or self-host Element Web on the same VPS if you want zero third-party touch. Create the family room, enable end-to-end encryption in the room settings (verified device badges turn green), and move the first real conversation in. The WhatsApp history doesn’t transfer — start fresh with the rule that made this server: anything posted here belongs to the family, forever, exportable. Element’s per-room export produces clean archives.
Step 7: Backups and the Maintenance Minute
The whole Matrix chat server is two directories: /opt/matrix/data and the Caddyfile. A weekly cron covers it:
sudo apt -y install restic
restic -r /backups/matrix --verbose backup /opt/matrix/data --tag weeklyPoint restic at an off-VPS destination for the real fire-proofing (S3-compatible storage or a second location). Updates are two commands (docker compose pull && docker compose up -d) and monthly is plenty. This is the same backup discipline as the Paperless-ngx vault — one cron, one restic repo, tested restore twice a year.
The Honest Limits
Three things to say plainly. Ecosystem: everyone’s contacts live on WhatsApp; Matrix handles your family’s core rooms, not the wider world — you keep both for a while, which is fine. Ops: you’re the admin now; the two-command update and the backup cron are the whole job, but they are your job. Video calls: Element’s group calling works but is not Zoom; for family quiz nights, keep the dedicated tool. None of these change the custody math — and custody was the point.
The OFW Layer: Why Families Abroad Switch First
Overseas Filipino families are the natural early adopters, for unglamorous reasons. The family’s shared life is already transnational: a mother in Riyadh, a son in Toronto, the house in Laguna — and the group chat is the only place all three exist at once. That chat carries the remittance confirmations, the medical updates, the visa questions with answers you cannot afford to lose. Rented chat apps have failed these families in specific ways: SIM swaps that orphan a number and its history, account lockouts that took months to resolve, phone thefts that erased the only copy. A Matrix chat server removes the single point of failure — history lives on the VPS, every device is a synced mirror, and the login is the family’s, not a carrier’s. Set the room culture early: the daily voice note lives here, the medical documents live in the document vault, the movie nights stream from Jellyfin — the private home, assembled pillar by pillar.
Troubleshooting: the Three Stumbles
Every first build hits one of these. Certificate wait: Caddy needs the domain’s A record already pointing at the VPS before first launch, or HTTPS fails — check the DNS first, restart Caddy second. Registration refused: by design; register each family member from the admin account with docker exec -it synapse register_new_matrix_user -c /data/homeserver.yaml http://localhost:8008 (without the -a flag for non-admins). Media errors on upload: disk ceiling — KVM 1’s 40GB fills with a photo-heavy decade; prune old media with Synapse’s purge commands or step up to KVM 2 before the family notices. Each fix is a minute; none are reasons to abandon the build.
Hostinger Fit: the Plan, the Price, the Pattern
KVM 1 at Hostinger’s KVM page carries a family chat server comfortably — the same VPS pattern as every build in this series: Jellyfin for movies, Paperless-ngx for documents, Vaultwarden for passwords, and now Matrix for words. One VPS, four pillars of the private home, one bill. Set it up tonight; move tomorrow’s voice notes into a room that never gets repossessed.
Frequently Asked Questions (FAQ)
- Q: Is Matrix really as easy as WhatsApp for non-technical family?
- Close. Element works like every modern chat app; the only one-time friction is signing in with your server address. Do the onboarding call once, help the least-technical member first, and the room runs itself after week one.
- Q: Can I bridge WhatsApp or Telegram into Matrix?
- Bridges exist but add fragility and dependency on third-party relay servers — this guide deliberately skips them. Matrix’s own apps and exports are the stable path.
- Q: What happens if the VPS dies?
- Restore from the restic backup to any new VPS — data, accounts, and history return because the signing keys and database travel together. This is exactly why the backup step is not optional.
- Q: How is this different from the Vaultwarden or Jellyfin builds?
- Same VPS pattern, different service: those host your passwords and movies; Matrix hosts your conversations. Together they replace four subscriptions with one VPS and one maintenance habit.
- Q: Does the server work when my relatives are abroad?
- Yes — that is the OFW promise: same room, same history, from any country, on any connection, without a SIM-bound account in the way.
Disclosure: this guide contains a Hostinger affiliate link; if you buy through it, the site earns a commission at no extra cost to you.










