How to become a resource repository mirror

From Armagetron


  • Apache 2
    • mod_rewrite
    • ability to edit Apache vhost config
    • mod_php 4+
  • rsync
  • One of:
    • cron
    • ssh account

Mirror Setup

Mirror Number

Ask Luke for a mirror number. Be sure to include your machine's IP address(es). References to this mirror number below are in English. For example, 'one' and 'two'.

Sync Document Root

You probably don't want to run this as root:

mkdir -p /var/www/armagetron/resource
rsync --delete -a rsync:// /var/www/armagetron/resource/

Setup Apache

Add to your vhost configuration:

<VirtualHost *:80>
    ServerAlias * *
    ServerPath /
    DocumentRoot /var/www/armagetron/resource/htdocs
    UseCanonicalName On
<Directory "/var/www/armagetron/">
    AllowOverride All
    Options FollowSymLinks
    Order allow,deny
    Allow from all

With Gentoo, this should be /etc/apache2/vhosts.d/02_armagetronad.conf

After setting up apache, you need to reload your configuration :)

Automatic Updating


Put in a crontab that gets run daily or hourly (with non-root permissions):

rsync --delete -a rsync:// /var/www/armagetron/resource

You may wish to append &>/dev/null so you don't get logs every time.

Using this method, your server will redirect to the master mirror when it doesn't have a resource.


Armabot is our bot that handles IRC and also updates things when there are changes.

Add to your SSH account's ~/.ssh/authorized_keys file:

command="rsync --delete -a rsync:// /var/www/armagetron/resource" ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtW5agPIL23MDpL6zFhJnLumv0pQrpIz7QkTlBbZ60KTVN0xITrVB7cf/Uphx7+WFYSde42Sf666jomDRu9ZwkBauGQjvKH7BlWRuLnFazdSd3X4jSEhAl38pQI/dV7QhUP0lBpIGv25h40S6YG1QwxQII4+BkbzoPIJs4RM4Pmn5piTN7OHdT/S8XxT/oVPiU1WrD08ewjxS7fawfQ31NKcAApDl5IFUkHY0+Zqzk0QACuWRRGTSa8h051JUWAnkEfNEg75PIstA6sgzXFqVcJLD4Mvk8sKkBqITniX8btxzW9kSfo/bzdgfx6C8X2r2ES/cY1ttTnp4Gb32GzuvXw== supybot@butler

Now, contact wrtlprnft to add a notifier for resource additions.

Using this method, you should always have all the latest resources.

Activate Mirror

Inform Luke that you're done. He'll check your mirror to make sure it's sane and put it in the round-robin.