Skip to content

Instantly share code, notes, and snippets.

@kworthington
kworthington / arch-digitalocean.md
Created June 19, 2022 02:20 — forked from 46bit/arch-digitalocean.md
Arch Linux on DigitalOcean

Arch Linux on DigitalOcean

DigitalOcean are a promising host: good machines, lovely interface, lots of free credit floating about. However they don't support custom disk images, which leaves a lot of distros unusable.

You can use this script to replace a fresh Debian 7.0 droplet with an Arch system (including the Arch Kernel). While there's no reason to think this script does anything naughty, it isn't easy to be sure. DigitalOcean might make a change that renders it unbootable, so backups would be advisable.

  1. Create a new Debian 7.0 droplet (either 32-bit or 64-bit works).
  2. In the droplet (either SSH or console access works), run the following as root:
# example WordPress configuration for Nginx as used on kevinworthington.com.
# Ubuntu 14.04.4, PHP 5.5.9, MySQL 5.5.49, Nginx 1.10.0. Last updated 24 May 2016 - Kevin Worthington
server {
# Default server block blacklisting all unconfigured access
#listen 8080 default_server;
listen 80 default_server;
server_name _;
return 444;
}
# example WordPress configuration for Caddy as used on kevindustries.com.
# Ubuntu 14.04.5, PHP 5.5.9, MySQL 5.5.52, Caddy 0.9.3. Last updated 20 October 2016 - Kevin Worthington
# Redirect all www. requests to base URL:
www.kevindustries.com {
redir https://kevindustries.com{uri}
}
kevindustries.com {
root /var/www/kevindustries.com
/* Reference: http://mattonomics.com/guess-a-four-digit-number-in-php/ */
/* I didn't look into how to pass into POST variables, but this will spit out 0000-9999 */
$input = 0;
while ($input < 10000)
{
echo str_pad($input, 4, "0", STR_PAD_LEFT) . "<br />";
$input++;
}
/**
* DABBLET
*/
#header{
background: #fff;
background: linear-gradient(90deg, #F47D2C, #1f4f1f);
min-height: 400px
}
h1 {
color:white;