Lightweight Alpine-based phpBB image with nginx and PHP 8.4 FPM.
Published to GitHub Container Registry as ghcr.io/fed1337/docker-phpbb.
Bundled phpBB 3.3.17 with SQLite and MariaDB/MySQL (mysqli) support.
The stack is split into a shared base and two overlays:
| File | Purpose |
|---|---|
compose.yml |
Shared MariaDB + phpBB configuration |
compose.dev.yml |
Build the image locally |
compose.prod.yml |
Pull the published image from GHCR |
$ docker compose -f compose.yml -f compose.dev.yml up --build$ docker compose -f compose.yml -f compose.prod.yml up -dPull a specific phpBB version tag instead of latest:
$ PHPBB_TAG=3.3.17 docker compose -f compose.yml -f compose.prod.yml up -dOpen http://127.0.0.1:8000. For a fresh install, pass PHPBB_INSTALL once:
$ PHPBB_INSTALL=true docker compose -f compose.yml -f compose.dev.yml up --buildDuring installation, use these database settings:
| Field | Value |
|---|---|
| Database type | MySQL with MySQLi Extension |
| Database server | mariadb |
| Database name | phpbb (or your MARIADB_DATABASE) |
| Username | phpbb (or your MARIADB_USER) |
| Password | phpbb (or your MARIADB_PASSWORD) |
Default MariaDB credentials can be overridden:
MARIADB_ROOT_PASSWORD(default:changeme)MARIADB_DATABASE(default:phpbb)MARIADB_USER(default:phpbb)MARIADB_PASSWORD(default:phpbb)
After installation, restart without PHPBB_INSTALL so the install/ directory is removed on startup:
$ docker compose -f compose.yml -f compose.dev.yml up -dOptionally enable automatic migrations:
$ PHPBB_DB_AUTOMIGRATE=true docker compose -f compose.yml -f compose.dev.yml up -dGitHub Actions publishes to GHCR on manual workflow dispatch. Tags track the phpBB version from the Dockerfile:
3.3.17— patch (full phpBB version)3.3— minor3— majorlatest
$ docker pull ghcr.io/fed1337/docker-phpbb:latest
$ docker run -p 8000:80 --name phpbb-install -e PHPBB_INSTALL=true -d ghcr.io/fed1337/docker-phpbb:latestBy default the standalone image uses SQLite. Set the DSN field to /phpbb/sqlite/sqlite.db during installation and leave username, password, and database name blank.
For an external database:
$ docker run --name phpbb \
-e PHPBB_DB_DRIVER=mysqli \
-e PHPBB_DB_HOST=dbhost \
-e PHPBB_DB_PORT=3306 \
-e PHPBB_DB_NAME=phpbb \
-e PHPBB_DB_USER=phpbb \
-e PHPBB_DB_PASSWD=pass \
-p 8000:80 -d ghcr.io/fed1337/docker-phpbb:latestMost variables are written into phpBB's config.php or read by the startup script.
If true, removes config.php and keeps the /install/ directory for a fresh setup. When unset, the startup script deletes install/ automatically.
Supported drivers: sqlite3, mysqli.
Default: sqlite3
Database hostname, or SQLite file path for the sqlite3 driver.
Default: /phpbb/sqlite/sqlite.db
Database port (required for PHPBB_DB_WAIT with network databases).
Database credentials.
Default: phpbb_
If true, runs bin/phpbbcli.php db:migrate on startup. Requires an existing database schema.
If true, waits for the database host/port to accept connections before running migrations. Not used with SQLite.
Enable phpBB debug and diagnostics output when set to true.
Persistent data paths:
/phpbb/www/files/phpbb/www/store/phpbb/www/images/avatars/upload/phpbb/sqlite(SQLite only)
$ ./update.sh 3.3This updates PHPBB_VERSION and its checksum in the Dockerfile, then rebuild and run the release workflow to publish new GHCR tags.
Extend the image to add PHP or nginx settings:
FROM ghcr.io/fed1337/docker-phpbb:latest
COPY custom.ini /usr/local/etc/php/conf.d/
COPY custom.conf /etc/nginx/http.d/To pass the client IP through a reverse proxy, configure nginx real_ip directives in a custom server block.