This guide is meant for end-users who are willing to set up their own version of Rin. This allows you to self host your own version of Rin, and credits to Ellie (@TheSilkky) for making this all possible.
In order to get started self-hosting your own version of Rin, you'll need some of the following installed:
Note If you are using Docker Desktop, Docker CLI and Docker Compose are already included and installed
Rin builds to 2 different Docker Registries: GHCR (GitHub Container Registry) and Docker Hub. You can pull production builds from both, but it is advised to use all production builds from Docker Hub
Note Do not use the dev-builds for production. Dev-builds are known to be unstable, and contain breaking changes. And therefore tagged versions or production builds should be used instead
-
Pull the latest production build from either GHCR or Docker Hub
GHCR (Replace
version
with the latest tagged release from GitHub):docker pull ghcr.io/no767/rin:latest
Docker Hub:
docker pull no767/rin-prod:latest
-
Go ahead and get the access tokens and/or API keys for some of the APIs. Here's a list of the services that require API Keys or Access Tokens
-
Go ahead and get the token for Rin. Save it instead, and this will be used to authorize the bot. Instructions can be found here.
-
Download the example docker env file. You'll put your API keys, bot tokens, and access tokens inside there.
curl:
curl -o .env https://raw.githubusercontent.com/No767/Rin/master/.env-docker-example
wget:
wget -O .env https://raw.githubusercontent.com/No767/Rin/master/.env-docker-example
-
Invite your bot into your server of choice
-
Adjust the values as needed. Replace
apiKey
with the correct API Keys, ACcess Tokens, Client IDs and Client Secrets. TheTOKEN
env is the token for the bot. Make sure that this is correct, or else the bot will not launch and function. Also make sure to invite your bot to your server first.
Note Dev builds require another env var to be set. Set the env var
TESTING_BOT_TOKEN
to the same exact token as theTOKEN
env var.
-
Now once you have everything set, it's time to run the bot. Use the command below to run the bot
sudo docker run -d --restart=always --env-file=.env --name=Rin no767/rin-prod:latest
Note If you are using Windows, then you don't need to use
sudo
with the commands.
- (Optional) Check the logs of the docker container to make sure that you are not missing anything
-
Download the
.env-docker-example
file anddocker-compose-example.yml
filecurl:
curl -o .env https://raw.githubusercontent.com/No767/Rin/master/.env-docker-example \ && curl -o docker-compose.yml https://raw.githubusercontent.com/No767/Rin/master/docker-compose-example.yml
wget:
wget -O .env https://raw.githubusercontent.com/No767/Rin/master/.env-docker-example \ && wget -O docker-compose.yml https://raw.githubusercontent.com/No767/Rin/master/docker-compose-example.yml
-
Go ahead and get the access tokens and/or API keys for some of the APIs. Here's a list of the services that require API Keys or Access Tokens
-
Go ahead and get the token for Rin. Save it instead, and this will be used to authorize the bot. Instructions can be found here.
-
Invite your bot into your server of choice
-
Adjust the values as needed (within the
.env
file). ReplaceapiKey
with the correct API Keys, ACcess Tokens, Client IDs and Client Secrets. TheTOKEN
env is the token for the bot. Make sure that this is correct, or else the bot will not launch and function. Also make sure to invite your bot to your server first.
Note Dev builds require another env var to be set. Set the env var
TESTING_BOT_TOKEN
to the same exact token as theTOKEN
env var.
-
Now once you have everything set, it's time to run the bot. Use the command below to run the bot
sudo docker-compose up -d
To stop the bot, you can just stop the docker compose stack:
sudo docker compose stop
Note If you are using Windows, then you don't need to use
sudo
with the commands.
- (Optional) Check the logs of the docker container to make sure that you are not missing anything
Discord bots are generally expected to be running 24/7, and are expected to have an uptime of 90-99% when in production. Make sure that the server you are running does not experience issues, or this can cause Rin to fail. It is recommended to not stop the bot unless for new updates, or critical downtime issues or server maintenance.
Rin can also be deployed to the cloud. Rin will work fine in Azure, GCP, or AWS. In fact, it is recommended to deploy Rin to the cloud. Hosts such as PebbleHost will not work here. All you need to do is to pull the image from either GHCR or Docker Hub, and then add the env during setup. Once done, Rin can be ran in the cloud. And also fun fact: Rin v1 was originally deployed to Azure before I started to self-host Rin.