Palworld Dedicated Server Guide on AWS | Run Palworld on AWS

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 มิ.ย. 2024
  • Want to deploy a dedicated Palworld server on AWS for maximum control? This video shows you how to use Terraform to create a Palworld server on AWS.
    ▬▬▬▬▬▬ T I M E S T A M P S ⏰ ▬▬▬▬▬▬
    00:00 - The What and Why
    02:20 - Creating an AWS Account
    04:22 - Install Terraform
    07:37 - Please get Visual Studio Code
    08:08 - Configuring the Terraform Code
    13:15 - Choosing PalWorldSettings.ini Settings
    18:45 - Creating AWS Access Keys
    23:55 - Deploying the Server
    30:45 - Cost Savings Tips
    38:45 - Setting Budget Alerts
    ▬▬▬▬▬▬ R E F E R E N C E S AND LINKS 🔗▬▬▬▬▬▬
    ► Terraform Registry Module -registry.terraform.io/modules...
    ► Module Repo - github.com/TheSudoYT/terrafor...
    ► Install Terraform - developer.hashicorp.com/terra...
    ► ssh error video - • SSH Errors: WARNING: U...
    ► auto start and stop ec2 instance cloudformation docs - docs.aws.amazon.com/solutions...
    ► CloudFormation template url - s3.amazonaws.com/solutions-re...
    ► aws price calculator - calculator.aws/#/
    ▬▬▬▬▬▬ What you’ll learn ✅ ▬▬▬▬▬▬
    ► Create an AWS Account
    ► Install Terraform
    ► Create a Palworld server with Terraform on AWS
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 84

  • @TheSudo
    @TheSudo  4 หลายเดือนก่อน +2

    Part 2: th-cam.com/video/H0gGtPqhxco/w-d-xo.html
    Frequent Questions:
    ❔Palworld Settings such as ExpRate and ServerAdmin password not working
    ✅ Release 1.0.2 of the module fixes this issue
    ❔During terraform apply " Error: creating EC2 Subnet: InvalidParameterValue: Value (us-east-1a) for parameter availabilityZone is invalid"
    ✅ There is an input named `subnet_availability_zone` . Add that input to your main.tf file as such `subnet_availability_zone = "eu-central-1a"` choosing an availability zone that exists the region you have set for your provider configuration.
    ❓You get an error "│ 'github.com/TheSudoYT/terraform-aws-palworld?ref=5e3223be6ab41a7b7189acccd6960ee2d8510dba': git must be available and on the PATH." " when running terraform init.
    ✅ Install Git on your PC

  • @mrjcbennett0321
    @mrjcbennett0321 4 หลายเดือนก่อน +12

    You’re an absolute chad for taking a devops approach to doing a dedicated server. Kudos good sir

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน

      Just wish I had time to teach everyone how to properly use Terraform and AWS but the video would be 2 hours long 😂

  • @bobfunk5055
    @bobfunk5055 4 หลายเดือนก่อน +2

    I hear there is a certified genius involved in this!

  • @alexl2174
    @alexl2174 4 หลายเดือนก่อน

    Thank you for doing this. I wish I had you in my basics to networking class. Such a helpful clip.

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน

      Any time!

  • @ALuckyDonkey
    @ALuckyDonkey 4 หลายเดือนก่อน +2

    Thanks for this in-depth tutorial ! Time to enslave some pals.

  • @magikarp8084
    @magikarp8084 4 หลายเดือนก่อน +2

    Hey for those not well versed with aws. Use a t3a instead of the regular t3. Its cheaper since it runs on amd cpus. I tried running it on a graviton instance but it didnt work and im not debugging that since graviton is not that much cheaper than an amd ec2. is around 12 dollars more a month assuming the is running 24/7 with no schedule applied. PS. the terraform doesnt seem to configure the sec group to open port 22 by default but you can open it in the inbound rules manually. or just check where the terraform sets the sec group and add it there.

  • @toddbelle
    @toddbelle 4 หลายเดือนก่อน

    Struggling with setting up custom schedules, are there other videos that go into more depth about setting up the lambda function/dynamodb tables? My use case is a different start stop mon-thu, fri, and sat-sun

  • @ScottA-hp3gk
    @ScottA-hp3gk 4 หลายเดือนก่อน +2

    Great guide, thanks a bunch!
    How would I go about transferring files to the EC2 instance? ie I want to transfer the world save file to the server

    • @ScottA-hp3gk
      @ScottA-hp3gk 4 หลายเดือนก่อน +1

      Oh NVM. I used WinSCP to connect to ip address, user=ubuntu and the palworld pem file as authentication

  • @King0nWings
    @King0nWings 4 หลายเดือนก่อน +1

    Great video! Thanks for putting this together. When I am running the terraform plan step at 24:10 I get multiple errors into the console of "Error: Unsupported argument" - I get one for each line in main.tf ... Did I miss a step?

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน

      Its hard to say without looking into the code. Can you open a github issue? Thing to check might be --
      Ensure you are in the directory that contains your terraform files when you run a terraform plan. Also, ensure the source and version at the top of the "module" block are correct. The latest version at the time of this comment is 1.1.0 and the source should be TheSudoYT/palworld/aws

  • @lihauwan1548
    @lihauwan1548 4 หลายเดือนก่อน +1

    Hey ! Thanks for this guide. Was wondering if I wanted to patch the palworld version would you happen to have a guide on how can I do it

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน

      SSHing into the server and performing a systemctl restart palworld should restart the service and also download any updates.

  • @ziyishen9178
    @ziyishen9178 4 หลายเดือนก่อน

    that is a awesome tutorial! thanks a lot. One quick Q - do we need to run anything when there's an update for the game?

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน

      You’ll have to SSH in and perform a systemctl restart palworld command to restart the service. At which time the server will update.

  • @MrMeeseeks33
    @MrMeeseeks33 4 หลายเดือนก่อน

    Awesome video! How would I backup the EC2 instance data if I were to destroy the instance. Also, If i stop the instance does the data go away?
    Also silly question, if the game updates do i need to do a redeploy?
    Thanks again!

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน +1

      There is an input for the module “enable_backups” that will put backups in an s3 bucket. That bucket is also part of the terraform state so a destroy would destroy that too. You can take a snapshot of the EBS volume attached to the ec2 instance as well and restore from there.
      Stopping the instance does not delete data. Terminating an instance does. If the game updates you need to restart the palworld service with the systemctl restart palworld command to update it.
      Don’t forget to add a feature request to the github repository if there’s something you would like to see added to the module!

    • @Hellsfool
      @Hellsfool 4 หลายเดือนก่อน

      @@TheSudo anyway to enable the S3 backup once the server is deployed? I have an ebs snapshot being taken daily but the s3 backup would be great for resiliency

  • @mattm5063
    @mattm5063 หลายเดือนก่อน

    I used the module as described, all infra is created successfully and I verified the security group rules, however I am unable to connect from my local pc to the palworld server using direct connect. SSH works, but game client to server fails. Any suggestions?

  • @remypaak4195
    @remypaak4195 4 หลายเดือนก่อน

    Thanks for this amazing tutorial! It's lovely to learn some DevOps skills while setting up a server for your friends :P Before this video I also had the incorrect assumption that it would be cheaper to run it myself than renting it from a server hosting company. This is clearly not the case sadly. Could you explain to me why it is so much cheaper for these companies to run these servers?

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน

      There are a lot of factors that come into play, but the major one is that they are buying or renting so much powerful hardware at once that they can get discounts and deals from the companies they buy or lease from. If you were to sign up for an AWS EC2 instance plan and commit to a 1 or multiple years cost savings plan for an upfront cost it would literally be 50% cheaper to run the server 24/7. Depending on the size of the company hosting the games they can also borrow large amounts of money to finance hardware purchases, and then recoup them over time by offering attractive prices to users.

  • @sidtv8897
    @sidtv8897 3 หลายเดือนก่อน

    im having a issue about terraform init it doesnt work when i do the aws access keys can you help me thanks

  • @CliveGlitch
    @CliveGlitch 4 หลายเดือนก่อน +2

    hi, good video, I got the server up and running nicely thanks, just a question, how can you do a manual back up of the save files on the case I want to migrate the server?

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน +1

      You can SSH into the EC2 instance and compress the `Pal/Saved/SaveGame` directory using this command:
      sudo tar -czvf palworld_backup.tar.gz /palworld-server/Pal/Saved/SaveGame
      Then:
      sudo chown ubuntu:ubuntu palworld_backup.tar.gz
      Then exit the EC2 instance using the `exit` command to get back to your local PC. Then use scp to pull the file from the EC2 instance to your PC using this command:
      scp -i /path/to/your-key.pem ubuntu@your-ec2-public-ip:/path/to/palworld_backup.tar.gz C:/local/destination/path
      Be sure to replace /path/to/your-key.pem with the path to your private ssh key. Replace ubuntu@your-ec2-public-ip with the public IP of your server. Replace /path/to/palworld_backup.tar.gz with the path to the backup tar file you created on the ec2 instance. If you just SSHed in and ran the above commands the file will probably be in /home/ubuntu/palworld_backup.tar.gz. Finally, replace C:/local/destination/path with a path on your local PC.

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน +1

      Additionally, there are 2 inputs you can use. If you start the server with enable_s3_backups = true an set a backup_interval_cron_expression then the server will push backups into the AWS S3 service in an S3 bucket. You can then download them from there. You can explore cron expressions here crontab.guru/#*/5_*_*_*

    • @CliveGlitch
      @CliveGlitch 4 หลายเดือนก่อน

      @@TheSudo Thanks you, made a backup successfully.

  • @Hellsfool
    @Hellsfool 4 หลายเดือนก่อน +2

    Firstly thanks for a great video and appreciated the repo as well! A couple of people have begun using my server but i noticed when i attempt to assume admin it says "that a admin password hasn't been set yet". I can see that in the "/palworld-server/Pal/Saved/Config/LinuxServer" i have AdminPassword set to something. Are you aware of this issue or any suggestions? I dont want to modify the .ini and corrupt the server metadata.

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน

      Let me look into this. Can you make a GitHub issue as well?

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน +1

      github.com/TheSudoYT/terraform-aws-palworld/issues/3 Found the issue and will release a fix.

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน +1

      Fixed with release of 1.0.2. If you already have a server up and running you can copy the /palworld-server/DefaultPalWorldSettings.ini to /palworld-server/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini and edit the values then restart palworld and it should take effect without destroying your server.

    • @Hellsfool
      @Hellsfool 4 หลายเดือนก่อน

      You are a legend for the quick fix@@TheSudo bought you a coffee as thanks!

    • @317Digest
      @317Digest 4 หลายเดือนก่อน

      @@TheSudo Should we edit the settings for file in /palworld-server/DefaultPalWorldSettings.ini before moving the file? After move the file, should we delete the existing PalWorldSettings.ini in the config folder?

  • @95near21
    @95near21 4 หลายเดือนก่อน

    Sorry for the silly question I am totally new with all this and trying to learn. I got up to 24:45 in your video and terraform initializes successfully but upon inputting terraform plan and apply it doesn't download your palworld module. Do you know if there's something specific I need to modify? I've followed everything as closely as I could. I am using version 1.0.3 of your code. Thank you for the helpful video 👍

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน

      Terraform modules and providers are downloaded when you run terraform init. If terraform initialized successfully, did it create a .terraform folder that contains the module and providers? If it did not, check to make sure you saved the main.tf file using the Windows shortcut CTRL+S or by going to File -> Save in VSCode. Then run terraform init again. You may be prompted to run terraform init --upgrade.
      If the issue persists, please open an issue on the GitHub repository and provide your code so I can better assist you.

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน

      Additionally, make sure you are running terraform from the same directory/folder that contains your code. If you code is in C:/Desktop/Palworld/Terraform_code make sure your terminal displays that you are in C:/Desktop/Palworld/Terraform_code as well.

  • @orfridman10
    @orfridman10 4 หลายเดือนก่อน +2

    Is there a way to move a server we're already playing on from my local PC to AWS? we don't want to start fresh

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน +1

      Yup. There’s a section in the README and an example for doing this. Head on over to the GitHub repository link in the description and check out the Restore From Backup section.

  • @omgnogod666
    @omgnogod666 4 หลายเดือนก่อน

    So this means one EC2 instance per server? Will destroying the EC2 instance essentially get ride of the server and its data?
    I understand there data can be backuped to S3 (which can cost a small amount of money monthly), but we would have to basically reconfigure everything (such as IP address) and upload the backup to the server and link to the server in the game for each person joining the server?

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน +1

      1 Instance per server is correct. Destroying the EC2 instance will delete the server and all data on it.
      Yes data can be backed up to S3 for a small charge. Please note that the backups 3 bucket created by the terraform apply is also part of the same terraform state that created the server. Running terraform destroy will also destroy the backups s3 bucket. To prevent this you can set the input `force_destroy = false` to protect yourself. You would want to download the backups you wish to save locally and put them somewhere else in that scenario.
      There is a section in the README for Restoring From Backup, and an example as well. The process to restore with this module involves placing your backup files in the opinionated file structure documented in the README and providing the old servers `dedicated_server_name_hash` input.

    • @omgnogod666
      @omgnogod666 4 หลายเดือนก่อน

      @@TheSudo maybe one alternative is to set count to 0 (disable server) or 1 (enable server) or just comment the terraform code that has the server haha
      Or create a mechanism that detects no activity after 15 or so minutes and down size the server (or disable it) and vice versa (although there will be a decent wait time). I suppose there will be a wait time either way.

  • @corymusgrave7084
    @corymusgrave7084 4 หลายเดือนก่อน +1

    Could you use GameLift for this? Would it provide any benefit?

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน

      Interesting thought. I'm actually going to look into this.

  • @MassiveMike90
    @MassiveMike90 4 หลายเดือนก่อน +2

    Hey Josh, thanks for guide. I was just about to finish up when I went to Init, it initializes the back end then the modules, starts downloading from the registry, and fails to download the module. Its stating it could not download "palworld". I'd copy and paste the entire code snippit but YT keeps deleting my comment lol.
    Best,
    Mike

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน +1

      Hey Mike. Can you open an issue on the GitHub repository with your code snippet attached?

    • @MassiveMike90
      @MassiveMike90 4 หลายเดือนก่อน

      What if I told you I closed out Visual Studio like 3 hours ago, just saw your comment, reopened it and now it works lol. If I run into anything else I'll let you know. Thanks so much!@@TheSudo

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน

      @@MassiveMike90 Glad to hear it!

  • @csualkyle2260
    @csualkyle2260 4 หลายเดือนก่อน +1

    Hey, I followed the guide so far but 24:34 I get "no changes. Your infrastructure matches the configuration." Does that mean I don't need to change anything? I checked my EC2 and there isn't anything showing up

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน

      This means Terraform believes that your code matches what exists in the real world. A few things to check:
      1.) Did a terraform init run and download the module and providers? If it did, you will see a .terraform folder that contains these.
      2.) Did terraform apply run once, and now you're trying to run it again, but its telling you the infrastructure matches the configuration?
      3.) Make sure you SAVE your main.tf file by using the shortcut CTRL+S on Windows or going to File -> Save in VSCode. Once you save, run terraform init and apply again.
      4.) Open an issue on the GiutHub repository and provide your code if the issue continues to exist.

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน

      Additionally, make sure you are running terraform from the same directory/folder that contains your code. If you code is in C:/Desktop/Palworld/Terraform_code make sure your terminal displays that you are in C:/Desktop/Palworld/Terraform_code as well.

  • @hippwn9087
    @hippwn9087 4 หลายเดือนก่อน +1

    When I ran the ssh -i command during the deploying part I received connection time out. How do I fix that? It doesn't appear like the port 22 is appearing in the AWS security tab like it did for you.

    • @hippwn9087
      @hippwn9087 4 หลายเดือนก่อน +1

      Well I ran the plan again and applied again and it added the port 22 and the ssh -i worked this time.

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน

      Sorry about that. There is a small issue with the way terraform is handling the lifecycle of the security group port 22 rule and the ec2 instance. A 2nd apply always fixes it but i am working on a permanent solution. @@hippwn9087

  • @eleventeen3926
    @eleventeen3926 4 หลายเดือนก่อน +1

    Awesome video, one thing, lets say i want to change the night time rate after i already run the server. the only way i can get changes to occur is if i redo the whole process, which resets all progress. how can i just change the main.tf and update that on the server? i tried changing the main.tf and saved and did terraform apply and it still didnt update on the server.

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน

      Great question. Rerunning the terraform apply after editing one of the Palworld settings results in terraform updating the user_data script that ONLY runs when the server gets created for the first time. The only way to get the change in that case is to terminate the server in the UI or run a terraform destroy and then rerun terraform apply. If you enable backups when creating the server you can use the restore from backup option and start the server from existing files. I realize that’s a lot of work so it’s probably just easier to ssh into the server, modify the settings file using VIM or a text editor of your choice, and restart Palworld with systemctl restart palworld

    • @eleventeen3926
      @eleventeen3926 4 หลายเดือนก่อน

      @@TheSudo Perfect thanks!

    • @colinholmes7180
      @colinholmes7180 4 หลายเดือนก่อน

      @@TheSudo Could you provide some direction on that second option for someone with little experience in a shell? I want to change some settings but I don't want to accidentally screw something up. Great video by the way.

    • @eleventeen3926
      @eleventeen3926 4 หลายเดือนก่อน

      @@colinholmes7180 so do what he does to ssh into the server at 26:16
      after that you will do
      sudo nano /palworld-server/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
      you change what you want then you do ctrl+x it will ask you if you're sure you hit y and then enter

    • @eleventeen3926
      @eleventeen3926 4 หลายเดือนก่อน +1

      Do what he does to ssh into the serve at 26:17
      then do
      sudo systemctl stop palworld
      sudo nano /palworld-server/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
      change what you want then do ctl+x then y then enter and it will be saved. Do
      sudo systemctl daemon-reload
      sudo systemctl start palworld
      @@colinholmes7180

  • @ScottA-hp3gk
    @ScottA-hp3gk 4 หลายเดือนก่อน +1

    How would we change the settings after the server and wolrd is created?

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน +1

      I'll be making a video on this soon, but for now you can SSH into the server and use a text editor such as vim or nano to update settings. More to come if you're new to linux.

    • @colinholmes7180
      @colinholmes7180 4 หลายเดือนก่อน

      ​@@TheSudo Subscribed with notifications on for this one.

  • @kemueltoledo1784
    @kemueltoledo1784 4 หลายเดือนก่อน +1

    whats the usual cost of the ec2 if you ran this for 24/7?

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน

      It depends on the instance type used. I’ve put a link in the description to the aws cost calculator where you can calculate the cost based on the type.

  • @ruizhou5716
    @ruizhou5716 4 หลายเดือนก่อน

    it give error when apply it. Error: creating EC2 Subnet: InvalidParameterValue: Value (us-east-1a) for parameter availabilityZone is invalid. Subnets can currently only be created in the following availability zones: eu-central-1a, eu-central-1b, eu-central-1c.

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน +1

      There is an input named `subnet_availability_zone` . Add that input to your main.tf file as such `subnet_availability_zone = "eu-central-1a"` choosing one of those 3 availability zones. That should resolve this.

    • @ruizhou5716
      @ruizhou5716 4 หลายเดือนก่อน

      Yes, it worked out. many thanks. this is the first time i deploy something on cloud server and the video is amazing to guid me step by step and is just so much better than my lecture professor @@TheSudo

  • @hoboactual
    @hoboactual 4 หลายเดือนก่อน

    This!!!!!

  • @tommybahamii
    @tommybahamii 4 หลายเดือนก่อน

    I did this but with the recommended hardware settings the price would Ballon so heavily

    • @robbyagn
      @robbyagn 4 หลายเดือนก่อน +1

      do you find any hardware settings that still can run but not that expensive?

    • @tommybahamii
      @tommybahamii 4 หลายเดือนก่อน +1

      @@robbyagn you can probably use lower end settings but not have as many concurrent users with some expected server jitter / lag

    • @tommybahamii
      @tommybahamii 4 หลายเดือนก่อน +1

      @robbyagn i know 1 gb + 1 core won't even run I think the game is recommend 8 gb + 4 core tried 2gb with 2 core still pretty bad. Recommend try 8gb maybe 2 core or 4 and 4 but didn't take the time to try because of the sheer difference in pay for 100% up time vs a game server provider

  • @zgu
    @zgu 4 หลายเดือนก่อน

    does the stupid rcon port open?

    • @TheSudo
      @TheSudo  4 หลายเดือนก่อน

      I'm not sure I understand the question.

    • @zgu
      @zgu 4 หลายเดือนก่อน

      ​@@TheSudoI try to configure the rcon port and enable it and it doesn't even listen on a tcp socket