Skip to content
Single script to build a custom image of Archlinux for DigitalOcean
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Archlinux Custom Image builder for Digitalocean

This tool will allow you to easily make an Archlinux custom image for use with DigitalOcean.


A few years ago DigitalOcean supported Archlinux as a standard image. When they dropped official support, people started using a conversion script that could convert a Debian system to an Archlinux system. As of late 2018 DigitalOcean now supports custom images, making a custom image is a process that takes time to get right.

What's in the image:

This is a very limited image, you can add packages at the top of the script.

  • haveged is installed and enabled by default.
  • sshd is installed and enabled by default.
  • base-devel is installed, you may not need this.
  • git is installed, this is needed for the digitalocean synchronize AUR package
  • wget, I am not sure this is strictly needed.
  • gptfdisk, used for the disk resize magic.
  • parted, used for disk resize magic.
  • digitalocean-synchronize AUR package to automatically setup network
  • DNS is setup for google's DNS on
  • All pacman mirrors are enabled by default.

At first boot a few things happen:

  • A resize the image to take up the full size of the disk.
  • Unique SSH host keys
  • Unique machine-id

How to use:

Run the script as root and give it a file name for your image.

# curl -O
# chmod u+x
# ./ foo.img

This will create a foo.img and a compressed foo.img.gz

Or just get the latest image from

Then in the DigitalOcean console upload a custom image, you can even import via URL and have DigitalOcean pull directly from

NOTE: The image created from this tool needs you to use SSH keys to access the server for the first time.


Yes, lots I expect. This has had limited testing, feel free to report bugs or feature requests to < robsonde at gmail >

You can’t perform that action at this time.