Installation Guide
Step-by-step instructions for installing InterChat
Installation Guide
This guide will walk you through the process of installing and setting up your own instance of InterChat.
These instructions are for Linux-based systems. The process may differ for other operating systems.
Prerequisites
Before you begin, ensure you have:
- A server running Linux (Ubuntu 20.04+ recommended)
- Root or sudo access
- A Discord application with a bot token
- A MongoDB Atlas account and cluster
- Basic knowledge of command line and server administration
Installation Steps
Install system dependencies
First, install the necessary system dependencies:
Install Node.js
InterChat requires Node.js and npm runtime:
Set up MongoDB Atlas
InterChat uses MongoDB Atlas for its database:
- Create a MongoDB Atlas account
- Create a new cluster (the free tier is sufficient for small deployments)
- Set up a database user with read/write permissions
- Configure network access to allow connections from your server's IP
- Get your connection string from the Atlas dashboard
Your connection string will look like this:
Install Redis
InterChat uses Redis for caching and session management:
Clone the InterChat repository
Install dependencies
Configure environment variables
Create a .env
file in the root directory and edit it:
Fill in the required environment variables (see Configuration Guide for details).
Set up the database
Build the application
Start InterChat
Verifying Installation
To verify that InterChat is running correctly:
-
Check the logs for any errors:
-
Invite your bot to a Discord server and test basic commands like
/stats
. -
Try creating a hub with
/hub create
and connecting a channel with/connect
.
If you encounter issues, check the logs for error messages and refer to the troubleshooting section below.
Updating InterChat
To update your InterChat instance to the latest version:
Troubleshooting
Common Issues
-
Database connection errors:
- Check your MongoDB Atlas connection string in the
.env
file - Ensure your IP address is whitelisted in the MongoDB Atlas Network Access settings
- Verify that your MongoDB Atlas user has the correct permissions
- Check your MongoDB Atlas connection string in the
-
Redis connection errors:
- Ensure Redis is running:
sudo systemctl status redis-server
- Check your Redis configuration in the
.env
file
- Ensure Redis is running:
-
Discord API errors:
- Verify your bot token is correct
- Ensure your bot has the necessary permissions
- Check that you've enabled the required Gateway Intents in the Discord Developer Portal
-
Build errors:
- Ensure you have the correct version of Node.js
- Try deleting
node_modules
,build
,tsconfig.tsbuildinfo
and reinstalling dependencies
For more help, join our support server or check the GitHub issues.