It's better when it's simple

User Tools

Site Tools


Translations of this page?:

Learn about DokuWiki

Advanced Use

Corporate Use

Our Community

Follow us on Facebook, Twitter and other social networks.

Our Privacy Policy


DokuWiki package for Debian

FIXME This page needs an update.

DokuWiki is available in the official Debian repository, excluding Stretch, and is able to be installed through the usual Debian tools.

unfortunately, the instructions on this page no longer for ubuntu, because ubuntu has switched from php5 to php7 .


All one has to know is written here. For more information on installing and configuring Dokuwiki on Debian, see debian_ubuntu_extras.

Further Configuration of DokuWiki via the Configuration Manager

See →config, the most nearby options being use rewrite and use slash.

The Extension Managers directory isn't writable. If you want to use this function, set the permissions accordingly.


apt-get update	 
apt-get install lighttpd	 
apt-get install php5-cgi php5 dokuwiki	 
lighty-enable-mod fastcgi fastcgi-php dokuwiki	 
/​etc/​init.d/​lighttpd force-reload	 

If the DokuWiki mod fails to load, you may need to create a link to lighttpd.conf. See lighttpd


Insert in /etc/nginx/sites-enabled/default

    # serve static files from nginx
    location ~ ^/dokuwiki/lib/.+\.(css|gif|js|png)$ {
        root /usr/share;
        expires 30d;
    location = /dokuwiki/install.php {
        deny all;
    location = /dokuwiki {
        rewrite ^ /dokuwiki/ permanent;
    location = /dokuwiki/ {
        rewrite ^ /dokuwiki/doku.php last;
        expires 30d;
    location ~ ^/dokuwiki/(|lib/(exe|plugins/[^/]+)/)[^/]+\.php {
        root /usr/share;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        include        fastcgi_params;
        # from Debian Jessie, replace the previous include by
        include snippets/fastcgi-php.conf;
    location /dokuwiki/ {
        deny all;


sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt dokuwiki

After you answer yes to the prompt twice, PHP will install itself.

If you're just seeing an 'It works!' page or similar, ensure that the default index.html has been removed from the site directory. If you are still having trouble it may also be useful to move index.php to the beginning of the directory index, This will make sure the index.php file is served first:

sudo nano /etc/apache2/mods-enabled/dir.conf

Note: nano is simply a text editing tool, use whatever you're comfortable with

Add index.php to the beginning of index files. The page should now look like this:

<IfModule mod_dir.c>
          DirectoryIndex index.php index.html index.cgi index.php index.xhtml index.htm

All one has to do is already done through the Dokuwiki package and it's built in postinstallation routines. /etc/dokuwiki/apache.conf got linked:

ls -l /etc/apache2/conf-available/
lrwxrwxrwx 1 root root   25 Apr  5  2014 dokuwiki.conf -> /etc/dokuwiki/apache.conf
ls -l /etc/apache2/conf-enabled/
lrwxrwxrwx 1 root root   32 Apr  5  2014 dokuwiki.conf -> ../conf-available/dokuwiki.conf

Within the Apache config file (dokuwiki.conf or apache.conf), change Alias and Allow from localhost ::1 to your needs; the default allows only viewing from the host running dokuwiki, and Allow from all will allow viewing from any remote host.

install/debian.txt · Last modified: 2020-05-10 17:27 by Klap-in