A modular Docker Compose configuration system for Element Web client with support for multiple environments and OIDC integration capabilities.
Use the stackbuilder utility to generate all configurations:
sb buildThis creates complete Docker Compose configurations in the build/ directory.
Navigate to your desired environment:
# Development with port forwarding
cd build/forwarding/base/
# Production with Let's Encrypt SSL
cd build/letsencrypt/base/
# Development with OIDC integration
cd build/forwarding/oidc/Copy and customize the environment file:
cp .env.example .env
# Edit .env with your valuesStart the services:
docker compose up --build -dAccess Element at http://localhost:3000 (forwarding mode) or your configured domain.
build/- Generated Docker Compose configurations (ready to deploy)components/- Source files used by stackbuilder to generate configurationsbase/- Core Element service configurationenvironments/- Environment-specific settings (dev, production, etc.)extensions/- Optional extensions like OIDC integration
- devcontainer - Development environment with workspace network
- forwarding - Development with port forwarding (3000:80)
- letsencrypt - Production with Let's Encrypt SSL certificates
- step-ca - Production with Step CA SSL certificates
- oidc - OIDC identity server integration for enhanced authentication
- step-ca-trust - Step CA certificate trust configuration
MATRIX_TZ- Timezone for Element servicesMATRIX_DOMAIN- Matrix homeserver domain (e.g., matrix.example.com)
SYNAPSE_SERVER_NAME- Server name for Element (e.g., element.example.com)VIRTUAL_HOST- Domain for nginx-proxyLETSENCRYPT_HOST- Domain for SSL certificateLETSENCRYPT_EMAIL- Email for certificate registration
IDENTITY_SERVER_URL- Identity server URL for enhanced authentication (e.g., https://idm.example.com)
- Configure proper Matrix homeserver URL
- Set up proper firewall rules
- Regular security updates
- Configure rate limiting
- Set up proper logging
- Validate SSL certificates
Build Issues:
- Ensure stackbuilder is installed:
cargo install stackbuilder - Check
stackbuilder.tomlconfiguration
Element Issues:
- Check config.json syntax
- Verify Matrix homeserver connection
- Review container logs:
docker logs element - Check network connectivity
SSL Issues:
- Let's Encrypt: Verify domain DNS and letsencrypt-manager
- Step CA: Check step-ca-manager and virtual network config
- Development:
element-network(internal) - DevContainer:
element-workspace-network(external) - Let's Encrypt:
letsencrypt-network(external) - Step CA:
step-ca-network(external)
For detailed Element Web client configuration options including customization, branding, SSO setup, VoIP settings, and all available /app/config.json parameters, see the official Element Web configuration documentation.
Element works seamlessly with:
- Matrix Synapse - Primary Matrix homeserver
- Identity Servers - Enhanced authentication and discovery
- Element Call - Video calling service
- Scalar - Widget and integration platform
- Custom Homeservers - Any Matrix-compatible server