Hosting Godot dedicated server on a VPS for FREE | DigitalOcean | Part 8

#godotmultiplayer #dedicatedserver #multiplayer #godotengine #godot3

In this series you will learn how to make a dedicated multiplayer server and client connection, how they interact and the entire workflow

Links:
SignUp for DigitalOcean:
Download Filezilla:
CodingKaiju Article:

@CodingKaiju

Commands:
ssh root@ipaddress
sudo apt update
wget
sudo apt install unzip
unzip Godot_v3.2.3-stable_linux_server.64.zip
nohup ./Godot_v3.2.3-stable_linux_server.64 –main-pack server.pck

Link to series:
Project on github:

SMASH SUBSCRIBE🔔
SMASH LIKEE!!!👍

# If Any Questions:
⭐Join my discord server:
📸Instagram:
Facebook:
🐤twitter:


Hey there everybody and welcome this is The last tutorial of this series and i’m Really glad to be here right now so in This tutorial we’re going to be hosting The game on ubps just so that players From around the world can come join and Play with everybody i guess so before we Begin i want you to just go over here to Digitalocean and also to create an Account so this is actually the service That we’re going to be using for our vps Um we’re going to be creating our vps Here and they give you 300 credits when You just sign up so you can go over to The link in the description sign up get A hundred dollar credit and try this out For free and one bug when i’ve seen we Are trying to sign up is um don’t try to Sign up from google or from github just Try and put in your email and password There um and sign up and don’t worry When you try to sign up they’re going to Ask you for your payment details through Paypal or your card just put it in They’re not going to debit it as long as You actually spend money on the server So i’m going to give you like three Seconds so that you can go create your Account will come back So now to begin we’re going to go over Here um we just create the account this Is what you’re going to be seeing this Is going to be your default i think his Name will be droplets whatever it is so

Um but this is exactly what you’re going To be seeing so first off we’re going to Click create and over here we’re going To click droplets So when you do that you’re going to see Create job let’s choose an image and all That stuff so we’re going to leave it as Ubuntu i’m going to leave it as 20.0.4 And here you see choose a plan you can Choose the shared cpu general purpose if Be optimized you can actually go for the Craziest one right now because you’re Going to be using your free dollar Credits i guess um but whatever i’m Going to just go to basic um just chat Cpu and i’m going to click this 14 one i Guess or you can go for this one since It has two intel cpus just if you’re Doing this for production purposes just Go for the one that’s best so over here You see add block storage we’re not Going to add that we don’t have any data Business and all that i’m going to Choose amsterdam for my country because I don’t know why not and Yeah that’s it password you get to Choose a password i actually like using One particular puzzle because it fits All this criteria inside here so i’m Just going to paste it and you can see Password must be this long Um just make it password to fix this Criteria and make sure you remember that Password because we’re going to be using

It later the next thing is select Additional options you can select to Enable backups this is just going to be Backup the Servers data monitoring all these things Um this one is free ipv6 we’re not going To be using ipv6 We’re just going to leave all these Things blank and over here how many Droplets really want one and we can just Choose a host name In this case i’m just going to choose Multiplayer Or let’s just say godot Multiplayer so yeah Here um you can choose tags we’re just Going to leave that blank we don’t Actually need tags and the tags are just So that um in case you have like many Droplets you can shuffle through um Really easily So we’re going to select the project Which is the droplets project i’m going To click create as you can see it’s Creating our server here 2 gigs 60 gigs Space um in the disk i’m just going to Wait for this to finish So yeah we were done with that as you Can see now our server has been created And he has an ip address We’re going to be using this later on But before we go on you’ll have to Download filezilla so filezilla is Basically what we’re going to use to

