Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

You can run DokuWiki on an Ubuntu VPS with Nginx and PHP-FPM without MySQL or PostgreSQL. DokuWiki stores wiki pages, media, search indexes, revisions, and configuration in files, so the deployment consists of a web server, PHP runtime, a writable DokuWiki directory, and sensible backups.

The reliable sequence is: prepare DNS and Ubuntu, install Nginx and the PHP extensions required by your DokuWiki release, unpack the stable archive, set least-privilege ownership, configure Nginx and PHP-FPM, complete install.php, enable ACLs, obtain a TLS certificate, then block the installer and verify that private directories cannot be downloaded.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the finished deployment looks like

A browser requests your wiki hostname. Nginx serves CSS, JavaScript, images, and other static files directly. Requests that need PHP are passed to PHP-FPM through its Unix socket. DokuWiki reads and writes ordinary files below its installation directory; no database server is required for a basic installation.

  • DNS: a hostname such as wiki.example.com points to the VPS address.
  • Nginx: terminates HTTP or HTTPS, serves static files, applies access rules, and forwards approved PHP requests.
  • PHP-FPM: runs DokuWiki under a service account such as www-data.
  • DokuWiki: resides at a web root such as /var/www/dokuwiki.
  • Storage: the complete DokuWiki directory, especially data/, conf/, and uploaded media, is included in off-server backups.

There is no authoritative capacity figure that applies to every wiki. Choose VPS CPU, memory, and disk capacity according to page count, media volume, concurrent editors, search activity, and backup retention, then monitor the real workload.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Prerequisites and decisions

Hostname and network access

Create an A or AAAA record for the wiki hostname and wait for it to resolve to the VPS. Keep SSH access available from your administration network. The public service normally needs TCP ports 80 and 443; do not expose PHP-FPM’s Unix socket or any database port because this deployment does not use one.

Ubuntu and package versions

Package names and PHP-version requirements change as Ubuntu and DokuWiki releases change. Before installing, check the requirements for the specific current DokuWiki release and select the PHP-FPM package and extensions it supports. The commands below use Ubuntu package names that are commonly available; if your release uses versioned packages, install the matching versions instead.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Administrative access

Use an account with sudo privileges. Confirm that your VPS provider’s firewall and Ubuntu’s firewall allow SSH before enabling firewall rules, so you do not lock yourself out.

1. Update Ubuntu, install Nginx and PHP-FPM

  1. Update the operating system:

    sudo apt update
    sudo apt full-upgrade
  2. Install Nginx, PHP-FPM, the command-line PHP interpreter, and extensions required by the current DokuWiki requirements. This broad set covers common releases; remove or add modules according to the release documentation:

    sudo apt install nginx php-fpm php-cli php-xml php-gd php-curl php-zip php-mbstring tar gzip ca-certificates
  3. Find the PHP-FPM service and socket actually installed on your VPS:

    systemctl list-units --type=service 'php*-fpm.service'
    ls -l /run/php/php*-fpm.sock

    Record the socket path, for example /run/php/php8.3-fpm.sock. The version in that path is an example, not a requirement; use the path present on your system.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  4. Enable the services:

    sudo systemctl enable --now nginx
    sudo systemctl enable --now php8.3-fpm

    Replace php8.3-fpm with the service name returned by the previous command.

  5. If Ubuntu’s uncomplicated firewall is enabled, allow SSH and web traffic:

    Rank #2
    EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
    • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
    • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
    • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
    • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
    • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
    sudo ufw allow OpenSSH
    sudo ufw allow 'Nginx Full'
    sudo ufw enable
    sudo ufw status verbose

2. Download and unpack DokuWiki

Obtain the stable DokuWiki tarball from the project’s official download channel. Save it locally as /tmp/dokuwiki-stable.tgz in the following example, or adjust the archive path to the filename you downloaded.

  1. Create an empty document root:

    sudo install -d -m 0750 /var/www/dokuwiki
  2. Extract the archive without creating an extra nested directory:

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    sudo tar -xzf /tmp/dokuwiki-stable.tgz --strip-components=1 -C /var/www/dokuwiki
  3. Check that the expected files exist:

    sudo test -f /var/www/dokuwiki/doku.php
    sudo test -d /var/www/dokuwiki/data
  4. Remove the archive after verifying the extraction:

    sudo rm /tmp/dokuwiki-stable.tgz

Do not unpack the application into a directory that contains unrelated sites. Keeping a dedicated document root makes permissions, backups, and later restores easier to reason about.

3. Set ownership and writable directories

The PHP-FPM account must be able to create and modify wiki data. The installer also needs to write configuration. Avoid making the entire VPS or unrelated directories writable.

Recommended baseline

The following approach keeps the root account as owner and grants the web/PHP group access:

sudo chown -R root:www-data /var/www/dokuwiki
sudo find /var/www/dokuwiki -type d -exec chmod 0750 {} +
sudo find /var/www/dokuwiki -type f -exec chmod 0640 {} +
sudo chmod -R g+rwX /var/www/dokuwiki/data /var/www/dokuwiki/conf

