Today's Deep-Dive: Synapse
Ep. 345

Today's Deep-Dive: Synapse

Episode description

What if you could run your own chat platform — secure, open source, and fully under your control?

In this episode, we dive into Synapse, the powerful home server behind the Matrix network. But this isn’t just a technical walkthrough — it’s about digital independence. What does it really mean to host your own communication infrastructure? And how hard is it, actually?

We break down the difference between Matrix (the open protocol) and Synapse (the server software that makes it real), explain why one small domain mistake can create a massive security risk, and uncover why decentralization still relies — at least for now — on a few centralized identity services.

You’ll learn:

  • Why a reverse proxy isn’t optional — it’s essential
  • The critical domain rule that protects your entire digital ecosystem
  • How spam bots can turn your server into a problem for the whole network
  • And why true decentralized identity is still an unsolved challenge

Whether you’re just curious about self-hosting or seriously considering running your own server, this episode filters out the noise and gives you the clarity you need to get started — safely.

Because owning your communication isn’t just a technical decision. It’s a strategic one.

Ready to rethink how chat works? 🎧

Gain digital sovereignty now and save costs

Let’s have a look at your digital challenges together. What tools are you currently using? Are your processes optimal? How is the state of backups and security updates?

Digital Souvereignty is easily achived with Open Source software (which usually cost way less, too). Our division Safeserver offers hosting, operation and maintenance for countless Free and Open Source tools.

Try it now!

Download transcript (.srt)
0:00

Welcome to the Deep Dive. Today we're diving into something pretty cool if you're

0:04

interested in,

0:04

you know, taking back control of your digital communication. We're looking at Synapse.

0:09

It's

0:09

the main home server for the Matrix Network. Basically, we want to make this whole

0:13

complex

0:13

topic a bit more, well, accessible for beginners. How do you actually run your own

0:19

chat platform?

0:20

But before we really jump in, just want to give a quick shout out to our supporter

0:23

for this dive,

0:24

Safe Server. They focus on hosting exactly this kind of open source software and

0:28

helping with

0:29

your digital transformation. You can check them out at www.safeserver.de. Yeah, and

0:34

our goal here

0:35

is really to filter out the noise. What is Synapse fundamentally? Why are the

0:39

security rules so

0:40

specific? And how does it handle who you are in this whole decentralized Matrix

0:45

world? It's a

0:46

bit different. Okay, let's definitely unpack that. Starting simple, Synapse, M, and

0:49

Matrix, they get

0:50

mentioned together all the time. What's the actual difference for someone just

0:53

starting out? Okay,

0:54

think of Matrix as the blueprint. It's the open standard, the set of rules for

1:00

secure, real-time

1:01

chat that can talk to anything else following the same rules. Right, the protocol.

1:05

Exactly. Synapse

1:06

N is the most well-known engine built using that blueprint. It's the software you

1:10

actually install

1:11

and run. It's open source, mostly written in Python, with some rust creeping in now,

1:16

and it's where

1:16

your account lives, where your messages are stored. And Element are the main folks

1:20

behind Synapse,

1:21

right? I saw it's got this interesting dual license thing going on. It's primarily

1:25

AGPL 3.0,

1:27

which means you can grab it, run it, modify it, all for free. Perfect for

1:30

individuals or communities.

1:32

Which is what most beginners will care about. For sure. But Element also offers a

1:37

commercial

1:37

license. If you're a big company, you might want their Element Server Suite, or ESS.

1:43

Okay, so why

1:44

would a company pay if the core is free? What does ESS add? It's less about core

1:49

features and more

1:50

about operational guarantees. Think professional support contracts, SLAs, fancy

1:57

admin tools,

1:58

audit logs for compliance, maybe advanced ways to manage user identities that big

2:03

organizations need.

2:04

It's SAN apps, but sort of enterprise hardened. Gotcha. So support and specific

2:10

business tools on

2:11

top. But the key thing for our listeners maybe is that you can run this powerful

2:16

server yourself.

2:17

That's the real magic, isn't it? That digital autonomy. Absolutely. So someone's

2:21

convinced

2:21

they want to run it. What's the path of least resistance for getting it installed?

2:26

Like day one,

2:27

easiest method. Definitely the official Docker images or the Debian packages from

2:32

matrix.org.

2:33

The documentation points you straight there. Okay. Those options kind of bundle up

2:38

all the

2:38

