This project provides a web-based GUI for controlling a BeamMP server, implemented using Flask. It allows you to manage active and inactive mods, configure server settings, and monitor connected users, all from a user-friendly interface hosted locally. The Web UI interacts directly with the BeamMP server files, moving mods between active and inactive states and editing the server configuration. It also includes a login system for secure access and real-time monitoring of server status and connected users. This setup is designed to be run on Windows machines.
Don't be intimidated by all the prerequisites, it's very easy to install once you have the latest version of Python installed.
Install Python
Download and install the latest version of Python from the official Python website.
Download the Project Files
Download the project files from the provided .zip file and extract them to your desired location. The folder structure should look like this:
This is the default BeamMP server folder where we paste the "WebGUI" folder after it's extracted.
WebGUI folder structure
Install Dependencies
Open a terminal or command prompt and navigate to the project directory. Then run:
pip install Flask Flask-Login Flask-WTF WTForms psutil toml
Note: Setup BeamMP Server
Resources
folder in this package replaces the original Resources
folder that comes with the downloaded BeamNG server package.ServerConfig.toml
file remains in the main BeamMP Server directory.Configure Web GUI
ServerConfig.toml
file inside the WebGUI
folder to match your desired server settings.ServerConfig.toml
file can later be edited inside the GUI itself for ease of access.Generate and Set Secret Key
For the login page and authentication process, you need to generate a secret key and input it in the app.py
file.
Create a new Python file named generate_secret_key.py
with the following content:
import os
print(os.urandom(24))
Open a terminal or command prompt, navigate to the directory where generate_secret_key.py
is located, and run:
python generate_secret_key.py
This will generate a secret key. Copy the generated key and set it in the app.py
file:
app.config['SECRET_KEY'] = b'your_generated_secret_key'
Once the secret key is generated and saved in the app.py
file, you can delete the generate_secret_key.py
file.
Update BEAMMP_DIR Path
Open the app.py
file and update the BEAMMP_DIR
variable on line 63 to reflect the directory where your BeamMP Server is extracted:
BEAMMP_DIR = r'C:/Users/Administrator/Desktop/BeamMP Server' # Update this path
Run the Web GUI
Run the Web GUI by executing the StartWebUI.bat
file.
Access the Web GUI
Open your web browser and navigate to http://localhost:5000
. Use the following credentials to log in:
These credentials can be changed inside the app.py
file.
Initially, put all of your mods in the /Resources/
folder and organize the mods into their respective /Cars/
or /Tracks/
folder. Then, through the Web GUI, activate whichever mods you require for your server. If you have mods that don't perfectly fit into either 'Cars' or 'Tracks', just put them in the /Cars/
folder because you are able to select multiple mods in that section.
The ServerConfig.toml
file inside the WebGUI
folder is used to configure your server settings. You can update the following parameters through the web interface:
Name
Port
LogChat
Tags
Debug
Private
Max Cars
Max Players
Description
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.
For any questions or feedback, please reach out to me on here or message me "pclipse" on the BeamMP discord.