Code Monkey home page Code Monkey logo

txadmin's Introduction

txAdmin for FiveM

Join our Discord Server:  

txAdmin is a full featured web panel to Manage & Monitor your FiveM Server remotely.


Features

  • Start/Stop/Restart your server instance or resources
  • Access control via multiple credentials and action logging
  • Discord Integration:
    • Server status command (/status)
    • Custom static commands
    • Command spam prevention
  • 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 or schedule
  • Password brute-force protection
  • FXServer process priority setter
  • Hitch Detection
  • New settings page
  • Save console to file
  • Restart warning announcements
  • Admin Management system
  • Permissions system (more info)
  • SSL Support (more info)
  • Translation Support (more info)
  • Server Activity Log (connections/disconnections, kills, chat, explosions and custom commands)
  • (BETA) Ban System
  • FiveM's Server CFG editor

Installing & Running (Windows/Linux)

Video Tutorial for Windows: ENGLISH, PORTUGUÊS.

Requirements:

  • NodeJS v10 LTS (or newer)
  • FXServer build 1543+ (or newer)
  • One TCP listen port opened for the web server (default is 40120)
  • Git (only for installs and updates)

1 - In the terminal (cmd, bash, powershell & etc) execute the following commands:

# Download txAdmin, Enter folder and Install dependencies
git clone https://github.com/tabarra/txAdmin
cd txAdmin
npm i

# Add admin
node src/scripts/admin-add.js

# Setup default server profile
node src/scripts/setup.js default

# Start default server
node src/index.js default

If on Windows, you can start txAdmin by executing start_<profilename>.bat in your txAdmin folder (ex txAdmin/start_default.bat).

2 - Then open http://public-ip:40120/ in your browser and login with the credentials created and go to the settings page to configure the remaining settings.

Important Notes:

Note: You MUST 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: You can run multiple txAdmin instances in the same installation folder.
To create more server profiles, execute node src/scripts/setup.js <profile name>.

Note4: Although not recommended, you can set FXServer processes priorities. To do so, change fxRunner.setPriority in the config.json to one of the following: LOW, BELOW_NORMAL, NORMAL, ABOVE_NORMAL, HIGH, HIGHEST.

Troubleshooting

If you run into any problem, check our Troubleshooting Guide.

If you are having trouble starting the FXServer via txAdmin, run node src/scripts/config-tester.js default and see which test is failing.

Updating

To UPDATE txAdmin execute the following commands inside txAdmin's folder:

git pull
npm i

If you have any problems with package-lock.json, just delete it and try again.

Note: This will only work if you downloaded txAdmin using the git clone command.

TODO:

The next major things:

  • Extension system
  • Multi-server support
  • Packaging txAdmin on a self-updating binary file
  • Ban/Whitelist feature

Minor things:

  • Reorganize all files/folders
  • Write a page that is full of small How-To's and link them here.
  • Write version bumper script
  • Config tester kill spawned fxserver after 5 seconds (do people use the config tester?)
  • 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?) (Note: when this happens, there is a close but not exit event. Or the other way around idk)
  • Remove forceFXServerPort, 10x more complicated than it should be for a feature that probably won't even be used

Ideas:

  • Discord bot extensions via required js files? Imagine typing /whitelist @username and the bot cross referencing the vRP id via the discord:xxx identifier. Or a /me giving 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. And a less organized TODO/Ideas file can be found here.

License, Credits and Thanks

  • This project is licensed under the MIT License.
  • Favicons made by Freepik from www.flaticon.com are licensed under CC 3.0 BY
  • Special thanks to everyone that contributed to this project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.