Mantræ
Mantræ is a user-friendly web interface designed to simplify the management of Traefik's dynamic configurations. Similar to Nginx Proxy Manager (NPM), this application allows you to manage your dynamic Traefik configuration from the comfort of a simple web ui.
Features
- Simplified UI: A clean and intuitive interface that keeps the complexity to a minimum.
- Router Configuration: Create and manage Traefik routers with custom rules, entrypoints, and middleware configurations.
- Middleware Management: Add middlewares to your routers, including rate limiting, authentication, and more.
- Service Status: Monitor the status of your services and see their health information.
- DNS Providers: Support for multiple DNS providers (currently Cloudflare and PowerDNS) for automatic DNS record updates.
Getting Started
Prerequisites
- Traefik: Ensure you have Traefik set up with a static configuration file that defines your entrypoints, certificates, and any other necessary static settings.
- Docker: Optionally, use Docker for easier deployment. (See Docker Compose for an example)
Installation
-
Generate a random secret with
openssl rand -hex 32 -
Use docker
docker run --name mantrae -e SECRET=<secret> -d -p 3000:3000 ghcr.io/mizuchilabs/mantrae:latest -
Or use the example docker-compose.yml file to run mantrae and traefik together
-
Access the Web UI: Open your web browser and navigate to
http://localhost:3000 -
Use the admin password, which will be printed in the logs after the first start. You won't be able to access the password afterwards!
Usage
Managing Routers
- Navigate to the "Routers" section in the web UI.
- Click "Create Router" to define a new router.
- Assign a name, service, and rule to the router. Optionally, set entrypoints, middlewares, and other settings.
- Save your router to apply the changes.
Managing Middlewares
- Open the "Middlewares" section.
- Create new middleware by defining its type and associated settings.
- Save the middleware and attach it to your routers as needed.
Managing DNS providers
- Open the "DNS Providers" section.
- Create new DNS provider by defining its type and associated settings. (Currently only Cloudflare and PowerDNS are supported)
- You can choose a default DNS provider for newly created routers.
Settings
- Various settings will be added here in the future. Currently you can use it to backup and restore your database.
FAQ
Why would use this? Traefik already has configuration discovery.
Yes, Traefik has amazing configuration discovery capabilities for various providers (Docker, Kubernetes, etc.). But for all those times you can't use these features (e.g. multiple machines not connected via Docker Swarm or Kubernetes) you have to use the file provider. Mantrae helps you with that and adds additional automation features like managing DNS records as well, similar to external-dns for Kubernetes.
I want to use multiple DNS providers of the same type (e.g. multiple cloudflare accounts), how do I do that?
Traefik doesn't support multiple DNS Challenge providers, so you have to use CNAME records to manage multiple accounts.
E.g. if you have a domain example.com on account "Foo" and a domain example.org on account "Bar", you can add the API Key for account "Foo" normally, but to get letsencrypt certificates for example.org you need add a CNAME record for example.org with these values:
- Type:
CNAME - Name:
_acme-challenge.example.org - Target:
_acme-challenge.example.com
Now you can request certificates for sub.example.org as well.
Example Static Configuration
Below is a simple example of a Traefik static configuration in traefik.yml:
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
certificatesResolvers:
myresolver:
acme:
email: your-email@example.com
storage: /acme.json
httpChallenge:
entryPoint: web
providers:
http:
endpoint: "<endpoint where mantrae is running>"
Roadmap
- Add support for more DNS providers
- Backup scheduler (local or S3)
- Support multiple database providers (currently only supports SQLite)
- User management and permissions system
Contributing
Contributions are welcome! Please feel free to submit issues, fork the repository, and create pull requests.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements
- Traefik: For providing the powerful reverse proxy that powers this application.
- Nginx Proxy Manager: For inspiration on building a simple and effective web UI for managing reverse proxies.
- External-DNS: For inspiration on building a simple and effective DNS management system for Kubernetes.