tricky dependencies. Yeah. Gets you a running server much quicker than, you know,

2:43

compiling

2:43

everything from scratch. Right. Avoid the compiling nightmare first time around.

2:47

Please do. But just

2:48

having it running isn't quite enough if you want it to talk to the rest of the

2:52

world, right? Which

2:53

is kind of the point of major. So you absolutely need what's called a reverse proxy.

2:58

Think Jinx,

2:59

Caddy, Apache, something sitting in front of Synapse. Now, the docs are really

3:04

strong on

3:04

this. Is it just a nice to have or truly essential? Oh, it's essential. Seriously.

3:10

For security. For

3:11

practicality. Synapse listens on specific ports, like maybe 8448 or something. But

3:17

your users and

3:18

other servers, they expect to connect on the standard web port, 443 for HTTPS. Okay,

3:23

so the

3:23

proxy handles that connection. It handles mapping that clean port 443 traffic to

3:29

Synapse's internal

3:30

port. And here's the critical bit. It means you can expose port 443 without running

3:35

Synapse itself

3:36

as the root user, the super admin. Ah, the principle of least privilege. Big

3:40

security win.

3:41

If Synapse somehow gets compromised, the damage is more contained because it doesn't

3:45

have root

3:45

powers. Precisely. Keep Synapse's privileges as low as possible. And while we're on

3:49

setup,

3:50

just a quick heads up on maintenance, running your own server means you got to keep

3:53

it updated.

3:54

Right. And with Synapse, you really need to read the release notes before you

3:56

upgrade. Sometimes

3:57

it's just a simple update, but other times you might need to do manual database

4:02

stuff or update

4:03

Python or PostgreSQL first. You can just blindly update. Good warning. Okay.

4:07

Installation handled,

4:08

reverse proxy in place. Now, this security bit you mentioned, the docs have this

4:13

huge warning

4:14

about domains. This seems really important. It's probably the most critical

4:18

security

4:18

configuration detail. You absolutely, positively must not host your Synapse home

4:23

server on the

4:24

same base domain, the ETLD plus one, like example.com as other sensitive web apps.

4:29

Whoa. Okay. Like webmail or maybe even the element web client itself?

4:33

Exactly. Don't put your Synapse server on matrix.example.com if your webmail is on

4:37

mail.example.com or your element web is on app.example.com.

4:42

Why? What's the risk there? It boiled down to cross-site scripting,

4:45

XSS. Matrix handles tons of potentially untrusted content from users all over the

4:49

federation.

4:50

If, hypothetically, someone found an XSS bug in Synapse and your Synapse server

4:56

shared

4:56

that example.com base domain with your webmail, that attacker might be able to

5:00

leverage the

5:01

Synapse vulnerability to steal cookies or credentials from your WebL session

5:04

or other apps on that same domain. It breaks the security isolation between apps.

5:08

Oof. Okay, so that's a huge blast radius. So, ideally, if my web client is app.mydomain.com,

5:15

my Synapse should live on something totally separate, like my-matrix-server.net.

5:22

That's the gold standard. Using a different subdomain on the same base domain like

5:27

matrix.mydomain.com,

5:28

it offers some protection, but it's not as good as a completely separate registered

5:32

domain.

5:33

And this applies specifically to whatever domain you put in Synapse's public base

5:37

or all setting.

5:37

Get this wrong.

5:38

And you're undermining a key security layer.

5:40

Crystal clear. That's a non-negotiable, then. Now, let's switch gears slightly to

5:44

identity.

5:45

People often confuse the home server Synapse with the identity server.

5:48

What does the IS actually do?

5:50

Right. They're distinct. Synapse, your home server, hold your account, your

5:53

username,

5:54

your password hash, your chat history.

5:56

The core stuff.

5:57

Yeah. The identity server, or IS like the common one,

6:00

its only job is mapping things like your email address or phone number,

6:04

what we call third-party IDs or 3P IDs, your matrix ID, like at yourname.my.domain.name.

6:10

And crucially, it verifies you actually own that email address or phone number.

6:14

It sends you a confirmation link or code, but it never sees or stores your matrix

6:20

password.

6:21

So it's just a look up and validation service. Got it.

6:23

But here's the kind of weird part.

6:26

We're building this decentralized thing, but the docs strongly suggest using a

6:30

centralized IS,

6:32

like the one run by matrix.org or vector.im.

6:35

