π§ A simple web interface for the LGSM! πΉοΈ
This project is intended to be an easy to use web interface for the Linux Game Server Manager (LGSM) command line tool. The LGSM is a fantastic tool for installing and administering game servers via the CLI. However, some users would rather manage their game server through a web interface. That is what this project attempts to be.
π Note: The web-lgsm is a fan project, and NOT affiliated in any way with the official LSGM Project
- First
SSH
to the server where you're running the LGSM and clone this repo as your user (NOT root):
git clone https://github.com/BlueSquare23/web-lgsm.git
- Then cd down into the installation directory and run the
install.sh
script.
cd web-lgsm
./install.sh
- Once the install completes, start the server using the
web-lgsm.py
script.
./web-lgsm.py
- You can also stop the server with the
web-lgsm.py
script.
./web-lgsm.py --stop
π Note: At this point the
install.sh
script only supports Debian & Ubuntu Linux. However, technically all the project needs to run is python3.8 or greater and some common shell utilites.If you're able to install the required dependacnies through your distributions package manager and install the required python modules then you should be able to run this on basically any flavor of Linux that is supported by the base LGSM project.
Check out the YouTube video tutorial linked below for information about installation, setup, and usage!
After starting the server you can browse to the web address in a browser and
you'll be directed to the web-lgsm Setup
page, where you can create a user.
After creating a user, you'll be automatically logged in and redirected to the home page.
From the home page you can do several things!
You can auto install a new LGSM server from their entire list of available game servers.
Once the installation process is started a set of spinners and an installing... message will appear above the live running console output of the ongoing installation.
If you already have an LGSM game server installed and setup on your machine and you want to add it to the Web-LGSM interface you can do so by clicking the "Add an Existing LGSM Installation" option.
Once you have a server added or installed you can access its controls
page by
clicking on the link for it under the "Installed Servers" list on the home
page.
The console menu includes most of the common LGSM script commands, besides the ones that require additional user input.
The console page also includes a live output feed from the command being executed in a python subprocess shell on the system.
You can click one of the edit config buttons on a given game server's controls page to access the config editor. From the config editor you can change any of the necessary game server settings and save them. You can also download a copy of the config file.
πΌοΈ Editing A Game Server Config Page Image
π Note: the config editor is disabled by default and can only be enabled by editing the
main.conf
file directly.
There's a basic app settings page.
And if you log out or are logged out, there's also a basic login page.
If you're going to run the Web-LGSM exposed to the public internet you should firewall off the port for this app (defaults to 12357) and proxy connections to this app through a real web server such as Apache or Nginx with SSL encryption!
For more information see: docs/suggested_deployment.md
.
- Language: Python 3
- Web Framework: Flask
- Database: SQLite
- ORM: SQLAlchemy
- CSS Framework: Bootstrap 5
- JavaScript: jQuery ajax
- Testing: Pytest
- Web Server: Gunicorn
I want to try to keep up with this as a pet project so feel free to report any bugs or security issues to me via this project's github issues page or my site's contact form. Or if you're interested in contributing to the project feel free to submit a pull request!
I claim no liability for any injury or damages that may result from the use or abuse of this piece of software. Use at your own risk! I have tried to take security precautions when building this app in order to prevent it from being horribly abused.
However, please note I am an amateur programmer and this app is fundamentally sorta suss. It is a web portal for wrapping shell commands. Everything should be validated, and no user input should be getting down to the shell. Nonetheless, there are lots of hackers out there with a better knowledge of application security than me and I make no claims that this is 100% unhackable.
I will try to patch any security vulnerabilities I find as time goes on. If you find any and want to help feel free to submit them!