How To Install DokuWiki on Debian 13
DokuWiki stands as one of the most versatile and lightweight wiki platforms available for creating documentation, knowledge bases, and collaborative content management systems. Unlike traditional wiki software, DokuWiki operates without requiring a database, storing all content in plain text files, which simplifies backup, migration, and maintenance tasks significantly. This comprehensive guide walks you through installing DokuWiki on Debian 13 (Trixie), the latest stable release that brings enhanced security features, updated kernel 6.12, and improved system stability. Whether you’re setting up internal documentation for your development team, creating a technical knowledge base, or building a collaborative wiki for your organization, this tutorial provides detailed instructions for both Apache and Nginx web servers, ensuring you can deploy DokuWiki in a production-ready environment with proper security configurations.
What is DokuWiki?
DokuWiki is an open-source wiki application developed in PHP that revolutionizes how organizations manage their documentation needs. The software’s architecture centers around flat-file storage, eliminating the complexity and overhead associated with database management systems. This design philosophy makes DokuWiki exceptionally portable and easy to maintain.
The platform supports a clean and intuitive markup syntax that allows users to format content without learning complex HTML or markdown variations. Built-in access control lists (ACL) provide granular permission management, enabling administrators to control who can view, edit, or delete specific pages and namespaces. DokuWiki ships with multilingual support for over 50 languages, making it suitable for international teams and organizations.
The extensive plugin ecosystem extends functionality beyond the core features, with thousands of community-developed extensions available for syntax highlighting, multimedia embedding, advanced formatting, and integration with external services. The active development community ensures regular updates, security patches, and continuous improvement of the platform.
Key Benefits and Use Cases
DokuWiki excels in numerous scenarios where structured documentation and knowledge management are essential. Software development teams leverage it for creating comprehensive API documentation, project wikis, and technical specifications. The platform’s version control integration and diff viewing capabilities make it ideal for tracking changes to documentation over time.
Organizations deploy DokuWiki as internal knowledge bases where employees can collaboratively document processes, procedures, and institutional knowledge. The simple editing interface encourages contributions from team members regardless of their technical expertise. Educational institutions utilize the platform for course materials, lecture notes, and collaborative student projects.
System administrators appreciate DokuWiki’s low maintenance requirements and minimal resource consumption. The absence of database dependencies simplifies backup strategies—simply archive the entire directory structure to preserve all content, configurations, and user data. Migration between servers becomes straightforward since no database exports or imports are necessary.
Security features include comprehensive access control, user authentication systems, CAPTCHA support for spam prevention, and regular security audits by the development team. The flat-file architecture also provides inherent protection against SQL injection attacks since no database queries are executed.
Prerequisites and System Requirements
Before beginning the installation process, ensure your system meets the necessary hardware and software requirements for optimal DokuWiki performance. A minimum of 2 GB RAM is required, though 4 GB or more is recommended for servers hosting multiple wikis or expecting moderate to heavy traffic. Allocate at least 20 GB of disk space for the operating system, with 50 GB or more recommended for desktop installations or systems with extensive media uploads.
Debian 13 (Trixie) must be installed and running on your server. The distribution released in August 2025 brings significant improvements including Linux kernel 6.12, updated system libraries, and enhanced hardware support. You’ll need root access or a user account with sudo privileges to execute administrative commands throughout this tutorial.
The web server component requires either Apache 2.4 or higher, or Nginx 1.18 or newer. Both servers are covered in this guide, allowing you to choose based on your preferences and existing infrastructure. PHP 7.4 represents the minimum version requirement, though PHP 8.0 or later is strongly recommended for improved performance and security. Essential PHP extensions include php-xml for XML parsing, php-json for JSON handling, php-mbstring for multibyte string processing, php-zip for archive management, php-intl for internationalization support, and php-gd for image manipulation.
Consider obtaining a domain name or subdomain for your wiki installation, as this improves accessibility and professionalism. An SSL/TLS certificate from Let’s Encrypt should be implemented to secure communications between users and your wiki. The UFW firewall provides an additional security layer, controlling network access to your server.
Step 1: Update System and Install Dependencies
Begin by connecting to your Debian 13 server via SSH. Execute the following command to update the package repository index and upgrade all installed packages to their latest versions:
sudo apt update && sudo apt upgrade -y
This command combination refreshes the package lists from configured repositories and applies available updates. The -y
flag automatically confirms all prompts during the upgrade process.
Installing Apache Web Server
For Apache installations, execute this command to install the web server along with required PHP modules:
sudo apt install apache2 php libapache2-mod-php php-xml php-json php-mbstring php-zip php-intl php-gd -y
After installation completes, verify that Apache is running correctly:
sudo systemctl status apache2
The output should indicate that Apache is active and running. Enable Apache to start automatically on system boot:
sudo systemctl enable apache2
Installing Nginx Web Server (Alternative)
If you prefer Nginx over Apache, install it along with PHP-FPM:
sudo apt install nginx php-fpm php-xml php-json php-mbstring php-zip php-intl php-gd -y
Check the Nginx service status:
sudo systemctl status nginx
Enable both Nginx and PHP-FPM to start on boot:
sudo systemctl enable nginx
sudo systemctl enable php8.2-fpm
Verify your PHP version to ensure compatibility:
php -v
The command displays the installed PHP version and build information. Debian 13 typically includes PHP 8.2 by default, which provides excellent performance and security for DokuWiki installations.
Step 2: Download and Extract DokuWiki
Navigate to a temporary directory for downloading the DokuWiki archive:
cd /tmp
Download the latest stable release directly from the official DokuWiki website using wget:
wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
This command retrieves the current stable version packaged as a compressed tarball. The DokuWiki project maintains this URL to always point to the most recent stable release, ensuring you receive the latest features and security updates.
Extract the downloaded archive:
tar xzvf dokuwiki-stable.tgz
The extraction process creates a directory with a name pattern like dokuwiki-YYYY-MM-DD
, where the date represents the release version. List the directory contents to identify the exact folder name:
ls -la
Create the target directory within your web server’s document root:
sudo mkdir -p /var/www/html/dokuwiki
Move all extracted files to the newly created directory. Replace dokuwiki-YYYY-MM-DD
with the actual directory name from your extraction:
sudo mv dokuwiki-*/* /var/www/html/dokuwiki/
The asterisk wildcard ensures all files and subdirectories transfer correctly to the destination. Verify the transfer completed successfully:
ls -la /var/www/html/dokuwiki/
You should see directories like bin
, conf
, data
, inc
, lib
, and several PHP files including doku.php
and install.php
.
Step 3: Set Proper Permissions and Ownership
Correct file permissions and ownership are critical for DokuWiki’s operation and your server’s security. The web server process must have read and write access to specific directories while maintaining appropriate restrictions on sensitive files.
Change the ownership of all DokuWiki files to the web server user:
sudo chown -R www-data:www-data /var/www/html/dokuwiki
The www-data
user and group represent the standard web server identity on Debian systems. The -R
flag applies the ownership change recursively to all subdirectories and files.
Set appropriate permissions for the directory structure:
sudo chmod -R 755 /var/www/html/dokuwiki
This permission set allows the owner (www-data) to read, write, and execute; while group and other users can read and execute but not modify files. The execute permission on directories enables directory listing and navigation.
Ensure the data and conf directories have proper write permissions:
sudo chmod -R 775 /var/www/html/dokuwiki/data
sudo chmod -R 775 /var/www/html/dokuwiki/conf
These directories require write access because DokuWiki stores page content, media files, and configuration data within them. The slightly more permissive permissions accommodate various web server configurations while maintaining security.
Step 4: Configure Apache Virtual Host
Apache virtual hosts enable hosting multiple websites on a single server, each with its own configuration. Create a new configuration file for your DokuWiki installation:
sudo nano /etc/apache2/sites-available/dokuwiki.conf
Add the following configuration, replacing your-domain.com
with your actual domain name:
<VirtualHost *:80>
ServerAdmin admin@your-domain.com
ServerName your-domain.com
DocumentRoot /var/www/html/dokuwiki
<Directory /var/www/html/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>
The ServerName
directive specifies the domain name for accessing your wiki. The DocumentRoot
points to the DokuWiki installation directory. The AllowOverride All
directive permits DokuWiki’s .htaccess
file to modify server behavior for security and URL rewriting.
Save and close the file by pressing Ctrl+X
, then Y
, and Enter
.
Enable the new virtual host configuration:
sudo a2ensite dokuwiki.conf
Enable the Apache rewrite module, which DokuWiki uses for clean URLs:
sudo a2enmod rewrite
Test the Apache configuration for syntax errors:
sudo apache2ctl configtest
A “Syntax OK” message confirms your configuration is valid. Restart Apache to apply the changes:
sudo systemctl restart apache2
Step 4 (Alternative): Configure Nginx Server Block
For Nginx installations, create a server block configuration file:
sudo nano /etc/nginx/sites-available/dokuwiki
Insert the following configuration, adjusting your-domain.com
and the PHP-FPM socket path as needed:
server {
listen 80;
server_name your-domain.com;
root /var/www/html/dokuwiki;
index index.php doku.php;
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&$args last;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
}
location ~ /(data|conf|bin|inc|vendor)/ {
deny all;
}
location ~ /\.ht {
deny all;
}
}
This configuration implements proper URL rewriting for DokuWiki’s clean URLs, processes PHP files through PHP-FPM, and denies access to sensitive directories. The try_files
directive checks for static files before falling back to DokuWiki’s routing system.
Save the file and create a symbolic link to enable the configuration:
sudo ln -s /etc/nginx/sites-available/dokuwiki /etc/nginx/sites-enabled/
Test the Nginx configuration for errors:
sudo nginx -t
A successful test shows “syntax is ok” and “test is successful” messages. Restart Nginx and PHP-FPM:
sudo systemctl restart nginx
sudo systemctl restart php8.2-fpm
Step 5: Configure Firewall (UFW)
The Uncomplicated Firewall (UFW) provides straightforward firewall management on Debian systems. Install UFW if not already present:
sudo apt install ufw -y
Allow SSH connections before enabling the firewall to prevent locking yourself out:
sudo ufw allow 22/tcp
For Apache installations, allow the “Apache Full” profile which opens both HTTP (80) and HTTPS (443) ports:
sudo ufw allow 'Apache Full'
For Nginx installations, use the corresponding profile:
sudo ufw allow 'Nginx Full'
Alternatively, explicitly allow HTTP and HTTPS traffic:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
Enable the firewall:
sudo ufw enable
Confirm the operation when prompted. Verify your firewall rules:
sudo ufw status verbose
The output displays active rules, showing allowed services and ports. This configuration permits web traffic while blocking unwanted connections, strengthening your server’s security posture.
Step 6: Run DokuWiki Installer
Open your web browser and navigate to the DokuWiki installer. Replace your-domain.com
with your actual domain or server IP address:
http://your-domain.com/install.php
The installation wizard presents a form requesting essential configuration information. Complete each field carefully:
Wiki Name: Enter a descriptive name for your wiki. This appears in the browser title and throughout the interface.
Superuser: Create an administrator username. Avoid obvious names like “admin” for security reasons. Consider using a unique, non-obvious username.
Real Name: Provide the administrator’s full name, which displays in user profiles and page history.
E-Mail: Enter a valid email address for the administrator account. DokuWiki uses this for notifications and password recovery.
Password: Create a strong password containing uppercase and lowercase letters, numbers, and special characters. Aim for at least 12 characters.
Confirm Password: Re-enter the password to confirm accuracy.
Initial ACL Policy: Select an access control policy that matches your wiki’s purpose. Options include “Open Wiki” (public read and write), “Public Wiki” (public read, restricted write), “Closed Wiki” (authentication required for all access), and custom policies.
License: Choose a license for your wiki content. Creative Commons licenses offer various options balancing attribution, commercial use, and derivative works permissions.
Allow users to register: Enable this option if you want visitors to create their own accounts. Disable it for private wikis requiring manual user management.
Review all entries for accuracy, then click the “Save” button. DokuWiki creates configuration files and sets up the initial structure. Upon successful completion, a confirmation message appears with a link to access your new wiki.
Click the “your new DokuWiki” link to view the welcome page. The installation process is complete, and your wiki is operational.
Step 7: Post-Installation Security
Immediately after installation, implement critical security measures to protect your wiki from unauthorized access and potential vulnerabilities.
Remove the installation script to prevent unauthorized reconfiguration:
sudo rm /var/www/html/dokuwiki/install.php
Deleting this file prevents attackers from resetting your wiki or creating new administrator accounts. This step is essential for production deployments.
For Nginx users, verify that sensitive directories are properly restricted. Edit your server block configuration:
sudo nano /etc/nginx/sites-available/dokuwiki
Ensure the following location blocks exist and are not commented out:
location ~ /(conf/|bin/|inc/|vendor/) {
deny all;
}
Save the file and restart Nginx:
sudo systemctl restart nginx
For Apache users, DokuWiki’s .htaccess
files provide automatic protection. Verify these files exist in sensitive directories:
ls -la /var/www/html/dokuwiki/conf/.htaccess
ls -la /var/www/html/dokuwiki/data/.htaccess
Both files should be present and contain deny directives. If missing, Apache’s security may be compromised.
Review your wiki’s ACL settings by logging into the administrator panel and navigating to Admin → Access Control List. Verify that only authorized users have write permissions and that public access aligns with your security requirements.
Enable automatic security updates for Debian packages to ensure your system receives critical patches:
sudo apt install unattended-upgrades -y
sudo dpkg-reconfigure -plow unattended-upgrades
Select “Yes” when prompted to enable automatic updates. This ensures PHP, web server, and system security patches install automatically.
Step 8: Install SSL/TLS Certificate (Optional but Recommended)
Implementing HTTPS encryption protects data transmitted between users and your wiki, preventing eavesdropping and man-in-the-middle attacks. Let’s Encrypt provides free SSL/TLS certificates with automated renewal.
For Apache installations, install Certbot and the Apache plugin:
sudo apt install certbot python3-certbot-apache -y
Obtain and install a certificate for your domain:
sudo certbot --apache -d your-domain.com
Certbot prompts for an email address for renewal notifications and agreement to the terms of service. It automatically configures your Apache virtual host for HTTPS and sets up HTTP to HTTPS redirection.
For Nginx installations, use the Nginx-specific plugin:
sudo apt install certbot python3-certbot-nginx -y
Execute Certbot for Nginx:
sudo certbot --nginx -d your-domain.com
Follow the interactive prompts to complete certificate installation. Certbot modifies your Nginx server block to enable SSL and configure proper security headers.
Test automatic certificate renewal:
sudo certbot renew --dry-run
This command simulates the renewal process without making actual changes. A successful dry run confirms that automatic renewal will work when your certificate approaches expiration.
Let’s Encrypt certificates remain valid for 90 days. Certbot installs a systemd timer that automatically renews certificates before expiration, requiring no manual intervention.
Access your wiki using HTTPS:
https://your-domain.com
Modern browsers display a padlock icon in the address bar, confirming the secure connection. Your DokuWiki installation now encrypts all communications, protecting user credentials and content.
Step 9: Basic DokuWiki Configuration
Log into your wiki using the administrator credentials created during installation. Click the “Login” link in the upper right corner of the page.
After authentication, click “Admin” to access the administration panel. This interface provides centralized access to all configuration and management functions.
Configuration Manager
Navigate to Admin → Configuration Settings to access DokuWiki’s comprehensive configuration manager. Key settings to review and adjust include:
Title: The wiki’s name appearing in page titles and headers.
Tagline: A subtitle or description appearing below the wiki title.
Start Page: The default page displayed when users visit your wiki’s root URL.
License: The default license applied to wiki content.
Use ACL: Must be enabled for access control functionality. This should be enabled by default from installation.
Superuser: Comma-separated list of administrator usernames.
Mailfrom: The email address used in outgoing notifications.
File Upload Settings: Configure maximum upload size, allowed file types, and restrictions. Default settings permit common document and image formats.
Edit Settings: Control edit lock timeout, draft auto-save intervals, and conflict handling.
User Management
Access Admin → User Manager to create, modify, and delete user accounts. Add new users manually or configure registration settings to allow self-registration.
For each user, specify username, full name, email address, and group memberships. Groups simplify ACL management by allowing permission assignment to groups rather than individual users.
Access Control Lists (ACL)
Navigate to Admin → Access Control List to configure granular permissions. DokuWiki’s ACL system operates on namespaces (wiki sections) and individual pages.
Permission levels include:
- None: No access
- Read: View pages
- Edit: Modify existing pages
- Create: Create new pages in namespace
- Upload: Upload files
- Delete: Remove pages and uploads
- Admin: Full administrative access to namespace
Configure permissions by selecting a namespace or page, specifying a user or group, and assigning the appropriate permission level. Start with broad namespace permissions, then add specific page exceptions as needed.
Appearance Customization
Navigate to Admin → Extension Manager, then select the “Templates” tab to browse available themes. DokuWiki includes several default templates, with hundreds more available from the community.
Install templates by searching for names, selecting desired templates, and clicking “Install.” After installation, activate a template through Admin → Configuration Settings under the “template” option.
Customize your template’s appearance by editing Admin → Configuration Settings → Template-specific settings. Available options vary by template but typically include color schemes, layout options, and sidebar configuration.
Step 10: Installing Essential Plugins
DokuWiki’s plugin architecture enables extensive functionality expansion. Access the plugin manager via Admin → Extension Manager.
Recommended Essential Plugins
Upgrade Plugin: Simplifies DokuWiki core updates through the admin interface. Install this first to enable easy future upgrades.
Backup Plugin: Creates complete wiki backups including pages, media, and configuration. Schedule regular automated backups for disaster recovery.
Wrap Plugin: Provides enhanced styling options with boxes, columns, and special formatting. Useful for creating professional-looking documentation.
Code Block Plugin: Improves syntax highlighting for code snippets across numerous programming languages. Essential for technical documentation.
Bureaucracy Plugin: Creates custom forms for collecting structured information from users. Valuable for surveys, requests, and data collection.
Tag Plugin: Implements tagging functionality for content organization and discovery. Users can browse content by tags.
Installing Plugins
Search for plugins by name in the Extension Manager. Click “Install” next to desired plugins. DokuWiki downloads and installs plugins automatically, displaying success or error messages.
After installation, some plugins require configuration. Access plugin settings through Admin → Configuration Settings, scrolling to plugin-specific sections.
Regularly update installed plugins through the Extension Manager’s “Update” tab. This ensures compatibility with DokuWiki core updates and applies security patches.
Evaluate plugin quality before installation by reviewing download counts, last update date, compatibility notes, and user reviews. Avoid abandoned plugins that haven’t been updated for several years, as they may contain security vulnerabilities or compatibility issues.
Testing Your DokuWiki Installation
Thoroughly test your wiki to ensure all functionality operates correctly before deploying to users.
Create a test page by clicking “Create this page” or entering a new page name in the search box. Use DokuWiki’s syntax to format text, insert links, and embed media. Save the page and verify it displays correctly.
Test the editing workflow by clicking “Edit this page” on an existing page. Make modifications, preview changes, and save. Check that the page history records your edit with correct timestamp and attribution.
Upload test images and documents using the Media Manager (Admin → Media Manager). Verify that files upload successfully, thumbnails generate for images, and embedded media displays properly in pages.
Test user registration if enabled. Create a new account using the registration form. Verify confirmation emails arrive and new users can authenticate.
Verify ACL functionality by logging in as different users with varying permission levels. Confirm that users can only access and modify content according to their assigned permissions.
Test search functionality by performing searches for known content. Verify that relevant pages appear in results and that search highlighting works correctly.
Access your wiki from different browsers (Chrome, Firefox, Safari, Edge) and devices (desktop, tablet, mobile). Ensure responsive design adapts appropriately and all features function across platforms.
Troubleshooting Common Issues
Permission Errors
If DokuWiki displays permission errors when saving pages or uploading files, verify directory ownership and permissions:
sudo chown -R www-data:www-data /var/www/html/dokuwiki
sudo chmod -R 755 /var/www/html/dokuwiki
sudo chmod -R 775 /var/www/html/dokuwiki/data
sudo chmod -R 775 /var/www/html/dokuwiki/conf
Check web server error logs for specific permission issues:
sudo tail -f /var/log/apache2/error.log
# or for Nginx
sudo tail -f /var/log/nginx/error.log
PHP Extension Errors
Missing PHP extensions prevent DokuWiki from functioning correctly. Install any missing extensions:
sudo apt install php-xml php-json php-mbstring php-zip php-intl php-gd -y
Restart your web server after installing PHP extensions:
sudo systemctl restart apache2
# or
sudo systemctl restart php8.2-fpm nginx
Verify installed PHP modules:
php -m
404 Not Found Errors
If DokuWiki pages display 404 errors, verify that URL rewriting is configured correctly. For Apache, ensure mod_rewrite is enabled:
sudo a2enmod rewrite
sudo systemctl restart apache2
Check that your virtual host configuration includes AllowOverride All
for the DokuWiki directory.
For Nginx, verify that your server block includes proper rewrite rules and that the configuration syntax is valid:
sudo nginx -t
Install.php Not Accessible
If the installation page doesn’t load, verify that your web server is running and properly configured:
sudo systemctl status apache2
# or
sudo systemctl status nginx
Check firewall rules to ensure HTTP traffic is allowed:
sudo ufw status
Verify DNS configuration if accessing by domain name. Test using the server’s IP address to isolate DNS issues.
Slow Performance
DokuWiki performance issues often stem from insufficient PHP memory allocation. Edit your PHP configuration:
sudo nano /etc/php/8.2/fpm/php.ini
Increase the memory limit:
memory_limit = 256M
Enable DokuWiki’s caching features through Admin → Configuration Settings. Set “cachetime” to an appropriate value (default 3600 seconds).
For high-traffic wikis, consider installing the cachd plugin or implementing reverse proxy caching with Varnish or Nginx FastCGI cache.
Plugin Compatibility Issues
The Debian package version of DokuWiki uses different paths and library versions than standard installations, causing plugin incompatibility. Since this guide uses manual installation from source, plugins should work without modification.
If plugins malfunction, check compatibility notes in the plugin’s documentation. Some plugins require specific DokuWiki versions or PHP extensions.
Disable problematic plugins through Admin → Extension Manager by unchecking the “enabled” box. This allows identifying which plugin causes issues through elimination.
Maintenance and Best Practices
Establish a regular maintenance schedule to keep your DokuWiki installation secure, performant, and reliable.
Check for DokuWiki updates monthly through Admin → Extension Manager → Update. The update process is straightforward and typically maintains backward compatibility. Always backup before upgrading.
Implement automated backup procedures using the Backup plugin or system-level backup tools. Create daily incremental backups and weekly full backups. Store backups off-server for disaster recovery.
Monitor disk space usage regularly:
df -h
DokuWiki’s flat-file structure can consume significant space with extensive media uploads. Archive or remove obsolete content periodically.
Review log files monthly for errors, security events, or performance issues:
sudo tail -n 100 /var/log/apache2/dokuwiki-error.log
Keep Debian 13 updated with security patches:
sudo apt update && sudo apt upgrade -y
Review and audit user accounts quarterly. Remove accounts for departed team members and adjust permissions as roles change.
Test your backup restoration procedure annually. Many organizations maintain backups but never verify they can successfully restore data.
Document all customizations, plugin installations, and configuration changes. This documentation proves invaluable when troubleshooting issues or setting up additional wiki instances.
Monitor security advisories from the DokuWiki project and Debian security team. Subscribe to announce mailing lists to receive notifications of critical issues.
Implement proper access control policies. Start with restrictive permissions and grant additional access as needed rather than beginning with open permissions and restricting later.
Congratulations! You have successfully installed DokuWiki. Thanks for using this tutorial to install the latest version of the DokuWiki on Debian 13 “Trixie” system. For additional help or useful information, we recommend you check the official DokuWiki website.