Prerequisites
Before installing SS-IMS, ensure your system meets these requirements:Software requirements
- .NET 9.0 SDK or later (download here)
- PostgreSQL 13+ (download here)
- Git for cloning the repository
External services
- Discord bot token - Create an application at the Discord Developer Portal
- osu! account with IRC access - Get your IRC password from https://osu.ppy.sh/p/irc
- Tournament Discord server with appropriate permissions
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
Step 2: Install PostgreSQL
Step 3: Create the database
Switch to the PostgreSQL user and create the database:Step 4: Clone the repository
Step 5: Apply the database schema
Download and apply the database schema: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:
.env file with your actual configuration:
.env
Step 7: Set up your Discord bot
- Go to the Discord Developer Portal
- Click “New Application” and give it a name
- Navigate to the “Bot” section and click “Add Bot”
- Copy the bot token and paste it into your
.envfile - Under “Privileged Gateway Intents”, enable:
- Server Members Intent
- Message Content Intent
- Navigate to “OAuth2” → “URL Generator”
- Select scopes:
botandapplications.commands - Select bot permissions:
- Read Messages/View Channels
- Send Messages
- Create Public Threads
- Send Messages in Threads
- Manage Messages
- Manage Threads
- Read Message History
- Copy the generated URL and use it to invite the bot to your server
Step 8: Get Discord IDs
Enable Developer Mode in Discord:- User Settings → Advanced → Enable “Developer Mode”
- Right-click on your tournament server → Copy ID (this is
DISCORD_GUILD_ID) - Right-click on the matches channel → Copy ID (this is
DISCORD_MATCHES_CHANNEL_ID) - Right-click on the referee role → Copy ID (this is
DISCORD_REFEREE_ROLE_ID) - Right-click on the admin role → Copy ID (this is
DISCORD_ADMIN_ROLE_ID)
Step 9: Install dependencies
Restore all NuGet packages:- 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
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:/etc/systemd/system/ss-ims.service
Using Docker (Optional)
The repository includes a Dockerfile for containerized deployment:Development setup
For development work on SS-IMS:Using JetBrains Rider
- Open Rider and select “Open Solution or Project”
- Navigate to
ss-integrated-management-server.sln - Rider will automatically restore NuGet packages
- Set up your
.envfile in thess.Integrated.Management.Serverdirectory - Run or debug using the built-in controls
Using Visual Studio
- Open Visual Studio and select “Open a project or solution”
- Navigate to
ss-integrated-management-server.sln - Right-click the solution in Solution Explorer → “Restore NuGet Packages”
- Set up your
.envfile in thess.Integrated.Management.Serverdirectory - Press F5 to run with debugging
Running tests
SS-IMS includes a comprehensive test suite: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:pgAdmin
Full-featured PostgreSQL GUI:Verification
After installation, verify everything works:- ✅ Check the bot is online in Discord
- ✅ Run
/linkircto link a referee account - ✅ Create a test match with
/creatematchup - ✅ Start a test ref session with
/startref - ✅ Verify the Discord thread is created
- ✅ Check database connectivity by viewing tables in Adminer
Troubleshooting
Bot won’t start
- Check .NET version:
dotnet --version - Verify
.envfile 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.commandsscope - 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