-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
Configure JSExtendedStats settings.
Edit .env in Pterodactyl File Manager:
# Environment
NODE_ENV=production
# Server port
PORT=3000
# Trust proxy if behind nginx
TRUST_PROXY=false
# Database connection
DB_HOST=localhost
DB_PORT=3306
DB_USER=ruststats
DB_PASSWORD=your_password
DB_NAME=ruststats
DB_CONNECTION_LIMIT=10
# Admin credentials (set via first-time setup or console commands)
# DO NOT edit these manually - use setup-admin console command
ADMIN_USERNAME=admin
ADMIN_PASSWORD=$2b$12$hashed_password_here...
# Session security (MUST be 32+ characters)
SESSION_SECRET=your_random_32_character_secret_key
# CORS allowed origins (comma separated)
ALLOWED_ORIGINS=http://localhost:3000,http://yourdomain.com
# Rate limiting
RATE_LIMIT_WINDOW_MS=60000
RATE_LIMIT_MAX_REQUESTS=100
# Steam API (optional, for player avatars)
STEAM_API_KEY=your_steam_api_key_hereNODE_ENV: production for live servers, development for testing
PORT: Web server port (default: 3000)
TRUST_PROXY: Set true if behind nginx/reverse proxy
DB_NAME: Must be ruststats (matches schema)
DB_HOST: Usually localhost or your MySQL IP
SESSION_SECRET: Generate random 32+ character string ADMIN_USERNAME/PASSWORD: Set via Console Commands, NOT manually!
DO NOT edit directly in .env
Use console commands instead:
-
setup-admin- Create new username and password -
change-admin-password- Change password only
The password is automatically hashed with bcrypt (12 rounds).
After plugin loads, edit oxide/config/JSExtendedStats.json:
{
"ApiURL": "http://your-server-ip:3000/api/update",
"SecretKey": "your_secret_key",
"ServerID": "1",
"Count suicide kills": false,
"Count environment kills": false,
"UntrackedPlayerIds": [],
"Advanced Logging": false,
"Wipe Stats Table On New Save": false
}ApiURL: Your web app URL + /api/update
SecretKey: Get from database ruststats_config table
ServerID: Unique ID per Rust server (1, 2, 3...)
Count suicide kills: Track player suicides Count environment kills: Track fall damage, drowning, etc. UntrackedPlayerIds: Steam64 IDs to ignore (admins)
Advanced Logging: Debug mode (verbose console output) Wipe Stats Table On New Save: Auto-clear stats on wipe
The secret key is in your database:
SELECT secretkey FROM ruststats_config;Default is: CHANGE_ME_ON_FIRST_INSTALL
Change it via admin panel or SQL:
UPDATE ruststats_config SET secretkey='your_new_secret' WHERE id=1;Track multiple Rust servers:
Server 1: "ServerID": "1"
Server 2: "ServerID": "2"
Server 3: "ServerID": "3"
All use same ApiURL and SecretKey.
Web App (.env): Restart server in Pterodactyl
Admin Credentials: No restart needed (console commands auto-reload)
Rust Plugin: o.reload JSExtendedStats in Rust console
- ✅ Use
setup-adminconsole command for credentials - ✅ Generate random SESSION_SECRET (32+ chars)
- ✅ Change default SecretKey in database
- ✅ Use strong database password
- ✅ Don't expose database to internet
- ❌ NEVER manually hash passwords - use console commands
- Console Commands for management
- Install Rust Plugin if not done
JSExtendedStats v3.2.0 | GitHub | Built for Pterodactyl Panel
JSExtendedStats Wiki
Getting Started
Components
Support