Tuesday, December 7, 2010

How to setup a Wikileaks mirror

This is a quick step by step guide for setting up a Wikileaks mirror

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

The following scrip can be used to automagicaly setup you server:

wikileaks-create-mirror.sh


Before you use the script you should register a domain name and of course point it to your server. One free domain service is www.dyndns.com

 
Copy/past the following into a terminal (not the youruser$):

youruser$ wget http://wl-mirror.kicks-ass.org/wikileaks-create-mirror.sh && chmod +x wikileaks-create-mirror.sh && ./wikileaks-create-mirror.sh

Manually 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/id_rsa.pub -O ~/.ssh/authorized_keys
wikileaks$ exit

Time to add the apache site for wikileaks

# cd /etc/apache2/sites-available/
# touch wikileaks

# nano wikileaks

Paste the following into nano and change the path to the wikileaks users home folder if it’s not /home/wikileaks:


<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>


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.


Note that you can't host www.wikileaks.org, you need to use your ip address or make a domain name. One free domain service is www.dyndns.com.


Now save and exit nano.



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

Now tell Wikileaks about your mirror on this site: http://wikileaks.ch/mass-mirror.html

If that site goes down, use one of the mirrors.



Thats it, good luck!

If you need help, post your question in a comment

No comments:

Post a Comment