Skip to content

Self hosting Guide (old)

Robin edited this page Dec 17, 2020 · 1 revision

Note: It is highly recommended for users (especially beginners) to use the official instance Nameless Link bot, which can be setup following these instructions.

This requires a VPS or Dedicated server which you have SSH access to, and beginner knowledge of Linux. A normal webhost will not work.

I try to keep this to the point as most of it is quite simple, but if you need help make an issue here.

Overview

In order to self-host the Nameless Link bot, there are a few key steps you must complete.

  1. Create a Discord Application

  2. Initiate the MySQL Database

  3. Edit configuration file

  4. Port Forward (if needed)

  5. Run bot in screen session

  6. Edit Bot URL value in StaffCP

Steps

  1. Creating a Discord Application

    • Open the Discord Developer Portal and click "New Application"
    • Give it a name, and then click "Next".
    • Click on "Bot" in the left-hand side menu. Click "Add Bot".
    • Take a note of the Token, we will need it in step 3.
  2. Initiate the MySQL Database

    • Download the bot.sql file, and place it in a location you will remember on your server.
    • Open the MySQL command line, and type the following: bot < /path/to/bot.sql, this will add the required tables into a database called bot.
  3. Edit configuration file

    • Make sure you have downloaded the latest version from the releases page. Place the files (Nameless-Link.jar, config.json, languages/) into a directory you have write permissions to on your server. I recommend /home/(your-username)/bot/.
    • Open the config.json file in your favourite text editor, and edit the values to your needs. Some have already been filled out.
    • Put the bot Token (from step 1) into the "token" field, and your MySQL login information in the "mysql" section. Please note that we cannot assist you with finding these values, they are confidential and could be anything. Only you should have access to these.
  4. Port Forward (if needed)

    • Note: If you are not home-hosting, you can probably skip this step
    • Only proceed if you understand what port forwarding is, and what it can cause.
    • In order for the bot to communicate with the outside world, the internet needs to know where to point traffic going to it.
    • Find your model of router (or a similar one) on portforward.com and follow the instructions to forward a TCP port to your server.
    • Double check it is working by visiting canyouseeme.org.
  5. Run bot in screen session

    • This allows the bot to run 24/7 on your server.
    • Please install screen (or an equivalent) on your server and then make a new session.
    • In this new session, navigate to the directory we made in step 3, and run the following command: java -jar Nameless-Bot.jar (if you want extra debugging information, append -debug at the very end of the command.
    • If you don't see any errors, congratulations! The bot is now setup.
  6. Edit Bot URL value in StaffCP

    • Since you are self-hosting the bot, the built in Bot URL in NamelessMC will not work for you.
    • Navigate to StaffCP - Integrations - Discord and set the Bot URL to either the IP (and port) of your bot, or the domain it is under.

Once you have completed these 6 steps, skip to step 2 of the normal setup guide to ensure everything is linked. Well done!

Clone this wiki locally