How to setup a Tor relay on Linux VPS

downloadTor is a free software that allows users to browse the internet anonymously and bypass censorship. In order for this software to work efficiently it requires relays. Relays route data from the end user to the internet and vice-versa. The more relays on the Tor network, the more anonymous and faster it becomes!

This tutorial will show you how to setup and configure a Tor relay on CentOS 5.

1. First you need to add the repository to Yum.

cd /etc/yum.repos.d/

2. You can now install Tor and Screen using Yum. Screen is needed to keep Tor running even when you close the SSH session.

yum install tor screen -y

3. Now we will modify the Tor configuration file to setup a relay!

cd /etc/tor/
nano torrc

At the end of the file you can add following:

ORPort 443
Nickname RelaynameHere
RelayBandwidthRate 100 KBytes
RelayBandwidthBurst 200 KBytes

ORPort is the port you want the relay to run on. I have set it to 443 which is the same port as HTTPS, this can be any port you like. Nickname is the name you want your relay to have and the nickname cannot have spaces. Address is the hostname of your relay server. RelayBandwidthRate is the amount of bandwidth you want to allocate to Tor in KB/s. RelayBandwidthBurst is the amount of “extra” bandwidth you would like to allocate to Tor if it requires it.

4. Time to start the relay!


And your Tor relay is now running! It will take about 20-30 minutes for it to become activated with the Tor network and be available for use. You can press Ctrl + A + D to detach from the screen and log out of SSH. To re-enter the screen you type:

screen -R

Make sure you have the available bandwidth to handle a relay because it can eat a lot of bandwidth overtime. Also make sure you block SMTP outgoing ports (25) if you would like to prevent spam from being sent from your relay. This can be done via iptables:

iptables -t nat -A PREROUTING -p tcp –dport 25 -j DROP

How to install Gnome and VNC on a VPS server

The operating system we used in the tutorial was CentOS. The installation instructions are very similar for other Linux distributions. Below are the commands used in the video to install VNC and Gnome.

1. Command to install VNC-Server

yum install vnc-server -y

2. Command to install Gnome:

yum groupinstall “Gnome Desktop Environment”

Please feel free to share this video with your friends and colleagues!

How to install Minecraft server on CentOS VPS

Minecraft servers can be a pain to setup without proper instructions. We have simplified the process by creating this easy to follow tutorials.

In order to install Minecraft on a CentOS VPS you will need the following:

  • CentOS 5 (32 or 64 Bit)
  • 1GB of Memory (or more)
  • Java JDK
  • Minecraft Server

1. First we will need to install Java on your VPS by running the following command:

yum install java-1.6.0-openjdk -y

2. Now make sure the correct version of Java is installed.

which java

It should output: /usr/bin/java

3. You will now need to install Screen so Minecraft server does not terminate when you log off SSH.

yum install screen -y

4. Now run the following commands to install the Minecraft server.

cd ~
mkdir minecraft
cd minecraft
chmod +x minecraft_server.jar

Minecraft server is now installed. All you have to do is run it in screen!

5. To run the Minecraft server first go into screen:


6. Now start the Minecraft server using the following command.

java -Xmx400M -Xms400M -jar minecraft_server.jar nogui

The Minecraft server will generate the world for the first time which might take a few minutes. After it is done generating you will be able to connect!

If you would like to add more RAM, change “400M” in step 6. However, make sure to not assign too much memory, because it will become more likely crash. For our tests, 400M worked well on a 1GB VPS.

To exit screen simply press Ctrl + A + D and to get back into screen run the command:

screen -R

Have fun!

How to setup a Tor relay on Linux VPS

Leave a Reply