A ready-to-use Docker image for HumHub – the flexible open-source social networking platform.
This image provides everything you need to run HumHub in a modern, containerized environment.
- Complete HumHub stack – preconfigured and production-ready
- Includes cron, queue workers and push events out of the box
- Secure defaults with automatic HTTPS certificates
- Simple setup with Docker Compose or any container platform
- Works with internal or external databases, Redis, or mail services
- Easy upgrading and version switching
Create a project directory (for example /opt/humhub) and inside it a docker-compose.yml file with the following content:
mkdir -p /opt/humhub
cd /opt/humhubservices:
humhub:
image: humhub/humhub:stablerestart: unless-stoppedports:
- "80:80"
- "443:443"
- "443:443/udp"# HTTP/3 (optional)depends_on:
db:
condition: service_healthyvolumes:
- ./humhub-data:/dataenvironment:
- HUMHUB_DEBUG=true
- SERVER_NAME=https://humhub.example.com
- HUMHUB_CONFIG__COMPONENTS__DB__DSN=mysql:host=db;dbname=humhub
- HUMHUB_CONFIG__COMPONENTS__DB__USERNAME=root
- HUMHUB_CONFIG__COMPONENTS__DB__PASSWORD=changeMedb:
image: mariadbrestart: unless-stoppedcommand:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ciuser: rootvolumes:
- ./mysql-data:/var/lib/mysqlenvironment:
- MYSQL_ROOT_PASSWORD=changeMeexpose:
- "3306"healthcheck:
test: ["CMD", "/usr/local/bin/healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized"]interval: 10stimeout: 5sretries: 5Important:
Before starting the containers, make sure to adjust all environment variables in the example — especially passwords and domain names.
Never use the provided example values in production environments.Required changes include:
HUMHUB_CONFIG__COMPONENTS__DB__PASSWORDMYSQL_ROOT_PASSWORDSERVER_NAME
Once adjusted, start HumHub with:
docker compose up -dRequires Docker ≥ 20.10.13 with Compose v2.
If you are using an older setup, use docker-compose instead.
Your instance installer will be available at:
https://humhub.example.com