APBoard v3 · Documentation
Documentation

Everything you need to install, configure and run APBoard. Explained in full, even for complete beginners.

APBoard Documentation Configuration

Configuration

APBoard stores its runtime configuration in config.php. Docker creates this file from deploy/.env. A plain web server installation creates it through the setup wizard.

1. Docker: deploy/.env is the source

In Docker, you edit deploy/.env. Every app container start writes a fresh config.php from these values. Do not edit config.php by hand in a Docker installation, because your changes will be overwritten at the next container start.

Instance and URL

VariableUse
COMPOSE_PROJECT_NAMEUnique Docker Compose project name. It affects container names and Traefik router names.
APBOARD_URLFull public URL, such as https://forum.example.com. No trailing slash.
APBOARD_DOMAINDomain only, such as forum.example.com. Traefik uses it in the routing rule.

Database

VariableUse
APBOARD_DB_HOSTUse db in Docker. For plain installations this becomes the database host in config.php.
APBOARD_DB_NAMEName of the APBoard database.
APBOARD_DB_USERDatabase user APBoard uses for normal operation.
APBOARD_DB_PASSWORDPassword for the APBoard database user.
APBOARD_DB_ROOT_PASSWORDMariaDB root password used by the database container.
APBOARD_DB_PREFIXTable prefix. The default is apb_. Keep it unless you need a different prefix.

First admin account

Docker uses APBOARD_FIRST_ADMIN_EMAIL and APBOARD_FIRST_ADMIN_PASSWORD only to initialize the first administrator. The helper script changes the placeholder admin account only while it still uses the placeholder email admin@example.com. After you change the account in APBoard, Docker will not overwrite it.

SMTP mail

VariableExampleUse
APBOARD_SMTP_HOSTsmtp.example.comSMTP server hostname.
APBOARD_SMTP_PORT587Use 587 for STARTTLS or 465 for SMTPS.
APBOARD_SMTP_AUTHtrueUse authentication. Most providers require it.
APBOARD_SMTP_SECUREstarttlsUse starttls, smtps or none.
APBOARD_SMTP_USERnoreply@example.comSMTP login name.
APBOARD_SMTP_PASSmail passwordSMTP password or app password.
APBOARD_SMTP_FROM_EMAILnoreply@example.comSender address shown in APBoard emails.
APBOARD_SMTP_FROM_NAMEMy ForumSender name shown in mail clients.

2. Plain installation: config.php is the source

In a plain installation, the setup wizard writes config.php into the APBoard root directory. APBoard reads this file on every request. You can edit it later if your database, URL or SMTP settings change.

php
<?php
$GLOBALS['CONFIG']['url']             = 'https://forum.example.com';
$GLOBALS['CONFIG']['db_server']       = 'localhost';
$GLOBALS['CONFIG']['db_database']     = 'apboard';
$GLOBALS['CONFIG']['db_user']         = 'apboard';
$GLOBALS['CONFIG']['db_password']     = 'database password';
$GLOBALS['CONFIG']['db_tableprepend'] = 'apb_';
$GLOBALS['CONFIG']['smtp_host']       = 'smtp.example.com';
$GLOBALS['CONFIG']['smtp_port']       = 587;
$GLOBALS['CONFIG']['smtp_auth']       = true;
$GLOBALS['CONFIG']['smtp_user']       = 'noreply@example.com';
$GLOBALS['CONFIG']['smtp_pass']       = 'mail password';
$GLOBALS['CONFIG']['smtp_fromemail']  = 'noreply@example.com';
$GLOBALS['CONFIG']['smtp_fromname']   = 'My Forum';
$GLOBALS['CONFIG']['smtp_secure']     = 'starttls';
$GLOBALS['CONFIG']['trusted_proxies'] = ['127.0.0.1', '::1', '172.16.0.0/12'];

3. URL and trusted proxies

url must match the public forum URL exactly. APBoard uses it for links, mail content, host validation and the sitemap. If your public site uses HTTPS, this value must start with https://.

trusted_proxies tells APBoard which reverse proxies may provide headers such as X-Forwarded-Proto. Docker behind Traefik uses the private Docker network range 172.16.0.0/12. On a simple plain server without a reverse proxy, the default values are fine.

4. Database prefix

The table prefix is normally apb_. The plain setup wizard can import the initial SQL dump with another prefix, but you should only change it before the first installation. Do not change the prefix after APBoard already has tables unless you know exactly how to rename every table and update config.php.

5. File generated by Docker

In Docker, config.php is generated at container start. This is normal. If you need to change configuration, edit deploy/.env and recreate the app container.

bash
cd /home/apboard/forum/deploy
nano .env
docker compose up -d --build