Transport our game project or our server Server file to this to the main server Here the computer so go ahead and Download filezilla go to filezilla Project.org slash download the php you Can see for windows you’re going to see For mac os down here linux whatever Operating system you’re on and get it Also just to be clear make sure you get Filezilla clients please don’t go Getting filezilla server because you Won’t be able to follow so after this We’re going to go over to our server or Google server here i’m going to export It so we go over to project export And as you can see we have a linux Already in here if you’re not seeing That just click add and click linux Level and we’re just going to leave all These values default and make sure you Don’t click this embed pack because Where is the part is the pck file we’re Going to be using and before we continue I want you to take note of something i Want to take note of the current version Of godot you’re using for me i’m Currently using godot 3.2.3 if i’m not Wrong here um if you want to check you Go over to help about and you’re going To see it here good engine 3.2.3 so yeah Take note of the good ol you’re going to You’re using to export this because We’re going to be using it later on we Will try to deploy the server so go back

To project export and We’re going to click this i’m just going To export the project and i’m going to Export it Over here To multiplayer game i’m just going to Export it here So click save It’ll take a couple of seconds And we’re done so if i go back to that Folder here you can see server dot x um 86 underscore 64 and pck actually we’re Not going to be using this other one is The pck file we need as i said before So now i assume your filezilla has Finished downloading so we’re just going To go fire it up so when fazila is up um This is basically how to look it may not Look like this i’m kind of using an old Version because i don’t know i like Trying new things but anyways um when Your filezilla is up it’s going to look Like this so we’re just going to Navigate to that folder that we saved The um Server that we just exported so mine is In Desktop And it’s a multiplayer game this is it And these are the two files down here so Now we’re going to be connecting to this Um digitalocean server that we just Created so we’ll go over here hover Around this ip address click copy

And go back to filezilla we’re going to Click this open site manager and over Here my site you’re just going to click New site when actually this is actually A site but just click new site we can Rename this to google and we’ll go over Here to protocol choose sftp and the Host is going to be the ip address you Just copied i’m going to leave the port Empty And the password is going to be that Password that you set while creating This server So remember i told you that you need That password now this is the time we’re Also going to use it again later on but You’re going to paste in that password Here So over here for the user we’re just Going to use roots and we’re going to Click ok then we go over back here and If you click this drop down you’re going To see godot i’m going to click that and It’s going to try to connect as you can See it’s going to try to connect with This fingerprint all this stuff just Click okay and as you can see connected Retrieving the directory and here it is This is our root this is our server that We created on digital ocean so now we’re Going to be sending the server the pck File as you can see is now inside there So basically what i just use just drag And drop basic drag and drop it to just

Upload the file to the server that’s Actually everything you need for zilla For um i’m sorry if it was a pain in the Ass to download but whatever So now it’s time to log into the server And some cool command prompt stuff so We’re going to close filezilla and we’ll Get to open windows terminal you can Open terminal you can open command Prompts whatever you want but i’m going To be using terminal in this case so now I’m opening here my terminal and this We’re going to be doing the remaining Stuff and before this i just want to Make reference to This website this is this is actually Where i found how to host getter servers For good kudos to coding kaiju this is An amazing article And you also check it out in description Below so we’re going to be connecting Via ssh so first off we’re going to type In ssh i will say roots At That ip address of the server so hit Enter on that and it’s going to say the Authenticity of the host blah blah blah Can be established fingerprint plenty Real stuff um we’re just going to say Yes anyways and now they’re going to be Asking for the password remember that Password we set when we’re creating the Server that’s the password we need here So go ahead and copy that in if you type

In the password you’re actually not Going to show it so um just use your Blind mind i guess and just type it in And if you hit enter if the password is Correct you’ll be successfully connected As you can see roots at godot Multiplayer and this was that name we Set when we’re creating the server Itself here it is so if you have gotten To this point trust me you’re going to Finish this tutorial we use so over here I can just type ls And you’re going to see server.pck so Now the next thing is we’re going to be Downloading the godot headless server um Headless linux server and we’re going to Download it through them now so i’m Going to paste in this um in the Description so you can go ahead and copy This same Command and basically it’s wgets and This is actually where the server is Stored remember when i said um you Should take note of your godot version Yeah this is why as you can see here 3.2.3 just change that to your version And over here go to v 3.2.3 also change That to your version there Every other thing can remain the same Way i’m going to go ahead and download It and what does it say command guess Nothing oh sorry sorry sorry before this We’re meant to do sudo update oh yeah Sorry i just tried to wrap my head

