Skip to content

Instantly share code, notes, and snippets.

@iqbalmineraltown
Last active July 9, 2020 10:46
Show Gist options
  • Save iqbalmineraltown/c56f6f9484a7f46aaa649de3ec705aea to your computer and use it in GitHub Desktop.
Save iqbalmineraltown/c56f6f9484a7f46aaa649de3ec705aea to your computer and use it in GitHub Desktop.
Risk of Rain 2 doctl
#!/bin/bash
DO_DROPLET_NAME=ror2-node
DO_SIZE=s-2vcpu-2gb
DO_REGION=sgp1
DO_SSH_ID=ssh_id_here #$(doctl compute ssh-key list --no-header --format ID)
DO_TAGS=game
MAIL_NOTIF=example@sample.com
GAME_PASSWORD=password_here
#!/bin/bash
source config.sh
doctl compute droplet create $DO_DROPLET_NAME --size $DO_SIZE --image docker-18-04 --region $DO_REGION --ssh-keys $DO_SSH_ID --tag-names $DO_TAGS --wait
export DO_DROPLET_IP=`doctl compute droplet list | grep $DO_DROPLET_NAME | cut -d$' ' -f9`
curl "curlmail.co/$MAIL_NOTIF?subject=cl_password\"$GAME_PASSWORD\";connect\"$DO_DROPLET_IP:25000\";"
ssh -o "StrictHostKeyChecking=no" root@$DO_DROPLET_IP "docker run avivace/ror2server:0.1 -p 25000:27015/udp -e R2_PSW='$GAME_PASSWORD'"
#!/bin/bash
source config.sh
doctl compute droplet delete -f $DO_DROPLET_NAME
@iqbalmineraltown
Copy link
Author

Start server:

  1. Authenticate doctl on your machine
  2. Fill DO_SSH_ID, DO_SSH_ID, and GAME_PASSWORD
  3. Run ./create.sh

Delete server:

  1. Run ./destroy.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment