-
Notifications
You must be signed in to change notification settings - Fork 20
Installation guide
Robin edited this page Jan 18, 2021
·
38 revisions
Downsides of using the central bot instance:
- you give your API key to us
- it may go down unexpectedly
- in case of a backwards-incompatible change, the bot will break for you until you upgrade your website
Only self-host if you know what you're doing, we provide limited support for self-hosting.
Does not require a database, only allows one website and one Discord server. This is the easiest to set up and recommended for everyone hosting a bot for their website.
- 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
.
- Install Java 11 or higher (e.g.
apt install openjdk-11-jre-headless
) - Create and enter a directory for the bot files, e.g.
/opt/nameless/discord
- Download the bot jar file here
- 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 GUILD_ID="enter discord server id here" export DISCORD_TOKEN="enter bot token here" java -jar Nameless-Link.jar
- 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
- Put contents above in file
This is what we use to host the central bot.
- Download the example postgres 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
.
There is no systemd service file or example start script available at this time.