General

Character Set

Moin uses Unicode internally, and utf-8 for external output and input, like pages, HTML output and translation files. The external character set is defined in config.charset to utf-8. This setting is fine for all languages, as any character can be encoded in UTF-8. You should not change this value, although technically it is possible.

Important: to use Unicode values, you must setup a correct coding line in the first line of your configuration file. Check that your editor is configured correctly.

Certain options must use Unicode values. For example, the site name could contain German umlauts or French accents or be in Chinese or Hebrew. Because of this, you must use unicode strings for those items. Unicode strings are defined by prefixing the letter u to the string. Here are some examples:

Read the comments in the configuration file - they tell you which options must use Unicode values.

Notes:

You can't mix different encodings in the same file. If your coding line says iso-8859-1, all your characters, the whole file content, must be in that encoding.

If you use utf-8 encoding (or plain ascii), you don't have to use unicode strings, moin will decode your string correctly for you.

International Setup

The default configuration file shipped with moin uses iso-8859-1 coding. This is fine for Latin languages like English or German, but not usable for non-latin languages. If you want to have non-latin characters in your configuration items, use utf-8 coding for the config file.

Set the first line of all configuration files to this line:

# -*- coding: utf-8 -*-

You need a text editor being capable of (and also really using) utf-8 encoding for editing the config files.

Values using unicode strings can be recognized by their default value being u"...." or ur"..." (the u means unicode) or when the description explicitly tells [unicode].

For ready made configuration in your language, see ConfigMarket. Read also the section about unicode options.

Customization of user preferences

Configuring a single wiki

If you run a single wiki, you should not copy the file farmconfig.py into your configuration directory (remove it and the .pyc file, if it is there). Without farmconfig, moin uses the default wikiconfig.py.

wikiconfig.py can be located anywhere, you just have make sure it can be imported by moin - it is a good idea to add the directory where it resides as first element to sys.path (this is the list of pathes python uses when searching for importable stuff). sys.path setup is done early, usually in the server adaptor script you use (e.g. moin.cgi or moin.wsgi) - see the comments in the script for details.

First, you must define the coding of the config file. The default setting is suited for Latin ("western") languages only, for international setup, read section #intsetup. If you don't define the coding, you can't use non-ascii characters.

Next we import moin's internal default configuration. The default configuration includes values for all options, so we don't have to define all values, just what we want to customize.

Then we define a new configuration class called "Config" and inherit all settings from the default configuration we imported. Note that the class name must be "Config".

Next lines are the configuration options for the Config class. Note that each line must be indented by 4 spaces, tabs are not allowed. Moin will not run if you use wrong indentation.

A common configuration item is sitename - in most cases you don't want your wiki to have the default u"Untitled Wiki" name. You can define any name you like in any language, but before you do that, read section #character-set.

If you followed the install instructions, the wiki will run without any other change, but you might want to change some values, like data_dir, data_underlay_diracl_rights_before and more. For most cases, setting all the values in the supplied wikiconfig.py file is enough.

Anything we do not define simply stays at moin's internal defaults which we inherited from DefaultConfig.

Configuration of multiple wikis

The moinmoin wiki engine is capable of handling multiple wikis using a single installation, a single set of configuration files and a single server process. Especially for persistent environments like Twisted, this is necessary, because the Twisted server will permanently run on a specific IP address and TCP port number. So for virtual hosting of multiple domains (wikis) on the same IP and port, we need the wiki engine to permanently load multiple configs at the same time and choose the right of them when handling a request for a specific URL.

