-
Notifications
You must be signed in to change notification settings - Fork 20
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.
- Download the example stateless docker-compose file and save it as
docker-compose.yaml
(right click the link -> save as) - Fill in the required settings and read the comments about making the bot accessible outside of the container
- Start in foreground using
docker compose up
. If it works, start in background usingdocker compose up -d
Assuming a standard Linux environment. Hosting on Windows is possible but not supported.
- Install Java 17 or higher (Debian/Ubuntu:
apt install openjdk-17-jre-headless
) - Create and enter a directory for the bot files, e.g.
/opt/nameless/discord
- Download the bot jar file from https://ci.rkslot.nl/job/Nameless%20Link%20v5/
- 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!
- Try running the script using
bash start.sh
- 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
- Put contents above in file
/etc/systemd/system/nlink.service
- Run
chmod 644 /etc/systemd/system/nlink.service
- Run
systemctl start nlink
andsystemctl status nlink
. - To start the service on boot, run
systemctl enable nlink
- Put contents above in file
Proceed with the standard setup instructions. Skip the /configure
command step, you have already configured the bot using environment variables.