Confirm the service account before applying this: some custom PHP-FPM pools run as a dedicated user rather than www-data. Replace the group with the account or group configured by your pool.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Directories that need writes

  • data/ stores pages, media, indexes, revisions, cache, and related runtime state.
  • conf/ receives the installer-generated configuration and later local settings.
  • lib/plugins/ and lib/tpl/ need write access only if you install or update extensions and templates through a web-based manager. If you update them from the shell, keep them non-writable by PHP.

After installation, inspect permissions with namei -l /var/www/dokuwiki/data. A successful page edit and media upload are better tests than simply seeing a green installer screen.

4. Create the Nginx server block

Create /etc/nginx/sites-available/dokuwiki. The example below uses wiki.example.com; substitute the hostname in your DNS record. Replace the PHP-FPM socket with the path found earlier.

Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
server {
    listen 80;
    listen [::]:80;
    server_name wiki.example.com;

    root /var/www/dokuwiki;
    index doku.php;

    # Keep this available if an ACME client uses HTTP validation.
    location ^~ /.well-known/acme-challenge/ {
        allow all;
    }

    # Never expose DokuWiki's private and executable support directories.
    location ~ ^/(?:data|conf|bin|inc)(?:/|$) {
        deny all;
        return 404;
    }

    # Deny hidden files, except the ACME location above.
    location ~ /.(?!well-known) {
        deny all;
        return 404;
    }

    # Friendly URLs and ordinary static files.
    location / {
        try_files $uri $uri/ /doku.php?$args;
    }

    # Execute only files that physically exist; do not pass arbitrary paths to PHP.
    location ~ .php$ {
        try_files $uri =404;
        include snippets/fastcgi-php.conf;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
    }
}

The try_files fallback sends unknown paths to DokuWiki’s front controller. The PHP block’s existence check prevents Nginx from handing invented filenames to PHP-FPM. DokuWiki’s own Nginx guidance may use additional rewrite rules for media and detail URLs; use those rules if your chosen URL mode requires them.

Enable the site and validate the configuration:

sudo ln -s /etc/nginx/sites-available/dokuwiki /etc/nginx/sites-enabled/dokuwiki
sudo rm -f /etc/nginx/sites-enabled/default
sudo nginx -t
sudo systemctl reload nginx

If nginx -t reports a duplicate server name, remove or edit the other enabled site that claims the same hostname.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

5. Obtain a certificate and enforce HTTPS

Use an ACME-compatible certificate client supported by your distribution or hosting workflow. Complete HTTP validation while port 80 is reachable, then configure Nginx with the certificate and private-key paths issued for your hostname.

Use two server blocks after the certificate is available:

  • The port-80 block should redirect every ordinary request to the equivalent HTTPS URL, while retaining the ACME challenge exception if your renewal method needs it.
  • The port-443 block should contain the DokuWiki root, PHP handler, private-directory rules, and certificate directives.

A typical redirect is:

return 301 https://$host$request_uri;

Only add a long-lived HSTS header after HTTPS is working reliably for every page and subdomain you intend to serve. A suitable HTTPS server should also send headers such as X-Content-Type-Options: nosniff and a restrictive referrer policy. Test renewal before relying on it for production access.

6. Run DokuWiki’s browser installer

  1. Visit https://wiki.example.com/install.php.
  2. Choose the wiki name and default license.
  3. Create the first administrator account with a unique, long password.
  4. Enable ACLs. ACL setup provides administrator login and the administration menu for users, permissions, plugins, and configuration.
  5. Submit the form and confirm that the installer can write its configuration under conf/.

If the installer reports that directories are not writable, fix the PHP-FPM account or group permissions rather than granting world write access. Check the Nginx error log and PHP-FPM journal for the exact path that failed.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

7. Configure ACLs and URL behavior

Design permissions before opening the wiki

Define access by namespace or page rather than granting every authenticated user administrator rights. A common policy is:

  • Anonymous visitors: read-only access, or no access for an internal wiki.
  • Registered users: read and edit rights only in namespaces they maintain.
  • Administrators: full access, user management, plugin management, and configuration rights.

Test each policy with separate anonymous, ordinary-user, and administrator sessions. Browser sessions can retain old permissions, so log out or use a private window when validating changes.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Enable friendly URLs carefully

DokuWiki’s userewrite and useslash settings change how page paths are generated. Enable them only after confirming that your Nginx fallback and any required DokuWiki rewrite rules are present. Change one setting at a time, clear relevant caches, then test a normal page, a namespace page, a media thumbnail, and a missing URL.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

8. Remove the installation exposure

Once the installer succeeds, prevent it from being run again:

  1. Block it in Nginx with an exact location:
location = /install.php {
    deny all;
    return 404;
}
  1. Reload Nginx and verify that https://wiki.example.com/install.php returns 404.
  2. Confirm that requests for /conf/, /data/, /bin/, and /inc/ also return 404 or 403 and never display file contents.

Do not rely on obscurity. Even if a directory listing is disabled, explicitly deny these paths and keep private files outside any separately exposed download location.

