User Tools

Site Tools


How to install DokuWiki on a Raspberry Pi

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. The Raspberry Pi is a series of small single-board computers developed to promote teaching of basic computer science in schools and in developing countries. The original model became far more popular than anticipated, selling outside its target market for uses such as robotics, weather monitoring, and even serving web pages.

This article will help you create a public-facing wiki hosted from your Raspberry Pi.


In this article I assume you already have a functioning Raspberry Pi. I also assume you're comfortable with the Linux command line interface.

I prefer Debian-based distros and Apache as my webserver. I have no experience with this using other distros or web server software.

⚠ I do not really address security here. I strongly suggest you visit, read, and understand the words written here.


  1. A Raspberry Pi
  2. A high-speed Internet connection
  3. PHP

Software installation

It's always good practice to update and upgrade.

sudo apt update -y && sudo apt upgrade -y

Install Apache.

sudo apt install -y apache2

Install PHP. At the time of writing I'm using PHP 7.4.

sudo apt install -y php7.4 php7.4-cli libapache2-mod-php7.4 php7.4-gd php7.4-curl php7.4-json php7.4-xml

Download the DokuWiki software.

Visit to select the options you want and download the resulting compressed tar file. You will need to extract this file under /var/www/html. In my case I extracted and rename the directory to wiki so it sits under /var/www/html/wiki.

The owner of these files and directories need to belong to www-data.

sudo chown -R www-data:www-data /var/www/html/wiki

You now have a wiki

Assuming Apache is running, you should have a wiki. Right now it's only available on your local network. Navigate to http://[RASPBERRY-PI-IP]/[DIRECTORY]/install.php. To setup your wiki. For example, if your Pi has an IP address of and you installed in a directory called wiki then navigate to

How to make your wiki public facing

Register a domain name

While not absolutely required, it's good to have a domain name for your wiki. There are plenty of tutorials online describing how to do this. As time allows I will write my own guide to this process, but for now, I leave this as an exercise for the student.

To be continued…

computing/how_to_install_dokuwiki_on_a_raspberry_pi.txt · Last modified: 2020-12-29T18:32:28+0000 (external edit)