What is DokuWiki?
DokuWiki is a simple, open-source wiki software that is aimed at creating documentation, collaborative websites, and knowledge bases. It’s written in PHP and stores all its data in plain text files, which means you don’t need a database like MySQL or PostgreSQL. This makes it easy to install, maintain, and backup, and it’s suitable for both small and large-scale use.
Key Features of DokuWiki:
- No Database Required:
- DokuWiki stores all data in plain text files, so it doesn’t require any database like MySQL or PostgreSQL. This simplifies installation and maintenance since you don’t have to worry about database management.
- Simple to Install and Use:
- DokuWiki has a very easy installation process and is simple to configure. It’s often chosen for its user-friendly interface, allowing even non-technical users to contribute easily.
- Version Control:
- DokuWiki has built-in revision control. This means that any changes to a page are tracked and saved, allowing users to revert to earlier versions if needed. This feature is particularly useful in collaborative environments where multiple users are editing the same documents.
- Access Control and Security:
- DokuWiki has a robust Access Control List (ACL) feature, which allows administrators to set permissions for different user groups (e.g., read-only, read-write, admin). This is useful for managing access to sensitive information or restricting certain parts of the wiki.
- Extensible with Plugins:
- DokuWiki has an active plugin repository that allows you to easily extend its functionality. Plugins are available for features such as authentication, user management, syntax enhancements, galleries, diagrams, and more.
- Multilingual Support:
- DokuWiki offers multilingual capabilities, allowing you to easily create and manage content in different languages.
- Highly Customizable:
- DokuWiki offers many themes and templates for customizing the look and feel of the site. Users can choose from pre-built templates or design their own to suit their specific needs.
- Easy Backup and Restore:
- Since DokuWiki stores all its data in plain text files, it’s very easy to back up the entire wiki just by copying the directory. This makes restoring a previous version or migrating to another server straightforward.
- Support for Media Files:
- DokuWiki supports the embedding of images, videos, and other media files in the documentation. It also supports various file formats, including PDF, MP3, and more.
- Search Engine Friendly:
- DokuWiki generates search engine-friendly URLs and has built-in SEO optimization, which makes it easier for your wiki content to be indexed by search engines.
Use Cases of DokuWiki:
- Internal Company Documentation:
- Many companies use DokuWiki for internal documentation like policies, procedures, user manuals, and more. Its easy-to-use interface allows employees at all levels to contribute.
- Knowledge Bases:
- DokuWiki is commonly used to build knowledge bases for products or services, helping customers or employees find answers to common questions. It’s great for self-help or troubleshooting portals.
- Collaborative Projects:
- Teams working on collaborative projects often use DokuWiki to manage documentation, task lists, project updates, and versioning. Since multiple users can work on the same document, it encourages real-time collaboration.
- Personal Wikis:
- Individuals or small groups use DokuWiki to maintain personal knowledge bases for hobbies, notes, or research. Since it is easy to install and doesn’t require a database, it’s ideal for personal projects.
- Educational Institutions:
- Schools and universities use DokuWiki as a teaching tool or to maintain knowledge bases. Professors and students can use it to create educational content, share research, or collaborate on projects.
- Open-Source Projects Documentation:
- Many open-source projects use DokuWiki to maintain their project’s documentation. Its ease of use makes it a popular choice for hosting technical guides, FAQs, and developer documentation.
- Intranets:
- DokuWiki is often used in company intranets to share and document internal knowledge. With access control features, organizations can ensure that only authorized personnel have access to certain parts of the wiki.
Pros of Using DokuWiki:
- No Database Required: Easy to install and maintain, with no need for a database.
- Revision Control: Built-in versioning ensures that changes can be tracked and reverted.
- Highly Customizable: Themes and plugins allow for extensive customization of features and appearance.
- Robust Access Control: Fine-grained permission settings make it suitable for different types of users.
- Search-Friendly: SEO-friendly URLs and optimization help content rank higher in search engines.
- Strong Community Support: DokuWiki has an active user community and extensive documentation.
Cons of Using DokuWiki:
- Plain Text Data Storage: While this simplifies backups and migrations, it may not be ideal for very large wikis where database-backed systems offer better performance.
- Basic Editor: DokuWiki’s editor, while user-friendly, is less sophisticated than some rich-text editors used in other wiki platforms.
- Limited Media Support: DokuWiki’s support for multimedia content (such as embedded video) is not as advanced as some CMS platforms like WordPress.
- No Built-In WYSIWYG Editor: It uses a simple markup language instead of a WYSIWYG (What You See Is What You Get) editor, which might be a learning curve for non-technical users.
When to Use DokuWiki:
- If you don’t need a database: DokuWiki’s simplicity makes it a great choice if you want to avoid setting up a database server.
- For collaborative documentation: If you’re looking to create an easily accessible, editable platform for teams or the public to contribute to, DokuWiki is a solid option.
- When you need version control: DokuWiki’s built-in revision history ensures you can track and manage changes easily.
DokuWiki is a powerful, flexible solution for documentation, knowledge management, and collaborative editing without the complexity of a database. It is ideal for users who need a lightweight, easy-to-use wiki that is both extensible and secure.
Let me know if you need more details or assistance with DokuWiki!
Step 1: Create an Instance
- Access the Dashboard: Log in to your Shape.Host account and navigate to your Dashboard.
- Click Create: Click on the “Create” button located in the top-right corner.
- Select Instances: From the dropdown menu, choose “Instances” to begin creating a new cloud server.
- Select Location: Choose a data center location for your instance closest to your target audience for optimal performance.
- Choose a Plan: Scroll through the available pricing plans. Select a plan based on your project requirements, such as Standard, CPU-Optimized, or Memory-Optimized.
- Choose an Image: Select Debian 12 as the operating system for your instance.
- Authentication and Finalize: Choose your authentication method, either via SSH keys or password. Once done, click Create Instance to launch your server.
Step 2: Access Your DokuWiki Instance
To connect to your instance on Shape.Host, follow these steps:
- Get the Instance IP: After creating your instance, find the public IP address in the Shape.Host dashboard under Resources.
- Open SSH Client: Use an SSH client like Terminal (Linux/macOS) or PuTTY (Windows).
- SSH into the Instance: Run the following command in your terminal:
ssh root@<your-instance-ip>
Replace <your-instance-ip>
with your actual instance IP address.
- Enter the Password: If prompted, enter your instance’s root password or use your SSH key if configured.
You are now connected to your instance!
Step 3: Update System Packages
Start by updating the system’s package index to ensure all software is up-to-date:
apt update
Step 4: Install Apache, MariaDB, PHP, and Other Required Packages
Install the necessary components for DokuWiki:
apt install apache2 mariadb-server php libapache2-mod-php php-xml php-mbstring php-zip php-intl php-gd ufw certbot python3-certbot-apache
Step 5: Verify Apache and MariaDB
Ensure that Apache and MariaDB are enabled and running:
systemctl is-enabled apache2
systemctl status apache2
systemctl is-enabled mariadb
systemctl status mariadb
Step 6: Configure UFW Firewall
Allow OpenSSH and web traffic (HTTP and HTTPS) through the firewall, and then enable it:
ufw allow OpenSSH
ufw allow 'WWW Full'
ufw enable
ufw status
Step 7: Configure PHP
Edit the PHP configuration file to optimize it for DokuWiki:
nano /etc/php/8.2/apache2/php.ini
You can use the search function (CTRL + W in nano) to find it more quickly. To save your changes and exit nano, press CTRL + X, then Y, and Enter. Make the following changes:
- Set
memory_limit
to256M
- Set
upload_max_filesize
andpost_max_size
to32M
- Set
max_execution_time
to60
Step 8: Restart Apache
Restart Apache to apply the changes:
systemctl restart apache2
Step 9: Secure MariaDB Installation
Run the MariaDB secure installation script to set up your database:
mariadb-secure-installation
Follow the prompts to secure your MariaDB installation.
Step 10: Create a Database for DokuWiki
Log in to the MariaDB server:
mariadb -u root -p
Run the following SQL commands to create the database and user:
CREATE DATABASE dokuwikidb;
CREATE USER 'dokuwiki'@'localhost' IDENTIFIED BY 'p4ssword';
GRANT ALL PRIVILEGES ON dokuwikidb.* TO 'dokuwiki'@'localhost';
FLUSH PRIVILEGES;
Verify the privileges of the user:
SHOW GRANTS FOR 'dokuwiki'@'localhost';
Step 11: Download and Set Up DokuWiki
Navigate to the web directory and download DokuWiki:
cd /var/www/
wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
tar xzvf dokuwiki-stable.tgz
mv dokuwiki-2024-02-06b dokuwiki
Change ownership of the DokuWiki files to the Apache user:
chown -R www-data:www-data /var/www/dokuwiki
Step 12: Configure Apache for DokuWiki
Create a new virtual host configuration for DokuWiki:
nano /etc/apache2/sites-available/dokuwiki.conf
To save your changes and exit nano, press CTRL + X, then Y, and Enter. Insert the following configuration, replacing ServerName
with your domain name:
<VirtualHost *:80>
ServerName debian-tutorials.shape.host
DocumentRoot /var/www/dokuwiki
<Directory ~ "/var/www/dokuwiki/(bin/|conf/|data/|inc/)">
<IfModule mod_authz_core.c>
AllowOverride All
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
</IfModule>
</Directory>
ErrorLog /var/log/apache2/debian-tutorials.shape.host_error.log
CustomLog /var/log/apache2/debian-tutorials.shape.host_access.log combined
</VirtualHost>
Enable the DokuWiki site and test Apache’s configuration:
a2ensite dokuwiki.conf
apachectl configtest
systemctl restart apache2
Step 13: Enable HTTPS with Let’s Encrypt
Install Certbot and enable HTTPS for your domain:
certbot --apache --agree-tos --redirect --hsts --staple-ocsp --email contact@shape.host -d debian-tutorials.shape.host
Step 14: Access DokuWiki
Open your web browser and visit the domain name of your DokuWiki installation (e.g., https://debian-tutorials.shape.host/install.php
). You should see the DokuWiki web installer.
Select the option Enable ACL, input your admin user, email, and password for DokuWiki, and then click Save.
Once the installation is successful, you should get an output ‘The configuration was finished successfully..’.
Step 15: Remove the Installer File
Once installation is complete, remove the installer file for security reasons:
rm /var/www/dokuwiki/install.php
Next, click the link ‘your new DokuWiki‘ to continue. And you should get the DokuWiki homepage like the following.
Now click on the Login button and you should get the DokuWiki login page like the following.
Input your admin user and password, then click Log in. When successful, you should presented with the DokuWiki dashboard.
This tutorial was made possible using Shape.Host services, specifically their Cloud VPS offering. Shape.Host provides reliable and scalable cloud hosting solutions that are ideal for hosting applications like DokuWiki. Check out their Cloud VPS plans to get started with your own instance today.