The recent emergence of the game “Palworld” has not only sparked extensive interests and discussions among the players, it has also ignited enthusiasm in standing up dedicated game servers on cloud service providers. The official servers faced some serious challenges dealing with the large amount of players with over 2 million concurrent users, which led to a dramatic surge in network traffic. Consequently, some cloud vendors have specifically introduced cloud-based dedicated server deployment solutions to provide a more stable and smooth online gaming experience.
Press enter or click to view image in full size
In addition to the exquisite quality of the game itself, the popularity and breakout success of “Palworld” also stem from the empathy of working individuals towards the in-game characters “Pals”, who are depicted as an overworked “corporate drone” exploited by various “cyber bosses”. In order to help everyone easily experience the joy of cloud gaming, we, who focus on Platform Engineering and application management, have been working tirelessly to jump on this bandwagon just like Pals. We hereby present how to use Kusion to set up a Palworld dedicated server on the cloud with a single-click.
Currently available dedicated server deployment generally involve launching the official server program of “Palworld” on a cloud compute instance that meets the hardware requirements for running the game (typically 4 cores and 16GB of RAM). Additionally, the solution involves opening the 8211 UDP port for public internet access. This allows players to type in the public IP address along with the port number 8211 in the game client to join the dedicated server. Game-related configurations, such as maximum players, difficulty, and the rate of day and night progression, can be modified through the configuration file during server startup.
Using Alicloud as an example, to create the cloud resources required for a “Palworld” dedicated server from scratch, the key components include:
- Alicloud Virtual Private Cloud (alicloud_vpc)
- Alicloud Virtual Switch (alicloud_vswitch)
- Alicloud Security Group (alicloud_security_group)
- Alicloud Security Group Rules (alicloud_security_group_rule)
- Alicloud Elastic Compute Service (ECS) Instance (alicloud_instance)
- Alicloud ECS Commands (alicloud_ecs_command)
- Alicloud ECS Invocation (alicloud_ecs_invocation)
Although Alicloud has simplified the installation of the “Palworld” server to a certain extent, users still need to be aware of the cloud infrastructure concepts such as ECS, VPC, SecurityGroup, or OOS. Therefore, we have added another layer of abstraction using KusionStack for these cloud resources, providing users with an end-to-end, one-click deployment and minimizing cognitive and operational overhead.
Press enter or click to view image in full size
Application Model Abstraction
We have encapsulated the configuration of the said cloud resources using the Kusion Module, providing the PalWorldServer as an abstract application model. It exposes only three fields externally: name (optional), server size, and network bandwidth. Users can simply start a server by choosing the appropriate size and bandwidth based on their needs. The rendering of related cloud resources will be handled by the Kusion Generator.
Press enter or click to view image in full size
Initialize with Online Application Template
To smooth out the experience, we are providing a one-click deployable template that users can pull locally using the Kusion command-line tool. The installation of the Kusion command-line tool can be found in the official documentation here.
Get KusionStack’s stories in your inbox
Join Medium for free to get updates from this writer.
You can use kusion init — online to pull the online template, select the application “palworldserver-ecs”, enter the resource name, instance type (“small”, “medium” or “large”), and bandwidth size (in Mbps, please enter a positive integer). Alternatively, you can press Enter all the way through, which will use our default selection of a small instance type machine and 5 Mbps bandwidth. Finally, navigate to the “dev” directory.
Press enter or click to view image in full size
Dependency Installation and Environment Variable Configuration
Afterward, you will also need to install the Terraform command-line tool locally and configure the Access Key (AK) and Secret Key (SK) for your Alicloud account. For the necessary preparations, you can refer to this article on the KusionStack website.
Press enter or click to view image in full size
Press enter or click to view image in full size
One-Click Deployment with Kusion
Finally, you can complete the one-click deployment of the “Palworld” cloud server by running the command kusion apply. For any future server updates required, this command will apply those changes to the server idempotent-ly.
Press enter or click to view image in full size
Server Login Verification
In the local dev/kusion_state.yaml file, the state of application resources is stored. You can open it to locate the public IP of the alicloud_instance.
Press enter or click to view image in full size
At this point, you can start the game client and enter the public IP with port 8211 to log in and enjoy the game!
Press enter or click to view image in full size
One-Click Deletion of Cloud Resources
Finally, you can use the command kusion destroy to delete the associated cloud resources with a single-click when needed.
Press enter or click to view image in full size
To sum it up…
Based on the atomic capabilities provided by KusionStack, we have encapsulated and abstracted the cloud resources required to deploy a Palworld game server, making it convenient for users to launch and terminate a dedicated server anytime, anywhere. However, the current implementation is relatively simple, and there are some configurable options that users are concerned about but haven’t been well exposed, such as cloud resource regions, disk sizes, and game-related properties. Nevertheless, we are not just here for Pal, and we welcome users interested in KusionStack to try and follow our products. You are more than welcome to join us in collectively building better platform engineering products.