Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.

Setup the application

Lukas edited this page Dec 28, 2018 · 3 revisions

1. Get the executable

Clone the repository and build it using GO111MODULE=on go build ./... or download a precompiled release.

2. Configuration

Because you don't want to read the whole configuration guide, here are some common configuration files:

Using DigitalOcean as provider:

{
  "web": {
    "port": 8011,
    "cors_domain": "YourDomain"
  },
  "gmod": {
    "port": 27015,
    "rcon_password": "YourRconPassword",
    "check_interval": 5,
    "shutdown_after": 60
  },
  "cloud": {
    "provider": "DigitalOcean",
    "token": "YourDigitalOceanToken",
    "server_name": "ubuntu-ttt-1vcpu-1gb-fra1",
    "server_type": "s-1vcpu-1gb",
    "region": "fra1",
    "snapshot": "YourSnapshotName",
    "ssh_key": "YourSSHKey"
  }
}

Using Hetzner as provider:

{
  "web": {
    "port": 8011,
    "cors_domain": "YourDomain"
  },
  "gmod": {
    "port": 27015,
    "rcon_password": "YourRconPassword",
    "check_interval": 5,
    "shutdown_after": 60
  },
  "cloud": {
    "provider": "Hetzner",
    "token": "YourHetznerToken",
    "server_name": "ubuntu-ttt-2gb-fsn1",
    "server_type": "cx11",
    "region": "fsn1",
    "snapshot": "YourSnapshotName",
    "ssh_key": "YourSSHKey"
  }
}

As you can see, there some values which begin with Your.

You have to fill in these values, so here's a guide how:

YourDomain

The domain where your frontend (see step 3) should run. (This is important to allow Cross-Origin-Requests) Example: http://example.com

YourRconPassword

The rcon password for GMod server.
Take a look into your server.conf of your GMod server and search for the rcon_password variable.
Example: SuperSerectPassword

YourSSHKey

The fingerprint of your ssh key which should be added to the server.
Run the command to extract the fingerprint ssh-keygen -l -E md5 -f ~/.ssh/id_rsa.pub.
Example: 55:7e:14:58:2a:be:66:67:48:e8:9e:e0:71:2d:b3:73

YourSnapshotName

The name of your snapshot of the GMod server.
If you don't have a snapshot, read Prepare a GMod server. Example: ubuntu-ttt-1vcpu-1gb-fra1

YourDigitalOceanToken

The api token for your DigitalOcean account.
Get it under the tab API and click generate new token.
Don't publish it anywhere. Example: NqESa96oRnHg3qD7BN2qoBQ68igMBGXsS69sBNhvN3EqwoW7woSvXkn8FpvHKQtH

YourHetznerOceanToken

The api token for your Hetzner account.
Go into your project, click on 'Zugänge' and 'API-Tokens' and generate a new one Example: NqESa96oRnHg3qD7BN2qoBQ68igMBGXsS69sBNhvN3EqwoW7woSvXkn8FpvHKQtH

That's it, you are ready to go!

If you want to dive deeper into the configuration, read more here.

3. Web Frontend

To start your server and take a look at the status, you can use a web interface.

I've created one: StartMyGameFront

Important: During the setup use the domain specified as YourDomain.

Clone this wiki locally