Jump to content

Full Setup Guide (Server + Database + Website)

What You Need

A MySQL database (Hostinger, PlanetHoster, any hosting with MySQL)

A web server (same hosting works)

A VPS or second server to run the sync scripts (Oracle Free Tier works)

Step 1 — Create MySQL Database

Go to your hosting control panel

Create a new MySQL database, user and password

Note down: host, database name, username, password

Run this SQL to create the tables:

Go to phpMyAdmin → your database → SQL tab and paste the schema from the download package (schema.sql)

Step 2 — Set Up Sync Scripts on VPS

Upload sync_stats.py and rcon_sync.py to your VPS at /opt/rust-sync/

Install requirements:

pip3 install mysql-connector-python websocket-client

Edit both files and fill in your database credentials:

DB_HOST = "your-mysql-host"
DB_NAME = "your-database-name"
DB_USER = "your-username"
DB_PASS = "your-password"

For rcon_sync.py also fill in:

RCON_HOST = "your-server-ip"
RCON_PORT = 28017
RCON_PASS = "your-rcon-password"

Step 3 — Set Up Push Script on Rust Server

Upload push_stats.sh to your Rust server and make it executable:

chmod +x push_stats.sh

Edit the script and fill in your VPS details:

ORACLE_USER = "ubuntu"
ORACLE_IP = "your-vps-ip"
ORACLE_KEY = "/path/to/ssh/key"

Add to crontab to run every 5 minutes:

crontab -e */5 * * * * /path/to/push_stats.sh >> /var/log/rust-sync.log 2>&1

Step 4 — Set Up Live Player Tracking (RCON)

Add rcon_sync.py to crontab on your VPS to run every minute:

* * * * * /usr/bin/python3 /opt/rust-sync/rcon_sync.py >> /var/log/rcon-sync.log 2>&1

Step 5 — Set Up Website

Upload index.php to your web hosting public_html folder

Edit the config section at the top:

define('DB_HOST', 'localhost');
define('DB_NAME', 'your-database');
define('DB_USER', 'your-username');
define('DB_PASS', 'your-password');
define('SERVER_NAME', 'Your Server Name');
define('SERVER_IP', 'your-server-ip:28015');
define('DISCORD_URL', 'https://discord.gg/yourlink');

Upload your server logo as logo.png to the same folder

Upload Rust item icons to an icons/ folder (list included in download)

Step 6 — Test Everything

Join your Rust server and do some actions (shoot, gather, raid)

Run push_stats.sh manually once

Visit your website — you should see your stats

That's it! Everything runs automatically from here.

Stats sync every 5 minutes

Live player count updates every minute via RCON

Wipe data is tracked automatically on each map wipe


About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
3.1m
Total downloads
Customers
12.1k
Customers served
Files Sold
171.1k
Total sales
Payments
3.7m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.