Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Private wiki farm with OpenID login

Fetching latest commit…

Cannot retrieve the latest commit at this time

about add screenshot
css ui update
help update screen shots, add "groups pending" shot
js include list of visible inputs in generic ajax submit
COPYING debianize Add group-invite/disinvite table to "manage wiki" form
DefaultFarmSettings.php fix preg delimiters in DefaultFarmSettings
GeSHiHighlight.php add GeSHiHighlight
Makefile add textile release tarball (thresholdstate has been offline for a lo…
SimpleTable.php add SimpleTable extension
WikifarmAuthPlugin.php use wfSetupSession() instead of User::SetupSession() in newer MW
adminhelp.textile add admin-only backups: wikifarm state only, and all wikis
awstats.00.conf remove hardcoded host name from awstats config templates
awstats.all.conf remove hardcoded host name from awstats config templates
claim-wiki-by-password.php import realname and email address when claiming credentials
commonist-0.3.43-wikifarm-1.15.patch get session id from commonist password field instead of env var add commonist 0.3.43 with openid auth patch add commonist 0.3.43 with openid auth patch
favicon.ico use wyss logo
help.textile update screen shots, add "groups pending" shot
login-bg.gif use local copy of login-bg.gif to prevent "insecure items" warning
logout.php redirect straight to login page after logout, instead of bouncing thr…
make_admin_user.php debianize
mysql-utf8.cnf character set fixes
php-apc-patch add php-apc patch
serverlogo.png use wyss logo
style.css add "group editable" feature. refs #767
textile-2.0.0-php-5.2.4.patch add textile patch
textile-2.0.0.tar.gz add textile release tarball (thresholdstate has been offline for a lo… debianize add Help tab, some bug fixes and display tweaks debianize
wikifarm-create-wiki debianize print all accesses to default log file, not just no-particular-wiki a…
wikifarm-sudo-disable debianize
wikifarm-sudo-enable debianize
wikifarm-template-save fix up ownership/permissions in "save template wiki" script remove hardcoded host name from awstats config templates
Copyright 2010 President and Fellows of Harvard College

Tom Clegg <>
Jer Ratcliffe <>

This file is part of wikifarm.

Wikifarm is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.

Wikifarm is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
General Public License for more details.

You should have received a copy of the GNU General Public License
along with wikifarm.  If not, see <>.

NOTE: This file documents how to set up a wikifarm on a plain Linux
system, like the Ubuntu Lucid image available on AWS.

An even quicker method is to use a pre-built AMI -- see README-ami.


Installing on AWS

Create instance

* use ami-714ba518
* Select a suitable private key, so you can log in
* Select a security policy with ports 22, 80, and 443 open

Update your OS

  sudo aptitude update && sudo aptitude full-upgrade

Add the wikifarm repository to your apt sources

  wget -q -O- | sudo apt-key add -
  echo deb lucid main | sudo tee /etc/apt/sources.list.d/wikifarm.list
  sudo apt-get update

Install and enable wikifarm

  sudo apt-get install wikifarm
  sudo a2dissite default
  sudo a2ensite wikifarm
  sudo /etc/init.d/apache2 restart

Change your default mysql character set to utf8

  sudo cp /etc/wikifarm/mysql-utf8.cnf /etc/mysql/conf.d/utf8.cnf
  sudo /etc/init.d/mysql restart

Create an administrator account

* Visit http://{}
* Log in with your OpenID
* Copy your OpenID from the "my account" screen
* Run:
 /etc/wikifarm/make_admin_user.php http://YOUR.OPENID.HERE
* Provide your email address and real name on the "my account" page
* Click "Save changes"

Create the base wiki config and database

* Visit http://{}/00 and click "set up the wiki".  Fill in the form:
* wiki name: Wiki (won't be used)
* random password for WikiSysop (won't be used)
* database name "wikidb00"
* db username "wikiuser"
* db password "wikipass"
* yes, use superuser account.
* provide the MySQL root password you used when installing mysql-server.
* Click "Install MediaWiki!"

Copy the config file to the template wiki and lock it down


Configure your server so it can send email notifications

* If you are using AWS, use a smarthost or attach an elastic IP address to your instance.
* Example:
  sudo dpkg-reconfigure exim4-config

Fix PHP session garbage collection

* Run /usr/lib/php5/maxlifetime
* If it reports "24" it is not reading the wikifarm.ini.
* Edit /usr/lib/php5/maxlifetime as follows:
  -for ini in /etc/php5/*/php.ini; do
  +for ini in /etc/php5/*/*.ini; do

(Optional) install mediawiki-math

  sudo apt-get install mediawiki-math

(Optional) create an AMI

* Delete any OpenID accounts you created during testing/setup:
  sqlite3 /var/lib/wikifarm/db/wikis.db 'delete from users; delete from usergroups;'
* Delete some history, cache, etc.
  sudo apt-get clean
  rm -rf ~/.*_history ~/.cache ~/.sudo_as*
  unset HISTFILE
* Shut down (not terminate) your instance
* Create an AMI from your instance (takes ~ 1/2 hour)
* Start an instance using the new AMI and test it (see README-ami)

Turn off deleteOnTermination attribute on your EBS volume

* Make sure your workstation is >= lucid
* Determine your instance id, EBS volume id, and root filesystem device
  (perhaps using "ec2-describe-instances -v")
* Turn off deleteOnTermination flag:
  ec2-modify-instance-attribute i-ef5eb785 -b /dev/sda1=vol-9a1980f3:false -v

(Optional) switch to SSL

* Create/obtain a signed site certificate
* Enable ssl:
  sudo a2enmod ssl
  sudo /etc/init.d/apache2 restart

Ensure your users always access your server with the same hostname.

* Some OpenID providers (including Google) do not supply the same
  OpenID URL when the same user signs in to different OpenID consumer
  sites.  This means your users must always access your wikifarm using
  the same domain name (i.e., only one of "",
  "", "").  The following code
  can be used in /etc/apache2/sites-available/wikifarm to accomplish

    <Limit GET HEAD>
      RewriteCond %{HTTP_HOST} !
      RewriteRule (.*)$1 [R,L]

Create wiki number 01 for yourself

* Visit http://{}.
* Click "My Wikis"
* Complete the form
  (Name this wiki "docs" so the link to "/docs/Wiki_Tutorial" on the
  Help tab will work)
* Click "Create new wiki"
* You have Sysop privileges in your new wiki, so you can protect
  pages, edit the MediaWiki:Sidebar page, etc.

(Optional) install other mediawiki extensions

* see README-extensions

(Optional) improve performance

* see README-performance

(Optional) customize site appearance

* Set site slogain in /etc/wikifarm/config.php
  (see /etc/wikifarm/config.php.example)
* Install logo graphic in /var/lib/wikifarm/www/serverlogo.png
  (64 pixels high for best results)
* Install favicon in /var/lib/wikifarm/www/favicon.ico
  (16x16 pixels for best results)
Something went wrong with that request. Please try again.