Table of Contents

Why DokuWiki?

dokuwiki is a free PHP-based wiki aimed at technical documentation (hence its employment here!). As the ReadyNAS is already running the Apache web-server its sensible to use it to serve up your DokuWiki pages too. Personally I installed DokuWiki on my nslu2 and have got used to using it, its simple, yet feature rich (there are lots of plugins).

This guide relies heavily on the official ReadyNAS Setting up a PHP CGI Environment and Create a personal webserver on the ReadyNAS HowTo's with some additional information on installing and getting dokuwiki.

Install PHP & CGI environment

This is a pre-requisite to installing DokuWiki as DokuWiki is written in PHP and requires CGI. The instructions are provided in the ReadyNAS Developers Centre, and follow naturally from having installed apt-get, you only need to install one Apache module for php

Setup a Web-share

Install DokuWiki

We're now ready to install DokuWiki itself. It will be installed to the 'dokuwiki' share that we just created but directly rather than through the Share interface.

Migrating DokuWiki

I already had a fairly well used DokuWiki installed on my NSLU2 that I wanted to migrate over to the ReadyNAS. Thankfully because DokuWiki is essentially based around simple text file pages this was fairly straight-forward. After setting the file and folder permissions above, instead of pointing your browser to install.php

You should now be able to point your browser at http://readynas/dokuwiki/ or whatever its IP address is on the local network and see your wiki hosted on your ReadyNAS. Thats great if you're only ever going to view/edit your wiki at home, but really you'd like to access it from anywhere in the world wouldn't you?

Configure your Routers Port-forwarding

If you want to be able to access your Wiki from anywhere on the internet you will have to setup your router to forward requests on port 80 (the default port on which http access is provided) to the ReadyNAS.

Background

Your ISP provides your internet connection, and every device connected to the internet has an IP address which uniquely identifies them. These are numeric id's such as 272.146.13.158 and can be a little awkward to remember.

DynamicDNS

Thankfully someone came up with the idea of Domain Name System which allows more easy-to-remember web-address' like www.google.co.uk to be mapped to the IP address, so you don't have to worry about remembering the numeric IP address, but can instead remember the text description. To save you having to remember your IP address all the time (and it can change over time when your ISP assigns you a new one) you can use DynamicDNS from somewhere like No-IP.org to assign an web-address to your IP address (and update it if you get assigned a new IP address by your ISP). So look up your ISP assigned IP address and go and choose a domain name at No-IP.org.

Configure your Router

I couldn't possibly guess what router you have, but you will want to configure it to forward Port 80 to the IP address your NAS is assigned on your local network. The official ReadyNAS FAQ on port-forwarding points you to an article on Router Port Forwarding and I'm going to do the same.

Once you've registered a domain name and setup port-forwarding you should now be able to access your Dokuwiki hosted on your ReadyNAS by simply pointing a browser at the domain name you registered.

Upgrading

Once installed and running you will, when logged into Dokuwiki as an administrator, notice occasionally that there are notifications telling you that updates are available. Its wise to install these as they often fix bugs and security issues. Thankfully its pretty easy to do. Official instructions are here, but I've written my own walk through (heavily based on these).

cp -a /c/dokuwiki /tmp/.
cd tmp
wget http://www.splitbrain.org/_media/projects/dokuwiki/dokuwiki-rc2011-11-10.tgz
tar xzvf dokuwiki-rc2011-11-10.tgz 
'cp' dokuwiki-rc2011-11-10/{*,.??*} /c/dokuwiki/.
cd /c/dokuwiki
rm install.php
cd /c/dokuwiki/data
chown -R admin:admin

Thats pretty much it, there are a few additional things to check detailed in the official upgrade instructions that you should check though.

Recommendations

I'd recommend that you use namespaces from the outset on your DokuWiki as it helps keep things tidier.

readynas php dokuwiki howto