DokuWiki - What It Is and How to Install It

DokuWiki is a lightweight, self‑hosted wiki that stores pages in plain text files, so you don’t need a database. This guide explains what it does well and walks you through a clean install on Ubuntu or Debian with Nginx or Apache.

Publish date: 9/1/2025

If you’ve ever wanted a simple, tidy place to keep notes, internal docs, or knowledge base articles without spinning up a full database stack, DokuWiki hits a sweet spot. It’s quick to set up, friendly to maintain, and flexible enough for teams or solo projects.

Below, we’ll cover what DokuWiki is, where it shines, and then walk you through an installation on a fresh Linux server. Let's dive in.

What is DokuWiki?

DokuWiki is open‑source wiki software written in PHP. Unlike many CMSs and wikis, it uses flat files instead of a database, which makes it easy to back up, migrate, and version with standard tools. You edit pages with a straightforward markup, manage media uploads, and extend behavior with templates and plugins.

Here's what DokuWiki looks like by default (they made their own website with DokuWiki):

Screenshot of what DokuWiki looks like

Why choose DokuWiki?

No database overhead

All content, from pages and media uploads to configuration settings, is stored in simple text files. This design choice dramatically reduces complexity. Backups are as easy as copying a directory, migrations involve moving a folder, and there are far fewer potential points of failure. This also makes DokuWiki exceptionally lightweight and fast, capable of running on almost any server, including shared hosting.

Human-readable content and version control

Because every page is a text file, your entire knowledge base is human-readable. This is a game-changer for technical teams who can use version control systems like Git to manage documentation just as they would code. You can track changes, review contributions, and roll back to previous versions with familiar tools.

Powerful access control

Don't let its simplicity fool you. DokuWiki features a robust Access Control List (ACL) system. You can restrict permissions (read, edit, create, upload, delete) for specific users or groups. These rules can be applied to individual pages or entire "namespaces" (which function like folders), making it ideal for managing both public and private information within a single installation.

Extensive customization

A vast ecosystem of community-developed plugins and templates allows you to extend DokuWiki far beyond its core functionality. You can integrate syntax highlighting for code, create interactive diagrams, embed calendars and videos, add task lists, or completely overhaul the wiki's appearance to match your brand.

Low barrier to entry

The wiki markup is straightforward and easy to learn. Better yet, the built-in editor includes a toolbar for common formatting tasks, allowing even non-technical users to contribute content immediately without a steep learning curve.

Note: If you're still curious about other self-hosted wiki options, we compared DokuWiki, Wiki.js, and BookStack here. We have an article about Wiki.js and how to install it as well.

How to install DokuWiki on Ubuntu or Debian (LEMP or LAMP)

Requirements and planning

  • A Linux server with shell access (we'll use Debian/Ubuntu in this tutorial) -- a simple KVM VPS from V.PS will work great, and it's affordable!
  • A web server: Nginx or Apache
  • PHP with common extensions (php-fpm or mod_php)
  • DNS pointed at your host
  • Optional but recommended: HTTPS with Let’s Encrypt

The steps below assume a fresh system and a non‑root user with sudo.

1. Update packages

sudo apt update && sudo apt -y upgrade

2. Install Nginx or Apache, plus PHP

Choose one web server.

For Nginx (LEMP):

sudo apt -y install nginx php-fpm php-xml php-gd php-mbstring php-intl php-zip php-curl unzip

For Apache (LAMP):

sudo apt -y install apache2 libapache2-mod-php php php-xml php-gd php-mbstring php-intl php-zip php-curl unzip

3. Download DokuWiki

Grab the current stable release:

cd /tmp
wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
tar xzf dokuwiki-stable.tgz
sudo mkdir -p /var/www/dokuwiki
sudo rsync -a dokuwiki-*/ /var/www/dokuwiki/
sudo chown -R www-data:www-data /var/www/dokuwiki

4. Configure the web server

Nginx server block (PHP‑FPM):

sudo nano /etc/nginx/sites-available/dokuwiki

Paste:

server {
    listen 80;
    server_name example.com;
    root /var/www/dokuwiki;

    index index.php index.html;

    # DokuWiki recommended locations
    location ~ /(data/|conf/|bin/|inc/|vendor/|install.php) { deny all; return 404; }

    location / { try_files $uri $uri/ @dokuwiki; }

    location @dokuwiki {
        rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
        rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
        rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
        rewrite ^/(.*) /doku.php?id=$1 last;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php-fpm.sock;
    }

    location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2?)$ {
        expires 30d;
        access_log off;
    }
}

