MXProxy¶
MXProxy is a Docker-aware proxy that lets you configure your services directly in Docker Compose files using a small, human-friendly DSL.
Instead of maintaining a separate proxy configuration, you define your routing rules using Docker labels. MXProxy watches Docker events, automatically updates its configuration, and reloads the proxy when needed.
Under the hood, MXProxy uses Caddy, but provides its own configuration language designed around Docker and Docker Compose.
Features¶
Simple reverse proxy¶
Expose a service by adding a single label to your Compose file:
services:
app:
image: traefik/whoami
networks: [mxproxy]
labels:
reverse_proxy: example.com -> 80
MXProxy automatically detects the container's IP address and configures the proxy to forward requests to port 80.
You can also route paths, use external upstreams, customize headers, and combine multiple routes under the same domain.
Learn more about reverse proxy configuration.
Integrated middleware¶
Want to protect a service with Anubis?
Just add anubis to the upstream chain:
MXProxy automatically deploys and configures Anubis for you. When the associated configuration is removed, MXProxy also removes the Anubis container.
Learn more about Anubis configuration.
More than just reverse proxying¶
MXProxy also supports:
- Cloudflare integration: Configure DNS challenges and dynamic DNS.
- Basic authentication: Protect services with username and password hashes.
- Custom responses: Return a status code or body without an upstream.
- Compression: Enable gzip compression.
- Custom configuration: Extend the automatically generated configuration with your own Caddyfiles.
Get started¶
Ready to deploy MXProxy?
Once MXProxy is running, head over to the usage guide to learn how its DSL works and explore the available directives.