Introduction

DokuWiki is a simple-to-use and highly versatile open-source wiki software that doesn't require a database. It is an excellent choice for creating documentation, knowledge bases, and collaborative websites. Installing DokuWiki on Debian 12 allows you to set up your own wiki for various purposes. In this guide, we'll walk you through the step-by-step process of installing DokuWiki on Debian 12.

Prerequisites

Before you begin, make sure you have the following:

  • A Debian 12 server with sudo privileges
  • A web server installed and configured (Apache or Nginx)

Step 1: Install DokuWiki

First, update the package index on your Debian system:

sudo apt update

Now, install DokuWiki using the package manager:

sudo apt install dokuwiki

Step 2: Configure Web Server

If you're using Apache, DokuWiki's configuration files will be automatically placed in /etc/dokuwiki/apache.conf. You can enable the DokuWiki configuration for Apache using the following command:

sudo ln -s /etc/dokuwiki/apache.conf /etc/apache2/conf-enabled/dokuwiki.conf

If you're using Nginx, you'll need to manually configure Nginx to serve DokuWiki. Create a new server block configuration file for DokuWiki:

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

Enter the following configuration:

server {
    listen 80;
    server_name your_domain.com; # Change this to your domain name or IP address
    root /usr/share/dokuwiki/;
    index doku.php;
    access_log /var/log/nginx/dokuwiki_access.log;
    error_log /var/log/nginx/dokuwiki_error.log;
    location / {
        try_files $uri $uri/ /doku.php?$args;
    }
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; # Change the PHP version if needed
    }
}

Enable the DokuWiki configuration for Nginx:

sudo ln -s /etc/nginx/sites-available/dokuwiki /etc/nginx/sites-enabled/

Test the Nginx configuration and restart the Nginx service:

sudo nginx -t
sudo systemctl restart nginx

Step 3: Access DokuWiki

Open a web browser and navigate to your server's domain name or IP address to access DokuWiki. Follow the on-screen instructions to complete the initial setup of DokuWiki.

Conclusion

Congratulations! You've successfully installed DokuWiki on Debian 12. You can now start creating and managing your own wiki for documentation and collaborative purposes.

Thank you for reading our guide on how to install DokuWiki on Debian 12. We hope you found it helpful!

Was this answer helpful? 0 Users Found This Useful (0 Votes)