This guide uses Docker Compose to run HumHub in containers. HumHub is a social networking platform with file sharing, collaboration tools, and community features. Note: There is no official Docker image; this guide uses the community-maintained image.
For Docker installation, see Docker.
Create a docker-compose.yml file with the following content:
version: '3.8'
services:
humhub:
image: mriedmann/humhub:1.18
container_name: humhub
restart: unless-stopped
ports:
- "8080:80"
volumes:
- ./config:/var/www/localhost/htdocs/protected/config
- ./uploads:/var/www/localhost/htdocs/uploads
- ./modules:/var/www/localhost/htdocs/protected/modules
environment:
- HUMHUB_DB_HOST=db
- HUMHUB_DB_USER=humhub
- HUMHUB_DB_PASSWORD=your-db-password
- HUMHUB_DB_NAME=humhub
- HUMHUB_DEBUG=0
depends_on:
- db
db:
image: mariadb:10.6
container_name: humhub-db
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=your-root-password
- MYSQL_DATABASE=humhub
- MYSQL_USER=humhub
- MYSQL_PASSWORD=your-db-password
volumes:
- ./db-data:/var/lib/mysql
Security Note: Replace the following before deployment:
your-db-password - Strong database passwordyour-root-password - Strong MySQL root passworddocker compose up -d
Wait for the containers to start (approximately 1-2 minutes for first run).
Open http://YOUR-SERVER:8080 to access HumHub.
On first access, you’ll be guided through the installation wizard:
For production deployments:
HUMHUB_DEBUG=0 for production (already set in compose file)After installation, configure SMTP in the HumHub admin panel:
Set up cron jobs for background tasks:
# Edit crontab
crontab -e
# Add this line (adjust container name if needed)
*/5 * * * * docker exec humhub php /var/www/localhost/htdocs/protected/yii cron/hourly
See Configuration and Security for production hardening.
Any questions?
Feel free to contact us. Find all contact information on our contact page.