Skip to main content
This guide covers the complete installation process for SS-IMS, from prerequisites to production deployment.

Prerequisites

Before installing SS-IMS, ensure your system meets these requirements:

Software requirements

External services

System recommendations

  • RAM: 2GB minimum, 4GB recommended
  • Storage: 1GB for application, plus database storage
  • Network: Stable connection for IRC and Discord WebSocket
For production deployments, consider using a dedicated VPS or cloud instance to ensure 24/7 uptime.

Installation

Step 1: Install .NET 9.0 SDK

wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

sudo apt-get update
sudo apt-get install -y dotnet-sdk-9.0
Verify the installation:
dotnet --version
# Should output: 9.0.x or later

Step 2: Install PostgreSQL

sudo apt-get update
sudo apt-get install -y postgresql postgresql-contrib
sudo systemctl start postgresql
sudo systemctl enable postgresql
Verify PostgreSQL is running:
sudo systemctl status postgresql

Step 3: Create the database

Switch to the PostgreSQL user and create the database:
sudo -u postgres psql
In the PostgreSQL prompt:
CREATE DATABASE ss_ims;
CREATE USER ss_ims_user WITH PASSWORD 'your_secure_password';
GRANT ALL PRIVILEGES ON DATABASE ss_ims TO ss_ims_user;
\q

Step 4: Clone the repository

git clone https://github.com/ssconexion/ss-integrated-management-server.git
cd ss-integrated-management-server

Step 5: Apply the database schema

Download and apply the database schema:
wget https://gist.githubusercontent.com/Angarn/ddd9cf693aaeeb9407cc46b750fce3e5/raw -O schema.sql
psql -U ss_ims_user -d ss_ims -f schema.sql
The schema creates all necessary tables for players, teams, matches, maps, scores, and more.

Step 6: Configure environment variables

Navigate to the main project directory and create your .env file:
cd ss.Integrated.Management.Server
cp .env.example .env
Edit the .env file with your actual configuration:
.env
DISCORD_BOT_TOKEN=your_bot_token_here
DISCORD_MATCHES_CHANNEL_ID=1234567890123456
DISCORD_REFEREE_ROLE_ID=1234567890123456
DISCORD_ADMIN_ROLE_ID=1234567890123456
DISCORD_GUILD_ID=1234567890123456

POSTGRESQL_CONNECTION_STRING=Host=localhost;Database=ss_ims;Username=ss_ims_user;Password=your_secure_password

LANGUAGE=en
Never commit your .env file to version control. It contains sensitive credentials.

Step 7: Set up your Discord bot

  1. Go to the Discord Developer Portal
  2. Click “New Application” and give it a name
  3. Navigate to the “Bot” section and click “Add Bot”
  4. Copy the bot token and paste it into your .env file
  5. Under “Privileged Gateway Intents”, enable:
    • Server Members Intent
    • Message Content Intent
  6. Navigate to “OAuth2” → “URL Generator”
  7. Select scopes: bot and applications.commands
  8. Select bot permissions:
    • Read Messages/View Channels
    • Send Messages
    • Create Public Threads
    • Send Messages in Threads
    • Manage Messages
    • Manage Threads
    • Read Message History
  9. Copy the generated URL and use it to invite the bot to your server

Step 8: Get Discord IDs

Enable Developer Mode in Discord:
  1. User Settings → Advanced → Enable “Developer Mode”
  2. Right-click on your tournament server → Copy ID (this is DISCORD_GUILD_ID)
  3. Right-click on the matches channel → Copy ID (this is DISCORD_MATCHES_CHANNEL_ID)
  4. Right-click on the referee role → Copy ID (this is DISCORD_REFEREE_ROLE_ID)
  5. Right-click on the admin role → Copy ID (this is DISCORD_ADMIN_ROLE_ID)

Step 9: Install dependencies

Restore all NuGet packages:
dotnet restore
This will install:
  • BanchoSharp (v1.5.0) - IRC communication with osu! Bancho
  • Discord.Net (v3.18.0) - Discord bot functionality
  • Npgsql (v10.0.1) - PostgreSQL database driver
  • Entity Framework Core (v9.0.12) - Database ORM
  • DotNetEnv (v3.1.1) - Environment variable management
  • Google.OrTools (v9.15.6755) - Schedule optimization

