Bare Metal
Set up Archiver on a bare metal Linux machine
Self-hosting the bot means you will lose the custom emoji used by the public instance. The generic version uses Unicode emoji instead.
Requirements
- Python 3.9 or later
pipenv
Setup
Make a Discord app
Go to the Discord developer dashboard and make a new app.
Set the name, picture and bio to whatever you want.
Configure the bot
To make your bot private, go to Installation and change Discord Provided Link
to None
, then click Save.
Now, go to Bot and turn off Public bot (remember to hit Save again).
Add the bot
Go to OAuth2 and scroll down to OAuth2 URL Generator. Choose the applications.commands
scope and User Install (or Guild Install if you want to use it in a server).
Copy the URL and paste it in a new tab. Add the bot from there.
Copy the token
Go to Bot and click Reset Token
. You will then be shown your token, click Copy
.
Download the code
Go to the source code repository and clone the code using Git.
It is recommended to deploy from main
and not a release as main
gets fixes and updates more frequently.
If you have no idea what that means, click the big green Code button and click Download ZIP.
You will not be able to update easily using the ZIP.
Set up the environment
Copy .env.example
to .env
(cp .env.example .env
). Inside, add in your token and error reporting URL (optional):
Run the bot
First, install pipenv using your distribution's package manager or pip
.
Then, cd
to the bot's folder and install the dependencies:
Now, run the bot:
This script is used to quickly start the normal and Unicode emoji versions of the bot. Run ./start.sh --help
for details.
Run the bot 24/7 (Linux only)
To do this, we can use systemd
. Simply copy and edit the below unit file to /etc/systemd/system/archiver.service
, then run sudo systemctl daemon-reload && sudo systemctl enable --now archiver
.
Updating
To update, stop the bot and go to the repository folder, run git pull
. Start the bot again.
If you used a ZIP file, download the ZIP again and extract the new ZIP over the old one (to the same folder, overwrite contents).