Mirrors - ArchWiki

# Mirrors

Related articles

- Mirroring
- pacman
- reflector

This page is a guide to selecting and configuring your mirrors, and a listing of current available mirrors.

## Enabling a specific mirror

To enable mirrors, open `/etc/pacman.d/mirrorlist` and locate your geographic region. Uncomment mirrors you would like to use.

Note: ftp.archlinux.org is throttled at 50KB/s.

Example:

    # Any
    # Server = ftp://mirrors.kernel.org/archlinux/$repo/os/$arch
    Server = http://mirrors.kernel.org/archlinux/$repo/os/$arch

See #Mirror status and #List by speed for tools that help choosing mirrors.

Tip: Uncomment 5 favorite mirrors and place them at the top of the mirrorlist file. That way it's easy to find them and move them around if the first mirror on the list has problems. It also makes merging mirrorlist updates easier.

It is also possible to specify mirrors in `/etc/pacman.conf`. For the [core] repository, the default setup is:

    [core]
    Include = /etc/pacman.d/mirrorlist

To use the HostEurope mirror as a default mirror, add it before the `Include` line:

    [core]
    Server = ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/$arch
    Include = /etc/pacman.d/mirrorlist

pacman will now try to connect to this mirror first. Proceed to do the same for [testing], [extra], and [community], if applicable.

Note: If mirrors have been stated directly in `pacman.conf`, remember to use the same mirror for all repositories. Otherwise packages that are incompatible to each other may be installed, like linux from [core] and an older kernel module from [extra].

### Force pacman to refresh the package lists

After creating/editing `/etc/pacman.d/mirrorlist`, (manually or by using `rankmirrors`) issue the following command:

    # pacman -Syyu

Tip: Passing two `--refresh` or `-y` flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing `pacman -Syyu` whenever changing to a new mirror is good practice and will avoid possible issues.

## Mirror status

Check the status of the Arch mirrors and how updated they are by visiting https://www.archlinux.org/mirrors/status/.

You can generate an up to date mirrorlist here, automate the process with a script, or install Reflector, a utility that generates a mirrorlist using Mirrorcheck's list; you can also manually check how up-to-date a mirror is by:

1. picking a server and browsing to "extra/os/";
2. accessing https://www.archlinux.org/ in another browser tab or window; and
3. comparing the last-modified date of the `i686` directory on the mirror to the [extra] date on the homepage, in the Package Repositories box to the right.

## Sorting mirrors

When downloading packages pacman uses the mirrors in the order they are in `/etc/pacman.d/mirrorlist`. If not using reflector, which has the ability to sort mirrors by both how updated they are and their speed, follow this demonstration of manual mirror sorting.

Note: This does not apply to powerpill-light, which connects to many servers simultaneously to increase the overall download speed. The speed of individual connections becomes less relevant, and powerpill-light can be configured to require minimum speeds per connection.

### List by speed

Take full advantage of using the fastest local mirror, which can be determined via the included Bash script, `/usr/bin/rankmirrors`.

Back up the existing `/etc/pacman.d/mirrorlist`:

    # cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup

Edit `/etc/pacman.d/mirrorlist.backup` and uncomment mirrors for testing with `rankmirrors`.

Optionally run the following `sed` line to uncomment every mirror:

    # sed -i 's/^#Server/Server/' /etc/pacman.d/mirrorlist.backup

Finally, rank the mirrors. Operand `-n 6` means only output the 6 fastest mirrors:

    # rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist

Run `rankmirrors -h` for a list of all the available options.

### Combined listing by speed and status

It is not a good idea to just use the fastest mirrors, since the fastest mirrors might be out of date. The preferred way would be to use #List by speed, then sorting those 6 fastest mirrors by their #Mirror status.

Simply visit either one or both #Mirror status links and sort them by the ones that are more up to date. Move the more up to date mirrors to the top of `/etc/pacman.d/mirrorlist` and if the mirrors are way out of date simply do not use those; repeat the process leaving out the outdated mirrors. So this ends up with a total of 6 mirrors that are sorted by speed and status, leaving out outdated mirrors.

