This guide covers admin setup, console commands, the Lua package system, player and vehicle management, and database configuration for your Onset dedicated server on Legion Hosting. For initial server setup, see our Onset Server Setup Guide.
Admin Setup
Onset handles admin privileges through Lua scripting within your game mode packages. Unlike many games with built-in admin systems, Onset relies on your packages to define who has elevated permissions and what those permissions allow.
Most community game mode packages include an admin system. Typically, admin setup involves:
- Open the File Manager in GPanel
- Navigate to your package directory (e.g.,
packages/mygamemode/) - Locate the admin configuration file (often
config.lua,admins.lua, or a JSON config file) - Add your Steam64 ID or in-game player ID to the admin list
- Save the file and restart the server
-- Example: config.lua admin setup
Config = {}
Config.Admins = {
"76561198000000001", -- Your Steam64 ID
"76561198000000002" -- Another admin
}
Server Console Commands
Onset provides built-in server console commands that work regardless of installed packages. These can be entered directly in the GPanel console.
| Command | Description |
|---|---|
help |
Lists all available console commands |
stop |
Gracefully stops the server |
restart |
Restarts the server |
players |
Lists all connected players with their IDs |
kick <playerid> [reason] |
Kicks a player from the server |
ban <playerid> [reason] |
Bans a player from the server |
unban <steamid> |
Removes a ban for the specified Steam ID |
package reload <name> |
Reloads a package without restarting the server |
package start <name> |
Starts a package that is not currently running |
package stop <name> |
Stops a running package |
package list |
Lists all loaded packages and their status |
Package System (Lua Scripting)
Onset's gameplay is defined entirely by packages written in Lua. Each package is a folder inside the packages/ directory containing Lua scripts that run on the server and/or client side.
Package Structure
packages/
mygamemode/
package.json <-- Package metadata and file declarations
server/
main.lua <-- Server-side entry point
commands.lua <-- Custom command handlers
client/
main.lua <-- Client-side entry point
ui.lua <-- User interface scripts
Installing Packages
- Download the package from the Onset community forums or GitHub repositories
- Connect to your server via SFTP
- Upload the package folder to the
packages/directory - Open
server_config.jsonin the File Manager - Add the package folder name to the
"packages"array - Restart the server through GPanel
// server_config.json - Adding packages
{
"packages": [
"roleplay",
"admintools",
"vehicleshop"
]
}
"packages" array are loaded in the order they are listed. If one package depends on another, make sure the dependency is listed first.
Player Management
Beyond the built-in kick and ban commands, most game mode packages provide additional player management features. Common package-provided commands include:
| Command (Package-Dependent) | Description |
|---|---|
/tp <player> |
Teleport to another player |
/bring <player> |
Teleport another player to your location |
/goto <x> <y> <z> |
Teleport to specific world coordinates |
/setadmin <player> <level> |
Set a player's admin level (if the package supports tiers) |
/announce <message> |
Send a server-wide announcement |
Vehicle Management
Onset features a built-in vehicle system that packages can extend. Admins commonly need to manage spawned vehicles to prevent server clutter.
- Vehicle spawning — Most RP packages let admins spawn vehicles via commands like
/car <model> - Vehicle cleanup — Some packages include auto-despawn for abandoned vehicles or admin commands like
/destroyvehicles - Vehicle limits — Configure maximum vehicles per player to prevent lag from too many spawned entities
Database (MariaDB)
Onset supports MariaDB/MySQL database connections for persistent data storage. This is used by roleplay and other game mode packages to store player data, inventories, properties, and more.
Database configuration is handled within your package's configuration files. A typical setup:
-- Database configuration in package config
Database = {
host = "127.0.0.1",
port = 3306,
username = "onset_user",
password = "your_password",
database = "onset_gamemode"
}
Troubleshooting
| Issue | Solution |
|---|---|
| Server starts but no gameplay available | You need at least one game mode package installed and listed in server_config.json. A bare Onset server has no built-in gameplay. |
| Package fails to load | Check the GPanel console for Lua error messages. Common causes: missing package.json, syntax errors in Lua files, or missing dependencies. |
| Database connection errors | Verify your database credentials, ensure the database exists, and check that the MariaDB service is running. Test connectivity from the console logs. |
| Server not visible in browser | Ensure "visible": true is set in server_config.json. Also verify port 7776 (TCP) is accessible for the query port. |
| High latency or lag | Lower the streamdistance value, reduce tickrate if CPU usage is high, and check for inefficient Lua scripts in your packages. |
Related Articles
- Onset Server Setup Guide
- How to Find Your Server IP and Port
- How to Upload Files via SFTP
- Getting Started with Your New Server
Need Help?
If you are experiencing issues with your Onset server or need further assistance, our support team is here to help. Submit a support ticket and we will get back to you as soon as possible.