Skip to content

Installation guide

Robin edited this page Jul 1, 2023 · 38 revisions

We don't provide support for self-hosting. If you don't know what these installation instructions mean, consider using our hosted bot instead.

Before you get started, create a bot in the Discord Developer Portal. You need the bot token and invite link.

Option 1: Using docker

  1. Download the example stateless docker-compose file and save it as docker-compose.yaml (right click the link -> save as)
  2. Fill in the required settings and read the comments about making the bot accessible outside of the container
  3. Start in foreground using docker compose up. If it works, start in background using docker compose up -d

Option 2: Manually

Assuming a standard Linux environment. Hosting on Windows is possible but not supported.

  1. Install Java 17 or higher (Debian/Ubuntu: apt install openjdk-17-jre-headless)
  2. Create and enter a directory for the bot files, e.g. /opt/nameless/discord
  3. Download the bot jar file from https://ci.rkslot.nl/job/Nameless%20Link%20v5/
  4. Create a script to launch the bot (e.g. start.sh). Set environment variables then start the bot using java -jar Nameless-Link.jar. Example:
    #!/bin/bash
    set -e
    export BOT_URL="http://localhost:27362"
    export WEBSERVER_PORT="27362"
    export API_URL="enter nameless api url here"
    export API_KEY="enter nameless api key here"
    export GUILD_ID="enter discord server id here"
    export DISCORD_TOKEN="enter bot token here"
    java -jar /path/to/Nameless-Link.jar # it's important that this is an absolute path if you intend to run this script from a systemd unit file!
  5. Try running the script using bash start.sh
  6. If it works, create a systemd unit file to run it as a daemon at startup. Example, might need changing:
    [Unit]
    Description=Nameless Link Bot Service.
    
    [Service]
    Type=simple
    ExecStart=/bin/bash /opt/nameless/discord/start.sh
    
    [Install]
    WantedBy=multi-user.target
    
    1. Put contents above in file /etc/systemd/system/nlink.service
    2. Run chmod 644 /etc/systemd/system/nlink.service
    3. Run systemctl start nlink and systemctl status nlink.
    4. To start the service on boot, run systemctl enable nlink

After installation

Proceed with the standard setup instructions. Skip the /configure command step, you have already configured the bot using environment variables.

Clone this wiki locally