When having mirror issues the above should be repeated. Or repeat once in a while even if not having mirror problems, to keep `/etc/pacman.d/mirrorlist` up to date.

### Script to download from Mirrorlist Generator

The Pacman Mirrorlist Generator ranks mirrors based on geography, availability, and tiering. A script is available that can backup the previous mirrorlist then install a Mirrorlist Generator version. To install it use the AUR package armrr-git or download it with `curl -O https://raw.githubusercontent.com/Gen2ly/armrr/master/armrr`. Run `armrr [*country code]` or just `armrr` for a country code prompt. Type `armrr -h,--help` for more details.

### Using Reflector

Alternatively, you can use Reflector to automatically retrieve the latest mirrorlist from the MirrorStatus page, filter the most up-to-date mirrors, sort them by speed and overwrite the file `/etc/pacman.d/mirrorlist`.

### Choosing a local mirror

The simple way is to edit the mirrorlist file by placing a local mirror at the top of the list. pacman will then use this mirror for preference.

Alternatively `/etc/pacman.conf` can be edited by placing a local mirror before the line sourcing the mirrorlist file, i.e. where it says "add your preferred servers here". It is safer if you use the same server for each repository.

### List mirrors only for a specific country

Can be useful to automate update of the mirror list only for a specific countries instead of making a speed test each time.

    Cnt="China";
    awk -v GG=$Cnt '{if(match($0,GG) != "0")AA="1";if(AA == "1"){if( length($0) != "0"  )print substr($0,2) ;else AA="0"} }' \
     /etc/pacman.d/mirrorlist.pacnew

## Official mirrors

The official Arch Linux mirror list is available from the pacman-mirrorlist package. To get an even more up-to-date list of mirrors, use the Pacman Mirror List Generator page on the main site.

In the unlikely scenario that you are without any configured mirrors and `pacman-mirrorlist` is not installed, run the following command:

    # wget -O /etc/pacman.d/mirrorlist https://www.archlinux.org/mirrorlist/all/

Be sure to uncomment a preferred mirror as described above, then:

    # pacman -Syyu pacman-mirrorlist

If you want your mirror to be added to the official list, file a feature request. In the meantime, add it to the #Unofficial mirrors list at the end of this page.

If you get an error stating that the `$arch` variable is used but not defined, add the following to your `/etc/pacman.conf`:

    Architecture = x86_64

Note: You can also use the values `auto` and `i686` for the `Architecture` variable.

### IPv6-ready mirrors

The pacman mirror list generator can also be used to find a list of current IPv6 mirrors.

## Unofficial mirrors

These mirrors are not listed in `/etc/pacman.d/mirrorlist`.

### Global

- http://sourceforge.net/projects/archlinux/files/ - ISO files only; Does not have any releases since 2006. Use it only if for getting older ISOs.

### TOR Network

- http://cz2jqg7pj2hqanw7.onion/archlinux
- ftp://mirror:mirror@cz2jqg7pj2hqanw7.onion/archlinux
- http://rstpevyo7zx47bld.onion/archlinux

### Austria

- http://gd.tuwien.ac.at/opsys/linux/archlinux/ - Vienna University of Technology
- ftp://gd.tuwien.ac.at/opsys/linux/archlinux/

### Bulgaria

- http://mirror.telepoint.bg/archlinux/
- ftp://mirror.telepoint.bg/archlinux/

### China

CHINA TELECOM

- http://mirror.lupaworld.com/archlinux/

CHINA UNICOM

- http://mirrors.sohu.com/archlinux/
- http://mirrors.yun-idc.com/archlinux/

Cernet

- http://mirrors.zju.edu.cn/archlinux/ - Zhejian University
- http://ftp.sjtu.edu.cn/archlinux/ - Shanghai Jiaotong University
- ftp://ftp.sjtu.edu.cn/archlinux/
- http://mirrors.ustc.edu.cn/archlinux/ - University of Science and Technology of China
- ftp://mirrors.ustc.edu.cn/archlinux/
- http://mirrors.tuna.tsinghua.edu.cn/archlinux/ - Tsinghua University
- http://mirrors.4.tuna.tsinghua.edu.cn/archlinux/ (ipv4 only)
- http://mirrors.6.tuna.tsinghua.edu.cn/archlinux/ (ipv6 only)
- http://mirror.lzu.edu.cn/archlinux/ - Lanzhou University
- http://mirrors.huste.du.cn/archlinux - Huazhong University of Science and Technology

