MCSManager/README.md

257 lines
7.8 KiB
Markdown
Raw Normal View History

2022-08-05 16:12:50 +08:00
<img src="https://public-link.oss-cn-shenzhen.aliyuncs.com/mcsm_picture/logo.png" alt="MCSManagerLogo.png" width="510px" />
2022-02-02 19:29:59 +08:00
<br />
2018-05-30 15:54:56 +08:00
2022-02-02 13:35:59 +08:00
[![Status](https://img.shields.io/badge/npm-v6.14.15-blue.svg)](https://www.npmjs.com/)
[![Status](https://img.shields.io/badge/node-v14.17.6-blue.svg)](https://nodejs.org/en/download/)
2022-08-18 10:41:16 +08:00
[![Status](https://img.shields.io/badge/License-Apache%202.0-red.svg)](https://github.com/MCSManager)
2018-05-30 15:54:56 +08:00
[Official Website](http://mcsmanager.com/) | [Web Project](https://github.com/MCSManager/MCSManager) | [UI Project](https://github.com/MCSManager/UI) | [Daemon Project](https://github.com/MCSManager/Daemon)
2022-11-14 15:19:23 +08:00
[English](readme.md) | [简体中文](README_CN.md)
2022-02-02 19:40:53 +08:00
2022-09-01 16:27:06 +08:00
2020-01-07 15:46:20 +08:00
<br />
2018-12-02 11:11:30 +08:00
## Introduction
2022-02-02 13:35:59 +08:00
2022-11-15 12:18:30 +08:00
MCSManager Panelabbr: MCSM Panelis a multilingual, lightweight, out-of-the-box, and multi-instance Minecraft server control panel with Docker support.
2017-11-12 09:54:53 +08:00
MCSManager panel can help you manage multiple physical servers in one place, and create game servers at any host dynamically. It also provides a secure and reliable user permission system for a seamless multi-user experience.
![Screenshot.png](https://mcsmanager.com/main.png)
![Screenshot.png](https://mcsmanager.com/main2.png)
2020-03-01 17:19:08 +08:00
2018-04-12 10:08:04 +08:00
<br />
2017-11-12 09:53:27 +08:00
## Runtime Environment
2022-02-02 13:35:59 +08:00
2022-11-15 13:08:46 +08:00
MCSManager panel can run on both Windows and Linux platforms without a database or complicated system configuration. As a lightweight control panel, you only need Node.js to run it.
2022-02-02 14:07:24 +08:00
2022-11-15 12:18:30 +08:00
Required Node.js version: **14.17.0** or above.
2019-10-25 21:30:06 +08:00
<br />
## Configurations/Data Directories
2019-10-25 21:30:06 +08:00
Configuration: `data/SystemConfig/config.json`
2019-10-25 21:30:06 +08:00
2022-09-01 16:06:11 +08:00
User data files: `data/User/*.json`
2017-11-18 15:53:36 +08:00
Remote daemon configurations: `data/RemoteServiceConfig/*.json`
2020-03-12 13:38:29 +08:00
2022-02-02 14:07:24 +08:00
<br />
2020-03-12 13:38:29 +08:00
2021-11-10 17:22:13 +08:00
<br />
2022-11-14 15:19:23 +08:00
## Install
### Windows
2020-03-12 13:38:29 +08:00
2022-11-15 13:08:46 +08:00
For the Windows systems, the MCSM panel has been **compiled into a click-to-run version**.
Download it from the official site: [https://mcsmanager.com/](https://mcsmanager.com/), **run the program as administrator**, and you will be all set!
2018-01-20 15:24:11 +08:00
<br />
2017-12-11 17:19:01 +08:00
2022-11-14 15:19:23 +08:00
### Linux
2018-04-22 09:47:58 +08:00
**Quick Install with one command**
2019-01-15 14:33:47 +08:00
2017-11-18 15:53:36 +08:00
```bash
2022-11-14 15:19:23 +08:00
wget -qO- https://raw.githubusercontent.com/mcsmanager/Script/master/setup_en.sh | bash
```
2020-10-09 13:12:03 +08:00
- The script is designed for Ubuntu/Centos/Debian/Archlinux of AMD64 architecture only.
- Use `systemctl start mcsm-{web,daemon}` to start service after installtion.
- Directory for panel components and runtime: `/opt/mcsmanager/`
2020-10-09 13:12:03 +08:00
<br />
2020-10-09 13:12:03 +08:00
**Linux Manual Installation**
2020-10-09 13:12:03 +08:00
- If the installation script does not work, you can try the following steps to install manually.
2020-10-11 12:57:14 +08:00
2020-10-09 13:12:03 +08:00
```bash
# switch to the installation directory. Please create it in advance with 'mkdir /opt/' if not exist.
2020-10-09 13:12:03 +08:00
cd /opt/
# Download runtime environment (Node.js). Ignore this step if you have Node.js 14+ installed already.
2022-11-14 15:19:23 +08:00
wget https://nodejs.org/dist/v14.17.6/node-v14.17.6-linux-x64.tar.gz
# Decompress archive
2022-02-02 14:07:24 +08:00
tar -zxvf node-v14.17.6-linux-x64.tar.gz
# Add program to system PATH
2022-02-02 14:07:24 +08:00
ln -s /opt/node-v14.17.6-linux-x64/bin/node /usr/bin/node
ln -s /opt/node-v14.17.6-linux-x64/bin/npm /usr/bin/npm
# Prepare installation directory
2022-02-02 14:07:24 +08:00
mkdir /opt/mcsmanager/
cd /opt/mcsmanager/
# Download the web project
2022-02-02 14:07:24 +08:00
git clone https://github.com/MCSManager/MCSManager-Web-Production.git
# Rename and enter the directory
2022-02-02 14:07:24 +08:00
mv MCSManager-Web-Production web
cd web
# Install dependencies
2022-11-14 15:19:23 +08:00
npm install --production
2022-05-28 10:02:04 +08:00
cd /opt/mcsmanager/
2022-07-18 14:34:40 +08:00
# Download the Daemon
2022-02-02 14:07:24 +08:00
git clone https://github.com/MCSManager/MCSManager-Daemon-Production.git
# Rename and enter the directory
2022-02-02 14:07:24 +08:00
mv MCSManager-Daemon-Production daemon
cd daemon
# Install dependencies
2022-11-14 15:19:23 +08:00
npm install --production
2021-10-23 12:25:41 +08:00
# Please open two terminals or Screen
2022-09-01 16:06:11 +08:00
# Start the daemon first
2022-02-02 14:07:24 +08:00
cd /opt/mcsmanager/daemon
# Start the daemon
2022-02-02 14:07:24 +08:00
node app.js
2021-10-23 12:25:41 +08:00
# Start the web project (in the second terminal/screen)
2022-02-02 14:07:24 +08:00
cd /opt/mcsmanager/web
# start the application
2022-02-02 14:07:24 +08:00
node app.js
2021-10-23 12:25:41 +08:00
# Access http://localhost:23333/ for web interface
# In general, the web application will scan and connect to the local daemon automatically.
```
2021-10-23 12:25:41 +08:00
- Note, the above steps do not register the panel components to system service. You have to use 'screen' to manage it or register the system service manually.
2022-02-02 13:35:59 +08:00
<br />
## Update
2022-02-02 19:29:59 +08:00
Upgrading from version `8.X` to `9.X` is not supported. You have to manually import all instance configurations.
2022-02-02 19:29:59 +08:00
Upgrading from version `9.X` to newer:
For Linux: Execute `git pull` in both `/opt/mcsmanager/web` and `/opt/mcsmanager/daemon`.
2022-02-02 19:29:59 +08:00
For Windows: Download the latest installation pack and overwrite all existing files.
> Note, backup of `data` directory before each update is highly recommended.
2022-02-02 19:29:59 +08:00
<br />
2022-09-01 16:25:48 +08:00
## Projects
2022-02-18 14:14:00 +08:00
This software requires all three projects to run. The code you use for installation is the result of compilation and integration.
2022-02-18 14:14:00 +08:00
2022-11-28 12:18:38 +08:00
[**Web Backend**](https://github.com/MCSManager/MCSManager)
2022-02-18 14:14:00 +08:00
2022-09-01 16:06:11 +08:00
- Role: Control Center
- Responsible for: Backend APIs, user data management, and communication & authentication with daemons.
2022-08-05 16:12:50 +08:00
2022-11-15 13:08:46 +08:00
[**Frontend/UI**](https://github.com/MCSManager/UI)
2022-02-18 14:14:00 +08:00
- Role: The user interfaces for the backend.
2022-11-15 13:08:46 +08:00
- Responsible for: Displaying statistics via the web interface, sending requests, and communicating with daemons. The final product of this project is pure static files.
2022-08-05 16:12:50 +08:00
2022-09-01 16:06:11 +08:00
[**Daemon**](https://github.com/MCSManager/Daemon)
2022-02-18 14:14:00 +08:00
- Role: Slave/controlled remote node
- Responsible for: Controlling all instances on localhost and managing the actual instance process. It is capable to communicate with all objects.
2022-02-18 14:14:00 +08:00
<br />
## Build the Development Environment
2022-02-02 14:11:43 +08:00
This is intended for developers. If you are not a developer, you can safely ignore these.
2022-02-02 14:11:43 +08:00
You can continue to develop or preview all the projects once they are running under the development environment. Please make sure to be in compliance with the license.
2022-02-18 14:14:00 +08:00
**Web Project**
2022-02-02 14:11:43 +08:00
```bash
git clone https://github.com/MCSManager/MCSManager.git
2022-02-18 14:14:00 +08:00
cd MCSManager
npm install
2022-08-05 16:12:50 +08:00
npm run start
# By default, use ts-node to run Typescript code directly
# By default, run on port 23333.
2022-02-18 14:14:00 +08:00
```
**UI Project**
2022-02-18 14:14:00 +08:00
```bash
git clone https://github.com/MCSManager/UI.git
cd UI
npm install
npm run serve
# Preview the interface at http://localhost:8080/
# All the requests will be redirected to port 23333.
```
2022-02-18 14:14:00 +08:00
**Daemon Project**
2022-02-18 14:14:00 +08:00
```bash
2022-06-18 05:54:09 +08:00
git clone https://github.com/MCSManager/Daemon.git
2022-02-18 14:14:00 +08:00
cd Daemon
2022-02-02 14:11:43 +08:00
npm install
npm run start
# After running, please connect the daemon to the control panel via the web interface.
# By default, run on port 24444
```
2022-02-02 14:11:43 +08:00
2022-02-02 19:29:59 +08:00
<br />
## Browser Compatibility
2020-07-21 10:04:00 +08:00
- Support mainstream modern browsers like `Chrome` `Firefox` `Safari` `Opera`.
- `IE` support has been dropped.
2018-04-12 09:54:06 +08:00
2018-04-12 10:08:04 +08:00
<br />
2022-09-26 17:27:15 +08:00
## i18n
2022-08-11 16:05:22 +08:00
Currently, MCSManager supports Chinese and English.
2022-08-11 16:05:22 +08:00
2022-11-14 15:31:01 +08:00
The MCSManager internationlization was done by [Lazy](https://github.com/LazyCreeper), [KevinLu2000](https://github.com/KevinLu2000), [zijiren233](https://github.com/zijiren233) and [Unitwk](https://github.com/unitwk).
2022-08-11 16:05:22 +08:00
<br />
## Panel Permission
2018-05-30 11:36:22 +08:00
The control panel will check the user list while running. If there is no user available, a default administrator user will be created.
2018-05-30 11:36:22 +08:00
If you forget your only administrator account, you can back up all the current user data, regenerate a new admin account, and overwrite the previous one.
2018-05-30 11:36:22 +08:00
2022-02-02 14:07:24 +08:00
<br />
2018-04-22 09:47:58 +08:00
## Contribution
2022-02-06 15:47:34 +08:00
If you encounter any issue while using, you can [submit an Issue](https://github.com/MCSManager/MCSManager/issues/new/choose) or submit Pull Request after you fix it in a fork.
2022-02-06 15:47:34 +08:00
The code needs to be in its existing format, and no extra codes should be formatted. For details: [click here](https://github.com/MCSManager/MCSManager/issues/544)。
2022-02-06 15:47:34 +08:00
2022-02-06 15:48:10 +08:00
<br />
2022-11-19 11:36:24 +08:00
## Report bug
2019-09-29 10:28:25 +08:00
Feedback on any problem encountered is welcomed and will be responded to in a timely manner.
If you find a serious security vulnerability, you can email mcsmanager-dev@outlook.com for a private submission.
2022-08-11 16:06:16 +08:00
After the security issue has been resolved, your name will be listed as the bug-finder.
2018-04-22 09:47:58 +08:00
2022-09-02 11:55:30 +08:00
<br />
2022-09-26 17:27:15 +08:00
2022-11-14 15:27:52 +08:00
## License
2022-11-27 12:50:03 +08:00
Copyright 2022 [MCSManager Dev](https://github.com/mcsmanager), Apache-2.0 license.
2022-11-26 18:17:59 +08:00
2022-11-27 12:50:03 +08:00
**Additional Requirements:**
2022-11-26 18:17:59 +08:00
2022-11-27 12:50:03 +08:00
You must keep all copyright information and place "Powered by MCSManager" in a conspicuous position.
2022-11-26 18:04:04 +08:00
2022-11-14 15:27:52 +08:00
2022-11-14 15:32:00 +08:00