Using LXC to Set Up a Minecraft Bedrock Edition Server Based on Turnkey-gameserver
本文最后更新于 171 天前,其中的信息可能已经有所发展或是发生改变,如有失效可到评论区留言。
Article Abstract
To meet the deployment needs of Minecraft Bedrock Edition servers, the Turnkey-gameserver CT template is combined with LXC containers to achieve rapid setup. After creating the container via the PVE platform, the pre-configured initialization process is used to configure user permissions and basic services. Subsequently, the game is installed via the command line (recommended to avoid potential missing dependency issues with GUI installation), and finally, the service is run as the specified user. This solution relies on the pre-integrated Debian system image of Turnkey Linux, simplifying the game server deployment process into container creation and configuration steps. It is suitable for personal game server setup scenarios, but please note that network optimization measures may be required in domestic environments.
Qwen3-14B · 2026-06-18

Preface

Since I set up the Trinitycore 3.3.5 World of Warcraft server, I have also been thinking about what other game servers I could set up. After all, the "Game World" section of my blog cannot have only one World of Warcraft; with such a grand name, having such a small scope is just too low. After some research, the Turnkey-gameserver solution caught my eye. It is basically a one-click setup, and there are over 100 game server backends to choose from. This article will take setting up a Minecraft (Bedrock Edition) server as an example to demonstrate how to use PVE's LXC template to quickly build a game server.


A brief introduction to Turnkey Linux: "Turnkey GNU/Linux is a free Debian-based library of system images that pre-integrates and polishes the best free software components into secure, easy-to-use solutions. TurnKey is inspired by a belief in the democratizing power of free software, which, like science, promotes the progress of a free and humane society. Without the freedom to freely distribute, patch, and learn from free software, the Internet as we know it would not exist. Free software is the silent, often invisible force behind the greatest technological wonders of our time."

Simply put, Turnkey has already deployed various excellent free software based on the Debian system and formed numerous CT templates. Users only need to use these CT templates to create virtual machines, and they can immediately get a Debian-based LXC with the relevant software already deployed, which is as simple as deploying an application using Docker.

In fact, in PVE's CT templates, you can see many templates named turnkey-(software_name):

image.png

By using these CT templates to establish LXCs, you can immediately have a Linux container with the corresponding software already deployed. This article will build a gameserver in this manner.


Using CT Template: Turnkey-gameserver to Create LXC

Follow the steps below to create the gameserver LXC:

image.png

image.png

image.png

image.png

image.png

image.png

image.png

image.png

image.png

Click to complete the creation of the LXC.

Initializing gameserver

In PVE, select the newly created gameserver Linux container, and log into the terminal in the right console interface using root and the password created earlier:

image.png

After logging in, you will directly enter the gameserver initialization interface, where a new account named "gameuser" will be created and its password set:
image.png

After setting the password, enter the "Initialize Hub services" interface:
image.png

Here, you mainly configure Turnkey's backup, migration, domain name management, and other functions. If needed, you will need to provide an API key, which requires going tohttps://hub.turnkeylinux.org/profileregister, as well as needing a free AWS account, etc. If you need this, just follow the prompts to set it up. This step is not mandatory; you can choose the Skip button below to skip it and enter the system notification and security warning interface:
image.png

If you need to receive notifications, enter your email in the email field and select Enable below; otherwise, you can directly select Skip to skip, and then enter the security update interface:
image.png

If you need to install security updates immediately, select the Install button below to install; otherwise, select Skip to skip. I chose Install. After installing the updates, a reboot is recommended:
image.png

After rebooting, the terminal displays the following interface:
image.png

In the two red boxes in the image above, you can see the IP address of this Linux container and the command to enter the advanced command-line consoleconfconsole. At this point, you can already use an SSH client to directly access the IP address for management.

Installing the game

GUI Installation (Not recommended, many issues)

Use an SSH client or the console on PVE to log into the gameserver, and then runconfconsolecommand to enter the game server application service interface, as shown below (if you chose skip for the security update at the end of the previous section, you will go directly to this interface):

image.png

In the image above, Web shell is a web-based command-line tool, and Webmin can be understood as a panel tool (which is also covered in my other article:Docker Series: Building a DNS Server Based on Bind9). Here, we first select "Advanced menu" in the red box below to enter the advanced menu:
image.png

Select Game Server in the image above, and then choose Select below:
image.png

Select "Select game" in the image above, and then choose Select below:
image.png

The image above prompts that some games may require some basic configurations, such as the server name. Directly select OK below, and finally, we enter the step of choosing the game to install:
image.png

Since we are going to set up a Minecraft Bedrock Edition server this time, select 60, and then choose OK below:
image.png

It will be installed quickly:
image.png

Because gameserver must bind the game to a non-root account when installing a game, installing the game via GUI will cause the system to bind the game to the gameuser account created during initialization, and install the game to the/home/gameuser/gameserver/directory. Since we are installing Minecraft (Bedrock Edition) this time, the final path of the executable program is/home/gameuser/gameserver/mcbserver:

image.png

Note: Try not to install via GUI, as it feels like there is a higher chance of issues. I also encountered the problem of incomplete installation files. The official recommendation is command-line installation.

Command Line Installation

Execute theauto_install.shcommand to install, as follows:

cd /root/gameservers  
./auto_install.sh --list #查看有哪些游戏可以安装

image.png

./auto_install.sh --list # to view which games can be installed

./auto_install.sh --game mcb --user gameuser --path /home/gameuser/gameserver/

./auto_install.sh --game mcb --user gameuser --path /home/gameuser/gameserver/--user gameuser binds Minecraft to the user gameuser,It specifies the installation directory of the game, and the default is/home/$USERNAME/gameserver, press Enter to complete the game installation. Honestly, command-line installation is much faster than GUI.

Please pay attention to whether there are missing dependencies during the installation process:

image.png

You can directly use apt install in root mode to install the corresponding dependencies, or enter root mode and go to the/home/gameuser/gameserverdirectory to run./mcbserver installto automatically install the corresponding dependencies.

Running the game

Log in to the system with the account bound to the game (gameuser), go to the game's installation directory, find the executable program, and run it with the start parameter. The steps are as follows:

su gameuser
cd /home/gameuser/gameserver
./mcbserver start

Run directly./mcbserverto see the supported operations:

image.png

If you want to check the running status of the server, you can use the monitor option:
image.png

Of course, if you want to put it on the public network, you need to set up the corresponding domain name resolution and UDP port 19132 mapping (or allow it in the firewall policy).

Although this article takes Minecraft as an example, in fact, there are more than 100 other game servers that can be created using the same method. The only thing to note is that if you are in a domestic environment, you will need VPN/proxy assistance.

View Related Categories · 3 Matches
📌 Content Structure Prompt:
This content is part of the following knowledge map, where you can view the complete content path: Blog Knowledge Map。
📎 Related Articles
Share this article
The blog content is original, please indicate the source when reposting! The RSS address of the blog is:https://blog.tangwudi.com/feed, welcome to subscribe; if needed, you can join theTelegram Groupto discuss questions together.
No Comments

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗ
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
Kaomoji
Emoji
Little Dinosaur
Flower!
Previous
Next
       

👋 Welcome to “Wudi's Personal Blog”

Here, long-term exploration is mainly carried out around the following directions:

🧱 Personal Digital Infrastructure and Blog System Construction
☁️ Cloudflare and Network Architecture Practice
🧠 AI and Knowledge System Exploration
🛡️ Network Security and Access Optimization
🎵 Music and Sound Cognition
👁️ Cognitive Perspectives and Worldviews