Alpine is probably one of the lightweight Linux distribution out there. It’s a very small, simple and security oriented. It doesn’t shipped with hundreds of bloatware which you probably don’t use in your lifetime. It just have the minimal packages installed which gets you up and running. You always have the option to install your desire packages later. Alpine is one of my favorite Linux distribution since it is lightweight, RAM and CPU efficient. Also it is very easy to setup.
DigitalOcean doesn’t provide Alpine as distribution. Currently it supports Ubuntu, Fedora, FreeBSD, Debian & CentOS. We will see how to ‘install’ Alpine Linux in DigitalOcean droplet. Basically we will convert Debian droplet to Alpine distribution.
First thing first, if you don’t have DigitalOcean account, simply create one by clicking here (referral link). You will receive 50$ free credit upon registration if you register via this link.
Now, create a droplet in DigitalOcean with debian-10 x64
Now under authentication, use SSH key, not password. If you use password as authentication, you won’t be able to login when we convert our droplet to Alpine. So use SSH key as authentication. I’ve written another tutorial about DigitalOcean where I explained how to generate SSH key.
After droplet creation, login to your droplet with SSH key and let’s get our hands dirty by executing the following commands:
chmod +x digitalocean-alpine.sh
Success! Wait for a few seconds or take a cup of coffee. Your droplet will be converted to Alpine Linux. Remember to use the same SSH key for login.
Thanks to bontibon for that script.
If you want to try out Alpine for your server or vm, you can download the respective package from their download site