Sign inSign up

basictheprogram/crossfire-phpbb3

By basictheprogram

Updated 3 months ago

Docker image for phpBB3 on Apache with PHP 8.4 and ImageMagick — self-hosted forum on Debian Trixi

Image
Content management system
0

2.1K

basictheprogram/crossfire-phpbb3 repository overview

Docker image for phpBB3

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.

What is phpBB?

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.

About this image

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:

  • Multi-stage build: extensions and PECL packages compiled in a cli builder stage; only runtime libraries copied into the apache final stage
  • ImageMagick (via imagick PECL extension) and GD enabled
  • opcache tuned for production
  • mod_remoteip configured for reverse-proxy deployments

TL;DR

docker run --name phpbb basictheprogram/crossfire-phpbb3:latest

Warning

This quick setup is for development only. Change default credentials before any production use.

Prerequisites

Docker Engine 20.10 or later. Docker Compose v2 recommended.

Get this image

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/

How to use this image

phpBB3 requires a MySQL or MariaDB database. Use Docker Compose to run both together:

docker compose up -d

Persisting your application

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.

Configuration

Environment variables
NameDescriptionDefault Value
PHPBB_DATA_TO_PERSISTFiles 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_LANGUAGEphpBB forum language.en
PHPBB_FORUM_NAMEphpBB forum name.My forum
PHPBB_COOKIE_SECUREUse secure cookies.false
PHPBB_FORUM_DESCRIPTIONphpBB forum description.A little text to describe your forum
PHPBB_FORUM_SERVER_PROTOCOLphpBB forum server protocol.http://
PHPBB_FORUM_SERVER_PORTphpBB forum server port.80
PHPBB_DISABLE_SESSION_VALIDATIONDisable session validation.false
PHPBB_HOSTphpBB forum hostname.localhost
PHPBB_SKIP_BOOTSTRAPWhether to perform initial bootstrapping for the application.nil
PHPBB_USERNAMEphpBB admin user name.user
PHPBB_PASSWORDphpBB admin password.phpbb
PHPBB_EMAILphpBB admin e-mail address.[email protected]
PHPBB_SMTP_HOSTSMTP server host.nil
PHPBB_SMTP_PORT_NUMBERSMTP server port.nil
PHPBB_SMTP_USERSMTP user.nil
PHPBB_SMTP_PASSWORDSMTP password.nil
PHPBB_SMTP_PROTOCOLSMTP protocol.plain
PHPBB_DATABASE_HOSTDatabase server host.mariadb
PHPBB_DATABASE_PORT_NUMBERDatabase server port.3306
PHPBB_DATABASE_NAMEDatabase name.phpbb3
PHPBB_DATABASE_USERDatabase user name.phpbb
PHPBB_DATABASE_PASSWORDDatabase user password.nil
APACHE_SERVER_ADMINApache ServerAdmin email address.webmaster@localhost
Example: SMTP via Gmail
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

Logging

Container logs go to stdout:

docker compose logs phpbb

Maintenance

Backup
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
Upgrade
  1. Pull the new image tag
  2. Stop the running container
  3. Take a backup (see above)
  4. Update the image tag in compose.yml
  5. docker compose up -d

Extend this image

FROM 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

Third-party software

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.

Issues

File an issue at https://github.com/crossfire-projects/docker-phpbb/issues.

Tag summary

Content type

Image

Digest

sha256:7f6d8130a

Size

191.9 MB

Last updated

3 months ago

docker pull basictheprogram/crossfire-phpbb3