This repository contains a Docker Compose configuration for running DokuWiki on a Raspberry Pi, behind a Caddy reverse proxy with automatic HTTPS.
I chose DokuWiki as my documentation engine for several reasons:
- No Database Required: DokuWiki stores all data in plain text files. This makes backups, migrations, and manual edits extremely simple.
- Lightweight: It has very low system requirements, making it perfect for a Raspberry Pi.
- Highly Extensible: There are thousands of plugins available for everything from Markdown support to professional themes.
- Revision Control: It has built-in versioning for every page, allowing you to see changes and revert to previous versions easily.
.
βββ docker-compose.yml
βββ /docker/dokuwiki/ # Persistent data and config
βββ data/
βββ config/Note: The linuxserver/dokuwiki image usually handles the URL through its internal settings, but it's good practice to keep your environment variables updated.
# Updated portion of docker-compose.yml
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Athens
- DOKUWIKI_BASEURL=https://dokuwiki.duckdns.orgEnsure your Caddyfile points to the dokuwiki service container on port 80:
dokuwiki.duckdns.org {
reverse_proxy dokuwiki:80
log {
output stdout
format console
level INFO
}
}-
Start the container:
docker-compose up -d
-
Initial Setup: The first time you run it, visit
https://dokuwiki.duckdns.org/install.phpto configure your admin user and wiki settings. -
Permissions: If you encounter permission issues, ensure the data folders are owned by the user defined in
PUID(usually 1000):sudo chown -R 1000:1000 /docker/dokuwiki
| Action | Command |
|---|---|
| Start Wiki | docker-compose up -d |
| Stop Wiki | docker-compose down |
| View Logs | docker logs -f dokuwiki |
| Update Image | docker-compose pull && docker-compose up -d |
If your links or CSS are not loading correctly after setting up the proxy:
- Log in to DokuWiki as Admin.
- Go to Admin > Configuration Settings.
- Look for the
basedirandbaseurlsettings. - Set
userewriteto1(or.htaccess) to get "Nice URLs".