--- title: "Setting Up the AMXBans Web Panel" excerpt: "How to connect the AMXBans web admin panel to your MySQL ban database, configure config.php, create the first web admin, and keep the plugin and site in sync." category: "administration" tags: "amxbans, web" image: "" read_time: "8 min read" ---

AMXBans stores bans in a MySQL database, and its web panel is the browser front-end to that database — a place to review, add and lift bans, manage admins, and show players a public ban list without touching the game console. Getting it running is mostly a matter of pointing the web files at the same database your in-game AMXBans plugin already writes to. This assumes the plugin side is installed and logging bans; the panel is the second half.

1. Prerequisites

You need three things in place first:

2. Create or reuse the database and import the schema

The panel and the plugin must share one database. If you have not created it yet, do so and grant a dedicated user access:

CREATE DATABASE amxbans CHARACTER SET utf8;
CREATE USER 'amxbans'@'%' IDENTIFIED BY 'a-long-password';
GRANT ALL PRIVILEGES ON amxbans.* TO 'amxbans'@'%';
FLUSH PRIVILEGES;

AMXBans ships an SQL schema file with its web package; import it once so the ban, admin and server tables exist:

mysql -u amxbans -p amxbans < amxbans.sql

If the plugin already created its tables, do not re-import over live data — the schema is the same one both halves use.

3. Upload the web files and edit config.php

Copy the panel's web directory into your web root, then open its main configuration file (commonly config.php in an includes/ folder) and fill in the database connection and a security salt. The exact variable names come from the version you downloaded, but they always cover the same fields:

$config['sql_host']   = 'localhost';
$config['sql_user']   = 'amxbans';
$config['sql_pass']   = 'a-long-password';
$config['sql_db']     = 'amxbans';
$config['sql_prefix'] = 'amx_';
$config['salt']       = 'a-random-16-plus-char-string';

The table prefix must match what the plugin uses, or the panel connects but shows no bans. Set the salt to a long random value and keep it secret — it protects stored web-admin passwords.

4. Run the installer and create the first admin

Most AMXBans web editions include a one-time setup page (often under an install/ directory) that verifies the database connection and lets you create the first web administrator. Complete it, then delete or rename the install directory — leaving it reachable is a standing security hole that lets anyone re-run setup and seize the panel. Log in with the admin account you just created and confirm the dashboard loads.

5. Link the plugin and the panel

For bans issued in-game to appear on the site and vice versa, the plugin's SQL config must point at the same database and prefix as config.php. AMXBans keeps this in its own config under addons/amxmodx/configs/ (the SQL section of the AMXBans config). Match the host, user, password, database and prefix on both sides exactly. Once they agree, a ban you place with amx_ban shows up in the panel within a refresh, and a ban you lift on the site stops blocking the player in-game. If you want a lighter, self-contained alternative to the whole AMXBans stack, the CSB Ban Manager keeps bans without a separate web install.

Common errors

Verification

Place a test ban in-game with amx_ban, refresh the panel, and confirm the ban appears with the correct SteamID, admin name and duration. Then lift it from the web panel and verify the player can reconnect. Finally, load the public ban-list page in a browser to confirm it renders for visitors. If in-game and web bans stay out of sync, the two configs are pointing at different databases — the single most common AMXBans mistake.