To be able to choose the right config, moin uses config variable wikis located in the file farmconfig.py - it simply contains a list of pairs (wikiname, url-regex). Please only use valid python identifiers for wikiname (to be exact: identifier ::= (letter|"_") (letter | digit | "_")* - just try with a simple word if you didn't understand that grammar rule). When processing a request for some URL, moin searches through this list and tries to match the url-regex against the current URL. If it doesn't match, it simply proceeds to the next pair. If it does match, moin loads a configuration file named <wikiname>.py (usually from the same directory) that contains the configuration for that wiki.

farmconfig.py in the distribution archive has some sample entries for a wiki farm running multiple wikis. You need to adapt it to match your needs if you want to run multiple wikis.

For simpler writing of these help pages, we will call such a <wikiname>.py configuration file simply wikiconfig.py, of course you have to use the filename you chose.

Of course you have already adapted the wikis setting in farmconfig.py (see above), so we only give some hints how you can save some work. Please also read the single wiki configuration hints, because it explains config inheritance.

We now use the class-based configuration to be able to configure the common settings of your wikis at a single place: in the base configuration class (see farmconfig.py for an example):

first we import the default config, like we do when configuring a single wiki

now we define a new farm config class - and inherit from the default config

then we change everything that our farm wikis have in common, leaving out the settings that they need to be different

this FarmConfig class will now be used by the config files of the wikis instead of moin's internal DefaultConfig class, see below:

The configs of your individual wikis then only keep the settings that need to be different (like the logo, or the data directory or ACL settings). Everything else they get by inheriting from the base configuration class, see moinmaster.py for a sample.

see single wiki configuration, the only difference is that we inherit from FarmConfig (that inherited from DefaultConfig) instead of directly using DefaultConfig

now we override show_hosts to be False - we want it for most wikis in our farm, but not for this one

we also override sitename, interwikiname and data_dir (the usual stuff)

Overview of Configuration Options

The following table contains default values and a short description for most configuration variables. Most of these can be left at their defaults, those you need to change with every installation are listed in the sample wikiconfig.py that comes with the distribution.

You can also have a look at MoinMoin/config/multiconfig.py, class DefaultConfig for further information (that file has the builtin default configuration).

Access control lists

ACLs control who may do what, see HelpOnAccessControlLists.

Variable name

Default

Description

acl_hierarchic

False

True to use hierarchical ACLs

acl_rights_after

u''

ACL that is processed after the on-page/default ACL

acl_rights_before

u''

ACL that is processed before the on-page/default ACL

acl_rights_default

...

ACL used if no ACL is specified on the page

acl_rights_valid

...

Valid tokens for right sides of ACL entries.

Mapping of attachment extensions to actions

Variable name

Default

Description

extensions_mapping

...

file extension -> do -> action

Authentication / Authorization / Security settings

Variable name

Default

Description

DesktopEdition

False

if True, give all local users special powers - only use this for a local desktop wiki!

if True, enables XSLT processing via 4Suite (Note that this is DANGEROUS. It enables anyone who can edit the wiki to get read/write access to your filesystem as the moin process uid/gid and to insert arbitrary HTML into your wiki pages, which is why this setting defaults to False (XSLT disabled). Do not set it to other values, except if you know what you do and if you have very trusted editors only).

auth

[MoinAuth()]

list of auth objects, to be called in this order (see HelpOnAuthentication)

auth_methods_trusted

...

authentication methods for which users should be included in the special "Trusted" ACL group.

If True (default), import passlib and support password hashes offered by it.

password_checker

_default_password_checker

checks whether a password is acceptable (default check is length >= 6, at least 4 different chars, no keyboard sequence, not username used somehow (you can switch this off by using `None`)

password_scheme

'{PASSLIB}'

Either "{PASSLIB}" (default) to use passlib for creating and upgrading password hashes (see also passlib_crypt_context for passlib configuration), or "{SSHA}" (or any other of the builtin password schemes) to not use passlib (not recommended).

recovery_token_lifetime

12

how long the password recovery token is valid [h]

secrets

None

Either a long shared secret string used for multiple purposes or a dict {"purpose": "longsecretstring", ...} for setting up different shared secrets for different purposes. If you don't setup own secret(s), a secret string will be auto-generated from other config settings.

superuser

[]

List of trusted user names with wiki system administration super powers (not to be confused with ACL admin rights!). Used for e.g. software installation, language installation via SystemPagesSetup and more. See also HelpOnSuperUser.

Backup settings

These settings control how the backup action works and who is allowed to use it.

Variable name

Default

Description

backup_compression

'gz'

What compression to use for the backup ("gz" or "bz2").

backup_exclude

...

Function f(self, filename) that tells whether a file should be excluded from backup. By default, nothing is excluded.

backup_include

[]

List of pathes to backup.

backup_users

[]

List of trusted user names who are allowed to get a backup.

Datastruct settings

Variable name

Default

Description

dicts

...

function f(cfg, request) that returns a backend which is used to access dicts definitions.

groups

...

function f(cfg, request) that returns a backend which is used to access groups definitions.

Perform title matches highlighting by default in search results generated by macro.

search_macro_parse_args

False

Do search macro parameter parsing. In previous versions of MoinMoin, whole search macro parameter string had been interpreted as needle. Now, to provide ability to pass additional parameters, this behaviour should be changed.

Session settings

Session-related settings, see HelpOnSessions.

Variable name

Default

Description

cookie_domain

None

Domain used in the session cookie. (None = do not specify domain).

cookie_httponly

False

Use a httponly cookie that can only be used by the server, not by clientside scripts.

Name of a group of trusted users who do not get asked TextCha questions.

textchas_expiry_time

600

Time [s] for a TextCha to expire.

ua_spiders

...

A regex of HTTP_USER_AGENTs that should be excluded from logging and are not allowed to use actions.

unzip_attachments_count

101

max. number of files which are extracted from the zip file

unzip_attachments_space

200000000.0

max. total amount of bytes can be used to unzip files [bytes]

unzip_single_file_size

2000000.0

max. size of a single file in the archive which will be extracted [bytes]

Style / Theme / UI related

These settings control how the wiki user interface will look like.

Variable name

Default

Description

backlink_method

_default_backlink_method

function determining how the (last part of the) pagename should be rendered in the title area

changed_time_fmt

'%H:%M'

Time format used on RecentChanges for page edits within the last 24 hours

chart_options

None

If you have gdchart, use something like chart_options = {'width': 720, 'height': 540}

date_fmt

'%Y-%m-%d'

System date format, used mostly in RecentChanges

datetime_fmt

'%Y-%m-%d %H:%M:%S'

Default format for dates and times (when the user has no preferences or chose the "default" date format)

edit_bar

...

list of edit bar entries

history_count

(100, 200, 5, 10, 25, 50)

Number of revisions shown for info/history action (default_count_shown, max_count_shown, [other values shown as page size choices]). At least first two values (default and maximum) should be provided. If additional values are provided, user will be able to change number of items per page in the UI.

history_paging

True

Enable paging functionality for info action's history display.

html_pagetitle

None

Allows you to set a specific HTML page title (if None, it defaults to the value of sitename)

interwiki_preferred

[]

In dialogues, show those wikis at the top of the list.

interwikiname

None

unique and stable InterWiki name (prefix, moniker) of the site [Unicode], or None

logo_string

None

The wiki logo top of page, HTML is allowed (<img> is possible as well) [Unicode]

navi_bar

...

Most important page names. Users can add more names in their quick links in user preferences. To link to URL, use u"[[url|link title]]", to use a shortened name for long page name, use u"[[LongLongPageName|title]]". [list of Unicode strings]

packagepages_actions_excluded

...

list with excluded package actions (e.g. because they are dangerous / questionable)

page_credits

...

list with html fragments with logos or strings for crediting.

page_footer1

''

Custom HTML markup sent before the system footer.

page_footer2

''

Custom HTML markup sent after the system footer.

page_header1

''

Custom HTML markup sent before the system header / title area but after the body tag.

page_header2

''

Custom HTML markup sent after the system header / title area (and body tag).

page_iconbar

...

list of icons to show in iconbar, valid values are only those in page_icons_table. Available only in classic theme.

page_icons_table

...

dict of {'iconname': (url, title, icon-img-key), ...}. Available only in classic theme.

show_highlight_msg

False

Show message that page has highlighted text and provide link to non-highlighted version.

show_hosts

True

if True, show host names and IPs. Set to False to hide them.

show_interwiki

False

if True, let the theme display your interwiki name

show_names

True

if True, show user names in the revision history and on RecentChanges. Set to False to hide them.

show_rename_redirect

False

if True, offer creation of redirect pages when renaming wiki pages

show_section_numbers

False

show section numbers in headings by default

show_timings

False

show some timing values at bottom of a page

show_version

False

show moin's version at the bottom of a page

sistersites

[]

list of tuples ('WikiName', 'sisterpagelist_fetch_url')

sitename

u'Untitled Wiki'

Short description of your wiki site, displayed below the logo on each page, and used in RSS documents as the channel title [Unicode]

stylesheets

[]

List of tuples (media, csshref) to insert after theme css, before user css, see HelpOnThemes.

supplementation_page

False

if True, show a link to the supplementation page in the theme

supplementation_page_name

u'Discussion'

default name of the supplementation (sub)page [unicode]

supplementation_page_template

u'DiscussionTemplate'

default template used for creation of the supplementation page [unicode]

Use 'action' to enable action URL generation to be compatible with robots.txt. It will generate .../action/info/PageName?action=info then. Recommended for internet wikis.

url_prefix_fckeditor

None

used as the base URL for FCKeditor - similar to url_prefix_local, but just for FCKeditor.

url_prefix_local

None

used as the base URL for some Javascript - set this to a URL on same server as the wiki if your url_prefix_static points to a different server.

url_prefix_static

'/moin_static198'

used as the base URL for icons, css, etc. - includes the moin version number and changes on every release. This replaces the deprecated and sometimes confusing url_prefix = '/wiki' setting.

User Preferences related

Variable name

Default

Description

email_subscribed_events_default

...

external_creation_check

None

Name of external program to call for checking new account creation.

jabber_subscribed_events_default

[]

quicklinks_default

[]

List of preset quicklinks for a newly created user accounts. Existing accounts are not affected by this option whereas changes in navi_bar do always affect existing accounts. Preset quicklinks can be removed by the user in the user preferences menu, navi_bar settings not.

require_email_verification

False

Require verification of new user accounts.

subscribed_pages_default

[]

List of pagenames used for presetting page subscriptions for newly created user accounts.

True to enable the fast, indexed search (based on the Xapian search library)

xapian_stemming

False

True to enable Xapian word stemmer usage for indexing / searching.

Some values can only be set from MoinMoin/config/__init__.py (part of the moin code and thus GLOBALLY changing behaviour of all your wikis), but not from the individual wiki's config - you should only touch them if you know what you are doing:

charset

'utf-8'

the encoding / character set used by the wiki Do not change config.charset. It is not tested and we can't support this.