So far, Unit doesn’t support handling the REMOTE_USER headers directly, so authentication should be implemented via other means. For a full list of available authenticators, see here.

To run the MoinMoin wiki engine using Unit:

  1. Install Unit with a Python 2 language module.


    As of now, MoinMoin doesn’t fully support Python 3. Mind that Python 2 is officially deprecated.

  2. Install and configure MoinMoin’s prerequisites.

  3. Install MoinMoin’s core files. Here, we install it at /path/to/app/; use a real path in your configuration.

    For example:

    $ tar xzf moin-X.Y.Z.tar.gz --strip-components 1 -C /path/to/app/
  4. Configure your wiki instances:

    See the ‘Single Wiki’ section here for an explanation of these commands:

    $ cd /path/to/app/
    $ mkdir single/
    $ cp wiki/config/ single/
    $ cp -r wiki/data/ single/data/
    $ cp -r wiki/underlay/ single/underlay/
    $ cp wiki/server/moin.wsgi single/

    Next, edit the wiki instance configuration in as appropriate.

    See the ‘Multiple Wikis’ section here for an explanation of these commands:

    $ cd /path/to/app/
    $ mkdir multi/ multi/wiki1/ multi/wiki2/
    $ cp wiki/config/wikifarm/* multi/
    $ cp wiki/config/ multi/
    $ cp wiki/config/ multi/
    $ cp -r wiki/data/ multi/wiki1/data/
    $ cp -r wiki/data/ multi/wiki2/data/
    $ cp -r wiki/underlay/ multi/wiki1/underlay/
    $ cp -r wiki/underlay/ multi/wiki2/underlay/
    $ cp wiki/server/moin.wsgi multi/

    Next, edit the farm configuration in and the wiki instance configurations, shown here as and, as appropriate.

  5. Run the following command so Unit can access the application directory:

    # chown -R unit:unit /path/to/app/


    The unit:unit user-group pair is available only with official packages, Docker images, and some third-party repos. Otherwise, account names may differ; run the ps aux | grep unitd command to be sure.

    For further details, including permissions, see the security checklist.

  6. Next, prepare the MoinMoin configuration for Unit (use real values for path):

        "listeners": {
            "*:80": {
                "pass": "applications/moin"
        "applications": {
            "moin": {
                "type": "python 2",
                "path": [
                "module": "moin"
  7. Upload the updated configuration. Assuming the JSON above was added to config.json:

    # curl -X PUT --data-binary @config.json --unix-socket \
           /path/to/control.unit.sock http://localhost/config/


    The control socket path may vary; run unitd -h or see Startup and Shutdown for details.

    After a successful update, MoinMoin should be available on the listener’s IP address and port:

    Moin on Unit - Welcome Screen