### France

- http://delta.archlinux.fr/ - With Delta package support. Needs xdelta3 package from extra to run.
- http://mirror.soa1.org/archlinux
- ftp://mirror:mirror@mirror.soa1.org/archlinux

### Germany

- http://ftp.uni-erlangen.de/mirrors/archlinux/
- ftp://ftp.uni-erlangen.de/mirrors/archlinux/
- http://ftp.u-tx.net/archlinux/
- ftp://ftp.u-tx.net/archlinux/
- http://mirror.michael-eckert.net/archlinux/
- http://linux.rz.rub.de/archlinux/
- http://mirror.k42.ch/archlinux/

### Hong Kong

- http://hk.mirrors.linaxe.net/archlinux/

### India

- http://ftp.iitm.ac.in/archlinux/
- ftp://ftp.iitm.ac.in/archlinux/

### Indonesia

- http://mirror.kavalinux.com/archlinux/ - only from Indonesia
- http://kambing.ui.ac.id/archlinux/
- http://repo.ukdw.ac.id/archlinux/

### Iran

- http://mirror.yazd.ac.ir/arch/

### Italy

- http://mi.mirror.garr.it/mirrors/archlinux/

### Japan

- http://ftp.nara.wide.ad.jp/pub/Linux/archlinux/ - NAra Institute of Science and Technology
- http://ftp.kddilabs.jp/Linux/packages/archlinux/
- http://srv2.ftp.ne.jp/Linux/packages/archlinux/

### Kazakhstan

- http://archlinux.kz/
- http://mirror.neolabs.kz/archlinux/
- http://mirror-kt.neolabs.kz/archlinux/

### Malaysia

- http://mirror.oscc.org.my/archlinux/
- http://mirrors.inetutils.net/archlinux/ - ISO and Core

### New Zealand

- http://mirror.ihug.co.nz/archlinux/
- http://mirror.ece.auckland.ac.nz/archlinux/ NZ only

### Poland

- ftp://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW
- http://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW
- rsync://ftp.icm.edu.pl/pub/Linux/dist/archlinux/ - ICM UW

### Russia

- http://hatred.homelinux.net/archlinux/ - Vladivostok, without iso, with 3SPY project repos and mingw32 repo
- http://mirrors.krasinfo.ru/archlinux/ - Krasnoyarsk, Classica-Service Ltd
- http://mirror.yandex.ru/archlinux/ - Moscow, Yandex LLC

### Singapore

- http://mirror.nus.edu.sg/archlinux/

### South Africa

- http://ftp.leg.uct.ac.za/pub/linux/arch/ - University of Cape Town
- ftp://ftp.leg.uct.ac.za/pub/linux/arch/
- http://mirror.ufs.ac.za/archlinux/ - University of the Free State
- ftp://mirror.ufs.ac.za/os/linux/distros/archlinux/
- http://ftp.wa.co.za/pub/archlinux/ - Web Africa Networks
- ftp://ftp.wa.co.za/pub/archlinux/
- http://archlinux.mirror.ac.za - TENET - Tertiary Education and Research Network of South Africa
- ftp://archlinux.mirror.ac.za

### South Korea

- http://mirror.star4u.org/archlinux/
- http://ftp2.lecl.net/pub/archlinux

### United States

- http://archlinux.linuxfreedom.com - Contains numerous ISO images but does not contain the ISO dated 2011.08.19
- http://mirror.clarkson.edu/archlinux/
- http://mirror.pointysoftware.net/archlinux/
- http://il.mirrors.linaxe.net/archlinux/ - Server location - Chicago, IL

### Viet Nam

FPT TELECOM

- http://mirror-fpt-telecom.fpt.net/archlinux/

## See also

- MirUp – pacman mirrorlist downloader/checker

Categories:

- About Arch
- Package management