This script is made with the intention of helping new developers get access to useful resources for their projects, that being the free tier of Oracle Cloud Infrastructure, which offers a cloud VPS with 24GB of memory and 4 OCPUs.
If this script helps you at all or you would like to support my work, consider donating to my ko-fi 🩷
Warning
A *nix dev environment such as Linux, MacOS or WSL for Windows is HIGHLY recommended to avoid issues
- Install Go from their site
git clone https://github.com/Sophed/oci-claimer
cd oci-claimer
go build
- You don't have to!
- Figure out if you're running ARM or x86 with
uname -m
- Download the latest release for your system with
wget <tar-name>.tar.gz
- Extract the tar contents with
tar -xzf <tar-name>.tar.gz
discord_id
is the user ID of your Discord account, used to notify youwebhook_url
is the URL for the Discord webhook you want to usessh_public_Key
is the path to the SSH public key you will use to connect to the instancenotify_out_of_capacity
determines whether or not to send webhook messages for every "out of capacity" error, will cause spamretry_delay
is how long to wait before trying all domains again (recommended 120)availability_domain_switch_delay
is how long to wait between each domain attempt (recommended 60)availability_domains
is a list of all the availability domains to try, find them heredisplay_name
is the name of the instance to createshape
determines the shape of the instance, can be found on OCI panelocpus
is the number of OCPUs to allocate (max 4 for free tier)memory_gbs
is the amount of memory to allocate in GBs (max 24 for free tier)boot_volume_gbs
is the size of the boot volume (storage) in GBs, free tier has a global limit of 200, I recommend 100 to save space for other instancescompartment_id
is the ID of your OCI compartment, find it hereimage_id
is the ID of the OS image to use for your instace, I actually don't know how you're supposed to find these, I just used dev tools in my browser to grab it from the HTTP requestsubnet_id
is the ID of the subnet for your instance, can be found in the subnet details
- Log into your OCI panel and head to user settings
- Head to the API keys section and add a new API key
- Download the key and make a note of the path
- Then add the contents of the config to
~/.oci/config
- You should then edit the
key_file
value of that same config to the path of your previously downloaded API key
- Start the program in the background, I personally use a
tmux
session
./ociclaimer