New wiki

We already have MoinMoin installed on our system. All you need to do is run a script, add some DomTool configuration, and edit your file.

Making a new MoinMoin instance

All you have to do is figure out which directory you want to use to store the wiki (we refer to it as $INSTANCE below), and then run:

moinmoin-install $INSTANCE

For the curious, the moinmoin-install script may be viewed here (FIXME: broken link).

Adding to your Domtool configuration

The easiest thing is to set up a dedicated web site for serving a MoinMoin wiki, like so:

moinMoin "mymoin" where
  Script = home "$INSTANCE/moin.cgi"

When this is done within $YOURDOMAIN, you get a new web virtual host mymoin.$YOURDOMAIN which expects your moin.cgi script to be in the base of your home directory. Change the Script parameter to alter this expectation. The static moin files are served out of http://mymoin.$YOURDOMAIN/moin$VERSION/..., and the wiki pages themselves are accessed at URLs like http://mymoin.$YOURDOMAIN/PageName.

You can also add a MoinMoin wiki within a larger virtual host. For example:

web "other" where
  alias "/something" "/something_else";

  addMoinMoin where
    Htdocs = "/wikidata";
    Script = home "$INSTANCE/moin.cgi";
    Prefix = "/mywiki"

Here, we add a wiki to a vhost other.$YOURDOMAIN that also has some other config. We ask to serve the static files with the URL prefix wikidata instead of moin$VERSION, we say that moin.cgi file is found in the other subdirectory of our home directory, and we ask to serve wiki pages at http://other.$YOURDOMAIN/mywiki/PageName. If you want to use the default HtDocs (recommended), set it to moin_default_htdocs which will use the appropriate versioned static files path for the current MoinMoin release.


As the final step, you will want to edit, which resides in your $INSTANCE folder. You must at least set sitename, and will want to configure the superuser and acl_rights_before settings to be able to administer your wiki.

Your new wiki's local HelpOnConfiguration page or HelpOnConfiguration should explain the rest.

If you customized the HtDocs location, you must edit the url_prefix_static. This is almost always a bad idea, however, since the default will result in the best cache policy and avoid problems with loading incorrect static files when we upgrade the shared files.

At this point, check out the rest of that file to set, for example, your site name. When done, tell domtool to update your configuration, and point a browser at your new wiki installation.

Setting the Default Access Control List

See HelpOnAccessControlLists for detailed instructions on setting access control lists.

As of MoinMoin 1.9.10, the default ACL only allows Trusted users to edit pages (acl_rights_default = u"Trusted:read,write,delete,revert Known:read All:read"). Earlier versions allowed users with accounts (Known) and without accounts (All) to edit by default, but would show a TextCHA (if enabled) to Known/All members.

If you'd like all users with accounts to edit, and anyone without an account to be able to read pages you can override the default acl: acl_rights_default = u"Trusted:read,write,delete,revert Known:read,write,revert All:read". If you decide to allow users without accounts to edit pages, it is recommended to only grant All:read,write and not grant anonymous users delete or revert permissions (delete in particular can do irreversible damage). Only allowing trusted users to delete pages is recommended, especially if you allow open account registration.

Allowing Account Creation

Starting with MoinMoin 1.9.10, the newaccount action is disabled by default, and users will need to manually request accounts to be created by a wiki superuser. It is recommended to leave newaccount disabled, and document how to request an account on your WelcomePage. Users will need to provide you with their requested WikiName and email address. A superuser then creates the account by using Settings -> Switch User, and entering the new username and email address. The user that requested the account can then claim the account by using the recoverpass action and setting a password.

If your wiki is for internal use only, or if you will be enabling a TextCHA for newaccount on a public wiki, you can enable public account creation by overriding actions_superuser in your configuration. For a wiki using multiconfig (default at HCoop):

    actions_superuser = multiconfig.DefaultConfig.actions_superuser[:]

If you have set up a wiki farm, the configuration suggested by MoinMoin will work:

   actions_superuser = FarmConfig.actions_superuser[:]

If you allow the newaccount action, you must set a TextCHA on the action, or spammers will inundate your wiki with fake accounts.


If you override the defaults and allow new account creation on your wiki, you must enable TextCHAs on your login form or your wiki will eventually grind to a halt

Unfortunately, spammers have figured out how to register MoinMoin accounts, and, even if you only allow editing by a trusted group, will register hundreds of accounts per month on your wiki after they've found it. Over time, you will notice the wiki slowing down since moin stores account information in individual files (finding a file in a UNIX directory becomes linearly more expensive as the number of files increases).

See HelpOnSpam for details on configuring TextCHA. Enabling TextCHAs will automatically place one onto the user registration form; if you choose a reasonable question/answer this will prevent shotgun spammers from silently slowing down your wiki.