DokuWiki is a simple and efficient wiki software built for teams and individuals. In this tutorial, we will go through the steps to install DokuWiki on a NixOS latest.
Before we begin, make sure that the following requirements are met:
The first step is to update your system to the latest version. Open your terminal and run the following command:
sudo nix-channel --update && sudo nixos-rebuild switch
DokuWiki requires the following packages to be installed on the system:
To install them, run the following command:
sudo nix-env -i php php_packages.apache php_packages.sqlite apache
Download the latest stable version of DokuWiki from the official website using the following command:
curl -O https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
Extract the downloaded file to the Apache web server’s document root directory,
sudo tar -xvf dokuwiki-stable.tgz -C /var/www/
sudo mv /var/www/dokuwiki-* /var/www/dokuwiki
To configure Apache to serve DokuWiki, we will create a new virtual host. To create a new virtual host, create a new configuration file /etc/httpd/sites-available/dokuwiki.conf
with the following content:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/dokuwiki
ServerName your-domain.com
ErrorLog /var/log/httpd/dokuwiki-error.log
CustomLog /var/log/httpd/dokuwiki-access.log combined
<Directory /var/www/dokuwiki/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Replace your-domain.com
with your actual domain name or server IP address. Also, make sure to enable mod_rewrite
module using the following command:
sudo ln -s /etc/nixos/modules/services/web-servers/apache-rewrite.nix /etc/nixos/modules/services/web-servers/apache/rewrites/dokuwiki.nix
To enable the newly created virtual host, run the following command:
sudo a2ensite dokuwiki
Restart the Apache service using the following command:
sudo systemctl restart apache
Now, it's time to access the DokuWiki installation by going to your server's IP address or domain name in your browser. You should see the DokuWiki setup page, where you can start configuring your new wiki.
Congratulations! You have successfully installed DokuWiki on NixOS latest. You can now start creating and collaborating on a new wiki with DokuWiki!
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!