User Tools

Site Tools


Table of Contents


'DokuWiki' is a wiki application licensed under GPLv2 and written in the PHP programming language. It works on plain text files and thus does not need a database. Its syntax is similar to the one used by MediaWiki.

At the end of this guide you have Dokuwiki up and running on your own Debian-based server.


  • A running Debian-based server.
  • Apache set up.



Download Dokuwiki from its website to your home directory:

cd ~

Unzip the compressed file:

tar -xzf dokuwiki-stable.tgz
mv dokuwiki-*/ dokuwiki/

Put the dokuwiki directory in your /var/www/ directory:

sudo cp -af dokuwiki /var/www/

Apache configuration

Edit the Apache configuration file of the web address you want to use:

sudo nano /etc/apache2/sites-available/
<VirtualHost *:80>
   Redirect /
<IfModule mod_ssl.c>
<VirtualHost *:443>
   DocumentRoot /var/www/dokuwiki
   CustomLog /var/log/apache2/ combined
   ErrorLog /var/log/apache2/
   SSLCertificateFile /etc/letsencrypt/live/
   SSLCertificateKeyFile /etc/letsencrypt/live/
<Directory /var/www/dokuwiki>
  order deny,allow
  allow from all
<LocationMatch "/(data|conf|bin|inc)/">
  order allow,deny
  deny from all
  satisfy all

Reload Apache:

sudo systemctl reload apache2


Give ownership of the /var/www/dokuwiki folder to www-data:

cd /var/www/dokuwiki
sudo chown -R root:root .
sudo chmod -R 775 data/
sudo chown -R www-data:www-data data/
cd data
sudo chmod 2775 {attic,cache,index,locks,media,meta,pages,tmp}
sudo chown www-data:www-data {attic,cache,index,locks,media,meta,pages,tmp}
cd ..
sudo chown -R www-data:www-data conf/
sudo chown www-data:www-data lib/plugins/ lib/tpl 

Run the installer

Run the installer on

More information about the installer on

Remove the installer file:

sudo rm /var/www/dokuwiki/install.php

Enjoy your own wiki on!

start/dokuwiki.txt ยท Last modified: 2019/04/24 20:34 by justin