Native package-based Matrix Synapse installer for Ubuntu and Debian systems.
Synapse Installer is a standalone installer that sets up Matrix Synapse homeserver using official system packages. It provides a complete, production-ready Matrix setup with PostgreSQL, Element Web, and Synapse Admin.
- Native Packages β Uses official system packages (apt) for better integration
- Multi-OS Support β Works on Ubuntu and Debian
- Standalone Capable β Can run independently or as part of the broader Matrix ecosystem
- SSL Integration β Seamless Root Key certificate management for federation
- Modular Design β Each component (manage, ssl, diagnostics) can run standalone
- Element Web Included β Optional Element Web and Synapse Admin installation
- Comprehensive Management β Full configuration management via YAML editing interface
git clone https://github.com/amm1rr/synapse-installer
cd synapse-installer/
./install.sh- Synapse Installation β Installs Matrix Synapse from official sources
- PostgreSQL Setup β Configures PostgreSQL database with optimized settings
SSL Certificates β Integrates with Matrix Installer Root Key or custom certificates- Element Web β Optional web client installation
- Synapse Admin β Optional admin panel installation
- Configuration Management β Interactive YAML-based configuration editor
- Service Management β Complete service lifecycle control
synapse-installer/
βββ install.sh # Main installer
βββ manage.sh # Configuration management library
βββ ssl.sh # SSL certificate management
βββ diagnostics.sh # Diagnostic tools (WIP)
βββ cache/ # Downloaded packages (gitignored)
βββ .gitignore
βββ CLAUDE.md # AI assistant guide
βββ README.md # This file
| Script | Purpose |
|---|---|
install.sh |
Main Synapse installer |
manage.sh |
Configuration management & YAML editor |
ssl.sh |
SSL certificate management |
diagnostics.sh |
Diagnostic tools (in development) |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β install.sh β
β (Orchestrator) β
ββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β sources
ββββββββββββββββββββββΌβββββββββββββββββββββ
βΌ βΌ βΌ
βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ
β manage.sh β β ssl.sh β β diagnostics.sh β
β β β β β β
β β’ YAML utilities β β β’ Certificate β β β’ Service status β
β β’ IP whitelist β β management β β β’ Health checks β
β β’ Management menu β β β’ Root CA install β β β’ Logs viewer β
β β’ Shared helpers β β β’ Auto-detection β β β
βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ
- Package Manager:
apt-get - Synapse Package:
matrix-synapse(from packages.matrix.org) - PostgreSQL:
postgresql - Service Name:
matrix-synapse - Config Directory:
/etc/synapse - Data Directory:
/var/lib/synapse - Service User:
matrix-synapse - Web Server User:
www-data - System CA Path:
/usr/local/share/ca-certificates/
./install.sh# Standalone
./manage.sh# Standalone
./ssl.sh# Standalone (when complete)
./diagnostics.shThe manage.sh script provides comprehensive YAML-based configuration editing:
- General Settings β Server name, listeners, logging
- TLS & Certificates β Certificate management and Root CA installation
- Database Settings β PostgreSQL connection configuration
- Registrations β User registration control and shared secrets
- Federation β Federation rules and certificate verification
- Rooms β Room creation, retention, and moderation
- Media β Media storage, URL preview, and quotas
- Rate Limiting β Rate limiting per-user and per-host
- Statistics β Usage reporting and analytics
The ssl.sh script provides intelligent certificate handling:
- Auto-Detection β Automatically detects certificate files from directory or individual paths
- Multiple Formats β Supports full-chain and separate file formats
- Root CA Integration β Installs Root CA to system trust store for federation
- Certificate Summary β Shows expiry, SANs, issuer, and installation status
- Color-Coded Status β Visual indicators for certificate validity
1. OS Detection
βββ Ubuntu/Debian check
2. Prerequisites Check
βββ System requirements
βββ Required packages (systemd, curl, openssl, yq)
3. PostgreSQL Setup
βββ Install PostgreSQL
βββ Create database and user
βββ Configure connection
4. Synapse Installation
βββ Add official Matrix repository
βββ Install Synapse package
βββ Generate configuration
5. SSL Configuration
βββ Install Root CA (if available)
βββ Configure certificates
βββ Set permissions
6. Optional Components
βββ Element Web (optional)
βββ Synapse Admin (optional)
7. Service Enablement
βββ Enable PostgreSQL
βββ Enable Synapse
βββ Create admin user
Main Synapse configuration at /etc/synapse/homeserver.yaml
server_name: "matrix.example.com"
pid_file: /var/lib/synapse/homeserver.pid
listeners:
- port: 8448
tls: true
type: http
x_forwarded: true
database:
name: psycopg2
args:
user: synapse
password: <generated>
database: synapsedb
host: localhost
tls_certificate_path: /etc/synapse/matrix.example.com.crt
tls_private_key_path: /etc/synapse/matrix.example.com.key
federation_verify_certificates: true
# local ip support for federation
ip_range_whitelist:[]| Requirement | Minimum | Recommended |
|---|---|---|
| RAM | 512MB | 2GB |
| CPU | 1 core | 2+ cores |
| Disk | 10GB | 50GB+ |
| Dependency | Requirement | Status |
|---|---|---|
| systemd | β required | Native |
| bash | 4+ | Native |
| curl | β required | Native |
| openssl | β required | Native |
| yq | β required | Native |
Ubuntu/Debian:
- postgresql, postgresql-contrib, python3-psycopg2
- matrix-synapse (from packages.matrix.org)
# Run management script
./manage.sh
# Get YAML value programmatically
source manage.sh
yaml_get "server_name" "/etc/synapse/homeserver.yaml"# Run SSL script
./ssl.sh
# Select: Update Synapse Certificates
# Enter path to file or directory (auto-detects)systemctl status matrix-synapsejournalctl -u matrix-synapse -f| File Type | Permissions | Owner |
|---|---|---|
homeserver.yaml |
0640 | matrix-synapse:matrix-synapse |
*.key |
0600 | matrix-synapse:matrix-synapse |
*.crt |
0644 | matrix-synapse:matrix-synapse |
/var/lib/synapse |
0750 | matrix-synapse:matrix-synapse |
When using Root Key certificates:
- Root CA installed to system trust store
- Server certificates configured for Synapse
- Federation enabled with certificate verification
- Automatic trust between servers with same Root Key
# Check certificate expiry
openssl x509 -in /etc/synapse/matrix.example.com.crt -noout -dates
# Verify certificate chain
openssl s_client -connect matrix.example.com:8448 -showcerts
# Check Root CA installation
ls /usr/local/share/ca-certificates/*Root-CA*# Check service status
systemctl status matrix-synapse
# View logs
journalctl -u matrix-synapse -f
# Test configuration
matrix-synapse --config-path /etc/synapse/homeserver.yaml- CLAUDE.md β AI assistant development guide
| Component | Source | URL |
|---|---|---|
| Synapse (Ubuntu/Debian) | packages.matrix.org | https://packages.matrix.org/debian/ |
| Element Web | GitHub Releases | https://github.com/element-hq/element-web/releases |
| Synapse Admin | GitHub Releases | https://github.com/Awesome-Technologies/synapse-admin/releases |
MIT
- Synapse β Matrix homeserver
- Element Web β Matrix web client
- Synapse Admin β Admin panel for Synapse
MIT
- Synapse β Matrix homeserver
- Element Web β Matrix web client
- Synapse Admin β Admin panel for Synapse

