A Matrix server running on Fly.io using Conduit - a lightweight Matrix homeserver written in Rust.
-
Create a Fly.io app:
flyctl launch
-
Create a volume for persistent data:
flyctl volumes create conduit_data --size 1
-
Set your Matrix server name:
flyctl secrets set CONDUIT_SERVER_NAME=your-domain.com -
Deploy:
flyctl deploy
The server is configured via environment variables. Key settings:
CONDUIT_SERVER_NAME: Your Matrix server's domain nameCONDUIT_DATABASE_PATH: Path to the database (default:/var/lib/matrix-conduit)CONDUIT_PORT: Port the server listens on (default:6167)CONDUIT_ADDRESS: Address to bind to (default:0.0.0.0)
See the Conduit documentation for all available configuration options.
At first setup you will need to allow registration, then disable it afterwards.
You can do this by setting:
fly secrets set CONDUIT_ALLOW_REGISTRATION=trueThen setting
fly secrets set CONDUIT_ALLOW_REGISTRATION=falseThis repository includes:
- GitHub Actions workflow (
docker-check-and-deploy.yml): Automatically checks the Dockerfile and deploys to Fly.io on push to main - Dependabot: Weekly checks for dependency updates
To enable automatic deployments, add your FLY_API_TOKEN as a GitHub secret.
Build and run locally:
docker build -t fly-conduit .
docker run -p 6167:6167 -v conduit_data:/var/lib/matrix-conduit fly-conduitSee LICENSE file for details.