Web-Based Administration Panel for Matrix Synapse Server
Project description
EPT-MX-ADM v1.0.1
_____ ____ _____ __ ____ __ _ ____ __ __
| ____| _ \_ _| | \/ \ \ / / / \ | _ \| \/ |
| _| | |_) || |_____| |\/ |\ \ /____/ _ \ | | | | |\/| |
| |___| __/ | |_____| | | |/ / \___/ ___ \| |_| | | | |
|_____|_| |_| |__| |_/_/\_\ /_/ \_\____/|_| |_|
Web-Based Administration Panel for Matrix Synapse Server
Universal admin tool that works with ANY Matrix server - local, remote, cloud, or self-hosted. Just admin credentials needed.
Table of Contents
- Features
- Requirements
- Installation
- Configuration
- Running the Application
- Usage
- Localization
- Production Deployment
- Troubleshooting
- Security
- Contributing
- License
- Support
Features
Universal Compatibility
- Works with ANY Matrix server (local, remote, cloud, self-hosted)
- Supports self-signed SSL certificates
- No complex configuration needed
- Multi-server support in one installation
Dashboard
- Real-time server statistics
- User analytics (active, deactivated, total)
- Room statistics and analytics
- Media storage monitoring
- API health status
- Synapse version information
- Python version display
User Management
- View all users with pagination
- Create new users
- Edit user profiles and settings
- Deactivate/reactivate users
- Reset user passwords
- View user devices and sessions
- Media storage per user
- Filter by guests and deactivated users
- CSV export/import
- Advanced search functionality
Room Management
- List all rooms with detailed information
- View room details and statistics
- Edit room settings
- Delete rooms
- Unblock rooms
- Assign room administrators
- Column visibility toggles
- Advanced filtering and search
- CSV export
- Pagination with customizable rows per page
Space Management
- List all Matrix spaces
- View space hierarchies
- Manage space settings
- Consistent pagination
- Modern card-based UI
Media Management
- Overall media statistics dashboard
- Users with media list
- Detailed user media files view
- File type filtering (Images, Videos, Audio, Documents, Other)
- Quarantine system for suspicious files
- Media file deletion
- CSV export
- Human-readable file sizes
- Status filtering (Normal, Quarantined)
Authentication & Security
- Simplified login form
- Server auto-detection
- Username auto-formatting
- Real Matrix admin rights verification
- Session management
- SSL certificate support
- Secure API integration
Localization
- Multi-language support: English, Russian, German, French, Italian, Spanish, Turkish, Arabic, Hebrew, Japanese, Chinese
- Easy language switching
- Full interface translation
- RTL support ready
Modern UI/UX
- Responsive design for all devices
- Dark/Light theme toggle
- Bootstrap 5 framework
- Bootstrap Icons
- Chart.js for analytics
- Smooth animations
- Modal dialogs
- Toast notifications
Requirements
System Requirements
- Python: 3.8 or higher
- pip: Latest version recommended
- Operating System: Linux, macOS (Windows with WSL or manual setup)
Matrix Server Requirements
- Matrix Synapse: Any version with Admin API enabled
- Admin Account: User with admin privileges on the Matrix server
- Network Access: HTTP/HTTPS access to Matrix server
Python Dependencies
All dependencies are listed in requirements.txt:
- Flask >= 2.3.0
- requests >= 2.31.0
- Jinja2 >= 3.1.0
- MarkupSafe >= 2.1.0
- werkzeug >= 2.3.0
Installation
Quick Start (PyPI - Recommended)
# Install from PyPI
pip install ept-mx-adm
# Download static assets
cd $(pip show ept-mx-adm | grep Location | cut -d' ' -f2)/ept-mx-adm
chmod +x install_assets.sh
./install_assets.sh
# Run the application
python -m ept-mx-adm
# or
ept-mx-adm
Installation from Source
Option 1: Simple Installation
# Clone the repository
git clone https://github.com/EPTLLC/EPT-MX-ADM.git
cd EPT-MX-ADM
# Install dependencies
pip install -r requirements.txt
# Download static assets
chmod +x install_assets.sh
./install_assets.sh
# Run the application
python app.py
Option 2: Using Helper Script
# Clone the repository
git clone https://github.com/EPTLLC/EPT-MX-ADM.git
cd EPT-MX-ADM
# Make script executable
chmod +x run.sh
# Run (auto-installs dependencies and starts app)
./run.sh
Option 3: With Virtual Environment
# Clone the repository
git clone https://github.com/EPTLLC/EPT-MX-ADM.git
cd EPT-MX-ADM
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate # On Windows: venv\Scripts\activate
# Upgrade pip
pip install --upgrade pip
# Install dependencies
pip install -r requirements.txt
# Download static assets
chmod +x install_assets.sh
./install_assets.sh
# Run the application
python app.py
Option 4: With pipx (Isolated)
# Install pipx if not already installed
python3 -m pip install --user pipx
python3 -m pipx ensurepath
# Clone and setup
git clone https://github.com/EPTLLC/EPT-MX-ADM.git
cd EPT-MX-ADM
# Install dependencies (pipx manages isolation)
pip install -r requirements.txt
# Download static assets
chmod +x install_assets.sh
./install_assets.sh
# Run
python app.py
Option 5: Windows (Manual Setup)
# Clone the repository
git clone https://github.com/EPTLLC/EPT-MX-ADM.git
cd EPT-MX-ADM
# Create virtual environment
python -m venv venv
# Activate virtual environment
venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Download static assets manually or use WSL:
# - Download Bootstrap 5, Bootstrap Icons, Chart.js
# - Place in static/vendor/ folders
# - See install_assets.sh for URLs
# Run the application
python app.py
Note for Windows users:
- Shell scripts (.sh files) require WSL (Windows Subsystem for Linux) or Git Bash
- Alternatively, manually download static assets from CDN links in
install_assets.sh - Python application itself runs natively on Windows
Configuration
config.json
The main configuration file is config.json in the project root.
Default Configuration:
{
"matrix_server": "https://matrix.example.com",
"app": {
"host": "127.0.0.1",
"port": 5000,
"debug": true
},
"session": {
"secret_key": "your-secret-key-here-change-this"
}
}
Configuration Options:
| Parameter | Description | Default | Required |
|---|---|---|---|
matrix_server |
Your Matrix Synapse server URL (can be changed at login) | https://matrix.example.com |
No |
app.host |
Application host | 127.0.0.1 |
Yes |
app.port |
Application port | 5000 |
Yes |
app.debug |
Debug mode (disable in production) | true |
Yes |
session.secret_key |
Flask session secret key (change in production) | Generated | Yes |
Important Notes
- Matrix Server: The
matrix_serverin config.json is optional - you can specify any server at login - Secret Key: Change
session.secret_keyin production to a random string - Debug Mode: Set
app.debugtofalsein production - SSL Certificates: Self-signed certificates are automatically supported
Running the Application
Development Mode
# Activate virtual environment if using one
source venv/bin/activate # On Windows: venv\Scripts\activate
# Run the application
python app.py
The application will start on http://127.0.0.1:5000 (or the host/port specified in config.json).
Production Mode (Gunicorn)
# Activate virtual environment if using one
source venv/bin/activate
# Run with Gunicorn
gunicorn -c gunicorn.conf.py app:app
Systemd Service (Linux)
Create /etc/systemd/system/ept-mx-adm.service:
[Unit]
Description=EPT-MX-ADM Matrix Admin Panel
After=network.target
[Service]
Type=notify
User=your-user
Group=your-group
WorkingDirectory=/path/to/EPT-MX-ADM
Environment="PATH=/path/to/EPT-MX-ADM/venv/bin"
ExecStart=/path/to/EPT-MX-ADM/venv/bin/gunicorn -c gunicorn.conf.py app:app
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable ept-mx-adm
sudo systemctl start ept-mx-adm
sudo systemctl status ept-mx-adm
Usage
First Login
-
Open your browser and navigate to
http://localhost:5000(or your configured host:port) -
Login Form:
-
Matrix Server: Enter your server domain (e.g.,
matrix.example.comorlocalhost)- No need for
https://- it's added automatically - Works with local servers, remote servers, and self-signed certificates
- No need for
-
Username: Enter your admin username (e.g.,
admin)- No need for
@or domain - it's formatted automatically
- No need for
-
Password: Enter your Matrix admin password
-
-
Click "Login"
The application will:
- Automatically format the server URL (add
https://if needed) - Automatically format the username into Matrix ID (add
@and domain) - Verify admin privileges via Matrix API
- Create a session for your admin user
Managing Users
View Users:
- Navigate to "Users" tab
- See all users with pagination
- Filter by guests and deactivated users
- View media storage per user
Create User:
- Click "Create User" button
- Fill in username, password, and optional display name
- Choose if user should be admin
- Click "Create"
Edit User:
- Click on user card dropdown menu
- Select "Edit"
- Modify user settings
- Save changes
Deactivate User:
- Click on user dropdown menu
- Select "Deactivate"
- Confirm action
Managing Rooms
View Rooms:
- Navigate to "Rooms" tab
- See all rooms with statistics
- Toggle column visibility
- Use search to find specific rooms
View Room Details:
- Click "View" button on room card
- See detailed information in modal
- View members, settings, and statistics
Edit Room:
- Click dropdown menu on room card
- Select "Edit"
- Modify room settings
- Save changes
Delete Room:
- Click dropdown menu
- Select "Delete"
- Confirm action (room will be permanently deleted)
Managing Media
View Media Statistics:
- Navigate to "Media" tab
- See overall statistics dashboard
- View total files, storage, and users with media
View User Media:
- Click on user in media list
- See all media files for that user
- Filter by file type (Images, Videos, Audio, Documents, Other)
- Filter by status (Normal, Quarantined)
Quarantine Media:
- In user media view, click dropdown on file
- Select "Quarantine"
- File will be marked as quarantined
Delete Media:
- Click dropdown on file
- Select "Delete"
- Confirm action
Managing Spaces
View Spaces:
- Navigate to "Spaces" tab
- See all Matrix spaces
- View space hierarchies
- Manage space settings
Localization
EPT-MX-ADM supports multiple languages out of the box.
Available Languages
- English (en)
- Russian (ru)
- German (de)
- French (fr)
- Italian (it)
- Spanish (es)
- Turkish (tr)
- Arabic (ar)
- Hebrew (he)
- Japanese (ja)
- Chinese (zh)
Changing Language
In Application:
- Click on language selector in top navigation
- Choose your preferred language
- Interface will update immediately
- Language preference is saved in session
Adding New Language:
- Copy
locales/en/messages.jsontolocales/[language_code]/messages.json - Translate all strings in the new file
- Language will be automatically detected and available
Production Deployment
Security Checklist
- Change
session.secret_keyin config.json to a random string - Set
app.debugtofalsein config.json - Use strong passwords for admin accounts
- Enable HTTPS (use nginx or Apache as reverse proxy)
- Restrict access to the application (firewall, VPN)
- Keep Python and dependencies up to date
- Regular backups of config.json
- Monitor logs for suspicious activity
Nginx Configuration Example
server {
listen 80;
server_name admin.yourdomain.com;
# Redirect to HTTPS
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name admin.yourdomain.com;
# SSL certificates
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
location / {
proxy_pass http://127.0.0.1:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Apache Configuration Example
<VirtualHost *:80>
ServerName admin.yourdomain.com
Redirect permanent / https://admin.yourdomain.com/
</VirtualHost>
<VirtualHost *:443>
ServerName admin.yourdomain.com
SSLEngine on
SSLCertificateFile /path/to/cert.pem
SSLCertificateKeyFile /path/to/key.pem
ProxyPass / http://127.0.0.1:5000/
ProxyPassReverse / http://127.0.0.1:5000/
ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto "https"
</VirtualHost>
Troubleshooting
Common Issues
"Connection refused" or "Cannot connect to Matrix server"
Solution:
- Verify Matrix server URL is correct
- Check if Matrix server is running
- Ensure network connectivity
- For local servers, try
localhostor127.0.0.1 - Check firewall rules
"SSL: CERTIFICATE_VERIFY_FAILED" error
Solution:
- EPT-MX-ADM automatically handles self-signed certificates
- If error persists, verify server URL starts with
https:// - Check if Matrix server certificate is properly configured
"Invalid credentials" or "Not an admin"
Solution:
- Verify username and password are correct
- Ensure user has admin privileges on Matrix server
- Check if user is deactivated
- Try logging in via Matrix client first to verify credentials
Login form only shows username/password (no server field)
Solution:
- This is normal - server field is optional
- Enter server domain at login or use default from config.json
- Server field will be shown after first failed attempt
Dashboard shows "N/A" or "0" for statistics
Solution:
- Verify admin API is enabled on Matrix server
- Check if user has proper admin rights
- Wait a few seconds for data to load
- Check browser console for errors
- Verify Matrix server API endpoints are accessible
Pagination not working (users/rooms/spaces)
Solution:
- Clear browser cache and reload
- Check browser console for JavaScript errors
- Verify API responses in Network tab
- Ensure using latest version of EPT-MX-ADM
Media page shows "Error loading media data"
Solution:
- Verify
/v1/statistics/users/mediaendpoint is available on Matrix server - Check if user has admin rights
- Clear browser cache
- Check server logs for errors
Security
Best Practices
- Passwords: Use strong, unique passwords for admin accounts
- Session Secret: Change
session.secret_keyto a random string - Debug Mode: Disable debug mode in production
- HTTPS: Always use HTTPS in production (via reverse proxy)
- Access Control: Restrict access to the application via firewall or VPN
- Updates: Keep Python, Flask, and all dependencies up to date
- Logs: Monitor application and server logs regularly
- Backups: Regular backups of configuration and data
SSL/TLS Support
EPT-MX-ADM automatically:
- Supports self-signed SSL certificates
- Disables SSL verification for local/development servers
- Adds
https://to server URLs if not present - Suppresses SSL warnings in logs
For production, always use valid SSL certificates via reverse proxy.
Contributing
We welcome contributions to EPT-MX-ADM!
How to Contribute
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Guidelines
- Follow PEP 8 style guide for Python code
- Add comments and docstrings
- Update documentation for new features
- Test your changes thoroughly
- Update CHANGELOG.md
Reporting Issues
Found a bug or have a feature request?
- Check if issue already exists
- Create new issue with detailed description
- Include steps to reproduce (for bugs)
- Provide environment details (OS, Python version, Matrix Synapse version)
License
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License allows you to:
- Use the software for any purpose
- Modify the source code
- Distribute copies
- Include in proprietary software
With the following conditions:
- Include the original license and copyright notice
- Provide attribution to original authors
Support
Support Policy
No Support Provided: This project is released as-is without support, consultation, or assistance.
Community Contributions: Development contributions are welcome but not obligated.
Resources
- Documentation: README.md and CHANGELOG.md
- Issues: GitHub Issues - for bug reports only
- Community: @EasyProTech
Project Information
- Project Name: EPT-MX-ADM
- Version: 1.0.0
- Status: Production Ready
- PyPI: pypi.org/project/ept-mx-adm
- Company: EasyProTech LLC
- Website: www.easypro.tech
- Developer: Brabus
- Repository: github.com/EPTLLC/EPT-MX-ADM
- License: MIT
- Python: 3.8+
- Supported Languages: EN, RU, DE, FR, IT, ES, TR, AR, HE, JA, ZH
Acknowledgments
- Matrix Foundation for the Matrix protocol
- Synapse Team for the Matrix Synapse server
- Flask Team for the amazing web framework
- Bootstrap Team for the UI framework
- Chart.js Team for visualization library
- Community Contributors for feedback and contributions
Changelog
For detailed history of changes, see CHANGELOG.md.
Created with care by EasyProTech LLC
Visit us: www.easypro.tech | Telegram: @EasyProTech
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ept_mx_adm-1.0.1.tar.gz.
File metadata
- Download URL: ept_mx_adm-1.0.1.tar.gz
- Upload date:
- Size: 278.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71657758ba1117d651aa518d0a22718cf90a390736bc720ab2faf40c4ea59edc
|
|
| MD5 |
d0fde20f2876102bcf1fa34be544e21d
|
|
| BLAKE2b-256 |
30438e344d17028e8b4b25d1a7f7f2a74cb34d1bbe5c15d380a9b9d9c992fb84
|
File details
Details for the file ept_mx_adm-1.0.1-py3-none-any.whl.
File metadata
- Download URL: ept_mx_adm-1.0.1-py3-none-any.whl
- Upload date:
- Size: 48.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1fe29bc353380f295db14a1118aced1bc676879c7daefb4c6a516192a68e5ce
|
|
| MD5 |
b67885386d1edc5943156018f59fe45d
|
|
| BLAKE2b-256 |
148dffe9386ceb1843181403e272edf9eb4436ce4eaec1643898d30e4102c56c
|