Self-hosting guide

Instructions for operators seeking to deploy and maintain an autonomous private instance of Inco on Linux or Windows servers.

1. Prerequisites

  • Python 3.10 or higher installed.
  • A Discord Bot application created via the Discord Developer Portal.
  • Privileged Gateway Intents enabled:
    • Server Members Intent
    • Presence Intent (required for Free tier Custom Status verification)
  • A relational database (SQLite for development, or MySQL / MariaDB / TiDB Cloud for production).

2. Installation Steps

Clone the repository and initialize the Python virtual environment:

# Clone the repository
git clone https://github.com/inco-studio/inco.git
cd inco

# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install --upgrade pip
pip install -r requirements.txt

Clone the repository and initialize the Python virtual environment in PowerShell:

# Clone the repository
git clone https://github.com/inco-studio/inco.git
cd inco

# Create and activate virtual environment
python -m venv venv
.\venv\Scripts\Activate.ps1

# Install dependencies
python -m pip install --upgrade pip
pip install -r requirements.txt

3. Environment Configuration

Copy the template configuration file to .env and populate your credentials:

cp .env.example .env

Sample production environment configuration:

.env
# Discord Core Credentials
DISCORD_TOKEN=your_bot_token_here
CLIENT_ID=1114569444505702441
OWNER_IDS=123456789012345678

# Database Configuration
IS_PRODUCTION=True
DB_HOST_PROD=127.0.0.1
DB_PORT_PROD=3306
DB_USER_PROD=inco_user
DB_PASSWORD_PROD=your_secure_password
DB_NAME_PROD=inco_production
DB_POOL_SIZE=8

# Promo Keywords (comma-separated, handles spaces)
PROMO_KEYWORDS=#inco, inco, inco.me

# Mutual Hub Integration
MUTUAL_HUB_GUILD_ID=123456789012345678
MUTUAL_HUB_INVITE_URL=https://discord.gg/PkFXp468bV

# Dedicated Proxy (Optional forward proxy)
PROXY_URL=http://username:password@proxy.example.com:8080

4. Running as a Background Service

On Linux systems, configure systemd to run Inco as a persistent daemon:

/etc/systemd/system/inco.service
[Unit]
Description=Inco Discord Bot Daemon
After=network.target

[Service]
Type=simple
User=ubuntu
WorkingDirectory=/home/ubuntu/inco
ExecStart=/home/ubuntu/inco/venv/bin/python main.py
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Enable and start the service:

sudo systemctl daemon-reload
sudo systemctl enable --now inco
sudo systemctl status inco