Skip to content
palpo-imPublic

About

A Matrix server written in Rust

Resources

Contributing

Stars

141 stars

Watchers

3 watching

Forks

Latest commit

Β 

History

1,218 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Palpo: A High-Performance Matrix Homeserver

License Rust

Palpo is a next-generation Matrix homeserver implementation written in Rust, designed for high performance, scalability, and robust federation. Built on the Salvo web framework and PostgreSQL database, Palpo delivers enterprise-grade real-time messaging and collaboration while maintaining minimal operational overhead.


🌟 What is Matrix?

Matrix is an open standard for decentralized, real-time communication. It enables:

  • End-to-end encrypted messaging - Secure conversations by default
  • Federated architecture - No single point of control or failure
  • Interoperability - Bridge with other chat platforms (Slack, Discord, IRC, etc.)
  • VoIP and Video Calling - Built-in support for voice and video
  • Rich messaging - Reactions, threads, file sharing, and more

Learn more at matrix.org


✨ Why Palpo?

Performance First

  • Built with Rust for memory safety and zero-cost abstractions
  • Powered by Salvo web framework for high-throughput async I/O
  • PostgreSQL backend for reliable data persistence and ACID compliance
  • Optimized for low latency and high concurrency

Developer Friendly

  • Clean, modular codebase
  • Well-documented APIs
  • Docker-ready deployment

Resource Efficient

  • Minimal memory footprint compared to reference implementations
  • Efficient database query patterns
  • Smart caching strategies
  • Scales horizontally

πŸ†š Palpo vs. Tuwunel

A common question is how Palpo compares to Tuwunel, another Rust Matrix homeserver. Both are valid choices β€” they just optimize for different things.

Architectural differences

  • Database: Palpo uses PostgreSQL as its primary backend, giving you ACID guarantees, mature replication/backup tooling, and standard SQL for inspection. Tuwunel (like Conduit/Conduwuit before it) is built around an embedded RocksDB key-value store. Palpo's choice favors operational familiarity for teams already running Postgres, easier integration with existing monitoring/backup pipelines, and the ability to scale storage independently from the application process.
  • Web framework: Palpo is built on Salvo, a modern async Rust web framework with a clean middleware/router model that maps closely to the Matrix Client-Server API.
  • Codebase lineage: Palpo started from ideas in Conduit and has been heavily reworked. We are not a fork of Tuwunel and do not carry its codebase β€” though we gratefully acknowledge architectural insights from that line of work (see Acknowledgments).
  • License: Palpo is Apache-2.0 licensed, which some downstream users and distributors find easier to consume than copyleft licenses.

Honest caveats

  • Complement coverage looks good. At the time of writing, our latest run is 672 pass / 0 fail / 14 skip (see tests/results/test_all.result.jsonl). On the Matrix spec compliance axis, Palpo is in solid shape.
  • What we don't have yet is real-world operational data. Palpo has not gone through large-scale production deployments. We don't have battle-tested numbers on long-running federation behavior, performance under sustained load, large room state, or 24/7 stability over weeks and months. Tuwunel is significantly more mature on this dimension, and if you need a homeserver to put into production today, that's an honest reason to pick it over Palpo for now.
  • We are actively working on closing this gap. Help testing Palpo in non-critical deployments and reporting back what you see would be hugely valuable.

Short version

Palpo passes the Matrix spec tests and offers a Postgres-backed, Salvo-based Rust stack; Tuwunel has the production mileage today. Pick whichever matches your priorities.


πŸš€ Quick Start

Try Our Demo Server

⚠️ IMPORTANT: Test Server Notice

Our test server is for evaluation and testing purposes only:

  • URL: https://test.palpo.im
  • ⚠️ All data on this server will be periodically deleted without notice
  • Do NOT use for production or store important conversations
  • Expected to be reset frequently for testing purposes

Connect with Cinny (Web Client)

  1. Open Cinny
  2. Click "Edit" on the homeserver selection
  3. Enter https://test.palpo.im as your custom homeserver
  4. Create a test account and start chatting!

Connect with Element (Desktop/Mobile)

  1. Download Element
  2. On login screen, click "Edit" next to the homeserver
  3. Enter https://test.palpo.im
  4. Register or login

