Dagma: The Matrix Homeserver That Executes Traitors and Timeouts
“Other homeservers federate politely. Dagma federates like an armored train arriving late to the protocol summit.” – Kim Jong Rails
Why Dagma Exists
Matrix is a beautiful idea: decentralized, end-to-end encrypted communication beyond the reach of adtech empires and feature roadmaps written by committees.
Then reality happened:
- Homeservers written in Python carrying 500MB of idle RAM just to say “hi”
- Governance by GitHub issue thread instead of clear authority
- UIs that look like every other VC-funded chat app with pastel gradients and HR-safe copy
Into this mess arrives Dagma, reachable at dag.ma:
- A Matrix homeserver with an explicit political personality
- An architecture designed for sovereign federation, not vendor lock-in
- A user base filtered by a simple test: “Did you read the lore?”
Most people won’t. That’s the point.
The Two-Server Dictatorship: Tribune and Politburo
Dagma runs on a deliberately theatrical architecture:
- Tribune – the public-facing server. It talks to the world, federates, takes the first bullets.
- Politburo – the hidden brain. It runs the heavy logic, stores the truth, and never touches the open internet.
Both are described in Terraform, not vibes. The political roleplay is decoration on top of a very simple principle:
“Never expose the brain directly to people who open random ports in production.”
The split lets you:
- Rotate Tribune aggressively without touching Politburo state
- Rate-limit and firewall the outer layer while keeping the inner one clean
- Run experiments at the edge without rewriting the core
This is not “microservices.” This is two services:
- The one you can kill.
- The one you never kill.
dag.ma: A Lore-Driven Load Test
Go to dag.ma and follow the links:
/origin– in-universe interview: “The Origin of Kim Jong Rails”/decree– Politburo Technical Stack Decree No. 1/five-year-plan– 25-year roadmap written like a Soviet poster/submission– contribution rules disguised as a Code of Submission
On paper, this is “branding.” In practice, it’s a multi-stage filter:
- People who bounce at the first emoji were never going to run
docker compose upanyway. - People who read the decree and argue about Rust vs Python in the comments can go maintain Synapse.
- People who make it to the Code of Submission, read it, and still want to help are the collaborators you actually want.
The lore is not a joke. It’s a recruitment algorithm disguised as satire.
Technical Stack: Less Feelings, More Throughput
From the decree (lightly paraphrased for sober readers):
- Language: Rust
- Not because it’s trendy, but because the runtime disappears once compiled.
- Native threads, work-stealing scheduler, zero-cost abstractions.
- Storage: PostgreSQL + Memgraph
- PostgreSQL for the boring parts: accounts, devices, message bodies.
- Memgraph for the fun parts: relationships, graph queries, experiments.
- Target profile:
- < 50MB idle
- All cores hot under load
- Federation that does not melt when your room has more than 12 people
If your reaction is “but Python is easier,” you have self-selected out of this project. That is by design.
Killing Low-Context Agents (And Other Time Sinks)
Dagma is explicitly hostile to:
- Agents with microscopic context windows that can’t remember page 2 of
/origin - People who skim one paragraph, ignore
/decree, and open an “idea” issue - Forks that reintroduce complexity Dagma already executed for performance crimes
This is not cruelty. This is bandwidth management.
The project assumes:
- You can read multiple screens of text without losing the thread
- You understand that performance numbers matter more than aesthetic debates
- You respect that the maintainers picked Rust and will not re-litigate it in every thread
If that sounds restrictive, good. The door is clearly marked. You can always walk back to the comfort of managed chat SaaS with a 12-page cookie policy.
How Dagma Fits into Derails
Derails is the railway: git, CI, blog, infra, all wired together on cheap hardware with IPv6 tricks and Terraform.
Dagma is the people’s communications line running alongside it:
- Derails Git: git.derails.dev
- Derails Blog: derails.dev
- Dagma Matrix: dag.ma
They share:
- The same sovereignty thesis: own the stack, not the subscription
- The same disdain for “enterprise-grade” bloat
- The same expectation that you can read documentation that isn’t a TikTok
If Derails is the Ministry of Railways, Dagma is the Ministry of Communications. Both report to the same Supreme Leader: “Does this actually run on real hardware, or is it just vibes?”
Should You Run dag.ma?
Probably not literally that domain. But you should absolutely:
- Run your own Matrix homeserver
- Write down your own decree about the stack
- Publish a ridiculous, honest Five-Year Plan that you actually intend to execute
- Make your CONTRIBUTING guide scary enough that only serious collaborators stay
If Dagma offends your sensibilities, that’s fine. The federation does not require you to like its propaganda.
What it requires is simple:
- Ship code, not whitepapers.
- Measure, not vibes.
- Own your infrastructure, or someone else will own your conversations.
If you agree with that, congratulations: you already understand Dagma, even if you hate the trains and the posters.