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

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

Line 51:

Line 49:

==Mirror status==

==Mirror status==

−

Check the status of the Arch mirrors and how updated they are by visiting http://www.archlinux.de/?page=MirrorStatus or https://www.archlinux.org/mirrors/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 [https://www.archlinux.org/mirrorlist/ here], automate the process with a [[#Script to automate use of Pacman Mirrorlist Generator|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:

+

You can generate an up to date mirrorlist [https://www.archlinux.org/mirrorlist/ here], automate the process with a [[#Script to download from Mirrorlist Generator|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:

#picking a server and browsing to "extra/os/";

#picking a server and browsing to "extra/os/";

#accessing https://www.archlinux.org/ in another browser tab or window; and

#accessing https://www.archlinux.org/ in another browser tab or window; and

Line 59:

Line 57:

==Sorting mirrors==

==Sorting mirrors==

−

When downloading packages pacman uses the mirrors in the order they are in {{ic|/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.

+

When downloading packages pacman uses the mirrors in the order they are in {{ic|/etc/pacman.d/mirrorlist}}. If not using {{Pkg|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 [[Improve_Pacman_Performance#Using_powerpill-light | 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.}}

+

{{Note|This does not apply to [[Improve pacman performance#Using_powerpill-light | 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===

===List by speed===

Line 73:

Line 71:

Optionally run the following {{Ic|sed}} line to uncomment every mirror:

Optionally run the following {{Ic|sed}} line to uncomment every mirror:

The following shell script can be used to create a mirror list based on the rankings produced by the [https://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator] (the country variable will need to be changed if not living in the United States). It can also be downloaded by invoking: {{ic|<nowiki>curl http://pastebin.ca/raw/2404700 -o pacmrr</nowiki>}}.

+

The following shell script can be used to create a mirror list based on the rankings produced by the [https://www.archlinux.org/mirrorlist/ Pacman Mirrorlist Generator] (the country variable will need to be changed if not living in the United States). It can be downloaded by invoking: {{ic|<nowiki>curl -L http://tinyurl.com/larn8po -o pacmrr</nowiki>}}. View script: [https://gist.github.com/anonymous/08ec03732f3da5c869df here].

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

+

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.

−

Alternativley the pacman.conf file 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.

+

Alternatively {{ic|/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.

==Official mirrors==

==Official mirrors==

Line 201:

Line 129:

*ftp://mirror:mirror@cz2jqg7pj2hqanw7.onion/archlinux

*ftp://mirror:mirror@cz2jqg7pj2hqanw7.onion/archlinux

−

===Singapore===

+

===Austria===

−

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

+

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

+

*ftp://gd.tuwien.ac.at/opsys/linux/archlinux/

===Bulgaria===

===Bulgaria===

*http://mirror.telepoint.bg/archlinux/

*http://mirror.telepoint.bg/archlinux/

*ftp://mirror.telepoint.bg/archlinux/

*ftp://mirror.telepoint.bg/archlinux/

−

−

===Viet Nam===

−

'''FPT TELECOM'''

−

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

===China===

===China===

Line 218:

Line 143:

'''CHINA UNICOM'''

'''CHINA UNICOM'''

*http://mirrors.sohu.com/archlinux/

*http://mirrors.sohu.com/archlinux/

+

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

'''Cernet'''

'''Cernet'''

−

*http://mirrors.zju.edu.cn/archlinux/ - "Zhejian University"

+

*http://mirrors.zju.edu.cn/archlinux/ - ''Zhejian University''

*http://ftp.sjtu.edu.cn/archlinux/ - ''Shanghai Jiaotong University''

*http://ftp.sjtu.edu.cn/archlinux/ - ''Shanghai Jiaotong University''

*ftp://ftp.sjtu.edu.cn/archlinux/

*ftp://ftp.sjtu.edu.cn/archlinux/

Line 229:

Line 155:

*http://mirrors.6.tuna.tsinghua.edu.cn/archlinux/ ''(ipv6 only)''

*http://mirrors.6.tuna.tsinghua.edu.cn/archlinux/ ''(ipv6 only)''

*http://mirror.lzu.edu.cn/archlinux/ - ''Lanzhou University''

*http://mirror.lzu.edu.cn/archlinux/ - ''Lanzhou University''

+

*http://mirrors.huste.du.cn/archlinux - ''Huazhong University of Science and Technology''

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:

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

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 -Syywhenever changing to a new mirror is good practice and will avoid possible issues.

Mirror 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:

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.

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 following shell script can be used to create a mirror list based on the rankings produced by the Pacman Mirrorlist Generator (the country variable will need to be changed if not living in the United States). It can be downloaded by invoking: curl -L http://tinyurl.com/larn8po -o pacmrr. View script: here.

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.

Viet Nam

Troubleshooting

Out-of-sync mirrors: corrupted packages/file not found

Issues regarding out-of-sync mirrors pointed out in this news post may have already been sorted out for most users, but in the event that problems of this nature present themselves again, simply try to see if the packages are present in the [testing] repository.

Doing so could help in any occasion where packages in the mirror have not been synced to [core] or [extra], and are still residing in [testing]. It is perfectly safe to install from [testing] in this case since the packages are being matched by version and release numbers.

In any event, it is best to switch mirrors and sync with pacman -Syy than resorting to an alternate repository. However, all or some of the mirrors may at times be out-of-sync to some degree.

Using all mirrors

To emulate pacman -Su's behavior of going through the entire mirror list, use this script: