summaryrefslogtreecommitdiffstats
path: root/wiki/src/contribute/how/mirror.mdwn
blob: 316f08742320bcd4212dbbf6aa3d4680ffd9fa1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
[[!meta title="Set up a Tails mirror"]]

<div id="intro">

<p>Setting up a Tails BitTorrent or HTTP mirror helps Tails users
downloading it faster and more reliably.</p>

[[!toc levels=2]]

</div>

BitTorrent
==========

It's really easy to help Tails users downloading it over BitTorrent...
especially if you are already a BitTorrent user.

1. Get the latest BitTorrent files
----------------------------------

Here are the latest available BitTorrent files:

[[!map pages="torrents/files/*.torrent"]]

2. Share Tails images
---------------------

Feed your preferred BitTorrent client with the `.torrent` files
downloaded at the previous step. Make sure you open and/or forward the
needed ports in your router and/or firewall configuration so that you
are a real seed.

3. Stay tuned!
--------------

As a contributor to Tails availability over BitTorrent, it is very
important you share the very latest published version, and only this
one: users need to be able to quickly download it and upgrade when we
release security fixes, and there is no need to help propagate
outdated versions with security flaws.

A way to do this is to configure software to [[automatically download
and seed Tails over
BitTorrent|contribute/how/mirror/automatically_download_and_seed_Tails_over_BitTorrent]].

Else, new versions are announced on:

* our [news
  mailing-list](https://mailman.boum.org/listinfo/amnesia-news)
* our <a href='/torrents/rss/index.rss'>RSS</a> and
  <a href='/torrents/rss/index.atom'>Atom</a> feeds that announce new available
  BitTorrent files.

HTTP
====

To efficiently help Tails users downloading it over HTTP, one needs to
have sufficiently privileged access to a web server with decent
bandwidth: a domestic DSL connection won't help; neither will a shared
web hosting setup that provides FTP access only.

To give you an idea, a few dedicated Mb/s is a must; you must expect
pushing at least 50-100GB [[!wikipedia GiB]] (bytes, not bits) on
a normal day, and twice as much for a short period after each release.
So, it is a must to be able to push at least 2 [[!wikipedia TiB]]
a month, and preferably 3 or 4 TiB.

If you satisfy these practical requirements, please read on!
Else, please consider seeding Tails images over BitTorrent instead.

Before starting doing any real work on this topic, please get in touch
(<tails@boum.org>, [[OpenPGP key|doc/about/openpgp_keys]]) and send us
your OpenPGP public key, so that any further communication between us
can be properly encrypted and authenticated.

1. The big picture
------------------

We have a DNS Round Robin setup for the `dl.amnesia.boum.org` host.

Every HTTP mirror makes our files available under a fixed URL
(`http://dl.amnesia.boum.org/tails/`) that contains per-version
sub-directories (such as
`http://dl.amnesia.boum.org/tails/stable/tails-i386-lenny-0.6.2/`).

2. Set up your web server
-------------------------

You need to set up a virtual host for dl.amnesia.boum.org, with indexing
enabled.

### Apache configuration example

	<VirtualHost YOUR_WEBSERVER_IP:80>
	   ServerName dl.amnesia.boum.org
	   ServerAdmin YOUR_EMAIL
	
	   DocumentRoot /var/www/THE_PLACE_WHERE_YOU_WANT_OUR_FILES_TO_LIVE/
	   <Directory /var/www/THE_PLACE_WHERE_YOU_WANT_OUR_FILES_TO_LIVE/>
	      Options Indexes
	      AllowOverride None
	      IndexIgnore README.html
	      IndexOptions FancyIndexing FoldersFirst IgnoreCase NameWidth=50
	      IndexOrderDefault Descending Date
	   </Directory>
	</VirtualHost>

### Lighttpd configuration example

	$HTTP["host"] =~ "^dl\.amnesia\.boum\.org$" {
		server.document-root = "/var/www/THE_PLACE_WHERE_YOU_WANT_OUR_FILES_TO_LIVE/"
		server.dir-listing = "enable"
	}

### nginx configuration example

	server {
		server_name dl.amnesia.boum.org;
		root /var/www/THE_PLACE_WHERE_YOU_WANT_OUR_FILES_TO_LIVE;
		location / {
			autoindex on;
		}
	}

3. Download the files
---------------------

Download a snapshot of the current Tails files:

	rsync -rt --delete rsync.torproject.org::amnesia-archive \
	         /var/www/THE_PLACE_WHERE_YOU_WANT_OUR_FILES_TO_LIVE/

4. Schedule the pulling of the files
------------------------------------

Secondary mirrors (like yours) should sync every hour + 15 minutes.
Use `cron` or equivalent to schedule the same `rsync` command
as above.

5. Go wild
----------

As soon as your web server is ready, please e-mail us its IP address
so that we can ask the DNS server admins to add it to the Round Robin
pool.

# Talk to us

[[!inline pages="contribute/talk" raw="yes"]]