Dokuwiki

From NixOS Wiki
Revision as of 16:44, 1 August 2022 by Onny (talk | contribs) (Add simple setup and configuration for Dokuwiki web app)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Dokuwiki is a web application and simple Wiki software for creating documentation and editable pages in markdown language. Compared to other Wikis, it is more minimal and only depends on PHP and file access without any need for databases.

Installation

To setup Dokuwiki locally, this is the most minimal configuration to get started

Breeze-text-x-plain.png
/etc/nixos/configuration.nix
services.dokuwiki.sites."localhost" = {
  enable = true;
  extraConfig = ''
    $conf['title'] = 'My Wiki';
  '';
};


After that Dokuwiki will be available at http://localhost .

Configuration

Users and permissions

To disable the user permissions completely and make the Wiki editable by anyone (even anonymous users), you can use following configuration

Breeze-text-x-plain.png
/etc/nixos/configuration.nix
services.dokuwiki.sites."localhost" = {
  aclUse = false;
  extraConfig = ''
    $conf['userewrite'] = 1;
  '';
};


Tips and tricks

SSL behind reverse proxy

In case you're running Dokuwiki behind a reverse proxy which offers ssl/https to the outside, you might have to enforce https protocol by changing the baseurl

Breeze-text-x-plain.png
/etc/nixos/configuration.nix
services.dokuwiki.sites."localhost".extraConfig = ''
  $conf['baseurl'] = 'https://wiki.project-insanity.org';
'';
};