How to be a Mirror for Elive

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.

The mirror from the website features a load balanced based on countries, you can see it working here: https://www.elivecd.org/downloads/mirrorcheck


Setup

  1. Environment: Create a dedicated user and a subdomain with 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:
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
<IfModule mod_ratelimit.c>
    <Location "/">
        SetOutputFilter RATE_LIMIT
        RateLimitInterval 600
        RateLimitByte 8
        ErrorDocument 429 "Too Many Requests"
    </Location>
</IfModule>
Nginx Configuration
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
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! :slight_smile:

This howto has been recovered from dev.elivecd.org (which is actually broken due to an ubuntu upgrade on the shared server) thanks to a snapshot in archive.org

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.

2 Likes

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? :thinking:

2 Likes

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?

2 Likes

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)

1 Like

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.)

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

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

2 Likes

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. :face_with_head_bandage:

1 Like

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.

:wink:

@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" ?

4 Likes

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:

2 Likes

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..

2 Likes

same here,
.
someone else?

2 Likes

I'm available tooooooooooo

2 Likes

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)

3 Likes

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 :thinking: (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

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

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

2 Likes

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:

4 Likes

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!

That's quite good! Evviva!

that's what I do, but with important releases only
yuck don't do that, better to use an updated 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)

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!)

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