Tor: Running a Mirror


Thank you for wanting to mirror the Tor website. All of our mirrors are publicly listed on our mirrors page. We've included some sample commands and configuration below to make the initial setup and ongoing maintenance a minimal effort. The Tor website and distribution directory currently require roughly 24GB of disk space, but this number can fluctuate. Expect space requirements of up to 30 GB.

Configuring your System

If you would like to run a mirror, it's as easy as these commands to download everything a mirror should share with the world:

rsync -aq --exclude dist --delete rsync://rsync.torproject.org/website-mirror/ /var/www/mirrors/torproject.org
rsync -aq --delete rsync://rsync.torproject.org/dist-mirror/ /var/www/mirrors/torproject.org/dist

In order to assure we have reliable and up to date mirrors, please ensure your mirror does at least the following:

Updates no less than every six hours, but no more frequent than every hour.

Allows "Directory Index / Indexes" (Index viewing) of the /dist directory.

Have a valid contact email for administrative communications should your server have issues.

It is highly recommended for all mirror operators to subscribe to tor-mirrors mailing list where all mirror listing modification requests should go (ADD, CHANGE, DELETE, any other requests/notifications). Also, any technical assistance in setting up your mirror may be found here as well.



An example cronjob to update a full mirror once every 6 hours may look like so:

0 */6 * * * rsync -aq --exclude dist --delete rsync://rsync.torproject.org/website-mirror/ /var/www/mirrors/torproject.org
5 */6 * * * rsync -aq --delete rsync://rsync.torproject.org/dist-mirror/ /var/www/mirrors/torproject.org/dist

For mirror operators that use Apache, we have created a sample virtual host configuration file to use:

<VirtualHost 10.10.10.10:80>
    ServerAdmin youremail@example.com
ServerName ServerNameHere
DocumentRoot /var/www/mirrors/torproject.org
<Directory /var/www/mirrors/torproject.org/>
Options MultiViews Indexes
DirectoryIndex index
AllowOverride None
</Directory>
</VirtualHost>

For mirror operators that use nginx, we created a sample virtual host configuration file to use:

server {
    listen 10.10.10.10:80;
    server_name your.example.com;

    root /var/www/mirrors/torproject.org;
    index index.html.en;

    location  / {
        autoindex on;
    }
}

If you use nginx, please ensure the text/html line in /etc/nginx/mime.types matches:

text/html                             en html htm shtml;


Please ensure that you keep your mirror updated (we suggest automating this task with something like 'cron'). Our website, source code and binary releases change often. An update frequency of six hours is recommended. Tor users everywhere will thank you.


Joining the mirror community

If you are running a mirror, please subscribe to the tor-mirrors mailing list, and introduce yourself there. Help for mirror support and configuration issues may also be found on the list.

In order to add your mirror, please send a single, comma delimited line of text based on this file to the mirrors list. Your mirror will then be added manually if it passes availability testing and your provided information is confirmed. Some general pointers on mirrors are:

  1. Try not to run your mirror behind a content delivery network (such as Akamai, Cloudflare, Fastly, etc) as most of them block access from countries where the mirror is needed the most.
  2. Try not to redirect http to https. Many places in the world cannot use https due to local or national firewalls.