APBoard v3 · Documentation
Documentation

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

APBoard Documentation Plain web server installation

Install APBoard on Apache or nginx

This installation runs APBoard directly on a normal web server with PHP and a MySQL compatible database. It is the right choice for shared hosting or for administrators who already operate Apache or nginx.

Use the release ZIP

For this installation, use an APBoard release ZIP that includes vendor/. A raw Git checkout does not include Composer dependencies unless you run composer install --no-dev yourself.

1. Prepare PHP and the database

APBoard needs PHP 8.5 with several extensions. On Ubuntu or Debian with Apache, the package names usually look like this:

bash
sudo apt update
sudo apt install apache2 mariadb-server unzip
sudo apt install php8.5 php8.5-cli php8.5-mysqli php8.5-gd php8.5-mbstring php8.5-intl php8.5-zip

Package names differ between distributions and hosting providers. The important part is the PHP version and the extensions.

2. Create the database

Create an empty database and a database user. APBoard will import its own tables during setup.

sql
CREATE DATABASE apboard CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'apboard'@'localhost' IDENTIFIED BY 'choose a long password here';
GRANT ALL PRIVILEGES ON apboard.* TO 'apboard'@'localhost';
FLUSH PRIVILEGES;

Write down the host, database name, database user and password. The setup wizard asks for them.

3. Extract APBoard

Upload the release ZIP to the server and extract it. The example installs APBoard into /var/www/apboard.

bash
cd /var/www
sudo mkdir -p apboard
sudo unzip /path/to/apboard-v3.zip -d apboard
sudo chown -R www-data:www-data /var/www/apboard

4. Set the web root to public/

This is the most important rule in the plain installation. The browser must only see /var/www/apboard/public. The parent directory contains private files and must stay outside the web root.

Apache example

Enable the required Apache modules and create a virtual host.

bash
sudo a2enmod rewrite headers
sudo nano /etc/apache2/sites-available/apboard.conf
apache
<VirtualHost *:80>
    ServerName forum.example.com
    DocumentRoot /var/www/apboard/public

    <Directory /var/www/apboard/public>
        AllowOverride None
        Require all granted
        Options FollowSymLinks

        RewriteEngine On
        RewriteRule ^\.well-known/webfinger$ /.well-known/webfinger.php [L,QSA]
        RewriteRule ^\.well-known/nodeinfo$ /.well-known/nodeinfo.php [L,QSA]
        RewriteRule ^nodeinfo/2\.0$ /nodeinfo.php [L,QSA]
        RewriteRule ^ap(/.*)?$ /ap.php [L,QSA]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^ index.php [L]
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/apboard_error.log
    CustomLog ${APACHE_LOG_DIR}/apboard_access.log combined
</VirtualHost>
bash
sudo a2ensite apboard.conf
sudo systemctl reload apache2

nginx example

With nginx, point root to public/ and use explicit locations for ActivityPub endpoints before the normal fallback.

nginx
server {
    listen 80;
    server_name forum.example.com;
    root /var/www/apboard/public;
    index index.php;

    location = /.well-known/webfinger { rewrite ^ /.well-known/webfinger.php last; }
    location = /.well-known/nodeinfo { rewrite ^ /.well-known/nodeinfo.php last; }
    location = /nodeinfo/2.0 { rewrite ^ /nodeinfo.php last; }
    location ^~ /ap { rewrite ^ /ap.php last; }

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.5-fpm.sock;
    }
}

5. Set file permissions

The setup wizard must be able to write config.php, create asset links and create upload folders. On Debian or Ubuntu with Apache, the web server user is usually www-data.

bash
sudo chown -R www-data:www-data /var/www/apboard
sudo find /var/www/apboard -type d -exec chmod 755 {} \;
sudo find /var/www/apboard -type f -exec chmod 644 {} \;
sudo chmod -R 775 /var/www/apboard/public/shared
sudo chmod -R 775 /var/www/apboard/public/assets
sudo chmod 775 /var/www/apboard

6. Run the setup wizard

Open https://forum.example.com/setup/ in your browser. If you do not have HTTPS yet, use http://forum.example.com/setup/ for the first test and configure HTTPS immediately afterwards.

The setup wizard has three steps:

  1. Database: enter host, port, table prefix, database name, database user and password. The wizard imports setup/mysql/initial-setup-dump.sql.
  2. Admin account: enter email address, display name and password for the first administrator.
  3. Forum and mail: enter the public forum URL, forum title and SMTP settings. You can skip SMTP and add it later.

At the end, APBoard writes config.php, prepares directories and creates asset symlinks. Once config.php exists, the setup wizard redirects to the forum and cannot be used again.

7. Secure the installation

After setup, make config.php readable by the web server but not writable by everyone.

bash
sudo chmod 640 /var/www/apboard/config.php
sudo chown www-data:www-data /var/www/apboard/config.php

Configure HTTPS with your hosting panel, Certbot or your reverse proxy. APBoard should be used through HTTPS in production because login cookies and admin sessions need secure transport.