Wiki.js is the administrator-facing Smithflix knowledge base. It stores rendered documentation in Postgres, exposes an authenticated GraphQL API for automation, and mirrors page state into the Git-backed repo used for durable revision history.
This page documents the wikijs service and its wikijs-db dependency. The documentation model itself lives on Documentation Methodology.
- App container:
wikijs
- App image:
ghcr.io/requarks/wiki:2
- Database container:
wikijs-db
- Database image:
postgres:15-alpine
- Stack: Server Stack
- Compose path:
/opt/stacks/server/compose.yaml
- Docker network:
server_default
- LAN URL:
http://192.168.0.113:8090
- Public URL:
https://wiki.better-than.tv
- Local GraphQL endpoint:
http://127.0.0.1:8090/graphql
- Local Git mirror:
/srv/docker/wikijs/data/repo
- Remote Git mirror:
git@github.com:adam6806/smithflix-wiki.git
- Git branch:
main
¶ Config and Data Paths
- Wiki.js data root:
/srv/docker/wikijs/data
- Git repo mirror:
/srv/docker/wikijs/data/repo
- Git deploy key directory:
/srv/docker/wikijs/data/ssh
- Database data root:
/srv/docker/wikijs-db/data
- Stack env file:
/opt/stacks/server/.env
- Local API helper:
/home/adam/.codex/skills/smithflix-wiki/scripts/wikijs_api.py
- LAN port mapping:
8090 -> 3000
- Public hostname:
wiki.better-than.tv
- Internal Postgres remains unexposed on the Docker network
¶ Authentication and Secret Locations
- Database password is sourced from
/opt/stacks/server/.env as WIKIJS_DB_PASSWORD
- Wiki.js users, sessions, and API keys are application-managed in the Wiki.js database
- Git SSH auth uses
/srv/docker/wikijs/data/ssh/id_ed25519
- API automation should use a dedicated API key rather than a user password when possible
- Read and update pages through the local helper:
/home/adam/.codex/skills/smithflix-wiki/scripts/wikijs_api.py
- Check storage state with
storage-status; Git should remain operational
- Use
storage-action --target git --handler sync after bulk edits or troubleshooting
- Treat the wiki as the canonical operational knowledge base and update the relevant page in the same turn as any server change
- Keep the NPM proxy configured with websocket support for full client compatibility
¶ Monitoring and Logs
- Docker logging driver is
json-file
docker logs wikijs shows routine Git sync activity and application startup state
- The container healthcheck probes
http://127.0.0.1:3000/ internally and was healthy at verification time
- The database container has its own
pg_isready healthcheck and must be healthy before Wiki.js starts
¶ Backup and Restore
/srv/docker/wikijs and /srv/docker/wikijs-db are inside the documented Duplicati scope
- The GitHub repo is a secondary archival path and revision log, not a replacement for the live Postgres data
- Restore both the app data directory and the Postgres data directory together to preserve page history, API state, and storage configuration
¶ Failure Modes and Recovery
- Database unavailability or a mismatched
WIKIJS_DB_PASSWORD will block startup
- Git storage will degrade if the branch, repo URL, or SSH key drifts from the configured remote
- Proxy or TLS issues will surface as UI failures even when the local LAN port still works
- Do not edit the Wiki.js database tables directly; use the API or Git storage workflows so page history, render state, and search state stay consistent