A complete Discord alternative built on Matrix protocol with LiveKit for voice/video.
curl -fsSL https://raw.githubusercontent.com/yahyasaqban-lab/dragon-chat/master/install.sh | sudo bashOr with your domain:
curl -fsSL https://raw.githubusercontent.com/yahyasaqban-lab/dragon-chat/master/install.sh | sudo bash -s -- --domain example.com- Ubuntu 22.04 or newer
- Root/sudo access
- Domain with DNS access
- Ports: 80, 443, 3478, 5349, 7880-7881, 50000-60000
Point these to your server IP:
matrix.yourdomain.com β YOUR_SERVER_IP
livekit.yourdomain.com β YOUR_SERVER_IP
turn.yourdomain.com β YOUR_SERVER_IP
- Matrix Synapse - Chat server with E2EE
- LiveKit - Voice/video calls
- Coturn - TURN server for NAT traversal
- PostgreSQL - Database
- Redis - Caching
- Nginx - Reverse proxy with SSL
Credentials saved to /opt/dragon-chat/credentials.txt
| Component | Description | Path |
|---|---|---|
| Server | Matrix + LiveKit + Coturn setup | /server |
| Desktop | Electron app (Mac/Windows/Linux) | /desktop |
| Mobile | Flutter app (iOS/Android) | /mobile |
cd server
# Edit configs/env.conf with your domain
./scripts/01-install-all.sh
./scripts/02-start-services.sh
./scripts/03-create-admin.shcd desktop
npm install
npm start # Development
npm run build # Production buildscd mobile
flutter pub get
flutter run # Development
flutter build apk # Android
flutter build ios # iOS- β End-to-end encrypted messaging (Matrix)
- β Voice/video calls (LiveKit WebRTC)
- β Screen sharing
- β Group chats and channels
- β File sharing
- β Push notifications
- β Cross-platform (Web, Desktop, Mobile)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Clients β
β ββββββββββββ ββββββββββββ ββββββββββββββββββββ β
β β Desktop β β Mobile β β Web (Element) β β
β β Electron β β Flutter β β β β
β ββββββ¬ββββββ ββββββ¬ββββββ ββββββββββ¬ββββββββββ β
βββββββββΌββββββββββββββΌββββββββββββββββββΌβββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Server Stack β
β βββββββββββββββ βββββββββββββββ ββββββββββββββ β
β β Synapse β β LiveKit β β Coturn β β
β β Matrix β β Voice/Videoβ β TURN β β
β βββββββββββββββ βββββββββββββββ ββββββββββββββ β
β βββββββββββββββ βββββββββββββββ β
β β PostgreSQL β β Redis β β
β β Database β β Cache β β
β βββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Matrix:
https://matrix.y7xyz.com - LiveKit:
wss://livekit.y7xyz.com - TURN:
turn.y7xyz.com
After server install, users can connect with:
- Element Web: https://app.element.io (use your matrix server URL)
- Element Desktop: https://element.io/download
- Element Mobile: iOS App Store / Google Play
Build from /desktop or /mobile folders, or download releases.
# Clone repo
git clone https://github.com/yahyasaqban-lab/dragon-chat.git
cd dragon-chat
# Run installer
chmod +x install.sh
sudo ./install.sh --domain yourdomain.comsudo ./install.sh --domain example.com --admin-user myadmin --admin-pass mypassword| Flag | Description | Default |
|---|---|---|
--domain |
Your domain | (required) |
--admin-user |
Matrix admin username | admin |
--admin-pass |
Matrix admin password | (random) |
# Check status
sudo systemctl status synapse livekit coturn
# View logs
sudo journalctl -u synapse -f
sudo journalctl -u livekit -f
# Restart services
sudo systemctl restart synapse livekit coturn
# Create new Matrix user
sudo docker exec synapse register_new_matrix_user -c /data/homeserver.yaml http://localhost:8008- Change default admin password immediately
- Keep
/opt/dragon-chat/credentials.txtsecure - Enable firewall:
sudo ufw enable - Regularly update:
sudo apt update && sudo apt upgrade
MIT
Created by Yahya π