This repository provides a lightweight and fully-configured Docker container for running XenForo forums. The container includes Nginx, PHP 8.*, and all required extensions to run XenForo smoothly. The imagick tag adds support for the ImageMagick library for advanced image processing.
Upload your XenForo files to /var/www/forum on your host machine. Alternatively, adjust the volume mappings in your docker-compose.yml file to point to your desired XenForo directory.
Ensure that the XenForo files are owned by a dedicated user on your host machine.
Create a user named forum (or your preferred username):
sudo adduser forum
Pass the PUID and PGID of this user as environment variables in your docker-compose.yml file.
Ensure that /var/www/forum (or your specified directory) is owned by the forum user:
sudo chown -R forum:forum /var/www/forum
The container exposes port 8080. You can map this to a different port on your host if needed.
services:
php:
pull_policy: always
restart: always
image: roccozero/xenforo:latest
environment:
- PUID=1000
- PGID=1000
links:
- mysql
volumes:
- /var/www/forum:/var/www/html
mysql:
image: mysql
restart: always
environment:
- MYSQL_RANDOM_ROOT_PASSWORD="yes"
- MYSQL_DATABASE
- MYSQL_USER
- MYSQL_PASSWORD
volumes:
- database_forum_data:/var/lib/mysql
volumes:
database_forum_data:
MYSQL_DATABASE="forum"
MYSQL_USER="forum"
MYSQL_PASSWORD="password"
/var/www/forum directory on your host is owned by the forum user (or the user defined by PUID / PGID). This prevents permission issues./var/www/forum or adjust the volume mapping in docker-compose.yml.8080. You can change the port mapping in your docker-compose.yml file if needed.Content type
Image
Digest
sha256:3b275bbfa…
Size
68 MB
Last updated
6 months ago
docker pull roccozero/xenforo