txAdmin for FiveM
txAdmin (formerly known as FXAdmin) is a full featured tool to help you Manage & Monitor your FiveM Server remotely.
- Start/Stop/Restart your server instance or resources
- Access control via multiple credentials and action logging
- Discord integration (/status and configurable commands)
- Monitor server’s CPU/RAM consumption
- Real-time playerlist with ping + steam-linked accounts (when available)
- OneSync Support (more than 32 slots server)
- Linux Support
- Live Console
- Auto Restart on failure detection
- Auto Restart on schedule
- Password brute-force protection
- Set FXServer process priority
- Hitch Detection
First, make sure you have:
- NodeJS v10+ (If you have problems with node-gyp/bcrypt/discord.js try downgrading to Node v10 LTS)
- FXServer (duh)
- One TCP listen port opened for the web server
- Git (only for installs and updates)
1 - To INSTALL txAdmin execute:
$ git clone https://github.com/tabarra/txAdmin $ cd txAdmin $ npm i
2 - Copy your
server.json and modify it according to your preferences. The most important settings:
global.fxServerPortis your fxServer port as configured in your
monitor.restarter.scheduleis the restart schedule. The time MUST be in the 24-hour format with two digits for hours as well as minutes (
HH:MM). Leave the array empty or set it to false to disable the feature.
fxRunner.buildPathis the folder containing the files
fxserver.exeand a bunch of DLLs in case of Windows, and only
run.shin case of Linux.
fxRunner.basePathis the folder that contains the
resourcesfolder, usually it's here that you put your
fxRunner.cfgPathis the absolute or relative path of your
3 - To add an admin execute:
$ npm run admin-add
If you want to manage existing admins you must edit the JSON file yourself. Make sure your admins file folow
admins-template.json. To generate the hashed password, you can use tools like this and this or even this one.
4 - To RUN txAdmin execute:
$ npm start server.json
Note: You should run FXServer through txAdmin, and not in parallel (ie in another terminal).
Note2: To configure your Discord bot, follow these two guides: Setting up a bot application and Adding your bot to servers.
Note3: Although not recommended, you can set FXServer processes priorities. To do so, change
fxRunner.setPriority to one of the following: LOW, BELOW_NORMAL, NORMAL, ABOVE_NORMAL, HIGH, HIGHEST.
If you are having trouble starting the FXServer via txAdmin, run
npm run config-tester server.json and see which test is failing.
To UPDATE txAdmin execute:
$ git pull $ npm i
Make sure there's no differences in the json templates. If there is, copy the new template and edit again.
If you have any problems with the
package-lock.json, just delete it and try again.
- Add custom commands to the config file
- Config tester check for the modules inside
- Config tester kill spawned fxserver after 5 seconds
- Investigate the "fxserver has stopped working" not disappearing when autorestarter kills the server (probably windows detaches it? in that case we would need to PID map and then kill them one by one?)
- We have data, we should plot it into a graph...
- Get JSONC compatibility. Inline documentation for the configs would be great.
- Multiple server support? Technically easy, but would require massive rework of the interface.
- FXServer artifact/build auto updater???
- Automagically send messages in discord when starting/stopping/restarting the server
- Discord bot extensions via required js files? Imagine typing
/whitelist @usernameand the bot cross referencing the vRP id via the discord:xxx identifier. Or a
/megiving back this users vRP stats like cars, wallet, bank, apartments & etc.
- Add some sort of detection to see if there is a fxserver running outside txAdmin on the same port.
The old TODO can be found here.