Skip to content

SturdyFool10/RustServerController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RustServerController Documentation

Current Project Status:

Main Branch:

  • Windows Build Status: Build Status for Windows
  • Linux Build Status: Build Status for Linux
  • MacOS Build Status: Build Status for MacOS

Testing Branch:

  • Windows Testing Build Status: Build Status for Windows Testing
  • Linux Testing Build Status: Build Status for Linux Testing
  • MacOS Testing Build Status: Build Status for MacOS Testing

RustServerController is designed for seamless server management on remote machines, with minimal resource usage, ensuring it remains unobtrusive in most scenarios.

Building the Project:

You can start building in two ways:

Building from Source:

  • Clone the main branch of the repository.
  • Navigate to the root directory, which mirrors the structure of the GitHub repository's main branch.
  • Open your terminal and execute the following command:
    cargo build --release
  • Once built, the compiled executable can be found at /target/release/server_host.exe. This file is standalone and can be moved as needed.
  • Note: Ensure that you have installed Cargo from rustup.rs. Git might also be required for cloning the repository.

Using Pre-Compiled Executables:

  • Pre-compiled executables are regularly updated and posted in the repository's releases tab.
  • These executables are less secure for those familiar with Rust, as source code may not always be provided, but they are easier to use and require less technical knowledge.

Master-Slave Architecture

The recent addition of a new feature enables a clustered setup with master and slave configurations.

Configuring a Slave Node:

  • A server is designated as a slave by setting the 'slave' line to true in its configuration.
  • Being a slave means the node will neither have slaves nor attempt to connect to configured slaves, and it will not host a web UI.

Configuring a Master to Connect to a Slave:

  • On Windows, use the ipconfig command to obtain the IPv4 address of the slave node's host PC.
  • On Linux, use the ifconfig -a command
  • On Mac, use the ipconfig getifaddr en0 or ipconfig getifaddr en1(which one depends on the specific system)
  • Edit the configuration using the following template, inserting the slave's IPv4 address and port:
    {
      "address": "<your address here>",
      "port": "<slave's port here>"
    }

Additional Information:

  • To edit a slave's configuration, use an external text editor (Notepad++ recommended).
  • While chaining master nodes is possible, it is not recommended due to potential latency issues. Support is not provided for setups with more than one layer of indirection. Assistance requests for multi-indirection setups will be the user's responsibility.

Server Process JSON Structure

A server process in RustServerController is described in the configuration file as a JSON object. This object defines how the controller should launch and manage the server. Below is an example of what a typical server process entry looks like in JSON:

{
  "name": "<namehereNOSPACES>",
  "exe_path": "<binary_path_here>",
  "arguments": ["insert", "args", "comma", "seperated"],
  "working_dir": "<workingDirHere>",
  "auto_start": true,
  "crash_prevention": true,
  "specialized_server_type": null
}

Field Descriptions

  • name: A friendly name for your server process. avoid using spaces in the name.
  • exe_path: The path to the executable or script to run (e.g., a .exe on windows or an executable on linux).
  • arguments: An array of command-line arguments to pass to the executable. these use json syntax and are expected to be strings(google it if you don't know it).
  • working_dir: The working directory from which the process will be launched. in the case of a minecraft server for example, this will be the folder where the server instance stores all of its files.
  • auto_start: If true, the server will start automatically when the controller launches.
  • crash_prevention: If true, the controller will attempt to restart the server if it crashes.
  • specialized_server_type(Optional, Default: null): allows the user to specify what type of server they are running for extra features, Currently Supported Values: "Minecraft", "Terraria"(does nothing yet), null

Note: Advanced fields like specialized_server_info are managed internally by RustServerController and should not be set or modified manually in your configuration. Most users will never need to use or change this field.

You can add multiple server process objects to the servers array in your configuration file to manage several servers at once.

About

creates a responsive user interface for managing game servers of most any kind

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published