Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YDRjtmAiNpo5mK5N3d7QwZ
Forum and comments (Flarum)
The forum is a separate PHP application (Flarum 2, PHP 8.3+, MariaDB or MySQL). It is not part of the static build: the site only links to it and shows its threads in a frame.
| Path | Role |
|---|---|
extension/ |
Flarum extension oc/flarum-museum: the oc:import command and the look of embedded threads |
docker/, docker-compose.yml |
local test forum; docker/bundle.sh packages the server bundle |
import/ |
not versioned: machines.json (export from the extraction repo), forum.json (thread map), forum.tar.gz (server bundle) |
How comments work
../oc/scripts/06_forum.pywritesimport/machines.json: one entry per machine with its archived comments, oldest first.php flarum oc:importcreates one discussion per machine: an opening post linking to the museum page, then one post per archived comment, all by the userArchive, with the original author and date at the top of each post and the original date as the post date. Discussions go under three tags (Computers, Consoles, Pongs) that are hidden from "All discussions".- The command records what it imported (table
oc_threads) and skips it on later runs, so it can be run again when new machines arrive. It writes the map machine → discussion toforum.json. - Copied to
../data/forum.json, that map makesmake contentgive every machine a Comments tab pointing at its thread (forum_threadin the page front matter); the old comments are then no longer written into the pages. - With
params.forum.urlset, the Comments tab shows<forum>/embed/<id>(Flarum's Embed extension) in a frame that follows the height of the thread.
Local test
make forum-up # http://localhost:8081, admin / adminadmin (first start takes a minute)
make forum-import # export + import; safe to repeat
To see it in the site, copy forum/import/forum.json to data/forum.json, run make content,
and build with HUGO_PARAMS_FORUM_URL=http://localhost:8081 hugo server. Do not commit a
data/forum.json made from the test forum: its thread numbers are not those of the real one.
Server install
The forum must live outside the folder make deploy writes to (that folder is synchronised
with deletion). On the test server: web/oldcomputers-forum/, next to web/oldcomputers/,
served at https://barbel.synology.me/oldcomputers-forum.
Checked on the test server (2026-10-11): PHP 8.4 (FPM) with every extension Flarum needs, Apache
2.4 behind nginx, .htaccess rewriting active. Files copied over the network share are not
writable by the web server user http, and the share does not let permissions be changed.
No Composer is needed on the server: make forum-bundle builds forum/import/forum.tar.gz, a
complete Flarum 2 tree (PHP 8.4) with the Embed and museum extensions and a top-level
.htaccess that routes every request into public/, so config.php, storage/ and vendor/
are never served. This layout is tested in the local image.
-
Create an empty MariaDB database and a user for it.
-
Unpack the bundle into
web/oldcomputers-forum/. -
Give the user
httpwrite access to that folder and everything in it (File Station → Properties → Permissions, orchown -R http:httpover SSH). Flarum writesconfig.php,storage/andpublic/assets/. -
Install. Either open the forum address and fill the installer (database, administrator), or over SSH, as
http, in the forum folder:php flarum install --file=install.yml(format indocker/entrypoint.sh). Do not leave the folder online uninstalled: whoever opens the installer first becomes its administrator. -
Enable the extensions Embed and "Old-Computers museum" (admin panel, or
php flarum extension:enable flarum-embedandoc-museum). Tags is enabled by default. -
In the admin panel: e-mail settings (registration confirms addresses by e-mail), and a spam filter extension. Schedule a database dump.
-
Import, over SSH in the forum folder (copy
import/machines.jsonthere first):php flarum oc:import machines.json --site-url=https://barbel.synology.me/oldcomputers --map=forum.jsonthen bring
forum.jsonback asdata/forum.json, setparams.forum.url,make content,make deploy.
To update the forum or the extension later: rebuild the bundle, unpack it over the existing
folder (it contains no config.php and no user data), then php flarum migrate and
php flarum cache:clear.
The forum and the site should share one domain: logging in from the embedded thread relies on the forum's cookie, which browsers restrict across domains.