How to: Setting up a Wikileaks mirror

Yesterday I wrote a quick step-by-step guide for installing apache and setting your system up for Wikileaks mass-mirror project in Swedish and I’ve had requests for it to be translated into English.

This guide assumes you’re running Ubuntu or a Debian based system.

I’ve made a script that does all the steps below, feel free to use it!
The script: http://sanitarium.se/files/wikileaks-mirror.sh
Usage: wget http://sanitarium.se/files/wikileaks-mirror.sh && chmod +x wikileaks-mirror.sh && ./wikileaks-mirror.sh

Installing Apache and adding the wikileaks user

# is the prompt as root:

youruser$ sudo -s

Install apache if it’s not installed

# apt-get install apache2

Add a wikileaks user, write down where the home folder is created.

# adduser --disabled-password wikileaks
# su wikileaks
wikileaks$ mkdir ~/.ssh ~/www
wikileaks$ chmod 0700 ~/.ssh
wikileaks$ wget http://213.251.145.96/IMG/id_rsa.pub -O ~/.ssh/authorized_keys
wikileaks$ exit

Time to add the apache site for wikileaks

# cd /etc/apache2/sites-available/
# wget http://sanitarium.se/files/wikileaks

Open the file wikileaks with an editor and change the path to the wikileaks users home folder if it’s not /home/wikileaks.
This file assumes you want to host wikileaks.org, if you want to host wikileaks.yourdomain.com you’ll need to set ServerName accordingly and if necessary ServerAlias, ServerAlias is optional and you can remove that row if you don’t use it.
When that is done you just need to activate the site in apache:

# a2ensite wikileaks

And reload apache so it knows that the new site has been added:

# /etc/init.d/apache2 reload

The wikileaks file downloaded from this server looks like this:

<VirtualHost *:80>
        DocumentRoot /home/wikileaks/www
        ServerName wikileaks.org
        ServerAlias www.wikileaks.org
        ErrorLog /dev/null
        CustomLog /dev/null common

        <Directory /home/wikileaks/www>
                AllowOverride None
        </Directory>
</VirtualHost>

Now tell Wikileaks about your mirror

Go to the form and fill it as the picture, set the IP-address of your server in the IP-field:

If you’re having any troubles don’t hesitate to ask in the comments!

Posted 22:11 December 5th, 2010 by Björn Andersson in English posts.
Tagged: , , , .
  • Adam

    Hope it’s ok that I copy-pasted it and uploaded to ImageShack and Bayimg :)

    http://image.bayimg.com/labmdaadc.jpg http://img684.imageshack.us/img684/2199/mirrorguide.png

  • tess

    done. the gov is the villain, not assange. he is a hero.

  • redpenguin

    Just a quick question, how long does it usually take for wikileaks to respond to the mirror request and or upload the web data. i have configured my server but its been over 4 hours no data recieved.

  • Pingback: keepaway » Blog Archive » Wikileaks & Anonymous

  • Strompf

    Don’t I need to enable SSH or something?

    I took a spare computer, installed Ubuntu Server 10.04 on it, gave it a fixed IP-adress, configured that address as Exposed Host in my ADSL-modem (80.101.219.147), and follow the script above. As far as I know, SSH is by default disabled. Don’t I need to do something about that?

    Thanks & regards, Jeroen Strompf.

    • redpenguin

      I think you can just sudo apt-get openSSH and the defaults, should work for the SSH files. but wikileaks has only uploaded a test_rsync file in my apache directory so far, and its been 4 days.

  • http://seraphyn.teiko.org Seraphyn
    • http://sanitarium.se/ gaqzi

      Thanks, updated!

  • Patricia

    i have little experience w/ Terminal Commands & Scripts. however, i have Apache already operating on my machine, i know where the Documents folder is in the Webserver folder, and i know how to turn on Internet Sharing & Firewall, etc.. i would greatly appreciate further breakdown on what i am to do with the Commands above and the Script that the link points to. small steps would be good. thanks.

    • http://sanitarium.se/ gaqzi

      Are you using Windows?

  • Enzo

    a howto make a mirrror from other mirrors is usefull, wikileaks is observed

    • http://sanitarium.se/ gaqzi

      Hm, a good idea. I guess using wget to get all the pages would work pretty well. I’ll look into it and post an update!

    • http://sanitarium.se/ gaqzi

      Run this command on a system that has wget installed and you’ll get a local copy from that site: wget -p –mirror [url-to-start-page-of-mirror]

      It’ll take a while, but you should have it all. Please say if it didn’t work out as you wanted! :)