A Docker container for BitlBee with extensive protocol support via plugins. Includes optional Stunnel (docker-stunnel) for TLS encryption and Kubernetes deployment manifests.
- ποΈ Multi-architecture support:
linux/amd64,linux/arm64 - π Security-hardened: Non-root user, minimal capabilities, security contexts
- π Health checks: Built-in monitoring with liveness/readiness probes
- π¦ SBOM generation: Software Bill of Materials for supply chain security
- π Automated vulnerability scanning: Trivy and Grype scans in CI/CD
- π Optimized builds: Layer caching and multi-stage builds
- βΈοΈ Kubernetes-ready: Production-grade manifests included
Built-in: BitlBee's built-in protocols
Via Plugins:
- Discord (purple-discord)
- Matrix (purple-matrix)
- Microsoft Teams (purple-teams)
- Slack (slack-libpurple)
- Facebook Messenger (mautrix-meta via built-in Matrix homeserver)
- Mastodon (bitlbee-mastodon)
- Telegram (tdlib-purple)
- WhatsApp (purple-whatsmeow)
# Create a volume for persistent data
docker volume create bitlbee-data
# Run BitlBee
docker run -d \
--name bitlbee \
--user $(id -u):$(id -g) \
-p 6667:6667 \
-v bitlbee-data:/var/lib/bitlbee \
mbologna/docker-bitlbee:latest# Clone repository
git clone https://github.com/mbologna/docker-bitlbee.git
cd docker-bitlbee
# Configure environment
cp .env.example .env
# Edit .env with your UID/GID
# Start services
docker-compose up -d
# Access BitlBee
# Plain IRC: localhost:6667
# TLS IRC: localhost:16697Create a .env file:
UID=1000 # User ID for file permissions
GID=1000 # Group ID for file permissions
BITLBEE_PORT=6667 # BitlBee port (default: 6667)
STUNNEL_PORT=16697 # Stunnel TLS port (default: 16697)
TZ=UTC # Timezone
MATRIX_REGISTRATION_TOKEN= # Optional: set a fixed Matrix registration token
# (auto-generated on first run if left empty)Data is stored in ./data directory or the bitlbee-data named volume.
# Deploy to cluster
kubectl apply -f k8s/
# Check status
kubectl get pods -n bitlbee
# Access from within cluster
# Plain: bitlbee.bitlbee.svc.cluster.local:6667
# TLS: bitlbee-stunnel.bitlbee.svc.cluster.local:6697
# Port forward for external access
kubectl port-forward -n bitlbee svc/bitlbee 6667:6667Managed by PersistentVolumeClaim (default: 128Mi, configurable in k8s/pvc.yaml).
Edit k8s/service.yaml to change service type:
NodePort (for bare-metal clusters):
spec:
type: NodePort
ports:
- port: 6667
nodePort: 30667 # Choose 30000-32767LoadBalancer (for cloud providers):
spec:
type: LoadBalancer
ports:
- port: 6667Edit k8s/deployment.yaml:
resources:
limits:
memory: 1Gi # Increase as needed
cpu: 2000m
requests:
memory: 256Mi
cpu: 200mEdit k8s/pvc.yaml:
resources:
requests:
storage: 5Gi # Adjust sizeEdit k8s/configmap.yaml:
data:
TZ: "Europe/Rome" # Change timezone-
Connect to BitlBee:
/server localhost 6667 -
Register an account:
register <password> -
Add a messaging account:
account add <protocol> <username> <password> account <id> on -
Save configuration:
save
account add discord your-email@example.com your-password
account discord on
save
Facebook Messenger is bridged via an embedded Matrix homeserver (conduwuit) and a mautrix-meta bridge. Both run inside the same container β no extra services needed.
On first container start, look for the Matrix registration token in the logs:
docker logs bitlbee | grep "registration token"
# or set MATRIX_REGISTRATION_TOKEN in your .env to choose your own
In your IRC client:
-
Register a local Matrix account (one-time setup):
register_matrix <your-matrix-username> <password> <registration-token>Or, using the raw Matrix account add:
account add matrix <username>@localhost <password> http://localhost:6167When BitlBee asks for a registration token, paste the one from the logs.
-
Enable the account:
account matrix on -
Start a conversation with the bridge bot to link your Facebook account:
/msg @facebookbot:localhost loginThe bot will guide you through a QR code or link-based login β this works with 2FA and does not use the old (broken) mobile API.
-
Once linked, your Facebook contacts appear as channels/users in BitlBee. Save:
save