This is a simple terraform workspace to set up a minecraft server using free resources in OCI
- Sign up for an always free OCI account
- Set up terraform for OCI - you only need to follow the steps in the first section ("Prepare")
- populate TF_VAR_OCI shell variables (in a ~/.bashrc or ~/.zshrc file) and add to your terminal session
# OCI / TERRAFORM
export TF_VAR_OCI_TENANCY="..."
export TF_VAR_OCI_TENANCY_OCID="..."
export TF_VAR_OCI_USER_OCID="..."
export TF_VAR_OCI_PRIVATE_KEY_PATH="..."
export TF_VAR_OCI_PUBLIC_KEY_PATH="..."
export TF_VAR_OCI_FINGERPRINT="..."
- Create the infrastructure by running
cd terraform && terraform apply
- the server should be up in about 10 minutes - Go to the console and find your instance's public IP
- Add the minecraft server in your client with address :25565
- SSH into the server to debug or customize the server
- ssh into the server and view the cloud-init logs. Search for lines prefixed with "cloud-init:" for errors in the init script
ssh -i $TF_VAR_OCI_PRIVATE_KEY_PATH opc@<IP>
sudo less /var/log/messages