Step 10: Run the server

dotnet run
If successful, you should see:
hola server de jd
The bot will now appear online in your Discord server.
The server runs continuously until stopped with Ctrl+C. For production, consider using a process manager like systemd or PM2.

Production deployment

For production environments, you should run SS-IMS as a background service.

Using systemd (Linux)

Create a systemd service file:
sudo nano /etc/systemd/system/ss-ims.service
Add the following content:
/etc/systemd/system/ss-ims.service
[Unit]
Description=SS Integrated Management Server
After=network.target postgresql.service

[Service]
Type=simple
User=your_username
WorkingDirectory=/path/to/ss-integrated-management-server/ss.Integrated.Management.Server
ExecStart=/usr/bin/dotnet run --configuration Release
Restart=always
RestartSec=10
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false

[Install]
WantedBy=multi-user.target
Enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable ss-ims
sudo systemctl start ss-ims
Check the status:
sudo systemctl status ss-ims
View logs:
sudo journalctl -u ss-ims -f

Using Docker (Optional)

The repository includes a Dockerfile for containerized deployment:
docker build -t ss-ims .
docker run -d --name ss-ims --env-file .env ss-ims
Ensure your .env file is properly configured before running the Docker container.

Development setup

For development work on SS-IMS:

Using JetBrains Rider

  1. Open Rider and select “Open Solution or Project”
  2. Navigate to ss-integrated-management-server.sln
  3. Rider will automatically restore NuGet packages
  4. Set up your .env file in the ss.Integrated.Management.Server directory
  5. Run or debug using the built-in controls

Using Visual Studio

  1. Open Visual Studio and select “Open a project or solution”
  2. Navigate to ss-integrated-management-server.sln
  3. Right-click the solution in Solution Explorer → “Restore NuGet Packages”
  4. Set up your .env file in the ss.Integrated.Management.Server directory
  5. Press F5 to run with debugging

Running tests

SS-IMS includes a comprehensive test suite:
cd ../ss.Integrated.Management.Server.Tests
dotnet test
The test suite verifies all tournament match flows and automation logic. Run tests before submitting pull requests.

Database management tools

For easier database management, consider installing:

Adminer

Lightweight database management tool:
wget https://github.com/vrana/adminer/releases/download/v4.8.1/adminer-4.8.1.php
php -S localhost:8080 adminer-4.8.1.php
Access at http://localhost:8080

pgAdmin

Full-featured PostgreSQL GUI:
# Ubuntu/Debian
sudo apt-get install pgadmin4

# macOS
brew install --cask pgadmin4

Verification

After installation, verify everything works:
  1. ✅ Check the bot is online in Discord
  2. ✅ Run /linkirc to link a referee account
  3. ✅ Create a test match with /creatematchup
  4. ✅ Start a test ref session with /startref
  5. ✅ Verify the Discord thread is created
  6. ✅ Check database connectivity by viewing tables in Adminer

Troubleshooting

Bot won’t start

  • Check .NET version: dotnet --version
  • Verify .env file exists and has correct values
  • Check PostgreSQL is running: sudo systemctl status postgresql
  • Review logs for error messages

Database connection fails

  • Test PostgreSQL connection: psql -U ss_ims_user -d ss_ims
  • Verify connection string format in .env
  • Check PostgreSQL allows local connections in pg_hba.conf
  • Ensure database schema is applied

Discord commands not appearing

  • Verify bot has applications.commands scope
  • Try kicking and re-inviting the bot
  • Wait up to 1 hour for global commands to register
  • Check bot has appropriate role permissions

IRC connection issues

  • Verify IRC password at https://osu.ppy.sh/p/irc
  • Ensure osu! account is not banned or restricted
  • Check you’re not logged into IRC on another client
  • Wait 5 minutes between connection attempts

Next steps

Now that SS-IMS is installed:

Quickstart guide

Run your first automated match

Discord commands

Learn all available commands

Database schema

Understand the data model

Environment setup

Configure environment variables

Build docs developers (and LLMs) love