How to Install an Alpine Linux Server at Vultr

Updated on September 10, 2024
How to Install an Alpine Linux Server at Vultr header image

Introduction

Alpine Linux is a security-focused Linux distribution. This quickstart guide explains how to perform a basic Alpine Linux installation at Vultr.

Upload the Alpine Linux ISO to your Vultr Account

  1. Visit the official Alpine Linux downloads page.

  2. Right-click your desired Alpine Linux image edition and select Copy Link from the list of options to copy its direct download URL.

  3. Open the Vultr Customer Portal.

  4. Navigate to Orchestration and select ISOs from the list of options.

    Access ISOs

  5. Click Add ISO to add a new ISO image to your account.

    Click Add a new ISO Image

  6. Paste your Alpine Linux ISO Image URL in the Remote URL field and click Upload to download the image to your Vultr account.

    Add ISO Image URL

  7. Monitor the Alpine Linux ISO Image progress and verify that its status changes to Available.

    View the Downloaded Alpine Linux Image Status

Deploy from the Alpine Linux ISO

  1. Navigate to the Vultr server deployment page.

  2. Under Choose Image, navigate to the Upload ISO tab.

  3. Select the Alpine Linux ISO available in your Vultr account.

    Select Alpine Linux ISO

  4. Choose your Server Size, Additional Features, and other options.

  5. Click Deploy Now to deploy a new instance using the Alpine Linux ISO.

  6. When the deployment is successful, click the instance name to open its management page.

  7. Click View Console on the upper-right navigation bar to open the Vultr console.

    Access Alpine Instance Console

  8. Login as the user root with no password.

Install Alpine Linux

  1. Type setup-alpine at the root prompt.

  2. Choose your keyboard layout. If you don't know your keyboard layout, choose us.

  3. Choose your keyboard variant. If you don't know, leave this value blank.

  4. Choose a hostname.

  5. When prompted for which interface you want to initialize, choose eth0.

  6. Choose dhcp.

  7. If you don't use IPv6, choose no for manual network configuration. If you use IPv6, enter yes for manual configuration and append the following to the file:

    iface eth0 inet6 static
       address <your assigned IPv6 address>/64
  8. Choose a password for the root user.

  9. Choose a timezone.

  10. Enter none for the HTTP proxy

  11. Choose an NTP client. chrony is the default.

  12. Choose a mirror geographically close to your Vultr server location, or type f to automatically choose the fastest.

  13. Choose an SSH server. openssh is the default.

  14. Choose vda as the disk.

    Disk & Install
    Available disks are:
    -----------------------
       vda (53.7 GB 0x1af4)
    
    Which disk(s) would you like to use? (or, `?` for help or `none`) [none]
  15. Choose sys when prompted how to use it.

  16. When prompted to erase the disk, type Y to confirm.

Wait until you see Installation is complete. Please reboot.

Dismount the ISO

  1. Navigate to your server's Server Information page
  2. Navigate to the Custom ISO page under Settings and click Remove ISO

Wait for the server to reboot.

Upgrade the System

  1. Login as root with the password you set earlier.
  2. Type apk update to update the repositories
  3. Type apk upgrade to upgrade the system's packages

Create a New User

Because logging in as root is not recommended, you should create a new user for daily tasks.

  1. Type adduser <username> to create a user.

  2. Type adduser <username> wheel to add the user to the wheel group.

  3. Type apk add doas to install doas which is a privilege escalation tool like sudo.

  4. Allow members of the wheel group to use doas:

    echo "permit nopass :wheel" > /etc/doas.conf
  5. Type passwd -l root to lock the root account as it is no longer used.

Conclusion

Alpine Linux is now installed and running on your server. Visit the official Alpine Linux wiki for more information on what you can do next.