Installing the code

There are a lot of ways to do this and as this is not moin specific, we won’t go into details:

  • Use your operating system’s / distribution’s package manager to install the moin2 package. This is the recommended method as it will install moin2 and all other software it requires. Also your OS / dist might have a mechanism for updating the installed software with security fixes or to future releases.

    E.g. on Debian/Ubuntu Linux: apt install moin2

  • Install from PyPI: pip install moin2

    • Optionally, create a virtual env first for better separation or
    • use pip install --user moin2 to install into your home directory.
    • pip will automatically install other python packages moin2 requires, but you maybe have to install required non-python packages yourself.
    • You will have to care for updates / installing security fixes yourself.

After this, you should have a moin command available, try it:

moin help

Creating a wiki instance

You’ll need one instance directory per wiki site you want to run using moin - this is where wiki data, indexes and configuration for that site are stored.

Let’s create a new instance:

moin create-instance INSTANCE-DIRECTORY  # TODO: implement this!

Change into the new instance directory:


You’ll find a there to edit. Adapt it as you like, you’ll find some comments in there.

After configuring, you need to initialize the storage and the index:

moin index-create -s -i

If you don’t want to start with an empty wiki, but rather play with some sample content we provide, load it into your wiki:

moin load-sample-content
# TODO: implement this using code like in:
# moin load --file contrib/sample/unicode.moin
# moin index-build

Run your wiki instance

Now try your new wiki using the builtin python-based web server:

moin moin  # visit the URL it shows in the log output

For production, please use a real web server like apache or nginx.

Installation (for developers)

Clone the git repository

If you like to work on the moin2 code, clone the project repository:

git clone

If you use github, you can also first fork that project repo to your own user’s github repositories and then clone your forked repo to your local development machine. You can easily publish own changes and do pull requests that way.


Before you can run moin, you need to install it:

Using your standard user account, run the following command from the project root directory. Replace <python> in the command below with the path to a python 3.5+ executable. This is usually just “python”, but may be “python3”, “python3.5”, “/opt/pypy/bin/pypy” or even <some-other-path-to-python>:



<python> <path-to-venv>

The above will download all dependent packages to the PIP cache, install the packages in a virtual environment, and compile the translations (*.po files) to binary *.mo files. This process may take several minutes.

The default virtual environment directory name is:

  • ../<PROJECT>-venv-<PYTHON>/

where <PROJECT> is the name of the project root directory, and <PYTHON> is the name of your python interpreter. As noted above, the default name may be overridden.

Check the output of to determine whether there were fatal errors. The output messages will normally state that stdout and stderr messages were written to a file, a few key success/failure messages will be extracted and written to the terminal window, and finally a message to type “m” to display a menu.

If there are failure messages, see the troubleshooting section below.

Typing “./m” (or “m” on Windows) will display a menu similar to:

usage: "./m <target>" where <target> is:

quickinstall    update virtual environment with required packages
extras          install packages required for docs and moin development
docs            create moin html documentation (requires extras)
interwiki       refresh contrib/interwiki/intermap.txt (version control)
log <target>    view detailed log generated by <target>, omit to see list

new-wiki        create empty wiki
sample          create wiki and load sample data
restore *       create wiki and restore wiki/backup.moin *option, specify file
import19 <dir>  import a moin 1.9 wiki/data instance from <dir>

run *           run built-in wiki server *options (--port 8081)
backup *        roll 3 prior backups and create new backup *option, specify file
dump-html *     create a static HTML image of wiki *options, see docs
index           delete and rebuild indexes

css             run lessc to update basic theme CSS files
tests *         run tests, log output (-v -k my_test)
coding-std      correct scripts that taint the repository with trailing spaces..

del-all         same as running the 4 del-* commands below
del-orig        delete all files matching *.orig
del-pyc         delete all files matching *.pyc
del-rej         delete all files matching *.rej
del-wiki        create a backup, then delete all wiki data

While most of the above menu choices may be executed now, new users should do:

m sample   # in Windows
./m sample # in Unix

to create a wiki instance and load it with sample data. Next, run the built-in wiki server:

m run      # in Windows
./m run    # in Unix

As the server starts, about 20 log messages will be output to the terminal window. Point your browser to, the sample Home page will appear and more log messages will be output to the terminal window. Do a quick test by accessing some of the demo items and do a modify and save. If all goes well, your installation is complete. The built-in wiki server may be stopped by typing ctrl-C in the terminal window.

Next Steps

If you plan on contributing to the moin2 project, there are more instructions waiting for you under the Development topic.

If you plan on using this wiki as a production wiki, then before you begin adding or importing data and registering users review the configuration options. See the sections on configuration for details. Be sure to edit (or and change the settings for:

  • interwikiname
  • secrets

If you plan on just using moin2 as a desktop wiki (and maybe help by reporting bugs), then some logical menu choices are:

  • ./m extras - to install packages required for docs and moin development
  • ./m docs - to create docs, see User tab, Documentation (local)
  • ./m del-wiki - get rid of the sample data
  • ./m new-wiki or m import19 … - no data or moin 1.9 data
  • ./m backup - backup wiki data as needed or as scheduled

Warning: Backing up data at this point may provide a false sense of security because no migration tool has been developed to migrate data between moin2 versions. In its current alpha state, there may be code changes that impact the structure of the wiki data or indexes. Should this occur, first try rebuilding the indexes with the ./m index command. If that fails, you must start over with an empty wiki and copy and paste the contents of all the old wiki items into the new wiki. While no such changes are planned, they have happened in the past and may happen in the future.

If you installed moin2 by cloning the repository, then you will likely want to keep your master branch uptodate:

git checkout master ; git pull mm master

After pulling updates, it is best to also rerun the quickinstall process to install any changes or new releases to the dependant packages:

m quickinstall  # in Windows
./m run         # in Unix


PyPi down

Now and then, PyPi might be down or unreachable.

There are mirrors,, you can use in such cases. You just need to tell pip to do so:

# put this into ~/.pip/pip.conf
index-url =

Bad Network Connection

If you have a poor or limited network connection, you may run into trouble with the commands issued by the script. You may see tracebacks from pip, timeout errors, etc. within the output of the quickinstall script.

If this is the case, you may try rerunning the “python” script multiple times. With each subsequent run, packages that are all ready cached (view the contents of pip-download-cache) will not be downloaded again. Hopefully, any temporary download errors will cease with multiple tries.

Other Issues

If you encounter some other issue not described above, try researching the unresolved issues in our issue tracker.

If you find a similar issue, please add a note saying you also have the problem and add any new information that may assist in the problem resolution.

If you cannot find a similar issue please create a new issue. Or, if you are not sure what to do, join us on IRC at #moin-dev and describe the problem you have encountered.