Skip to content Skip to footer

DWeb App Setup (Matrix Synapse)

Setting Up Matrix Synapse with NGINX on Debian for ANANSI

At ANANSI, one of our core missions is to create communication spaces that aren’t controlled by centralized corporations. Instead, we focus on tools and platforms that let members retain ownership over their data, conversations, and connections. Matrix Synapse is a perfect fit for this vision — it’s an open-source, decentralized communication protocol that gives us the power to host our own chat server while still being able to communicate across the wider Matrix network.

This setup on Debian uses NGINX as a reverse proxy, making the server accessible securely over the internet, and is designed to be scalable, resilient, and community-focused.


Why Matrix for ANANSI

Mainstream communication platforms like WhatsApp, Slack, or Discord store your messages on their servers, set the rules, and hold the keys. For ANANSI, this means sacrificing control, privacy, and the ability to adapt the platform to our community’s evolving needs.

By hosting our own Matrix Synapse server:

  • We own the data — Messages, files, and metadata are under our control.

  • We control the rules — No corporate moderation or arbitrary restrictions.

  • We stay interoperable — Matrix allows us to federate, meaning ANANSI members can talk to people on other Matrix servers.

  • We can extend and integrate — From bots to integrations with our other decentralized tools, Matrix is endlessly adaptable.


The Tech Stack

For this deployment, we used:

  • Debian (stable, lightweight, secure Linux distribution)

  • Matrix Synapse (Python-based Matrix homeserver)

  • PostgreSQL (robust database backend for storing messages, rooms, and metadata)

  • NGINX (reverse proxy for SSL termination and traffic handling)

  • Certbot (to generate and renew free TLS certificates from Let’s Encrypt)

  • Systemd (for managing service processes)

  • FirewallD / UFW (to control network access)

  • Port forwarding on the router to expose the server to the internet


Step-by-Step Setup Overview

  1. Install Dependencies
    On Debian, we began by updating the system and installing necessary packages for Synapse and PostgreSQL.

  2. Set Up PostgreSQL
    We created a dedicated database and user for Synapse to ensure better performance and security compared to the default SQLite setup.

  3. Install and Configure Matrix Synapse
    Synapse was installed from the official Matrix repositories, and configured with:

    • ANANSI’s domain name (e.g., matrix.anansi.site)

    • PostgreSQL connection details

    • Proper federation and media storage settings

  4. Configure NGINX Reverse Proxy
    NGINX was set to listen on ports 80 and 443, redirect HTTP traffic to HTTPS, and proxy requests to the Synapse backend.
    This configuration ensures:

    • Secure TLS connections using Let’s Encrypt certificates

    • Optimized performance for large file transfers and federation requests

  5. Port Forwarding & Firewall
    On the network level, ports 443 (HTTPS) and 8448 (Matrix federation) were forwarded from the router to the Debian server. Firewall rules were adjusted to allow these ports.

  6. Enable Federation & Test
    Using tools like federationtester.matrix.org, we verified that ANANSI’s Matrix homeserver was reachable across the decentralized Matrix network.


Benefits for ANANSI

  • Resilience — Even if other communication platforms shut down or censor content, ANANSI members still have a space to connect.

  • Privacy by Design — Messages are encrypted and stored on infrastructure we control.

  • Customizability — We can integrate bots, custom bridges to other platforms, and tailor the experience for ANANSI’s creative and collaborative projects.

  • Community Sovereignty — No need to conform to third-party rules or algorithms — our server is truly ours.


By deploying Matrix Synapse on Debian with NGINX, ANANSI has built a core piece of communication infrastructure that aligns with our mission — decentralized, owned by the collective, and connected to a global network without sacrificing autonomy.

The End-User Experience

For the community, joining is simple:

  1. Install FluffyChat (mobile/desktop) or visit Element Web in a browser.

  2. On first login, select “Custom server” and enter matrix.anansi.site.

  3. Create an account or log in with ANANSI credentials.

  4. Start chatting — privately, in groups, or across the global Matrix network.

For ANANSI members, this means encrypted communication, persistent community spaces, and a platform they can shape — not one shaped for them by corporate interests.