About Download Docs Changes

Install on Debian or Ubuntu Linux

Note: This is a step-by-step guide for hatta prior to 1.5.0. For 1.5.0 and newer, refer to Install.

Open a terminal and follow the instructions. Commands that use sudo will ask you for your password. (Running Etch? Also see the additional instructions specific to Etch).


First you need to install the dependencies:

sudo apt-get install mercurial python-werkzeug

Optionally install Pygments for syntax highlighting:

sudo apt-get install python-pygments

If your version of python is 2.4, you will also need wsgiref:

sudo apt-get install python-wsgiref

If you are installing the development version, you will also need jinja2:

sudo apt-get install python-pkg-resources python-jinja2

Download the script

Download the most recent version of the script from http://hatta-wiki.org/Download, rename it to hatta.py and make it executable with:

chmod a+x hatta.py

Run locally

Just execute the script:


This will create two subdirectories: docs and cache, and also start a new Mercurial repository in the docs directory. Then it will start a web server on port 8080. You can now open your web browser and type http://localhost:8080/ into the address bar to use the wiki.

Note: When Hatta starts, you will see a warning message, it's harmless, seems to be a glitch in the Debian's install of Mercurial, see Running on Debian stable (etch)? for more details.

Run locally in existing repository

If you start Hatta in an existing Mercurial repository, it will also create the directories as above, but won't start a new repository in the docs directory – instead all the changes will be commited to your existing repository.

You might want to add the cache directory to .hgignore, so that you are not bothered about the files in it.

Change directories and port

See Script settings.

Using Upstart on Ubuntu Server

In case you're running Hatta on your own server you might want to ensure that Hatta will be up and running also after rebooting the server. Using Ubuntu's Upstart is a nice and easy way of doing this. Login as root and create a file named hatta.conf in /etc/init with the following contents:

start on startup
    cd /path/to/hatta
    python hatta.py
end script

Now Hatta will be started on server boot, in addition you can use the initctl command to control Hatta:

sudo initctl start hatta
sudo initctl restart hatta
sudo initctl stop hatta