-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
Add the following lines to your docker-compose.yml
, as an additional voice under the services
key:
automod:
image: ornatot/lemmy-automoderator:latest
hostname: automod
environment:
- LEMMY_USERNAME=AccountUsername
- LEMMY_PASSWORD=AccountPassword
- LEMMY_INSTANCE=lemmy.example.com
- DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/[...]
restart: always
logging: *default-logging
ports:
- "8000:8080"
volumes:
- ./volumes/automoderator:/usr/src/app/database
The environment
values will have to be filled with the credentials of the account you'll be using the AutoMod from, as well as your Lemmy instance.
The DISCORD_WEBHOOK_URL
is optional and only necessary if you plan on using the Discord webhook administration feature.
Alternatively, it is also possible to run the docker container without docker-compose, by running the following command:
$ docker run
-p PORT:8080
-e LEMMY_USERNAME=AccountUsername
-e LEMMY_PASSWORD=AccountPassword
-e LEMMY_INSTANCE=lemmy.example.com
-e DISCORD_WEBHOOK_URL=https://discord.com/api/[...]
-d ornatot/lemmy-automoderator
The -e
values will have to be filled with the credentials of the account you'll be using the AutoMod from, as well as your Lemmy instance.
The DISCORD_WEBHOOK_URL
is optional and only necessary if you plan on using the Discord webhook administration feature.
Users will also need to change the value of PORT
to an appropriate port number on the host machine.
Lastly, it is possible to directly run the bot as a Node.js script.
- Node.JS on a version greater than 17.5. Reccomended version: 18.17.1 LTS
- NPM
To run the bot, it will be necessary to create a .env
file in the root directory of the project, containing the credentials of the account you'll be using the AutoMod from, as well as your Lemmy instance.
The DISCORD_WEBHOOK_URL
is optional and only necessary if you plan on using the Discord webhook administration feature.
LEMMY_USERNAME=AccountUsername
LEMMY_PASSWORD=AccountPassword
LEMMY_INSTANCE=lemmy.example.com
DISCORD_WEBHOOK_URL=https://discord.com/api/[...]
Run the following commands to compile and run the bot:
npm i
to install all dependencies. It might be necessary to also run separately npm i better-sqlite3
, to install the appropriate sqlite binaries for your machine.
npm run build
to compile the TypeScript code to executable JavaScript.
npm start
to start the bot.
The AutoMod for Lemmy is an open source project published with the GPL-3.0 license by Tommaso Ornato, built for the Based Count Lemmy instance.