Enable and reload:

sudo ln -s /etc/nginx/sites-available/dokuwiki /etc/nginx/sites-enabled/dokuwiki
sudo nginx -t && sudo systemctl reload nginx

Apache VirtualHost:

sudo nano /etc/apache2/sites-available/dokuwiki.conf

Paste:

<VirtualHost *:80>
    ServerName example.com
    DocumentRoot /var/www/dokuwiki

    <Directory /var/www/dokuwiki>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/dokuwiki_error.log
    CustomLog ${APACHE_LOG_DIR}/dokuwiki_access.log combined
</VirtualHost>

Enable modules and site, then reload:

sudo a2enmod rewrite
sudo a2ensite dokuwiki
sudo systemctl reload apache2

5. Run the web installer

Visit example.com/install.php to set the wiki name, admin user, and ACL defaults.

Then when done, delete the installer:

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

Secure your DokuWiki with HTTPS

Use Let’s Encrypt and Certbot.

For Nginx:

sudo apt -y install certbot python3-certbot-nginx
sudo certbot --nginx -d example.com

For Apache:

sudo apt -y install certbot python3-certbot-apache
sudo certbot --apache -d example.com

Certbot sets up auto‑renewal. For more information on how to use Certbot, read our article here.

Running DokuWiki on shared hosting

If you don’t need root access, shared hosting is a simple option. Upload the DokuWiki files via your control panel or SFTP, point the document root, and run install.php in your browser.

Conclusion

DokuWiki keeps documentation straightforward, which makes it a steady pick for teams that want a self‑hosted wiki without a database. You can deploy it on a small VPS, scale up when you need to, and keep backups simple with file copies or Git.

Thanks for reading. If you’re mapping out infrastructure for DokuWiki or other apps, xTom offers enterprise‑grade options: dedicated servers, colocation, NVMe‑powered KVM V.PS for fast VPS deployments, IP transit, and shared hosting. You can also browse more on our services page.

Ready to discuss your infrastructure needs? Contact our team to explore the right solution for your projects.

Frequently asked questions about DokuWiki

What makes DokuWiki different from other wiki software?

It uses flat files instead of a database, which keeps installs and backups simple. This also makes it a good fit for lightweight servers and Git‑based workflows.

Can DokuWiki handle a private, access‑controlled knowledge base?

Yes. You can enable ACLs, create groups, and restrict namespaces so only certain users can read or edit content.

Which web server should I choose, Nginx or Apache?

Both work well. Nginx with PHP‑FPM is common on modern VPS and dedicated servers, while Apache can be simpler on shared hosting due to .htaccess support.

How do I back up DokuWiki?

Back up the ./data and ./conf directories, plus any custom templates or plugins. With flat files, you can use rsync, tar, or Git, and pair that with provider snapshots.

Is there a database migration path if we outgrow flat files?

DokuWiki is designed for flat files. If you later need a database‑driven CMS, plan a content export and migration, or mirror certain content to a different platform.

What size server do I need?

A small VPS handles many internal wikis. Add CPU and RAM as your user base and plugin count grows. For high traffic, move to a dedicated server and consider a CDN for static assets.

Can I install DokuWiki on shared hosting?

Yes. Upload the package, point your document root, and run the installer in your browser. If you want to start quickly, see V.PS shared hosting plans here.