Skip to content

Latest commit

Β 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Β 
Β 
Β 
Β 
Β 
Β 

Readme.md

DokuWiki with Docker & Caddy Reverse Proxy

This repository contains a Docker Compose configuration for running DokuWiki on a Raspberry Pi, behind a Caddy reverse proxy with automatic HTTPS.

πŸ“ Why DokuWiki?

I chose DokuWiki as my documentation engine for several reasons:

  1. No Database Required: DokuWiki stores all data in plain text files. This makes backups, migrations, and manual edits extremely simple.
  2. Lightweight: It has very low system requirements, making it perfect for a Raspberry Pi.
  3. Highly Extensible: There are thousands of plugins available for everything from Markdown support to professional themes.
  4. Revision Control: It has built-in versioning for every page, allowing you to see changes and revert to previous versions easily.

πŸ“ Directory Structure

.
β”œβ”€β”€ docker-compose.yml
└── /docker/dokuwiki/  # Persistent data and config
    β”œβ”€β”€ data/
    └── config/

βš™οΈ Configuration Adjustments

1. Docker Compose

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.org

2. Update Caddyfile

Ensure 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
    }
}

πŸš€ Deployment

  1. Start the container:

    docker-compose up -d
  2. Initial Setup: The first time you run it, visit https://dokuwiki.duckdns.org/install.php to configure your admin user and wiki settings.

  3. 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

πŸ–₯️ Useful Commands

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

πŸ›  Troubleshooting

If your links or CSS are not loading correctly after setting up the proxy:

  1. Log in to DokuWiki as Admin.
  2. Go to Admin > Configuration Settings.
  3. Look for the basedir and baseurl settings.
  4. Set userewrite to 1 (or .htaccess) to get "Nice URLs".