Upgrade Scripts Docs

#Installation

#Requirements

  • FXServer with oxmysql running and started before this resource.
  • MariaDB 10.2+ or MySQL 5.7+. The resource checks this at startup and prints a clear error if the database is older.
  • Either QBCore (or QBox in QBCore-compatibility mode) or ESX.

#Drop the files in your server

Start by dropping the files included in the resource from keymaster into your resources folder, make sure to ensure the resource in your server.cfg

ensure upgrade-admin

Make sure oxmysql starts before it, and that it's listed as a dependency your server already has running.

#Pick your framework

Open fxmanifest.lua and make sure exactly one of these two lines is active in shared_scripts:

'compat/qbcore.lua',
-- 'compat/esx.lua',

QBCore is active by default. For ESX, comment out the QBCore line and uncomment the ESX line, then update Config.DB.CharactersTable / Config.DB.VehiclesTable in config.lua if your table names differ from the defaults (players/player_vehicles for QBCore, users/owned_vehicles for ESX).

#Setup Config

Open config.lua and set at least:

Config.ServerName    = "Your Server Name"
Config.ServerDiscord = "discord.gg/your-invite"
Config.LogsWebhook   = "" -- optional Discord webhook for admin action logs
Config.FuelScript    = "LegacyFuel" -- whichever fuel resource you run

Tables are created automatically the first time the resource starts - nothing to import manually.

#Check the startup output

On first start the resource runs a self-check and prints one line per problem it finds: a missing config key, an unsupported database version, a Config.DB table that doesn't exist, a framework that isn't running. A clean start ends with:

[upgrade-admin] Self-check passed (QBCore, v1.0.0).

Fix anything reported before going further - most of it would otherwise surface later as a confusing error inside one feature.

#Open the panel and make yourself an admin

Anyone in the god or admin QBCore permission group (or ESX group) can already open the panel with /admin. To grant someone access without touching server.cfg, use:

/setrole [server id] [role]

Roles are god, admin, mod, or helper. This also works from the server console, which is the way back in if you ever lock yourself out of your own panel.

Once you're in, the Users page lets you add/remove admins and fine-tune permissions without any more commands. Note that you can't grant a role more senior than your own.

#Connecting the web dashboard (optional)

The dashboard lives at admin.upgrade-scripts.com - there is nothing to install for it. You sign in there with Discord and point it at your server.

1. Give yourself a role by Discord ID. From the panel's Users page (or /setrole), add the identifier discord:<your Discord user ID> with the god role. Connecting a server checks this, and it's separate from the token - a Tebex purchase alone doesn't unlock it.

2. Generate the credentials. In the panel, go to Users -> Web dashboard access and click Generate credentials. You'll get two values with copy buttons:

  • an API token, which identifies this server
  • a dashboard secret, which proves which of your admins is behind each action, so each of them gets their own permissions instead of a shared fallback

They're shown once. The token is stored hashed, so it genuinely can't be displayed again - if you lose it, generate a new pair.

3. Add the server on the dashboard. Sign in, choose "Add a server", and enter your server's IP (and port, if it isn't 30120) along with both values.

Generating a new pair immediately invalidates the old one. If you do that on a server that's already connected, update it on the dashboard with Edit connection, which keeps every access grant you've already made.

If nobody can open the panel at all, apitoken regenerate works from the server console as a recovery path. It's console-only on purpose - an in-game chat command would put live credentials into chat, where other resources' loggers can read them.

See Web API and Web Dashboard.