Why? Why not run my own IS too?

6:38

It's about trust and network effects, really.

6:41

You can run your own IS, like Sident, and you can associate your email with your

6:45

matrix ID on your

6:46

server. But the problem is, nobody else on the matrix network trusts your little IS

6:51

to be telling

6:51

the truth about who owns what email address. If someone on a different server wants

6:55

to find

6:55

you by searching for your email, they'll query an IS they trust, like matrix.org,

7:00

and if your email isn't registered there, they won't find your matrix ID.

7:03

So for discoverability across the whole network right now, using one of the big

7:07

established IS

7:08

instances is kind of necessary if you want people to easily find you via email or

7:11

phone.

7:12

Ah, so it's a practical compromise. You trade a bit of pure decentralization

7:16

for actually being findable in the wider ecosystem.

7:19

Pretty much sums it up, yeah. It's a known limitation, and there's work towards

7:23

more

7:24

decentralized solutions, but for now, that's the reality for easy federation.

7:28

Makes sense. Okay, installed, secured the domain, understood identity. How do I

7:33

actually,

7:33

you know, use this thing, test it out?

7:35

Easiest way is probably a web client like Element Web. Just go to app.element.io in

7:40

your browser, and this trips people up. You can't just use the default login page.

7:44

Right, because that points to matrix.org's home server.

7:46

Exactly. You need to find the option to specify a custom home server. It might be

7:50

under advanced

7:51

or other. Then you put in your server's address, usually something like https.your.server.name.8448.

7:59

Got it. And then I try to sign up, but it won't let me by default, will it?

8:03

Correct. Default setting is enable registration.false. Safety first.

8:07

You have to go into your home server.yml configuration file and flip that to true.

8:12

Okay. Registration enabled. Now what?

8:14

Now you have a choice. Option one, strongly recommended if your server is reachable

8:19

from the internet. Set up a cappie TCHA. To stop the bots.

8:23

Absolutely. Option two is you can set enable registration without verification.

8:29

Good. But honestly, don't do that unless your server is purely internal and locked

8:35

down.

8:36

Why is the cappie TCHA so important, even for a small server, maybe just for

8:41

friends?

8:41

Because spam bots will find your open registration endpoint eventually.

8:45

And if they can create accounts without a cappie TCHA, they won't just spam your

8:49

users.

8:49

They'll use your server as a launchpad to spew spam across the entire Matrix

8:53

Federation.

8:53

Ah, so you become part of the problem. You really do.

8:56

Running a server comes with a bit of responsibility to the network's health.

9:00

Use a cappie TCHA if it's public, please.

9:02

Message received. Okay, so I registered successfully.

9:05

My Matrix ID will look like at my username.my.server.name.

9:08

Right, exactly that format. Username, colon, your server's domain name.

9:12

And if you hit snags, setting this all up.

9:14

Where do I go?

9:14

The main community support room is hashtag sendapps.matrix.org on Matrix itself.

9:19

Lots of helpful folks there.

9:21

Just remember, GitHub issues are really for actual bugs, not general how-do-I

9:25

questions.

9:26

Good distinction.

9:27

And if you're a developer looking to contribute, there's hashtag synapse-dev.matrix.org.

9:33

Okay, so wrapping this up, Synapse is powerful.

9:36

It gives you this amazing open source foundation for your own secure communication

9:40

platform.

9:41

But you have to nail the setup.

9:43

Get the reverse proxy right.

9:45

Absolutely follow that domain separation rule for security.

9:49

And understand the current trade-offs with identity servers for discoverability.

9:53

Yeah, and if you look at the bigger picture, reading between the lines in the docs,

9:57

The Matrix Project wants to solve that identity server centralization issue.

10:01

The long-term goal is clearly full decentralization, even for finding people via

10:05

email.

10:06

The current reliance on servers like matrix.org is pragmatic, but you can see they're

10:10

aiming beyond that.

10:11

That is definitely something interesting to think about.

10:13

What does truly decentralized identity actually look like?

10:17

And how does trust work in that kind of future network compared to today's hybrid

10:21

model?

10:22

Something for you to ponder.

10:23

And remember, this deep dive was supported by Safe Server.

10:26

They're there to help you manage hosting for software like Synapse

10:29

and support your digital transformation efforts.

10:32

Check them out at www.safeserver.de.

10:35

We'll catch you on the next one.

10:35

We'll catch you on the next one.