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.
It's always good practice to update and upgrade.
sudo apt update -y && sudo apt upgrade -y
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 https://download.dokuwiki.org/ 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
The owner of these files and directories need to belong to
sudo chown -R www-data:www-data /var/www/html/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
192.168.1.100 and you installed in a directory called
wiki then navigate to
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…