Change to a Different Download Server

Overview

The official Manjaro repositories (also known as mirrors) are hosted on Software Servers. Physically located throughout the world, these servers are responsible for receiving requests for software packages via the terminal and/or pacman-gui, and consequently delivering them to your system. There are therefore three primary factors that will determine how fast your downloads are:

  • Your internet connection
  • The speed of the server itself, and
  • The proximity of the server to you, that is, how close or how far away it is.


Other than upgrading your internet package or switching providers, it is therefore, potentially possible to improve the speed of downloads from the Manjaro repositories by selecting a different server to use. Servers are currently located in the following countries:

  • Brazil
  • France
  • Germany
  • Greece
  • United Kingdom
  • United States


Two methods to switch servers are available. The first is to manually determine the server to use, as is provided in this guide. The second is to use the Rankmirrors command to automatically determine and set the fastest possible server on your behalf, provided in the Use Rankmirrors to Set the Fastest Download Server guide.


Note
The closest server may not always necessarily be the fastest!

Step 1: Changing Servers

Note
The contents of the mirrorlist will look different depending on when and which version of Manjaro was installed. This is because prior to the release of 0.8.2, Rankmirrors was automatically used to select the fastest server. This feature was removed with the release of 0.8.2, resulting in a cleaner and simplier looking mirrorlist.


This is undertaken by amending the mirrorlist file, which is read by Manjaro's package manager, pacman, for the internet addresses of the Manjaro servers to download updates and software applications from.


Open the Mirrorlist

Tip
More than one server can be enabled. However, they will be selected in the order they are listed, and pacman will only select another server if there is a problem with the one before it.


You will need to first open your terminal in order to edit the mirrorlist file. The syntax of the command to edit the mirrorlist is:

sudo [text editor] /etc/pacman.d/mirrorlist


For example, if you wish to edit the file within the terminal using nano (a standard terminal-based text editor) then enter:

sudo nano /etc/pacman.d/mirrorlist


However, if you have installed the full version of Manjaro (but not the NET-Edition) you may find it easier to use the pre-installed gedit text editor instead. This will open the mirrorlist file up as a document, making it easier to read and edit. To use gedit, the command is:

sudo gedit /etc/pacman.d/mirrorlist

Edit the Mirrorlist

Lines beginning with a hash '#' will be ignored by pacman. Hence to disable a mirror, a comment can be put in the beginning of a line starting with Server.

The mirrorlist can be long generally and only a part of it is displayed below:

##
## Manjaro Linux repository mirrorlist
## Generated on 20 January 2015 13:44
##
## Use pacman-mirrors to modify
##


## Location  : Africa
## Time      : 1.781
## Last Sync : 1:37
Server = http://manjaro.mirror.ac.za/stable/$repo/$arch

## Location  : Brasil
## Time      : 2.495
## Last Sync : 1:47
Server = http://manjaro.fis.unb.br/stable/$repo/$arch

## Location  : France
## Time      : 0.664
## Last Sync : 0:37
Server = http://mirror.finn.lu/manjaro/stable/$repo/$arch

## Location  : Germany
## Time      : 0.744
## Last Sync : 0:17
Server = http://mirror3.layerjet.com/manjaro/stable/$repo/$arch

## Location  : Australia
## Time      : 1.030
## Last Sync : 0:37
Server = http://mirror.ventraip.net.au/Manjaro/stable/$repo/$arch

## Location  : United_States
## Time      : 1.058
## Last Sync : 0:07
Server = http://www.gtlib.gatech.edu/pub/manjaro/stable/$repo/$arch

## Location  : United_Kingdom
## Time      : 1.157
## Last Sync : 0:47
Server = http://repo.manjaro.org.uk/stable/$repo/$arch

## Location  : Germany
## Time      : 1.296
## Last Sync : 0:07
Server = http://mirror.netzspielplatz.de/manjaro/packages/stable/$repo/$arch

## Location  : Netherlands
## Time      : 1.357
## Last Sync : 2:47
Server = http://ftp.nluug.nl/pub/os/Linux/distr/manjaro/stable/$repo/$arch

## Location  : Italy
## Time      : 1.453
## Last Sync : 2:07
Server = http://manjaro.mirror.garr.it/mirrors/manjaro/stable/$repo/$arch


Warning
Do not remove hashes from the lines that contain the names of the server countries.


Once you have disabled and/or enabled the desired server(s), save the changes and close the mirrorlist as follows:

  • nano: Press CTRL and 'x' to exit, 'y' to save, and <enter> to finish, or
  • gedit: Select the 'save' option and then close the window.


Now, all that is required is to Synchronise the newly enabled server(s):

sudo pacman -Syy

Step 2: Synchronising with the Newly Enabled Server(s)

Your Manjaro system has a database of all the software packages that are available from the official repositories. These are used by pacman to locate and download them for installation. Synchronising your database after changing servers will therefore ensure that it is up to date, and avoid any potential problems when subsequently downloading software packages.

To synchronise your database with the Manjaro repositories, enter the following command in the terminal:

sudo pacman -Syy


Once the Mirrorlist has been amended and the database synchronised, the change will be immediate. There will be no need to reboot your system for the change to take effect.


See Also