# How to be a Mirror for Elive

**URL:** <https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298>\
**Category:** Elive\
**Created:** [July 18, 2019, 4:28pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298 "2019-07-18T16:28:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thanatermesis](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thanatermesis/32/3_2.png) [@Thanatermesis](https://forum.elivelinux.org/u/Thanatermesis)\
**Post date:** [July 18, 2019, 4:28pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/1 "2019-07-18T16:28:47Z")

</div>

### Requirements

- **Stability:** High uptime required. Frequent reboots corrupt active downloads.
- **Bandwidth:** Minimum **1TB/month** recommended.
- **Storage:** At least **20GB** of available disk space.
- **Access:** SSH + Rsync (preferred) or FTP (fallback).
- **No CloudFlare:** Do not use CDN/Proxy services like CloudFlare.

> **Bandwidth Usage Breakdown**
>
> Average scenario with 6 mirrors:
> 
> - Total downloads/day: ~30
> - Avg. ISO size: 3.3 GB
> - Downloads per mirror: ~4.4/day
> - **Total: ~400 GB/month**  
> Most VPS providers (Vultr, etc.) offer 1-2TB on entry-level plans, which is sufficient.  
> [Check current mirrors status](https://www.elivecd.org/downloads/mirrorcheck).
> 
> The mirror from the website features a load balanced based on countries, you can see it working here: [https://www.elivecd.org/downloads/mirrorcheck](https://www.elivecd.org/downloads/mirrorcheck)

* * *

### Simple Setup

1. **Environment:** Create a dedicated user for the mirror and give it an URL pointing to a directory like `~/public_html`, the public URL should have **SSL (HTTPS)**.
2. **Web Server Config:**
  - **Apache:** Enable `mod_rewrite` (`AllowOverride All`).
  - **Nginx:** Enable `autoindex on`.

3. **Deployment Script:** Run this as the mirror user to set up SSH keys and directory structure:

```sh
HOSTNAME=$(hostname) ; yes | ssh-keygen -t rsa -C "$HOSTNAME" -f "$HOME/.ssh/id_rsa" -P ""
mkdir -p "$HOME/.ssh" 
echo 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAk45j0yfCnHcyi6EKy/tnUOfUKMMeVf1rc/nRPratslLwVVr+bCqjS/KVc5si+8yGsCxQzow2TC3hlymvyxVZhA0Q17G87UQb61nLeG9sl45LyPg5gqLYZUoxaxjT/L/T5XkqpfXhXle5ix0metdSh0sZHMnfhRvMXOAkQHY7YBWMkh9TOLu45GiUW2XKDSZjEWV0NeR06r66KspqsV5jR6HCZ9iQDMoya/6HdTqNDqpza+qqAcHvXCWAbAgr95PXDbSM1KIS9KCRebHVka1437kCU3vrwXKBIb0OF0Rnseqs4icTu2xnu74H2/+uM/C+o4f2QFjJM/CwlQ0w2kL2+Q== elivewebsites@zatara' >> "$HOME/.ssh/authorized_keys" 
chmod 744 "$HOME/.ssh" && chmod 600 "$HOME/.ssh/authorized_keys" 
mkdir -p "$HOME/public_html"
chgrp -R "www-data" "$HOME/public_html" 
chmod -R 750 "$HOME/public_html"
chmod g+s "$HOME/public_html"

```

* * *

### Security & Rate Limiting

To prevent bandwidth exhaustion by bots, we recommend limiting requests (e.g., 8 requests per 10 minutes per IP).

> **Apache Configuration**
>
> ```apache
> <IfModule mod_ratelimit.c>
> <Location "/">
> SetOutputFilter RATE_LIMIT
> RateLimitInterval 600
> RateLimitByte 8
> ErrorDocument 429 "Too Many Requests"
> </Location>
> </IfModule>
> 
> ```

> **Nginx Configuration**
>
> ```nginx
> limit_req_zone $binary_remote_addr zone=file_limits:10m rate=8r/m;
> server {
> location / {
> limit_req zone=file_limits burst=12 nodelay;
> limit_req_status 429;
> }
> }
> 
> ```

> **Caddy Configuration**
>
> ```caddy
> rate_limit {
> zone file_limits {
> key {http.request.remote.host}_{http.request.uri.path}
> rate 8/10m
> burst 5
> }
> }
> 
> ```

NOTE: I plan to feature it with a balancer based in the amount of bandwith available / give by each mirror, so keep me updated about your limits if i implement it

* * *

### Final Step

Email `thanatermesis@gmail.com` with the following details to activate your mirror and receive Premium access:

1. URL to the publicly shared link of ISOs.
2. Username and absolute path (e.g., `/home/user/public_html/`).
3. Server location (City, Country).
4. Contact email.

That's all! 🙂

---

<div class="post-metadata">

**Author:** ![Thanatermesis](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thanatermesis/32/3_2.png) [@Thanatermesis](https://forum.elivelinux.org/u/Thanatermesis)\
**Post date:** [July 18, 2019, 4:29pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/2 "2019-07-18T16:29:40Z")

</div>

_This howto has been recovered from [dev.elivecd.org](http://dev.elivecd.org) (which is actually broken due to an ubuntu upgrade on the shared server) thanks to a snapshot in [archive.org](http://archive.org)_

---

<div class="post-metadata">

**Author:** ![stoppy98](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/stoppy98/32/2337_2.png) [@stoppy98](https://forum.elivelinux.org/u/stoppy98)\
**Post date:** [January 19, 2020, 2:16pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/4 "2020-01-19T14:16:01Z")

</div>

I'm renewing my home server and i was wondering, would be a raspberry pi 3 based server be enough powerful for this task? I should be able to grant a 98% uptime due to multiple fault tolerance solutions and a 100Mbit/s stable connection with no data limits (I'm looking forward to upgrade it to 1Gbit/s as soon as possible). The raspberry choice is due to energy cost mainly.

---

<div class="post-metadata">

**Author:** ![triantares](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/triantares/32/2550_2.png) [@triantares](https://forum.elivelinux.org/u/triantares)\
**Post date:** [January 19, 2020, 3:53pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/5 "2020-01-19T15:53:23Z")

</div>

I think it should work. I contemplated the same for my my home server but don't really have enough upload bandwidth.  
The download is 100-200 Mb/s but up is only 10-20 Mb. This 10% ratio is fairly normal except if you take a business connection ..... are you sure about your ratios? 🤔

---

<div class="post-metadata">

**Author:** ![stoppy98](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/stoppy98/32/2337_2.png) [@stoppy98](https://forum.elivelinux.org/u/stoppy98)\
**Post date:** [January 19, 2020, 4:02pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/6 "2020-01-19T16:02:52Z")

</div>

Yeah you're right i forgot about the 10% ratio. damn. Well as said hopefully will get the gigabit connection soon! It is said it will be(virtually) 200 Mbit in upload

edit:  
@triantares so looks like we're making a better server at a friend's house. it should be supposedly based on on a 2011 4 core Xeon (forgive me i don't remember the actual name rn) and windows server on top of it (forgive me @Thanatermesis but if we do not try it for free as long as we are students idk when we will!). Gigabit connection with 110 Mbit/s for upload. Is it good enough now?

---

<div class="post-metadata">

**Author:** ![Thanatermesis](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thanatermesis/32/3_2.png) [@Thanatermesis](https://forum.elivelinux.org/u/Thanatermesis)\
**Post date:** [February 18, 2020, 10:47am UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/7 "2020-02-18T10:47:49Z")

</div>

10-20 Mb upload sounds good except for the moments of release (which you can have 20 downloads simultaneously), apart of that, the biggest important thing is the stability of the server (no reboots, no restarts of the web server, etc...) because on such case, the dowlnoads of the users on -that- moment will be cut leading to broken isos (and so, "oh elive don't boots! crappy distro not even able to boot on my computer")

the biggest fault of this is of course by chrome, firefox, and almost every browsers, which doesn't offer a reliable download system (if the download fails,doesn't continue, and the user don't even know about it)

---

<div class="post-metadata">

**Author:** ![stoppy98](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/stoppy98/32/2337_2.png) [@stoppy98](https://forum.elivelinux.org/u/stoppy98)\
**Post date:** [February 18, 2020, 4:05pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/9 "2020-02-18T16:05:52Z")

</div>

> [@Thanatermesis](#):
>
> the biggest important thing is the stability of the server

I can guarantee a stable server, on 24/7. Apart from unexpected hardware faults ofc. But as said before, i'm looking forward for getting Gbit connection so even the speed bottleneck would be avoided (10Mbit/s would mean about 45/55 mins to download elive. Which is too much.)

---

<div class="post-metadata">

**Author:** ![Thanatermesis](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thanatermesis/32/3_2.png) [@Thanatermesis](https://forum.elivelinux.org/u/Thanatermesis)\
**Post date:** [February 18, 2020, 4:10pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/10 "2020-02-18T16:10:03Z")

</div>

> [@triantares](#):
>
> So should we create a widget for downloading using "curl" and/or "zsync\_curl" and have our own built-in ? 🤔

IMHO actually zsync is just a tip / trick for us to download using less bandwith, remember that it also **requires** a previous version of elive so basically is useful for us (active betatesters), so we can use the default one (removing the S from httpS links) or using the other version at our own

> [@stoppy98](#):
>
> I can guarantee a stable server, on 24/7. Apart from unexpected hardware faults ofc. But as said before, i'm looking forward for getting Gbit connection so even the speed bottleneck would be avoided (10Mbit/s would mean about 45/55 mins to download elive. Which is too much.)

yeah hardware faults is another story 🙂 sounds good then! :happy_dance:

---

<div class="post-metadata">

**Author:** ![triantares](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/triantares/32/2550_2.png) [@triantares](https://forum.elivelinux.org/u/triantares)\
**Post date:** [February 18, 2020, 4:35pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/11 "2020-02-18T16:35:33Z")

</div>

I have been looking into AWS options but **DANG !** they make it hard too see where "free of charge" ends and bills start coming.  
I was actually hoping @yoda would look into it (it's his speciality I sumrise) and create a HOWTO. I mean if there's 5 or 6 of those AWS instances out there we could do something.

Me, I started checking the "free tier" options out and got lost along the way. 🤕

---

<div class="post-metadata">

**Author:** ![yoda](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/yoda/32/42_2.png) [@yoda](https://forum.elivelinux.org/u/yoda)\
**Post date:** [February 19, 2020, 12:52am UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/12 "2020-02-19T00:52:19Z")

</div>

I am ready to pay my actual VM/Cloud provider

I would like to know how many download of the ISO and/or how many Gigs / month actual downloads are taking.

Please get back to me @Thanatermesis  
Even if I disagree with all of you on the actual download method, I am still open to help

So my question : How many Gigs or Download/month approx do you currently have

Actual download speed is another pain for new user and I want to solve it.

😉

@Thanatermesis if I pay for some powefull VM on "MY" Cloud provider, Could i have my company Logo/link somewhere on your site and be listed as some " corporate sponsor" ?

---

<div class="post-metadata">

**Author:** ![Rebel450](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/rebel450/32/2737_2.png) [@Rebel450](https://forum.elivelinux.org/u/Rebel450)\
**Post date:** [February 19, 2020, 2:11pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/13 "2020-02-19T14:11:15Z")

</div>

What is about the torrent idea -  
to keep e.g. Transmission open as we are online anyway  
and share the already downloaded version that everyone of us will have handy ....  
:madness:

---

<div class="post-metadata">

**Author:** ![yoda](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/yoda/32/42_2.png) [@yoda](https://forum.elivelinux.org/u/yoda)\
**Post date:** [February 19, 2020, 2:48pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/14 "2020-02-19T14:48:05Z")

</div>

We had torrent well establish when 64 came out I think...

We we just have to follow @Thanatermesis and do what we have to do / follow his instruction on how to set it back up again the right way so we can seed all day long

I do not have internet limit and have a fast link so I am ok with setting my station up again for that..

---

<div class="post-metadata">

**Author:** ![Rebel450](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/rebel450/32/2737_2.png) [@Rebel450](https://forum.elivelinux.org/u/Rebel450)\
**Post date:** [February 19, 2020, 2:49pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/15 "2020-02-19T14:49:44Z")

</div>

> [@yoda](#):
>
> I am ok with setting my station up again for that..

same here,  
.  
someone else?

---

<div class="post-metadata">

**Author:** ![stoppy98](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/stoppy98/32/2337_2.png) [@stoppy98](https://forum.elivelinux.org/u/stoppy98)\
**Post date:** [February 19, 2020, 4:46pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/16 "2020-02-19T16:46:50Z")

</div>

I'm available tooooooooooo

---

<div class="post-metadata">

**Author:** ![triantares](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/triantares/32/2550_2.png) [@triantares](https://forum.elivelinux.org/u/triantares)\
**Post date:** [February 21, 2020, 5:20pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/17 "2020-02-21T17:20:16Z")

</div>

Same here but there will be some issues to solve first in respect to amd64 as torrents are freely accessible.  
sorry for all typos. Am posting from my phone (using Opera)

 ![20200221181913](https://forum.elivelinux.org/uploads/default/original/2X/2/2e94f7188dba60dd513b8ef82d4495310df7dc84.jpeg)

---

<div class="post-metadata">

**Author:** ![Thanatermesis](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thanatermesis/32/3_2.png) [@Thanatermesis](https://forum.elivelinux.org/u/Thanatermesis)\
**Post date:** [February 23, 2020, 1:32am UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/18 "2020-02-23T01:32:00Z")

</div>

> [@yoda](#):
>
> I would like to know how many download of the ISO and/or how many Gigs / month actual downloads are taking.
> 
> Please get back to me @Thanatermesis

I would strongly suggest that the mirror should be "unlimited bandwith", otherwise overbill can happen (and those hostings with a limited bandwith seems to be low for the mirror needs, think about 1k downloads can happen easily in a week on releases, so 4TB / week)

Also, the server should be set with apache 🤔 (those "places" services to store data as objects like AWS is a very strange thing that wont' work), and a remote ssh with rsync installed is needed too

> [@yoda](#):
>
> @Thanatermesis if I pay for some powefull VM on "MY" Cloud provider, Could i have my company Logo/link somewhere on your site and be listed as some " corporate sponsor" ?

in the website? yes, i can create a page for that (so we don't have any yet) 🙂

> [@Rebel450](#):
>
> What is about the torrent idea -

only for stable releases, no time to maintain that 🙂 too much human work

---

<div class="post-metadata">

**Author:** ![Thanatermesis](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thanatermesis/32/3_2.png) [@Thanatermesis](https://forum.elivelinux.org/u/Thanatermesis)\
**Post date:** [April 26, 2020, 1:43pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/19 "2020-04-26T13:43:53Z")

</div>

I'm happy to announce a new mirror from France, the owner of the mirror is Remi and is a big fan of Elive since the start, a very stable server with more than 500 days of uptime and 100Mbit bandwith

With it, we have now a mirror in France and another in China that has been recently added too 1(very good locations), where before we had only 1-2 mirrors around! :happy_dance:

---

<div class="post-metadata">

**Author:** ![stoppy98](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/stoppy98/32/2337_2.png) [@stoppy98](https://forum.elivelinux.org/u/stoppy98)\
**Post date:** [April 26, 2020, 2:24pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/20 "2020-04-26T14:24:06Z")

</div>

Tho... you could update the torrent just sometimes. I keep reinstalling the same old beta version since it uploads anyway by itself!  
Btw, what about, instead of calling it elive beta, you do not call it elive rolling? I mean: it works, it updates costantly, always on the edge... it's a rolling version!

---

<div class="post-metadata">

**Author:** ![stoppy98](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/stoppy98/32/2337_2.png) [@stoppy98](https://forum.elivelinux.org/u/stoppy98)\
**Post date:** [April 26, 2020, 2:25pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/21 "2020-04-26T14:25:26Z")

</div>

> [@Thanatermesis](#):
>
> I'm happy to announce a new mirror from France, the owner of the mirror is Remi and is a big fan of Elive since the start, a very stable server with more than 500 days of uptime and 100Mbit bandwith

That's quite good! Evviva!

---

<div class="post-metadata">

**Author:** ![Thanatermesis](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thanatermesis/32/3_2.png) [@Thanatermesis](https://forum.elivelinux.org/u/Thanatermesis)\
**Post date:** [May 8, 2020, 12:30pm UTC](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298/23 "2020-05-08T12:30:04Z")

</div>

> [@stoppy98](#):
>
> Tho... you could update the torrent just sometimes. I keep reinstalling the same old beta version since it uploads anyway by itself!

that's what I do, but with important releases only  
yuck don't do that, better to use an updated version

> [@stoppy98](#):
>
> Btw, what about, instead of calling it elive beta, you do not call it elive rolling? I mean: it works, it updates costantly, always on the edge... it's a rolling version!

yes and no, some things are not included in the iso (sometimes a new version of elive-tool is required or other elements, the selection of packages included are different, same for kernels and drivers, etc...)

yes its pretty rolling, but in any case we need the announcements in order to get some promotion... when there's no releases announced for 1 month, the downloads decreases a lot, people "forgets" that elive exists lol (or more exactly, people don't know about it, it doesn't appears on any website, and it appears in a very few btw)

> [@TheTechRobo](#):
>
> Also I have no idea how to make a cname or whatever on Apache or any other webserver software lol

you have a server or a personal computer that you want to use as server?  
There's long time i was thinking into make a kind of "version" of elive for servers (version without graphical system, heh!)

> [@TheTechRobo](#):
>
> EDIT: Turns out the webhost i am going to buy soon has apache, rsync, ssh, subdomains... All in all i'm just going to use a subdomain on that lol

hum, normally webhosts includes a panel where to create the domains and things like that, otherwise you must follow some howtos 🤔

[Next page](https://forum.elivelinux.org/t/how-to-be-a-mirror-for-elive/1298.md?page=2)
