Self-Hosting Guide
This guide will walk you through the process of self-hosting the Community Signal Moderation Bot.
Prerequisites
Section titled “Prerequisites”- Docker and Docker Compose
- A registered domain name (optional, but recommended for production)
- A phone number for the bot
1. Clone the Repository
Section titled “1. Clone the Repository”git clone https://github.com/your-username/Community-Signal-Moderation-Bot.gitcd Community-Signal-Moderation-Bot2. Configure Environment Variables
Section titled “2. Configure Environment Variables”Copy the .env.example file to .env:
cp .env.example .envNow, open the .env file and fill in the required environment variables. Refer to the compose.yml file for a complete list of environment variables.
Important: You must set the BOT_NUMBER and SIGNAL_CLI_CONFIG_PATH variables.
Optional Environment Variables
Section titled “Optional Environment Variables”| Variable | Description | Default |
|---|---|---|
COMMUNITY_DOMAINS | Comma-separated list of community domains to skip in auto-scraper. URLs from these domains won’t be auto-archived or processed. | irregularpedia.org,irregularchat.com,irregular.chat,forum.irregularchat.com |
MINIO_ENDPOINT | Internal MinIO API endpoint | - |
MINIO_ACCESS_KEY | MinIO access key | - |
MINIO_SECRET_KEY | MinIO secret key | - |
MINIO_BUCKET | MinIO bucket name | irregularchat |
MINIO_PUBLIC_URL | Public URL for presigned links | - |
SHLINK_API_URL | Shlink URL shortener API endpoint | - |
SHLINK_API_KEY | Shlink API key | - |
SHLINK_PUBLIC_URL | Public base URL for shortened links | - |
Example COMMUNITY_DOMAINS configuration:
COMMUNITY_DOMAINS=irregularpedia.org,irregularchat.com,irregular.chat,forum.irregularchat.com,s3.irregular.chat,outline.irregularchat.com,wiki.irregularchat.com3. Register with signal-cli
Section titled “3. Register with signal-cli”Before you can use the bot, you need to register its phone number with Signal. You can do this using the signal-cli command-line tool.
First, build the signal-cli container:
docker compose build signal-cliThen, run the registration command:
docker compose run signal-cli register --voice --number <YOUR_BOT_NUMBER>Replace <YOUR_BOT_NUMBER> with the phone number you want to use for the bot. You will be prompted to enter the verification code you receive on your phone.
4. Deploy the Bot
Section titled “4. Deploy the Bot”Once you have registered the bot, you can deploy the entire stack using the deploy.sh script:
./deploy.shThis will start all the services defined in the compose.yml file, including the bot, the database, and the Redis cache.
5. Verify the Installation
Section titled “5. Verify the Installation”You can check the logs of the bot to make sure it is running correctly:
docker compose logs -f signal-botYou should see a message indicating that the bot has connected to the Signal network.
You can now start sending messages to the bot’s phone number.