1. Home
  2. Docs
  3. Pacman
  4. Automatically ranking the mirror list

Automatically ranking the mirror list

Edited by Manuel at 2020-Aug-26

Important note for reflector-auto users:

2020-Aug-26: While the text below is still valid, the developers of the reflector package have added a similar systemd integration feature about a week ago. This means that the new reflector package makes reflector-auto package obsolete.

EndeavourOS will keep reflector-auto available for those who still use it until the end of year 2020.

EndeavourOS reflector-auto

When downloading packages, pacman uses the mirrors in the order they are listed in /etc/pacman.d/mirrorlist and /etc/pacman.d/endeavouros-mirrorlist The order servers appear in the list sets their priority.

It is not optimal to only rank mirrors based on speed since the fastest servers might be out-of-sync. Instead, make a list of mirrors sorted by their speed, then remove those from the list that are out of sync according to their status.

It is recommended to repeat this process periodically.

Archwiki have some instruction to do all this manually:


You can do this in different ways, on “pure” arch use this one:


For EndeavouOS we have a package in our Repository, as we may need to rank our own mirrors too one time, for now this is not nessesarry, as we do not have hundreds:

install the package:

sudo pacman -S reflector-auto

This tool uses reflector to rank your Archlinux mirrorlist once a week.

Sources for reflector-auto: github.com/endeavouros-team

The reflector-auto uses a configuration file /etc/reflector-auto.conf if it exists. If not, you can create (or edit) it with command:

sudo nano /etc/reflector-auto.conf

That file can contain

  • reflector options (more info: see the output of command: reflector -h)
  • empty lines (for better layout)
  • comment lines (comment starts with character #)

Typically it should contain options for your country (+ country near you). For example:

# Contents of /etc/reflector-auto.conf:
-c Germany -c Poland -f 15 -p https -a 2

this will search for 15 best mirrors inside Germany and Poland among mirrors that have been updated within 2 last hours.

save the file by pressing this keycombination:

[Ctrl]+[X] and say yes to save the file.

the last step is to enable the reflector-auto timer to run this once a week:

sudo systemctl start reflector-auto.timer
sudo systemctl enable reflector-auto.timer

check if it is running:

systemctl status reflector-auto.timer

This will give something like this:

 ● reflector-auto.timer - Run reflector-auto periodically    Loaded: loaded (/usr/lib/systemd/system/reflector-auto.timer; enabled; vendor preset: disabled)    Active: active (waiting) since Tue 2019-08-20 12:17:00 CEST; 28min ago   Trigger: Mon 2019-08-26 00:00:00 CEST; 5 days left
Aug 20 12:17:00 host systemd[1]: Started Run reflector-auto periodically.

If you do not get this working ask at the forum, if you want to add something :
do it !
join at the forum, you are welcome!

Follow us
Was this article helpful to you? Yes 12 No 1

How can we help?