Image by vectorjuice on Freepik
A couple of weeks ago, a game called Palworld released and took the gaming world by storm. My brother and I wanted to play it co-op, but due to issues with the multiplayer server, we couldn't. Luckily, we found that Palworld has a dedicated server that we can host it anywhere we want. I took this opportunity to try and host it myself using AWS.
Setting up the EC2 instance
The first step is to spin up a virtual server using Amazon Elastic Compute Cloud (EC2), amazon's on demand virtual servers. For the image, I decide on Ubuntu since it was easier to set up the required dependencies for the Palworld server.
According to the recommended server specs we need at least 16GB of RAM, for this, I opt for the t3.xlarge instance and for the Elastic Block Storage (EBS) I put 30GB of storage.
Before moving on to the installation of SteamCMD and the Palworld dedicated server, I decided to create a specific Security Group and an Elastic IP address for this EC2 instance.
Security Groups
A security group controls the traffic allowed to reach and leave the resources that it is assigned to. For my instance, I created a new security group called Palworld Server Security Group and then edit the inbound rules for this group. I enabled SSH to accept connections from my local IP address and allowed UDP port 8211 to accept any IPv4 requests. This will let anyone with the server IP address and port connect to the Palworld server using the in game server browser.
Elastic IP
Before February 1st, 2024, Elastic IP Addresses assigned to an instance were free, but now, they charge US$0.005/hour, you can read more about it here.
IP addresses in the cloud are dynamic by nature; every time I stop an EC2 instance and then start it up again, it gets a new IP address. Due to this, I opted to use an Elastic IP address.
Elastic IP is a static IPv4 address designed for dynamic cloud computing. My main motivation to use an Elastic IP was so that I didn't have to share the server IP address every time my brother or cousins wanted to play.
That's all the setup as far as AWS console goes, now we will SSH into the EC2 instance to install everything we need to run the Palworld dedicated server.
Installing SteamCMD and Palworld server
SteamCMD
SteamCMD is a Steam client CLI tool for installing and updating dedicated servers, to install it on ubuntu as per the documentation we run:
sudo add-apt-repository multiverse; sudo dpkg --add-architecture i386; sudo apt update
sudo apt install steamcmd
After the setup is complete, we can type in the following command:
steamcmd
If everything works, you should be inside a SteamCMD prompt
$ steamcmd
tid(931) burning pthread_key_t == 0 so we never use it
Redirecting stderr to '/home/ubuntu/Steam/logs/stderr.txt'
Logging directory: '/home/ubuntu/Steam/logs'
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation - version 1705108307
-- type 'quit' to exit --
Loading Steam API...dlmopen steamservice.so failed: steamservice.so: cannot open shared object file: No such file or directory
OK
Steam>
That's all for the SteamCMD setup, now we move on to install and configure the Palworld server.
Palworld dedicated server
Our first step is to download and install the dedicated server, to do this we run the following command:
steamcmd +login anonymous +app_update 2394010 validate +quit
-
+login anonymous
let us log in into steam as anonymous user. -
+app_update <app_id>
installs or updates the installation of the givenapp_id
. -
validate
checks the server files to make sure they match with SteamCMD files. -
+quit
logs off from the Steam servers.
After the download is complete, we go to the download directory, which, in my case, it was in my user's home directory.
cd ~/Steam/steamapps/common/PalServer
Now we simply run:
./PalServer.sh
On the first run, it will throw the following error:
.steam/sdk64/steamclient.so: cannot open shared object file: No such file or directory
As per the documentation, we can fix this with the following commands:
mkdir -p ~/.steam/sdk64/
steamcmd +login anonymous +app_update 1007 +quit
cp ~/Steam/steamapps/common/Steamworks\ SDK\ Redist/linux64/steamclient.so ~/.steam/sdk64/
- It creates a folder called sdk64.
- It installs the Steamworks SDK Redistributable.
- Copy the file
steamclient.so
to~/.steam/sdk64/
.
With that out of the way, we can run this command again:
./PalServer.sh
If we get the following line after running the previous command, the server is up and running successfully:
[S_API] SteamAPI_Init(): Loaded '/home/ubuntu/.steam/sdk64/steamclient.so' OK. (First tried local 'steamclient.so')
We are almost done. The last thing we need to do is to change some of the server settings.
Configuring the Palworld server
Running the server for the first time will generate a configuration file in the following location:
steamapps/common/PalServer/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
As per the documentation found here, we need to copy the default settings found in steamapps/common/PalServer/DefaultPalWorldSettings.ini
.
There are many server parameters we can edit, but for now we only need to change the following:
- ServerName: We type in the name of our saver, in our case, we called it Eternia
- ServerPassword: We can set a server password here.
- PublicIP: We need to type in the Elastic IP address we set up earlier.
- PublicPort: We can specify a port number here, the default is 8211.
With those final steps, we are all set to begin our journey into Palworld.
Nice!๐๐ป
Closing thoughts
Setting up a game dedicated server with AWS was a really fun experience, from the proper setup of the EC2 instance, to the correct setup of the security group and the allocation of the Elastic IP while also installing and configuring all the dependencies needed to host the Palworld server.
With this little project under my belt, I'm looking forward to set up all kinds of dedicated servers, from Minecraft to Enshrouded and anything else that comes in between.
Hope to see you again as I continue my journey towards the cloud.
Top comments (0)