Code Monkey home page Code Monkey logo

script's Introduction


What is MCSManager?

MCSManager Panel (MCSM) is a modern, secure, and distributed control panel designed for managing Minecraft and Steam game servers.

MCSManager has already gained a certain level of popularity within the community, specifically Minecraft. MCSManager excels in offering a centralized management solution for multiple server instances and provides a secure and reliable multi-user permission system. In addition, We are committed to supporting server administrators not only for Minecraft but also for Terraria and various Steam games. Our goal is to foster a thriving and supportive community for game server management.

MCSManager supports English, French, German, Italian, Japanese, Portuguese, Simplified Chinese, and Traditional Chinese, with plans to add support for more languages in the future!

failed_to_load_screenshot.png

failed_to_load_screenshot.png

Features

  1. One-click deployment of Minecraft Java/Bedrock Server
  2. Compatible with most Steam game servers. (e.g. Palworld, Squad, Project Zomboid, Teraria, etc.)
  3. Customizable UI, create your own layout
  4. Support Docker virtualization, multiuser, and commercial services
  5. Manage multiple servers with a single web interface
  6. More...

Runtime Environment

MCSM supports both Windows and Linux. The only requirement is Node.js and some libraries for decompression.

Require Node.js 16.20.2 or above.


Installation

Windows

For Windows, We provides packaged executable files:

Go to: https://mcsmanager.com/


Linux

One-Command Deployment

Script needs to register system services, it requires root permissions.

sudo su -c "wget -qO- https://script.mcsmanager.com/setup.sh | bash"

Usage

systemctl start mcsm-{web,daemon}
systemctl stop mcsm-{web,daemon}
  • Only supports Ubuntu/Centos/Debian/Archlinux.
  • Installation directory: /opt/mcsmanager/.

Linux Manual Installation

  • If the installation script failed to execute correctly, you can try install it manually.
# Create /opt directory if not already
mkdir /opt
# Switch to /opt
cd /opt/
# Download Node.js 20.11. If you already have Node.js 16+ installed, ignore this step.
wget https://nodejs.org/dist/v20.11.0/node-v20.11.0-linux-x64.tar.xz
# Decompress Node.js source
tar -xvf node-v20.11.0-linux-x64.tar.xz
# Add Node.js to system PATH
ln -s /opt/node-v20.11.0-linux-x64/bin/node /usr/bin/node
ln -s /opt/node-v20.11.0-linux-x64/bin/npm /usr/bin/npm

# Prepare MCSM's installation directory
mkdir /opt/mcsmanager/
cd /opt/mcsmanager/

# Download MCSManager
wget https://github.com/MCSManager/MCSManager/releases/latest/download/mcsmanager_linux_release.tar.gz
tar -zxf mcsmanager_linux_release.tar.gz

# Install dependencies
./install.sh

# Please open two terminals or screens.

# Start the daemon first.
./start-daemon.sh

# Start the web interface at the second terminal or screen.
./start-web.sh

# For web access, go to http://localhost:23333/
# In general, the web interface will automatically scan and add the local daemon.

This installation approach does not automatically set up MCSManager as a system service. Therefore, it is necessary to use screen for management. For those interested in managing MCSManager through a system service, please refer to our wiki/documentation.


Browser Compatibility

  • Supported on modern browsers including Chrome, Firefox, and Safari.
  • Support for IE has been discontinued.

Development

This section is specifically designed for developers. General users may disregard this portion without concern.

MacOS

git clone https://github.com/MCSManager/MCSManager.git
./install-dependents.sh
./npm-dev-macos.sh

Windows

git clone https://github.com/MCSManager/MCSManager.git
./install-dependents.bat
./npm-dev-windows.bat

Build Production Version

./build.bat # Windows
./build.sh  # MacOS

Next, you'll need to go to the PTY and Zip-Tools projects to download the corresponding binary files and place them in the daemon/lib directory to ensure the proper functioning of the Emulation Terminal and File Decompression.


Code Contributing

If you experience any problems while using MCSManager, you are welcome to submit an Issue. Alternatively, you can fork the project and contribute directly by submitting a Pull Request.

Please ensure that any submitted code adheres to our existing coding style. For more details, refer to the guidelines provided in this issue.


BUG Reporting

Open Issue: Click here

Security Vulnerability Report: SECURITY.md


Internationalization

Thanks to these contributors for providing a substantial amount of translation:


License

The source code of MCSManager is licensed under the Apache-2.0 License.

Copyright ©2024 MCSManager.

script's People

Contributors

amazingdm avatar creeperkong avatar funnyshadow avatar huangsijun17 avatar jgc9527 avatar kevinlu2000 avatar nekoyyang avatar nuomiaa avatar swwind avatar unitwk avatar yaosiqian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

script's Issues

Replace use of `sudo` and add root privileges check

The script should probably check for root privileges and remove the obsolete use of sudo everywhere.
It really makes no sense, especially sudo echo is something that you'd think it works, but it doesn't. You'd have to pipe it into sudo tee for that.

Update Node version?

I think the install node step should be replaced by always the latest LTS version and if that isn't something that's guaranteed to be supported by MCSManager it should somewhere be defined as working version.

To not require it being updated all the time, you could also leverage something like fnm

Error when running setup_en.sh : Unable to connect to github.com repository

When installing https://github.com/MCSManager

wget -qO- https://raw.githubusercontent.com/mcsmanager/Script/master/setup_en.sh | bash

ERROR :

[+] Check network connection(ping github.com)... Fail
=================================================
[x] Unable to connect to github.com repository!
=================================================

This error is caused by line 237 in setup_en.sh : if ping -c 1 github.com > /dev/null;
github.com dosn't support ping anymore.

Ship a more secure configuration by default

Currently, both the daemon and the frontend are run as root in the default configuration. This is too dangerous even for self-deployed instances. It is much better if we can get rid of root access, so that even if MCSManager is compromised, the system as a whole stays safe.

Attack model: Attacker can find ways to do remote execution with MCSManager. We need to isolate damages to the system even if this is done.

On the other hand, the source code in both web/ and daemon/ folders are writable. Even if we run MCSManager as a non-root user, the attacker can easily change the contents of the server code. It would be slightly better if we set app.js to be read-only for the user that executes MCSManager.

It will be easy to run web/app.js as an ordinary user. However, running daemon/app.js as an ordinary user would be difficult. To gain access of docker, one has to be added to the docker group. This immediately enables delegation attack -- an attacker who has shell access to host system (for instance, by compromising the daemon) will be able to modify every file on the host system as root by simply mounting / into the container. This will allow the attacker to do privilege escalation.

The solution would by user namespaces, either by using rootless docker or podman. This PR enables integration with other container runtimes like podman. With that in mind, the following changes should be made to the installation script:

  1. fix subtle incompatibilities caused by podman (e.g., changing default network name to "bridge")
  2. enable podman.sock for the user mcsm-daemon
  3. run the daemon with user mcsm-daemon while enabling related systemd hardening options.

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.