Docker image for phpBB3 on Apache with PHP 8.4 and ImageMagick — self-hosted forum on Debian Trixi
2.1K
Warning
**Debian Bookworm end-of-life: June 20, 2026.** This image is pinned to `php:8.4-*-bookworm`. Once bookworm reaches EoL it will stop receiving security updates. Migration to `php:8.4-*-trixie` is planned for the next phpBB3 upstream release. See `php/Dockerfile` for details.
phpBB is a popular open-source bulletin board that features robust messaging capabilities: flat message structure, subforums, topic split/merge/lock, user groups, full-text search, and attachments.
This image provides a Docker-based deployment for phpBB3 on Apache with PHP 8.4. It was originally created for the Crossfire Forums but the packaging is general-purpose and not specific to that deployment.
Key differences from the official phpBB distribution:
cli builder
stage; only runtime libraries copied into the apache final stageimagick PECL extension) and GD enabledmod_remoteip configured for reverse-proxy deploymentsdocker run --name phpbb basictheprogram/crossfire-phpbb3:latest
Warning
This quick setup is for development only. Change default credentials before any production use.
Docker Engine 20.10 or later. Docker Compose v2 recommended.
Pull from Docker Hub:
docker pull basictheprogram/crossfire-phpbb3:latest
Pull a specific version:
docker pull basictheprogram/crossfire-phpbb3:[TAG]
Tags follow the phpBB3 upstream version (e.g., 3.3.15). Available tags:
https://hub.docker.com/repository/docker/basictheprogram/crossfire-phpbb3/tags
Build locally:
git clone https://github.com/crossfire-projects/docker-phpbb.git
cd docker-phpbb
docker build --build-arg AUTH_TOKEN=<token> -t crossfire-phpbb3 php/
phpBB3 requires a MySQL or MariaDB database. Use Docker Compose to run both together:
docker compose up -d
Mount volumes for the database and phpBB3 data to survive container restarts:
services:
mariadb:
volumes:
- /path/to/mariadb-data:/var/lib/mysql
phpbb:
volumes:
- /path/to/phpbb-data:/var/www/html/phpBB3
Without mounted volumes, all data is lost when the container is removed.
| Name | Description | Default Value |
|---|---|---|
PHPBB_DATA_TO_PERSIST | Files to persist relative to the phpBB installation directory. To provide multiple values, separate them with a whitespace. | store language files images config.php ext styles |
PHPBB_FORUM_LANGUAGE | phpBB forum language. | en |
PHPBB_FORUM_NAME | phpBB forum name. | My forum |
PHPBB_COOKIE_SECURE | Use secure cookies. | false |
PHPBB_FORUM_DESCRIPTION | phpBB forum description. | A little text to describe your forum |
PHPBB_FORUM_SERVER_PROTOCOL | phpBB forum server protocol. | http:// |
PHPBB_FORUM_SERVER_PORT | phpBB forum server port. | 80 |
PHPBB_DISABLE_SESSION_VALIDATION | Disable session validation. | false |
PHPBB_HOST | phpBB forum hostname. | localhost |
PHPBB_SKIP_BOOTSTRAP | Whether to perform initial bootstrapping for the application. | nil |
PHPBB_USERNAME | phpBB admin user name. | user |
PHPBB_PASSWORD | phpBB admin password. | phpbb |
PHPBB_EMAIL | phpBB admin e-mail address. | [email protected] |
PHPBB_SMTP_HOST | SMTP server host. | nil |
PHPBB_SMTP_PORT_NUMBER | SMTP server port. | nil |
PHPBB_SMTP_USER | SMTP user. | nil |
PHPBB_SMTP_PASSWORD | SMTP password. | nil |
PHPBB_SMTP_PROTOCOL | SMTP protocol. | plain |
PHPBB_DATABASE_HOST | Database server host. | mariadb |
PHPBB_DATABASE_PORT_NUMBER | Database server port. | 3306 |
PHPBB_DATABASE_NAME | Database name. | phpbb3 |
PHPBB_DATABASE_USER | Database user name. | phpbb |
PHPBB_DATABASE_PASSWORD | Database user password. | nil |
APACHE_SERVER_ADMIN | Apache ServerAdmin email address. | webmaster@localhost |
phpbb:
environment:
- PHPBB_SMTP_HOST=smtp.gmail.com
- PHPBB_SMTP_PORT_NUMBER=587
- [email protected]
- PHPBB_SMTP_PASSWORD=your_app_password
- PHPBB_SMTP_PROTOCOL=tls
Container logs go to stdout:
docker compose logs phpbb
docker compose stop phpbb
docker run --rm \
-v /path/to/phpbb-backups:/backups \
--volumes-from phpbb \
busybox cp -a /var/www/html/phpBB3 /backups/latest
compose.ymldocker compose up -dFROM basictheprogram/crossfire-phpbb3:latest
USER 0
RUN apt-get update && apt-get install -y --no-install-recommends vim \
&& rm -rf /var/lib/apt/lists/*
USER www-data
This image downloads and ships phpBB3, which is distributed under the GNU General Public License, Version 2.
The GPL v2 requires that the phpBB3 source be made available to recipients of this image. The unmodified phpBB3 source is available at the upstream GitHub repository linked above. This project's own files (Dockerfile, scripts, configuration) are licensed separately under the MIT License — see LICENSE.md.
File an issue at https://github.com/crossfire-projects/docker-phpbb/issues.
Content type
Image
Digest
sha256:7f6d8130a…
Size
191.9 MB
Last updated
3 months ago
docker pull basictheprogram/crossfire-phpbb3