How to Install an Alpine Linux Server at Vultr
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
Visit the official Alpine Linux downloads page.
Right-click your desired Alpine Linux image edition and select Copy Link from the list of options to copy its direct download URL.
Open the Vultr Customer Portal.
Navigate to Orchestration and select ISOs from the list of options.
Click Add ISO to add a new ISO image to your account.
Paste your Alpine Linux ISO Image URL in the Remote URL field and click Upload to download the image to your Vultr account.
Monitor the Alpine Linux ISO Image progress and verify that its status changes to Available.
Deploy from the Alpine Linux ISO
Navigate to the Vultr server deployment page.
Under Choose Image, navigate to the Upload ISO tab.
Select the Alpine Linux ISO available in your Vultr account.
Choose your Server Size, Additional Features, and other options.
Click Deploy Now to deploy a new instance using the Alpine Linux ISO.
When the deployment is successful, click the instance name to open its management page.
Click View Console on the upper-right navigation bar to open the Vultr console.
Login as the user
root
with no password.
Install Alpine Linux
Type
setup-alpine
at the root prompt.Choose your keyboard layout. If you don't know your keyboard layout, choose
us
.Choose your keyboard variant. If you don't know, leave this value blank.
Choose a hostname.
When prompted for which interface you want to initialize, choose
eth0
.Choose
dhcp
.If you don't use IPv6, choose
no
for manual network configuration. If you use IPv6, enteryes
for manual configuration and append the following to the file:iface eth0 inet6 static address <your assigned IPv6 address>/64
Choose a password for the
root
user.Choose a timezone.
Enter
none
for the HTTP proxyChoose an NTP client.
chrony
is the default.Choose a mirror geographically close to your Vultr server location, or type
f
to automatically choose the fastest.Choose an SSH server.
openssh
is the default.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]
Choose
sys
when prompted how to use it.When prompted to erase the disk, type Y to confirm.
Wait until you see Installation is complete. Please reboot.
Dismount the ISO
- Navigate to your server's Server Information page
- Navigate to the Custom ISO page under Settings and click Remove ISO
Wait for the server to reboot.
Upgrade the System
- Login as
root
with the password you set earlier. - Type
apk update
to update the repositories - 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.
Type
adduser <username>
to create a user.Type
adduser <username> wheel
to add the user to thewheel
group.Type
apk add doas
to installdoas
which is a privilege escalation tool likesudo
.Allow members of the
wheel
group to usedoas
:echo "permit nopass :wheel" > /etc/doas.conf
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.