Arch Linux VPS
- Virtual private server (VPS) is a term used by Internet hosting services to refer to a virtual machine. The term is used for emphasizing that the virtual machine, although running in software on the same physical computer as other customers' virtual machines, is in many respects functionally equivalent to a separate physical computer, is dedicated to the individual customer's needs, has the privacy of a separate physical computer, and can be configured to run server software.
This article discusses the use of Arch Linux on Virtual Private Servers, and includes some fixes and installation instructions specific to VPSes.
- Since many container-based virtualization environments rely on older kernels, it may be impossible to keep an Arch Linux install up-to-date in such an environment. Linux 2.6.32, used by OpenVZ 6, is not supported by systemd since version 205 (and will not work with systemd-212 or higher). OpenVZ does sometimes backport newer kernel features into its kernel, but as of 2018-06-27, a fresh installation of Arch does not work on OpenVZ 6 kernel version 2.6.32-042stab131.1 . Arch can be installed on OpenVZ 7, with a minor workaround, as of OpenVZ 7 kernel version 3.10.0-693-21.1.vz7.48.2 .
- 1 Providers that offer Arch Linux
- 2 Installation
- 2.1 KVM
- 2.2 OpenVZ
- 2.3 Xen
Providers that offer Arch Linux
- Loading custom disc images (requires hardware virtualization such as in Xen or KVM),
- Installing under chroot, for example with the help of the vps2arch script (it will download the latest iso; be particularly aware of the systemd 220/221 bug), or
- Following #Installing the latest Arch Linux on any OpenVZ container provider instructions, using rsync to synchronize Arch over the top of another distribution.
|1984hosting.com||2016.x||Xen||Iceland (IS)||Hardware will provide any image you request, has Arch in default image list.|
|4smart.cz||2013.08||OpenVZ||Prague, CZ||(Czech language site only) when updating system make sure you use [tredaelli-systemd] in pacman.conf (see Unofficial user repositories|
|affinity.net.nz||2013.08.01||KVM||Auckland, New Zealand (NZ)||IRC channel is #affinity on ircs.kiwicon.org|
|Atlantic.Net||2016.03.01||KVM||NYC/SF/Toronto/Dallas/Orlando, US & Canada||100% SSD 1-click Arch Linux, ready in 30 seconds. It is also easy to update Arch to the current version because the pre-provisioned Arch image is relatively current.|
|BuyVM||2017.08.01||KVM||Buffalo, (US-NY); Las Vegas, (US-NV); Luxembourg, Germany (DE)||Cannot select Arch at purchase. Once purchased, use Stallion control panel to install Arch manually from ISO.|
|Coinshost||2015.04||Xen||Zurich, Switzerland||Bitcoin and other cryptocurrencies accepted.|
|Cherry Host||Latest||KVM||Santee, US-CA||Must submit a support ticket to get Arch installed.|
|Contabo||Latest||KVM||German||Only place to get 500 GB for 7€ - Decent speed. Other cheaps plans add snapshots, which is useful if you VPS runs a rolling release distro.|
|DirectVPS||2014.01.xx||OpenVZ||Amsterdam, NL; Rotterdam, NL||(Dutch language site only)|
|Edis||2013.03.01||vServer, KVM, OpenVZ||Multiple international locations.||Also offer dedicated server options as well as an "off-shore" location at the Isle of Man (IM). Requires mounting an Arch ISO for a full manual install.|
|GigaTux||2013.06.01||Xen||Chicago, US-IL; Frankfurt, DE; London, GB; San Jose, US-CA||Currently, when changing to the US$ currency, the page breaks and it is not possible to provision a server.|
|Host Virtual||2014.06.01||KVM||Multiple International Locations||Appears to use KVM virtualization. Site lists "Xen based virtualization" and features lists ability to install from ISO. VPS plans are very expensive with an setup fee as well.|
|Hostigation||Latest||OpenVZ, KVM||Charlotte, US-NC; Los Angeles, US-CA||Arch is not currently listed as a choice.|
|Leapswitch Networks||2013.10.xx||OpenVZ/KVM||USA, India, Portugal, Spain, Ukraine, Germany||Arch Linux currently available in Control Panel for reinstall, not on order form.|
|Linevast.de||Latest||OpenVZ, KVM||Germany||Arch Linux is possible on openvz and on KVM with the one click os installer.|
|Linode||Latest||KVM||Multiple US, London, Frankfurt, Tokyo, Singapore||Linode instances are configured to run Arch's kernel by default. Linode provides custom kernels which can be selected in the manager settings. There are also community-supported kernels in the AUR, such asAUR.|
|LYLIX||2014.01.xx||OpenVZ||Multiple US; Europe||32-bit and 64-bit available|
|Netcup||2012.11.xx||KVM||Germany (DE)||(German language site only)|
|MedHaHosting||Latest||KVM||Buffalo, NY, USA; Atlanta, GA, USA; Chicago, IL, USA; Los Angeles, CA, USA||ArchLinux available on request. Many Linux and Windows hosting options.|
|OnePoundWebHosting||2014.01||Xen PV, Xen HVM||United Kingdom (UK)||They are a registrar too. Unable to verify server locations.|
|OVH||Latest||KVM||Beauharnois, Canada (CA); Frankfurt, Germany (DE); Gravelines, Stratsbourg, France (FR); Warsaw, Poland (PL); London, United Kingdom (UK)|
|PacmanVPS||2014.01||KVM||Canada (CA), Poland (PL)||Arch image is very old and PacmanVPS repos are broken. Not possible to update Arch. Site appears unmaintained.|
|Proplay||Latest||OpenVZ, KVM||Germany (DE)||(German language site only)|
|Rackspace Cloud||2013.6||Xen||Multiple international locations||Billed per hour. Use their "next gen" VPSes (using the mycloud.rackspace.com panel); the Arch image on the first gen Rackspace VPSes is out of date.|
|RamHost.us||2013.05.01||OpenVZ, KVM||Los Angeles, US-CA; Great Britain (GB); Atlanta, US-GA; Germany (DE)||You can request a newer ISO on RamHost's IRC network.|
|RamNode||2016.01.01||SSD and SSD Cached: KVM||Alblasserdam, NL; Atlanta, GA-US; Los Angeles, CA-US; New York, NY-US; Seattle, WA-US||You can request Host/CPU passthrough with KVM service. Frequent use of discount promotions., Must install Arch manually from an ISO using VNC viewer.|
|RoseHosting||Latest||OpenVZ, KVM||St. Louis, Missouri, USA||SSD powered hosting plans with free fully-managed 24/7 support. No unmanaged VPS offerings.|
|SeedVPS||Latest||OpenVZ, KVM||Amsterdam, Netherlands||Linux VPS and Windows VPS Hosting in The Netherlands (NL). Newer ISO can be requested by opening a support ticket.|
|Server Cheap||Latest||OpenVZ, KVM||Chicago, Illinois, USA||ArchLinux available on request. Windows, BSD, and many Linux distribution hosting options.|
|TransIP||2017.01.01||KVM||Amsterdam, NL||For latest image, submit ticket. Also registrar.|
|upCUBE||Latest||Docker||Germany||Different prepared arch linux templates available|
|Virpus||2014.11.07||Xen||Kansas City, US-KS; Los Angeles, US-CA||Arch is not offered as a choice when creating a server (even though the Arch logo is prominently featured on the site). As of 2018, the most recent version of Ubuntu offered is 14.04, and the limited-time promo code for new sign ups is over two years old. None of this generates much trust.|
|Virtual Master||2012-08||??||Prague, CZ|
|VPS6.NET||2013.01.xx||OpenVZ, Xen, HVM-ISO||Multiple US; Frankfurt, DE; Bucharest, RO; Istanbul, TR||Registrar.|
|VPSBG.eu||2013.10||OpenVZ||Sofia, Bulgaria||Offshore VPS in Bulgaria - anonymous registrations and Bitcoin are accepted.|
|VPSCHEAP||Latest||NVM KVM||Dallas, TX, USA||Has one plan that allows you to select ArchLinux, but doesn't appear in any other plan, but available on request|
|VPSSERVER||2015.07||KVM||Chicago, US-IL; Dallas, US-TX; Miami, US-FL; New York, US-NY; Silicon Valley, US-CA; Amsterdam, NL; Frankfurt, DE; London, UK||Currently the latest Archlinux OS version we are providing is 2015.07 x64 and you can't update the OS version to the new version.|
|Vultr||Latest||KVM||Multiple International locations||When deploying a new server just select the Arch install ISO from Vultr ISO Library. Then just manually run through the standard Arch installation guide.|
|World4You||2015.10.28||OpenVZ||Austria (AT)||Internet hosting provider; quick setup; 24/7 support; shared web hosting; also CentOS, Debian, Ubuntu, Fedora and Arch OpenVZ servers; supports newest systemd (227 atm)|
|XenVZ||2009.12.07||OpenVZ, Xen||United Kingdom (UK), United States (US)||Hardware|
|ZappieHost||Latest||LXC||Auckland, New Zealand (NZ)||Hosted on redundant SSDs. Kernel 4.X using LXC|
|ZeptoVM||Latest||KVM||St. Petersburg, RU; Khabarovsk, RU; Seoul, KR; Ashburn, US||Also provides local Archlinux mirror in some locations.|
Installing the latest Arch Linux on any OpenVZ container provider
It is possible to directly copy an installation of Arch Linux over the top of a working OpenVZ VPS. This tutorial explains how to create a basic installation of Arch Linux with
pacstrap (as used in a standard install) and then replace the contents of a target VPS with it using rsync.
This process (with minor modification) also works to migrate existing Arch installations between various environments and has been confirmed to work in migrating from OpenVZ to Xen and from Xen to OpenVZ. For an install to Xen, other hardware-virtualized platforms, or even to physical hardware, extra steps (basically running
mkinitcpio and installing a boot loader) are needed.
- A working Arch Linux installation
- To keep things simple, it should match the architecture you want to install on your VPS (x86_64 or i686).
- To build from other distributions, arch-bootstrap.sh can be used in place of
- The official repositories
, , and packages from the
- SSH is not strictly required, but rsync over SSH is the method used here.
- A VPS running any distribution, with
rsyncand a working SSH server
- Its architecture (x86_64 or i686) does not matter as long as the OpenVZ installation can support your target architecture.
- OpenVZ's serial console feature (usually accessible via your provider's control panel)
- Without this, any network configuration for the target VPS will have to be done immediately after the "Build" step below.
Building a clean Arch Linux installation
As root, build the installation (optionally replacing
build with your preferred target directory):
# mkdir build # pacstrap -cd build
Other tweaks for the
-C custom-pacman-config.conf- Use a custom pacman configuration file. By default,
pacstrapbuilds according to your local pacman.conf. This determines the architecture (i686 or x86_64) of the build, the mirror list, etc.
pacstrapfrom copying your system's pacman keyring to the new build. If you use this option, you will need to run
pacman-key --populate archlinuxin the Configuration step to set up the keyring.
pacstrapfrom copying your system's pacman mirror list to the new build.
- You can pass a list of packages to
pacstrapto add them to your install, instead of the default
basegroup. For example:
pacstrap -cd build base openssh dnsutils gnu-netcat traceroute vim
Preparing the Arch build for use on an OpenVZ 7 container
OpenVZ 7 will fail to start a container if some expected network configuration files don't exist. The easiest way to get around this is as follows:
- Create the OpenVZ 7 container as Debian 8 (Debian 9 would probably work as well).
- Create the required blank network configuration files inside the Arch build, as follows:
# mkdir build/etc/network # touch build/etc/network/interfaces # mkdir -p build/etc/resolvconf/resolv.conf.d # touch build/etc/resolvconf/resolv.conf.d/base
Replacing everything on the VPS with the Arch build
Replace all files, directories, etc. on your target VPS with the contents of your
build directory (replacing "YOUR.VPS.IP.ADDRESS" below):
rsyncis very destructive, especially with any of the
# rsync -axH --numeric-ids --delete-delay -e ssh --stats -P build/ YOUR.VPS.IP.ADDRESS:/
Explanation of options:
-a- Required. Preserves timestamps, permissions, etc.
--delete- Required. Deletes anything in the target that does not exist in the source
-x- Important. Prevents the crossing of filesystem boundaries (other partitions, /dev, etc.) during the copy
-H- Important. Preserves hardlinks
--numeric-ids- Important. Doesn't assign user/group ownership of files based on matching user and group names and instead uses the numeric IDs directly, ensuring proper file ownership on the target system
--delete-delay- Recommended. Enables alternate deletion mode which waits to delete anything until the synchronization is otherwise complete, which may reduce the risk of a slow transfer causing the target VPS to lock-up
-e ssh- Recommended. Uses
rsyncover SSH (recommended for simplicity compared to setting up an
-P- Recommended. Shows partial progress information during transfer
--stats- Recommended. Shows transfer statistics at the end
- Reboot the VPS externally (using your provider's control panel, for example).
- Using OpenVZ's serial console feature, configure the network and basic system settings (ignoring fstab generation and arch-chroot steps).
- If you do not have access to the serial console feature, you will need to preconfigure your network settings before synchronizing Arch to the VPS.
- On some VPS configuration you won't have a gateway to connect to, here is an example netctl configuration for this setup. It configures static IP addresses and default routes on venet0 and uses Google Public DNS.
Description='VPS venet connection' Interface=venet0 Connection=ethernet IP=static Address=('192.0.2.42/32') Routes=('default') IP6=static Address6=('2001:db8::1234:5678/128') Routes6=('default') DNS=('2001:4860:4860::8888' '2001:4860:4860::8844' '188.8.131.52' '184.108.40.206')