Skip to content
SirShaw edited this page Feb 27, 2019 · 9 revisions

Contents

Step 1: Download

Step 2: Install

Step 3: Configuration

Step 4: Port Forwarding

Step 5: Discord Bot

Step 6: HTTPS (SSL)

Step 1: Download

Stable

https://github.com/tsebring/ArkBot/releases

Pre-release built from latest sources

Open as zip-archive or change extension to .zip, binaries are located under tools/.

https://www.myget.org/F/tsebring/api/v2/package/ArkDiscordBot

Step 2: Install

  • Download the latest pre-built binaries (see above).
  • Open arkbot.exe and click on the "configuration" tab next to where it says "console" on the main program window and fill in your configuration. DO NOT EDIT THE config.json MANUALLY. This sometimes "bricks" the config making the arkbot executable unable to read the config!

Step 3: Configuration

All configuration settings are documented in Configuration. Reading this through is a good idea - it will let you know what different settings do and what can be changed.

Step 4: Port Forwarding

To access services remotely port forwarding has to be configured in your router and/or other firewalls.

For more information, see Port Forwarding.

Step 5: Discord Bot

Getting your Discord bot up and running is easy.

  • Register and create your Discord application on https://discordapp.com/developers.
  • Create a bot user for your newly created application by clicking "Create a bot user".
  • Copy App Bot User Token to the botToken setting in your config.
  • To join the bot to your server you have to replace YOUR_CLIENT_ID_HERE in the link below with the Client ID from your Discord application and open the link in your browser.
https://discordapp.com/oauth2/authorize?&client_id=YOUR_CLIENT_ID_HERE&scope=bot&permissions=0

Step-by-step instructions with screenshots can be found using Google Discord adding your bot to your server.

Step 6: HTTPS (SSL)

Enabling SSL (HTTPS) is important to protect users against session hijacking. With SSL enabled the bot will attempt to issue a free SSL-certificate using Lets Encrypt. Once the SSL-certificate has been issued, it is valid for 90 days, after which it must be renewed.

For the SSL-certificate to be issued you need to prove that you control the domain name; the domain must be pointed to your public IP and port 80 must be open externally and available for the bot to bind locally.

Any errors during the process will appear in the ARK Bot console and in the log files. If the process is successful, the bot will continue booting up like normal.

Minimal configuration

Edit your configuration according to the SSL template. In the template change the settings outlined below:

Key Description
password A secure password to protect your SSL-certificate.
email Email address to use when registering with Lets Encrypt. Will receive notifications when issued SSL-certificates are about to expire.
domains Domain name(s) to issue the certificate for.

You may use useCompatibilityNonSNIBindings false if your OS supports SNI bindings (IIS8/Windows Server 2012, Windows 8 etc).

The bot requires netsh to configure these bindings.

SSL template

  "webAppListenPrefix": "https://+:443/",
  "webApiListenPrefix": "https://+:60001/",
  "webAppRedirectListenPrefix": [
    "http://+:80/"
  ],
  "ssl": {
    "enabled":  true,
    "challengeListenPrefix": "http://+:80/",
    "name": "ark-bot-ssl",
    "password": "secret123",
    "email": "youremail@yourdomain.com",
    "domains": [
      "app.yourdomain.com"
    ],
    "ports": [ 443, 60001 ],
    "useCompatibilityNonSNIBindings":  true
  },