Dokuwiki: Difference between revisions

From NixOS Wiki
imported>Onny
Add simple setup and configuration for Dokuwiki web app
 
imported>Onny
mNo edit summary
Line 1: Line 1:
[https://www.dokuwiki.org 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.
[https://www.dokuwiki.org 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 ==
== Installation ==


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


{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
Line 14: Line 14:
</nowiki>}}
</nowiki>}}


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


== Configuration ==
== Configuration ==
Line 35: Line 35:
=== SSL behind reverse proxy ===
=== 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
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


{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{{file|/etc/nixos/configuration.nix|nix|<nowiki>

Revision as of 13:50, 2 August 2022

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

/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

/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

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