Installation & Hosting Guide
LibreNote is a bot intended for self-hosting. This guide provides instructions for a rudimentary installation of LibreNote via either Docker (recommended) or Node.js.
#
Preliminary Steps#
PrerequisitesDiscord Application
Spotify Client & Secret
#
Constructing the .env- Create a file named
.env
and give it the following template:
BOT_TOKEN=CLIENT_ID=SPOTIFY_CLIENT_ID=SPOTIFY_CLIENT_SECRET=
- This file follows a
key=value
pattern. Fill it out using the values noted from the prerequisite steps.
#
Installation#
DockerLibreNote is provided as a Docker image, which you may run in a container. This is the recommended method for most hosts. Begin by ensuring that you have Docker and Node.js (v16) installed. You may also need to enable Windows HyperV for Docker on Windows to work.
Redis
When all requirements are met, and Redis is set up, you can install LibreNote in Docker. This can be done with the following commands. In the second command, replace ENV_PATH
with the relative or absolute path to the .env
file created in the preliminary steps.
docker pull ghcr.io/oprogram/librenote:latestdockerdocker run --name librenote --env-file=ENV_PATH -d --network=host --restart=unless-stopped ghcr.io/oprogram/librenote:latest
#
Node.jsThose who elect to avoid Docker, may run LibreNote with Node.js (with or without a process manager). Hosts should be weary of this method, while it is much more easier to set up, there have historically been issues related to the functioning of ytdl, a necessary LibreNote component. As such, it is recommended that most users stick to Docker hosting. For those who wish to use Node, ensure that you have installed Node.js (v16), Git and Redis (Windows Subsystem for Linux) or Redis (Legacy, unmaintained Windows port).
Begin by cloning the LibreNote Git repository.
git clone https://github.com/oprogram/LibreNote.gitcd librenote
At this point, you should wish to move your previously created .env
file to the new LibreNote directory which you have cloned. Thereafter, install LibreNote's dependencies and start the bot.
npm installnode dev/commands.jsnode dev/run.js
If no errors are displayed, you may stop the bot via Ctrl + C. You may also set up your desired process manager now.
To start the bot again, simply execute:
node dev/commands.jsnode dev/run.js