πŸ“¦ Installation

Palpo provides the Matrix homeserver and its management APIs. The optional account approval service handles ordinary account signup separately from the homeserver. Hagency fleet, project and Agent workflows are no longer included; see the retirement guide for existing application deployments.

Prerequisites

  • Rust 1.96 or higher
  • PostgreSQL 16 or higher
  • Linux, macOS, or Windows (WSL2 recommended)

Build from Source

# Clone the repository
git clone https://github.com/palpo-im/palpo.git
cd palpo

# Build the project
cargo build --release

# Copy example configuration
cp palpo-example.toml palpo.toml

# Edit configuration (set your domain, database credentials, etc.)
nano palpo.toml

# Run the server
./target/release/palpo

Docker Deployment

# Pull the image
docker pull ghcr.io/palpo-im/palpo:latest

# Run with docker-compose
cd deploy/docker
docker-compose up -d

See installation for detailed deployment instructions.

For an existing database, follow the upgrade instructions before starting an upgraded server.

Enable URL Preview Cards

Matrix clients request webpage metadata from Palpo to display inline link cards. URL-preview allowlists are empty by default, so previews require an operator to configure the allowed destinations.

Add the following to your active palpo.toml, or update its existing [url_preview] section. Replace the example hostnames with the sites you want to preview:

[url_preview]
domain_explicit_allowlist = ["github.com", "example.org"]

Use hostnames without a scheme or path. With the default check_root_domain = false, each hostname is matched exactly; list any desired subdomains separately. An entry in domain_explicit_denylist takes precedence over the allowlist. Keep the deployment's outbound network restrictions in place. See the full configuration example for the other preview options.

For the Docker Compose deployment above, edit deploy/docker/palpo.toml, which is mounted at /var/palpo/palpo.toml. Confirm the running service uses that file and check for environment overrides, then restart the Palpo service to apply it:

cd deploy/docker
docker compose restart palpo

To verify, make an authenticated request to GET /_matrix/client/v1/media/preview_url?url=https%3A%2F%2Fgithub.com%2Fpalpo-im%2Fpalpo on your homeserver, using an existing Matrix access token in the Authorization: Bearer ... header. A successful response returns HTTP 200 with preview metadata such as og:title, og:description, and, when available, og:image.

HTTP 403 with M_FORBIDDEN and URL is not allowed to be previewed means the requested URL failed Palpo's preview policy check. Check the effective allowlist and denylist before troubleshooting client rendering. Clients may cache a failed preview, so retry the link after the endpoint works.


πŸ§ͺ Current Progress

We use Complement for comprehensive end-to-end testing against the Matrix specification.

  • Test Results: test_all.result.jsonl
  • Test Coverage: Continuously improving compliance with Matrix spec
  • Federation: Active testing with other homeserver implementations

🀝 Contributing

We welcome contributions of all kinds! Whether you're:

  • πŸ› Fixing bugs
  • ✨ Adding features
  • πŸ“ Improving documentation
  • πŸ§ͺ Writing tests
  • 🎨 Improving UX

Please read our Contributing Guide to get started.



πŸ™ Acknowledgments

Palpo stands on the shoulders of giants. We're grateful to these projects:

  • Conduit - Pioneering lightweight Matrix homeserver in Rust
  • Ruma - Essential Matrix types and protocol implementations
  • Tuwunel - Innovative Matrix server architecture insights
  • Salvo - High-performance async web framework
  • Matrix.org - For creating and maintaining the Matrix protocol

πŸ“„ License

Palpo is licensed under the Apache License 2.0. See LICENSE for details.


πŸ”— Links


⚠️ Important Notices

Test Server Data Retention

The test server at test.palpo.im is for evaluation only.

  • All accounts, rooms, and messages may be deleted at any time
  • Data is not backed up
  • Service may be interrupted for updates
  • Do not rely on this server for any important communications

Production Use

Palpo is under active development. While we strive for stability:

  • Always backup your database
  • Test updates in a staging environment
  • Monitor server logs and performance

Built with ❀️ by the Palpo community

About

A Matrix server written in Rust

Resources

Contributing

Stars

141 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages