HelpOnConfigurationConfiguration This page should help you with configuring an already installed MoinMoin wiki. Character SetMoin 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 SetupThe 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: /!\ 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 preferencesYou can predefine, disable or remove several options in the user preferences, see HelpOnConfiguration/UserPreferences. Configuring a single wikiIf 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. General notes on wiki/farmconfig.py structure: 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 wikisThe 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): farmconfig.py: Explanation: 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. moinmaster.py: Explanation: 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 OptionsThe 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. (!) Lengthy default values in the tables below are shown as "...". Move your mouse pointer over the dots to display the default value in a tooltip. 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 listsACLs control who may do what, see HelpOnAccessControlLists.Variable nameDefaultDescriptionFalseacl_hierarchicu''acl_rights_afteru''acl_rights_before...acl_rights_default...acl_rights_validMapping of attachment extensions to actionsVariable nameDefaultDescription...extensions_mappingAuthentication / Authorization / Security settingsVariable nameDefaultDescriptionFalseDesktopEditionNoneSecurityPolicy...actions_excludedFalseallow_xsltauth...auth_methods_trusted{'schemes': ['sha512_crypt']}passlib_crypt_contextTruepasslib_supportpassword_checker'{PASSLIB}'password_scheme12recovery_token_lifetimeNonesecrets[]superuserBackup settingsThese settings control how the backup action works and who is allowed to use it.Variable nameDefaultDescription'gz'backup_compression...backup_exclude[]backup_include[]backup_usersDatastruct settingsVariable nameDefaultDescription...dicts...groupsEditor relatedVariable nameDefaultDescriptionFalsecomment_required'warn 10'edit_locking20edit_rowsTrueedit_ticketing'text'editor_defaultFalseeditor_force'freechoice'editor_uiFalsepage_license_enabledu'WikiLicense'page_license_pageMail settingsThese settings control outgoing and incoming email from and to the wiki.Variable nameDefaultDescriptionNonemail_fromu'%s'mail_import_pagename_envelope'\\[\\[([^\\]]*)\\]\\]'mail_import_pagename_regex['subject', 'to']mail_import_pagename_searchu'$from-$date-$subject'mail_import_subpage_template[]mail_import_wiki_addrsNonemail_login...mail_notify_att_added_intro...mail_notify_att_added_subject...mail_notify_att_removed_intro...mail_notify_att_removed_subject...mail_notify_page_changed_intro...mail_notify_page_changed_subject...mail_notify_page_deleted_intro...mail_notify_page_deleted_subject...mail_notify_page_renamed_intro...mail_notify_page_renamed_subject...mail_notify_page_text...mail_notify_user_created_intro...mail_notify_user_created_subjectNonemail_sendmailNonemail_smarthostOpenID ServerThese settings control the built-in OpenID Identity Provider (server).Variable nameDefaultDescriptionFalseopenid_server_enable_userFalseopenid_server_enabledNoneopenid_server_restricted_users_groupOpenID Relying PartyThese settings control the built-in OpenID Relying Party (client).Variable nameDefaultDescription[]openidrp_allowed_opSpecial page namesVariable nameDefaultDescription...page_category_regexu'(?P<all>(?P<key>\\S+)Dict)'page_dict_regexu'LanguageSetup'page_front_pageu'(?P<all>(?P<key>\\S+)Group)'page_group_regexu'LocalSpellingWords'page_local_spelling_words...page_template_regexPathsVariable nameDefaultDescriptionNonecache_dir'./data/'data_dir'./underlay/'data_underlay_dir...docbook_html_dirNoneplugin_dir[]plugin_dirsNonesession_dirNoneshared_intermapNoneuser_dirRSS settingsThese settings control RSS behaviour.Variable nameDefaultDescription0rss_ddiffs0rss_diffs15rss_items_default100rss_items_limit20rss_lines_default100rss_lines_limit''rss_page_filter_pattern0rss_show_attachment_entriesTruerss_show_page_history_link0rss_uniqueSearch macro settingsSettings related to behaviour of search macros (such as FullSearch, FullSearchCached, PageList)Variable nameDefaultDescription1search_macro_highlight_pages1search_macro_highlight_titlesFalsesearch_macro_parse_argsSession settingsSession-related settings, see HelpOnSessions.Variable nameDefaultDescriptionNonecookie_domainFalsecookie_httponly(0, 12)cookie_lifetimeNonecookie_nameNonecookie_pathNonecookie_securesession_serviceAnti-Spam/Leech/DOSThese settings help limiting ressource usage and avoiding abuse.Variable nameDefaultDescription...antispam_master_url[]hosts_deny...surge_action_limits3600surge_lockout_timeNonetextchasNonetextchas_disabled_group600textchas_expiry_time...ua_spiders101unzip_attachments_count200000000.0unzip_attachments_space2000000.0unzip_single_file_sizeStyle / Theme / UI relatedThese settings control how the wiki user interface will look like.Variable nameDefaultDescriptionbacklink_method'%H:%M'changed_time_fmtNonechart_options'%Y-%m-%d'date_fmt'%Y-%m-%d %H:%M:%S'datetime_fmt...edit_bar(100, 200, 5, 10, 25, 50)history_countTruehistory_pagingNonehtml_pagetitle[]interwiki_preferredNoneinterwikinameNonelogo_string...navi_bar...packagepages_actions_excluded...page_credits''page_footer1''page_footer2''page_header1''page_header2...page_iconbar...page_icons_tableFalseshow_highlight_msgTrueshow_hostsFalseshow_interwikiTrueshow_namesFalseshow_rename_redirectFalseshow_section_numbersFalseshow_timingsFalseshow_version[]sistersitesu'Untitled Wiki'sitename[]stylesheetsFalsesupplementation_pageu'Discussion'supplementation_page_nameu'DiscussionTemplate'supplementation_page_template'modernized'theme_defaultFalsetheme_force5trail_sizeURLsVariable nameDefaultDescriptionNonenotification_bot_uri{}url_mappingsNoneurl_prefix_actionNoneurl_prefix_fckeditorNoneurl_prefix_local'/moin_static198'url_prefix_staticUser Preferences relatedVariable nameDefaultDescription...email_subscribed_events_defaultNoneexternal_creation_check[]jabber_subscribed_events_default[]quicklinks_defaultFalserequire_email_verification[]subscribed_pages_default0.0tz_offset[]userprefs_disabledUsers / User settingsVariable nameDefaultDescription...user_checkbox_defaults[]user_checkbox_disable...user_checkbox_fields[]user_checkbox_removeTrueuser_email_unique...user_form_defaults[]user_form_disable...user_form_fields[]user_form_removeu'Self'user_homewikiTrueuser_jid_unique...user_transient_fieldsVariousVariable nameDefaultDescriptionTruebang_meta['text_html']caching_formatsFalseconfig_check_enabled'wiki'default_markup''html_head...html_head_index...html_head_normal...html_head_posts...html_head_queries'en'language_defaultFalselanguage_ignore_browser1log_events_formatTruelog_remote_addrTruelog_reverse_dns_lookupsFalselog_timing...mimetypes_embed...mimetypes_xss_protectNonerefresh60rss_cache25search_results_per_page'default'siteidXapian searchConfiguration of the Xapian based indexed search, see HelpOnXapian.Variable nameDefaultDescriptionNonexapian_index_dirFalsexapian_index_historyFalsexapian_searchFalsexapian_stemmingSome 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. lowerletters ucs-2 lowercase letters Lowercase letters, used to define what is a WikiName smileys [...] a list of smiley markups moin supports - image and image sizes are defined in the theme code. umask 0770 umask used by moin, the default gives rights to owner and group, but not to world. upperletters ucs-2 uppercase letters uppercase letters, used to define what is a WikiName url_schemas ['http', 'ftp', ...] URL schemas you want to have recognized Related TopicsHelpOnAccessControlLists - how to manage access to pages with ACLs HelpOnThemes - how to change the appearance of your wiki HelpOnSpellCheck - how to configure and maintain the spell checking option /EmailSupport - how to work with emails in MoinMoin. HelpOnXmlPages (configure both XML and DocBook rendering) /SecurityPolicy/FileAttachments/SurgeProtection