Install the MCSM panel on the Linux server to remotely control Minecraft My World Private Server [No public network IP]

overview

In general MC servers, players will be restricted by various rules, so many friends are more keen to build their own servers. And we can use MCSM to build a minecraft server with one click. MCSManager is an open source, lightweight management panel that supports most game servers and console programs. It supports both Chinese and English languages, and has web console functions. Same customer experience as SSH terminal. Has been providing healthy software support for countless Minecraft server admins, ops, and other game admins.

After the Minecraft server is successfully set up, if you want to share it with friends who are not in the same LAN for online connection, we can do it through intranet penetration. You don't need a public network IP, and you don't need to buy a cloud server. You can achieve remote connection at low cost.

The following describes how to remotely access the local Mcsmanger management panel, and combine the cpolar intranet penetration tool to realize remote operation and management of game private servers

1. Install the MCSManager panel

Use the download command script on the official website to download and install directly. The installation script only supports mainstream x86_64-bit operating systems such as Ubuntu/Centos/Debian/Arch.

wget -qO- https://gitee.com/mcsmanager/script/raw/master/setup.sh | bash

After the installation is complete, we can see the accessed address and the related port number. The following command is the operation command.

image-20230411170836978

Execute the above command to start the service

systemctl enable mcsm-{
    
    daemon,web}.service

2. LAN access to MCSM

Through the above ip address, we can see that the port number is 23333. We can use the LAN ip address on the external computer to access port 23333 in the browser, and check the Linux LAN ip address:

ip address

After entering the command, we can see the relevant LAN ip address

image-20230411172123324

Then use an external browser to access through the LAN ip address plus port 23333, and you can see the web interface of MCSM. For the first login, you need to create an account

image-20230411175312109

After creating an account, you can see the management interface

image-20230413161613140

3. Install cpolar

Above we installed the MCSM panel on local Linux, and below we installed the cpolar intranet penetration tool. Through the http public network address of cpolar, we can easily implement remote access to MCSManager without registering a domain name to purchase a cloud server or Public network IP.

cpolar official website: https://www.cpolar.com/

  • Install commands using one-click scripts
curl -L https://www.cpolar.com/static/downloads/install-release-cpolar.sh | sudo bash
  • token authentication

Log in to the background of the cpolar official website, click the verification on the left to view your own authentication token, and then paste the token in the command line:

cpolar authtoken xxxxxxx

20230206171248

  • Add a service to the system, configure it as a background service and start it automatically
sudo systemctl enable cpolar
  • Start the cpolar service
sudo systemctl start cpolar

4. Configure the public network access address

After successfully starting the cpolar service, we visit the Linux LAN ip address + port 9200 on the browser, and log in to the cpolar web UI management interface.

After successful login, click Tunnel Management on the left dashboard - Create Tunnel, and create an http protocol tunnel pointing to port 23333 above:

  • Tunnel name: can be customized, be careful not to duplicate the existing tunnel name
  • protocol: http
  • Local address: 23333
  • Domain name type: choose a random domain name for free
  • Region: Select China VIP

click创建

image-20230414102530269

Then open the online tunnel list, view and copy the public network address of the http protocol, and use the http protocol to access

image-20230414102606397

We open the browser, we use the above public network address to access, enter the account password to log in

image-20230414102852420

5. Fixed public network address

Since the above tunnel created by using cpolar uses a random public network address, it will change randomly within 24 hours, which is not conducive to long-term remote access. Therefore, we can configure a second-level subdomain name for it, which is a fixed address and will not change randomly

Note that the cpolar package needs to be upgraded to the basic package or above, and the bandwidth corresponding to each package is different. [cpolar.cn has been filed]

5.1 Reserve a second-level subdomain

Log in to the cpolar official website, click Reserve on the left, choose to reserve the second-level subdomain name, set a second-level subdomain name, click Reserve, and copy the reserved second-level subdomain name after the reservation is successful

image-20230414103549980

After the reservation is successful, copy the reserved second-level subdomain address

image-20230414104352487

5.2 Configure a fixed second-level domain name

Log in to the cpolar web UI management interface, click Tunnel Management on the left dashboard - Tunnel List, find the tunnel to be configured, and click Edit on the right

image-20230414104434128

Modify the tunnel information, and configure the successfully reserved second-level subdomain name into the tunnel

  • Domain name type: select a second-level subdomain name
  • Sub Domain: Fill in the reserved sub-domain name

click更新

image-20230414104508234

After the update is complete, open the online tunnel list. At this time, you can see that the public network address has changed, and the address name has also become a reserved second-level subdomain name. Copy its http address

image-20230414104530685

Then use the fixed http address to open the browser to access, enter the account password to log in

image-20230414104715967

6. Set the public network address of the node

The remote panel access is set above, but the instance cannot be accessed. Clicking on our instance will prompt the following error, because the node address is still a local address

image-20230414105129361

So we need to set the public network address of the instance service. We click to view the port number of the node server managed by the node. You can see that the port number on my side is 24444

image-20230414105703262

Log in to the cpolar web UI management interface, click the tunnel management on the left dashboard - create a tunnel, and create a 24444 port tcp tunnel

  • Tunnel name: you can customize the name, be careful not to duplicate the existing tunnel name
  • Protocol: select tcp
  • Local address: 24444
  • Domain name type: choose a random domain name for free
  • Region: Select China VIP

click创建

image-20230414105902508

After the tunnel is successfully created, click on the status on the left - online tunnel list to view the generated public network address. This address needs to be remembered and copied

image-20230414105952604

Then we open the node server, change the local address localhost and port number to the port number and ip address of our public network address above, and then click Update

image-20230414110152466

Then we open the application instance again, and we can see that the above address has also changed

image-20230414110234882

Then click to successfully access the instance server without the above error

image-20230414110323930

7. Fixed node public network address

It should be noted that the above steps use a random temporary tcp port address, and the generated public network address is a random temporary address, which will change randomly within 24 hours. Next, we configure a fixed TCP port address for it, which will not change, and there is no need to repeatedly modify the server address every day after setting.

To configure a fixed tcp port address, you need to upgrade cpolar to a professional package or above.

7.1 Reserve a fixed tcp address

Log in to the cpolar official website , click on the reservation on the left, find the reserved tcp address, let's reserve a fixed tcp address for Minecraft:

  • Region: Select China VIP
  • Description: It is a note, which can be customized

click保留

image-20230414110551307

After the address is successfully reserved, the system will generate a corresponding fixed public network address and copy it down

image-20230414110622615

7.2 Configure fixed TCP port address

Configure a fixed tcp address, access the Linux LAN ip address +: 9200 port on the browser, log in to the cpolar web ui management interface, click the tunnel management on the left dashboard - tunnel list, find the tcp tunnel we created above, and click on the right of编辑

image-20230414110759386

Modify the tunnel information and configure the successfully reserved fixed tcp address into the tunnel

  • Port type: modified to fixed tcp port
  • Reserved tcp address: fill in the address successfully reserved on the official website,

click更新

image-20230414110829127

After the tunnel is successfully updated, click the status on the left dashboard - the list of online tunnels, and you can see that the public network address has been updated to a fixed tcp address.

image-20230414110954682

Open the node management, we change the random address set above to our fixed tcp address, and then update

image-20230414111111105

Then we use the public network address to remotely access the MCSM panel to access and control the game instance service normally

image-20230414111140988

Guess you like

Origin blog.csdn.net/2301_76369174/article/details/130281981