Arch Linux on a VPS - ArchWiki

Jump to content
From ArchWiki

Related articles

- Server

From Wikipedia:Virtual private server:

  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.

## Official Arch Linux cloud image

Arch Linux provides an official cloud image as part of the arch-boxes project. The image comes with Cloud-init preinstalled and should work with most cloud providers.

The image can be downloaded from the mirrors under the `images` directory. Instructions for tested providers is listed below:

Provider | Locations | Note
--- | --- | ---
Digital Ocean | Global | Find the cloud image on a mirror, ex: https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-cloudimg.qcow2 Add the image as a custom image by importing it Create a new VM from the custom image SSH to the VM: `ssh root@ip`
1. Hetzner Cloud | Nuremberg, Falkenstein (Germany), Helsinki (Finland) | Create a new VM with this user data:
       #cloud-config
       vendor_data: {'enabled': false}
The `vendor_data` from Hetzner overrides the `distro` and sets the default user to `root` without setting `disable_root: false`, meaning you can not login Boot the VM in rescue mode SSH to the VM and download the cloud image from a mirror, ex: `curl -O https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-cloudimg.qcow2` Write the image to the disk: `qemu-img convert -f qcow2 -O raw Arch-Linux-x86_64-cloudimg.qcow2 /dev/sda` Reboot the VM SSH to the VM: `ssh arch@ip`
Linode | Multiple international locations | Create a new VM and select Arch as the distribution (to use the Linode-provided image, stop here; otherwise proceed with the rest of the steps) Boot the VM in rescue mode Connect to the VM via the Lish console and download the basic image from a mirror, ex: `curl -O https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-basic.qcow2` Install the qemu-utils package: `apt update && apt install qemu-utils` Write the image to the disk: `qemu-img convert -f qcow2 -O raw Arch-Linux-x86_64-basic.qcow2 /dev/sda` In the Linode manager, go to the VM's configurations menu and edit the configuration to change the kernel option to "Direct Disk" Reboot the VM SSH to the VM: `ssh arch@ip`
Proxmox | N/A | Create a new VM. Select "Do not use any media" in OS section. Remove created hard disk from your VM after VM creation completes. Add the downloaded image to your VM using `qm disk import`, ex: `qm disk import 100 Arch-Linux-x86_64-cloudimg.qcow2 local`. Under Options, edit the boot order and add the newly-created disk. Add a cloudinit drive and make your configurations in Cloud-Init section. Start the VM!
Kimsufi OVH Eco | Canada, France | Paraphrasing the official documentation: Navigate to the Dedicated Servers section in your OVH management panel, then select the server you want to deploy Arch Linux to. Click the ... button next to "Last operating system (OS) installed by OVHcloud" and choose "Install" Select "Install from custom image" For "Image URL" put `https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-cloudimg.qcow2` For "Image type" select `qcow2` For "Checksum type" select `sha256` For "Image checksum" put the fingerprint value from https://geo.mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-cloudimg.qcow2.SHA256 Enable "ConfigDrive" to enter "Server host name" and your public "SSH key" (both are mandatory for Arch Cloud Init install) Click "Install the system" Wait (it takes a while) for an email from OVH titled "Installation of your image", it will say "Congratulations! Your dedicated server has just been installed! Connect to your server with ssh key provided during your installation." Use `ssh arch@ip` to log in.

Categories:

- Installation process
- Virtualization