9. Verify the deployment before inviting users

  • Configuration: sudo nginx -t passes and both Nginx and PHP-FPM are active.
  • HTTPS: HTTP redirects to HTTPS, the certificate matches the hostname, and renewal is scheduled.
  • Authentication: the administrator can sign in and reach the admin menu.
  • Content: create, edit, rename, and delete a test page.
  • Media: upload an image, view it, and verify that the resulting file is stored under data/.
  • ACLs: test anonymous, registered, and administrator behavior independently.
  • Isolation: direct requests to private directories and unsupported PHP paths do not expose files.
  • Logs: review /var/log/nginx/error.log, the access log, and the PHP-FPM journal after these tests.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Backups, updates, and recovery

Back up the file-based state

Because DokuWiki is file-based, a database dump is not a substitute for a filesystem backup. Back up the complete DokuWiki directory and preserve at least data/, conf/, uploaded media, and any locally managed plugins or templates. Keep copies off the VPS and protect them as sensitive data because configuration and wiki content may contain private information.

A simple compressed archive, created while writes are quiet, is a starting point:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo tar -czf /var/backups/dokuwiki-$(date +%F).tgz -C /var/www dokuwiki

Copy the archive to separate storage, apply retention, and periodically restore it into a non-public test directory. A backup is not proven until a restore can reproduce pages, media, configuration, and administrator access.

Update deliberately

Keep Ubuntu packages, DokuWiki core, and extensions current. Upstream maintainers recommend the latest DokuWiki release for security updates; distribution packages may backport fixes on a different schedule. Read the release notes, take a fresh backup, update during a maintenance window, and test login, editing, media, ACLs, and URL rewriting afterward.

Do not leave conf/ or extension directories permanently writable by PHP merely to simplify updates. Grant temporary write access for a controlled update, or perform the update from the shell, then restore the least-privilege mode.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Native Nginx versus a container deployment

A native installation gives direct control over Nginx, PHP-FPM, filesystem permissions, and system logs. A container can package the application and PHP runtime, but it still needs persistent storage and a reverse proxy for TLS and authentication.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Decision area Native Nginx/PHP-FPM Containerized DokuWiki
Updates You manage Ubuntu, PHP-FPM, Nginx, DokuWiki, and extensions separately. You replace images and manage host runtime updates; extension data remains in persistent storage.
Storage Back up the DokuWiki directory directly. Back up the persistent storage volume, including the application’s writable storage path.
TLS Nginx can terminate HTTPS on the host. A reverse proxy normally handles SSL termination and authentication.
Permissions Unix ownership and PHP-FPM pool settings are visible on the host. Container user IDs and host-volume ownership must match.
Observability Use systemd, Nginx logs, and PHP-FPM logs. Combine container logs with reverse-proxy and host logs.
Recovery Restore files and package configuration on a prepared VPS. Start the known image with the restored persistent volume and proxy configuration.

For a single Ubuntu VPS where you want transparent operating-system administration, native Nginx/PHP-FPM is usually the easier arrangement. Choose a container when image-based deployment, isolation, or an existing reverse-proxy platform outweighs the extra volume and user-ID coordination.

Troubleshooting common failures

502 Bad Gateway

Nginx cannot reach PHP-FPM. Check that the service is running, compare fastcgi_pass with the actual socket under /run/php/, and verify that the socket ownership permits Nginx to connect:

systemctl status php8.3-fpm
ls -l /run/php/
sudo tail -n 50 /var/log/nginx/error.log

403 or 404 for every page

Confirm the root path, hostname, and enabled site. A broad deny rule may be matching the request before the normal location. Run nginx -T to inspect the complete active configuration and check that doku.php exists at the document root.

Installer says files are not writable

Check the PHP-FPM pool’s user and group, then inspect each parent directory with namei -l. Grant group write access only to data/ and the configuration path needed by the installer. Do not solve this with chmod -R 777.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Pages work but media or friendly URLs fail

Verify the DokuWiki URL settings and Nginx fallback rules together. Test the media fetch and detail endpoints, inspect access-log status codes, and temporarily return to the default URL mode until the rewrite behavior is correct.

Users can download private files

Check the deny locations for data, conf, bin, and inc, including requests with a trailing slash or additional path component. Reload Nginx after changes and test with a client that is not authenticated.

Updates break the site

Restore the pre-update archive to a separate test root first, review extension compatibility, and compare Nginx, PHP, and DokuWiki logs. Keep the previous application directory until the new release has passed the verification checklist.

Final security checklist

  • DNS points only to the intended VPS.
  • SSH is restricted to your administration method and remains usable after firewall changes.
  • Only ports 80 and 443 are publicly required for the wiki.
  • HTTPS is enforced with a valid, renewable certificate.
  • install.php is blocked after setup.
  • conf/, data/, bin/, and inc/ are denied by Nginx.
  • PHP-FPM runs as a deliberate service account with only the writes DokuWiki needs.
  • ACLs reflect anonymous, registered-user, and administrator roles.
  • Core, plugins, and templates are updated from trusted release sources.
  • Off-server backups are encrypted or otherwise protected and have been restored successfully in a test.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.