- Shell 52.2%
- Dockerfile 33.2%
- Perl 14.6%
| scripts | ||
| .gitignore | ||
| auto.setup | ||
| docker-compose.yml | ||
| Dockerfile | ||
| example_env | ||
| ikiwiki.conf | ||
| install.sh | ||
| LICENSE | ||
| post-update | ||
| pre-receive | ||
| README.org | ||
IkiWiki-Docker is a Docker container with batteries included
This is an containerized version of IkiWiki, the wiki compiler/static site generator.
-
The container runs a web server (apache2), with
- The wiki content at
/ - The CGI end point at
/ikiwiki.cgi - Authentication to access
/ikiwiki.cgiby default -
There are git repositories at
/git/ikiwiki.git— the wiki source/git/libdir.git— for custom plugins (default is empty)/git/templates.git— for custom templates (default is empty)
- The wiki content at
- The c-compiler is
tcc, rather thangcc(saving about 100 MiB) - There is Python 3 in the container
- the Markdown flavour is Discount
- The various data/configuration locations are consolidated under
/home/ikiwiki/, containing: data/ikiwiki.setup, the ikiwiki configuration filerepos, the above-mentioned git repositorieshtpasswd, for auth
The following changes are made from a default IkiWiki installation:
- theme plugin enabled and actiontabs theme selected
- httpauth enabled
- Python plugins are available
-
Comments are disabled by default
-
why?
-
Just to note that authenticate is already enabled for
/ikiwiki.cgi-
I use Isso - (~20kB gzipped).
- But of course you can enable it by adding
commentsandmoderatedcommentsto theadd_pluginssection of theauto.setupfile.
- But of course you can enable it by adding
-
-
-
- Admonitions are enabled
The IkiWiki version used is normally the latest tagged release with some extra patches on top. See /fz0x1/ikiwiki-docker/src/branch/master/README.org for the details.
Usage example
First create a volume to store the wiki's state, configuration and data:
docker volume create ikiwiki-repos
Run it:
cp example_env .env
# edit settings and set 'IKIWIKI_ADMIN_PASSWORD'
./install.sh
docker compose up -d
Then access your wiki at http://localhost:8080 or git pull/push to http://localhost:8080/git/ikiwiki.git
Adding users
This IkiWiki container relies upon the users and their passwords being
defined in /home/ikiwiki/htpasswd. To add more users, modify that
file using htpasswd from the apache2-utils Debian package, e.g.
docker exec -i ikiwiki htpasswd /home/ikiwiki/htpasswd newuser
# or by ssh
ssh user@server "docker exec -i ikiwiki htpasswd -bB /home/ikiwiki/htpasswd newuser pass"
Once a user exists in the htpasswd file, you can grant them admin
rights on the Wiki via "Preferences → Setup", or alternatively edit
/home/ikiwiki/data/ikiwiki.setup within the container's data and then rebuild the wiki
Rebuilding the wiki
Sometimes you might want to trigger a full wiki rebuild, such as after
hand-editing the /home/ikiwiki/data/ikiwiki.setup file:
docker exec -i ikiwiki --setup /home/ikiwiki/data/ikiwiki.setup --rebuild --wrappers
# or by ssh
ssh user@server "docker exec -i ikiwiki --setup /home/ikiwiki/data/ikiwiki.setup --rebuild --wrappers"
Proxy
I proxy the container using Nginx and Let's Encrypt with this simple configuration:
certbot certonly --nginx -d ikiwiki.test.com
server {
listen 127.0.0.1:80;
server_name ikiwiki.test.com;
return 301 https://ikiwiki.test.com$request_uri;
}
server {
server_name ikiwiki.test.com;
access_log /var/log/nginx/ikiwiki_access.log;
error_log /var/log/nginx/ikiwiki_error.log;
client_max_body_size 64M;
location / {
proxy_pass http://127.0.0.1:9191;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
listen 127.0.0.1:443 ssl http2; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/ikiwiki.test.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/ikiwiki.test.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
TODOs
TODO add underlay description in the README
Who/License
IkiWiki is by Joey Hess and many others. IkiWiki-Docker is a fork of Opinionated IkiWiki by Jonathan Dowland (thank you very much!), and is maintained by fz0x1. The code bits in this repository are © 2026 fz0x1, and distributed under the terms of the GNU Public License, version 3 (see /fz0x1/ikiwiki-docker/src/branch/master/LICENSE).