Around the error and what i meant to do Is sudo apt Update basically is to update the linux Survivors Next up we’re going to be downloading Godot headless server version so for That i’m just going to paste in this Command w gets And this is basically going to download That google headless server version so If we hit enter on this you’ll see it’s Going to download it a couple of seconds About 80 mb per second that was crazy so We’re done with that so as you can see We downloaded a zip file if we type ls Then we can see the file we just Downloaded and it’s a zipper before we Can extract this we have to install Something and to do that we’ll just do Sudo apt install unzip as you can see Installs it really quickly and now we Can go ahead and just unzip that good Offer all these commands will be in the Description below so don’t panic and now For the finale if we click if we type ls You can see that again we successfully Extracted it so now we’re going to run The server file as you can see godot v 3.2.3 table linux server dot 64 dash Dash main dash pack fps server dot ps Pck this is actually meant to be server This is the name of your server so yeah So now movement of truth if we hit enter Wow you’re going to see a lot of errors

Now these errors actually mata in my Opinion because um when i searched Online about the errors they said that It doesn’t really matter anyways as you Can see server created has been printed Successfully and now in order to connect To our server from the client to go back To Our game script here go over to script Um Over here where we put 127.0.0.1 instead of connecting to that Now connect to a real ip address So now if we go back to our game and we Click run Moment of truth if you click join game Yeah So if this doesn’t work for you i want To just tell you um some problems as you Can see here player connected So if this doesn’t work for you Make sure you are running the same Version of godot as the one that you Exported the server in make sure because I have like seven versions of good also And most of the time i run it on Different goods and i’ve always had a Problem so make sure that you’re running The the same good version so that i can Connect so now i’m just going to create Another good instance so that you can You can see people um working in the Scene and all that if we join him on This side you can see the other guy got

Spawned and if you look closely you’re Going to see some latency And that’s actually because we’re no More on our local machine now we are on E7 so if we move you can you can see a Bit of lag there because my internet is Not that fast but it’s fast enough too Anyways as you can see I’m just going to try to kill this guy As you can see responding in three Seconds everything is working basically Everything is working But wait there’s actually one last thing We haven’t done If you go over here back to the command Line And we close it as you can see where i’m Trying to shoot i can’t shoot and that’s Because i’m disconnected from the server So closing the command line surprisingly Disconnects you from the server So We are going to have to fix that as you Can see we have come back to the home Page because the client now knows they Were disconnected So i’m going to open up temi now back I’m going to log in and instead of Running it like this If you want to get out of if you want to Stop this process you can just click Ctrl c but instead of running it like This i want to run it in the environment So that even after i close this time you

Know it’s still going to run so we’re Going to be using no hop for this So no hop is built into the linux you Don’t have to install it or anything so Just put no hop in front of the run Statements Click enter and you can see no help Ignoring output inputs and appending Output to know of the out that is Basically just going to append all the Errors to know of the outs if you want To see that error we can just close this And do nano No hope dot out And you can see all the errors and Remember it’s just like those errors That were there before then we’re going To use ctrl x and exit out of that Come back around the new up again As you can see Same outputs then if we close this we Can go ahead Run Our clients join game and as you can see He joins the game also run another Instance and as you can see django Yeah so everything is updating really Nicely even after i’ve closed the Terminal because it is now running that File in the environment so yeah i think That’s all for this tutorial i we are Really thankful to all of you that have Watched this tutorial series from the Beginning

It means a lot to me and i really thank You for watching this video even if this Is the only video you have watched new Youtube is a passion for me and i really Love it thanks again to you guys thanks For watching see you guys next time Smash subscribe and goodbye

You May Also Like