Quickstart

This will be a quick walkthrough of setting up SourceBans++ for the first time.

Prerequisites

Before we get started, let’s make sure you meet these following requirements:

  • Web

    • A working MySQL/MariaDB database

    • PHP Version >= 5.6 (and PHP Version < 7.4 for SB++ 1.6.3 release)

      • GMP extension (for A2S queries)
  • Game

    • Sourcemod >= 1.7

    • Metamod: Source

    If you’re using Cloudflare, Rocket Loader must be disabled otherwise SourceBans++ will become unresponsive.

Uploading

  • Download the latest release from the release page

  • Upload everything that’s within web folder to either the root of your web server or a folder that you wish to allocate

  • Upload everything that’s within game to the game mod directory (tf, cs, dod, etc)

Write Permission (Make sure the files is under the web server user)

  • config.php file is writable (Linux: sudo chmod 644 config.php)

  • /demos folder is writable (Linux: sudo chmod -R 644 demos)

  • /themes_c folder is writable (Linux: sudo chmod -R 774 themes_c)

  • /images/games folder is writable (Linux: sudo chmod -R 644 /images/games)

  • /images/maps folder is writable (Linux: sudo chmod -R 644 /images/maps)

Web Installation

For demonstration purposes, I am going to be using example.com for the rest of the example, you will need to replace it with your own, and it may vary depending if you placed it within a directory other than the root directory (Ex: example.com/sb/)

Navigate to your Sourcebans++ installer (example.com/install) to begin installation

  1. Read over the license agreement, check I have read, and accept the license and click Ok when you are done reading

  2. Fill out the information

    • Server Hostname - Database host, use localhost if it’s on the same machine, otherwise use the IP or any resolvable records

    • Server Port - Database port, by default it runs on 3306, you will need to change it if the port is difference

    • Username - Database username, the user to sign in with

    • Password - Database password, the password for the corresponding user

    • Database - Database to use, you should create a database if have not already

    • Table Prefix - The prefix you want the SourceBans++ tables to use, useful if there are name collisions, otherwise, leave it at default

    • Steam API Key - Your Steam API key, which can be obtained here

    • SourceBans URL - Your SourceBans site with protocol included! (Ex: https://example.com), the http:// or https:// is required

    • SourceBans EMail - The email address to send password reset and/or ban submissions from, leave empty if you don’t have one to use and don’t plan to use it

  3. System check, look over everything and make sure everything is green before continuing

  4. Table creation, click Ok when a success notification pops up

  5. Fill out the information for your personal account, and hit Ok when done (Note: Steam ID is your SteamID2 ID)

Plugin Setup

Navigate to your addons/sourcemod/configs/ directory and edit databases.cfg file

Append and edit the following

"sourcebans"
	{
		"driver"			"default"
		"host"				"EDITME_DATABASE_HOST_EDITME"
		"database"			"EDITME_DATABASE_EDITME"
		"user"				"EDITME_USERNAME_EDITME"
		"pass"				"EDITME_PASSWORD_EDITME"
		"port"			"3306" // EDIT IF NEEDED
	}

Note: Whilst the webpanel will do its best to generate the above section for you, you should not rely on this being correct. Especially if your webserver (and database server) is on a different host to your game server. Also keep in mind that if your game server has to connect remotely, you may need to allow this with your database configuration. If you have problems here you would usually need to seek help from your webhost, not the SB++ support team.

Save this file and upload the changes as required.

You next need to add the server in the web portal and take note of the ServerID from the SB++ Web Panel. Then navigate to your addons/sourcemod/configs/sourcebans/ directory and edit sourcebans.cfg and update the “ServerID” parameter near the bottom of the file. Refer to the Adding Server docs page for more info.

Final Note

Please take a look at our other docs if you are having difficulty installing