User Tools

Site Tools



DokuWiki is a free (as in freedom) wiki, made especially for any kind of documentation. Dokuwiki is file based and thus easy to backup. Dokuwiki can be extended by using the internal plugin manager.

Installing DokuWiki

The installation guide below assumes you want to install DokuWiki on a Debian server

apt-get install dokuwiki

Configuring DokuWiki

In the configuration dialog which is part of Debian's installation process:

  1. Ordered List Item In dialog “Configuring dokuwiki”
  2. Choose “apache2”
  3. Answer “No” when asked if pages should be purged on removal (this is a safety measure if you accidentally remove the package)
  4. Choose an administrator password

Configuring human readable URLs

You get much nicer URLs if you use Apache's rewrite engine. Therefore you must uncomment the rewrite options in the configuration file.

sed -i -e 's/#Rewrite/Rewrite/' /etc/apache2/conf.d/dokuwiki.conf
sed -i -e 's/userewrite.*;/userewrite'\'']  = 1;/' /etc/dokuwiki/dokuwiki.php
a2enmod rewrite
service apache2 restart

Making the wiki accessible from the internet

By default the configuration allows access from localhost only. If you are satisfied with the basic setup, make it accessible to the world.

sed -i -e 's/Allow from localhost.*/Allow from all/' /etc/apache2/conf.d/dokuwiki.conf
apachectl graceful

Enabling plug-in installation

If you want to use dokuwiki's built-in plug-in manager to install new plug-ins, you first need to allow www-data to write to the plug-in directory:

chown www-data /usr/share/dokuwiki/lib/plugins

Disabling registration

There is a bot for everything on the Internet. From own experience I can tell that one uses the wiki's registration to trap DokuWiki user accounts. I noticed when I checked the mail log.

In Debian the configuration file is for security reasons not writable for the web server. Therefore we disable registration by hand in the file /etc/dokuwiki/dokuwiki.php

$conf['disableactions'] = 'register';

If your user list is already full of fake accounts, find the file users.auth.php (under Debian /etc/dokuwiki/users.auth.php). Use grep to filter the valid accounts.

Recommended Plugins

  • note - Notes, warnings and idea boxes
  • keyboard - Render keyboard keys (like <key>CTRL-ALT-DEL</key>)

Migrating Dokuwiki from one Debian server to another one

It is surprisingly easy to move a Dokuwiki installation from one Debian server to another one.

  1. Install Dokuwiki on the new server
  2. Move (and if necessary adapt the webserver config)
  3. Copy SSL certificates to new server if necessary
  4. Copy users /var/lib/dokuwiki/acl/users.auth.php
  5. Copy groups /var/lib/dokuwiki/acl/acl.auth.php
  6. Copy the data files

On the source server pack the data files:

tar czvf /tmp/dokuwiki-data.tar.gz /var/lib/dokuwiki/data

Copy the archive to the destination server and unpack it:

cd /
tar xzvf /tmp/dokuwiki-data.tar.gz
dokuwiki.txt · Last modified: 2015/10/18 15:27 by sebastian