For the complete documentation index, see llms.txt. This page is also available as Markdown.

Godot - Getting Started

Learn by doing and deploy your first Dedicated Server on Edgegap. By the end of this guide, you will have deployed a dedicated server with Edgegap at no cost.

โœ”๏ธ Preparation

Before you get started, make sure to create a free account with Edgegap (no credit card required).

Configure a few essentials on your development machine:

Install Docker Desktop (or Docker CLI)
Install Edgegap's Godot Dedicated Servers Quickstart Plugin

This plugin has been tested on, and supports Godot versions 4.x.x and newer.

Option 1) Install from ZIP:

  1. Extract ZIP to your project's addons folder.

To update plugin installed with ZIP delete the old plugin and replace with new ZIP.

Option 2) Install from Source:

  1. Clone our plugin repository in your project's addons folder.

git clone git@github.com:edgegap/edgegap-godot-plugin.git

To update plugin installed with git, open command line in the plugin folder and run git pull.

Enable your new Edgegap Servers Quickstart plugin under Project / Project Settings / Plugins. A new tab labeled "Edgegap" willl appear in your right-side panel, next to Inspector. If you close the panel later and need to reopen it, you can find the option under Project / Tools / Edgegap.

โš™๏ธ 1. Connect Account

โ˜‘๏ธ Sign in and verify there are no new errors in your Output related to Edgegap's plugin.

โœ… You may now proceed to the next step.

๐Ÿ”ง 2. Build Game Server

Whether youโ€™re using a Windows, Mac, or a Linux machine, you will need to build your server for Linux runtime, as most cloud providers nowadays (including Edgegap) run on Linux. Donโ€™t worry, no Linux knowledge is required to accomplish this with our plugin.

โ˜‘๏ธ Validate Export Templates to ensure the plugin correctly set up your linux server template.

Advanced users - optionally customize export template. Caution! This may break your build.

โ˜‘๏ธ Add new bootstrap script to your project, to automatically launch as dedicated server. Create a new node under your main scene, and link the new script under Inspector / Script / Load.

This is a minimal template script which can be extended to fit your project's needs.

This is a customized version of the bootstrap script for netfox forest brawl sample.

โ˜‘๏ธ Once youโ€™re happy with your configuration hit Build server, wait for the process to finish and verify there are no new errors in your Output. Completing this step will result in a new build appearing in your project under folder build.

โœ… You may now proceed to the next step.

๐Ÿ‹ 3. Containerize Server

Working in a team of developers means sharing your code. When things go wrong, the last thing you want to hear is โ€œit works on my machineโ€. Game servers have to run reliably on any machine, since a successful gamesโ€™ servers will run on thousands of server machines across the world.

To help make your server reliable, we use Docker - virtualization software to ensuring that all of your server code dependencies down to the operating system level are going to be always exactly the same, no matter how or where the server is launched.

We recommend watching "Never install locally" (video). You DON'T need to use Dockerhub with Docker. Docker โ‰  Dockerhub. Think of Docker as a programming engine and Dockerhub as itโ€™s App Store.

โ˜‘๏ธ Start by hitting the Validate Docker button to ensure youโ€™ve completed โœ”๏ธ Preparation.

Install Docker Desktop (or Docker CLI)

โ˜‘๏ธ You may configure the following options (or keep defaults):

  • Image name is a unique identifier of your choice, labeling your server build before shipping.

    • Usually, this will include the name of your game - for example โ€œmy-game-serverโ€.

  • Image tag is an identifier pointing to a specific version of your image.

    • The term โ€œbuild artifactโ€ is sometimes used to refer to a specific version of your image.

    • Timestamps are a great option for tagging, e.g. 2026.07.30-16.25.00-UTC .

  • Path to Dockerfile can be used to customize the recipe for your images.

    • We recommend keeping the default setting for now, you can read more later in section Customize Image.

  • Optional docker build parameters can be used to further instruct Docker on finer nuances.

Rebuild from Source will automatically build and containerize, to speed up your next build.

โ˜‘๏ธ Once youโ€™re happy with your configuration hit Containerize with Docker, wait for the process to finish and verify there are no new errors in your Output. Completing this step will result in a new image appearing in your local machine. You can verify this either in Docker Desktop, in tab Images underneath Local (default), or in docker CLI by running docker images .

โœ… You may now proceed to the next step.

๐Ÿงช 4. Test Server Locally

Letโ€™s try deploying locally (on your machine) and connecting a game client, to make sure the server image is functioning properly before we upload and deploy (which may take a bit of time).

โ˜‘๏ธ You may configure the following options (or keep defaults):

  • Server image tag from the previous step.

    • Defaults to the last tag youโ€™ve built with the plugin.

    • โ˜๏ธ appearing in front of your image name indicates this image has been uploaded.

  • Optional docker run parameters can be supplied for exposing multiple ports, or running your image on macOS machines.

    • You may publish multiple ports for your container if needed, simply add the parameter -p {internal port}/{protocol} for each, for example -p 8080/tcp -p 7777/udp to publish and map your server port 8080 to a random external port for TCP connection and server port 7777 to a random external port for UDP connection at the same time. Find server port configuration in your bootstrap script.

    • If youโ€™re using a machine with ARM architecture (macOS M1, M2, M3, etc..) you should see this optional parameter included in your Optional docker build parameters: --platform=linux/amd64 .

โ˜‘๏ธ Once youโ€™re happy with your configuration hit Deploy local container, wait for the process to finish, and verify there are no new errors in your Output. Completing this step will result in a new container being started on your development machine.

For more details see Docker Desktop / Containers, or Docker CLI command docker ps .

โ˜‘๏ธ Now itโ€™s time to connect your Godot Editor game client to your local docker container to verify your server image is functioning properly. Find your client connection details and input:

  • localhost or 0.0.0.0 (equivalent in most cases) in place of server IP,

  • randomized external port value found in Docker Desktop / Containers.

โ˜‘๏ธ Once youโ€™ve verified youโ€™re able to connect to your local server container and play without issues, you may delete the container ๐Ÿ—‘๏ธ to free up resources on your machine for other programs.

โœ… You may now proceed to the next step.

โ˜๏ธ 5. Upload to Edgegap

Itโ€™s time to ship your server online! Now that your image can successfully host players, we can upload it to Edgegap and start running it anywhere in the world. In this guide, weโ€™ll be using Edgegapโ€™s Container Registry (storage for images).

โ˜‘๏ธ You may configure the following options (or keep defaults):

  • Application name on Edgegap can match your image name or be customized.

    • Weโ€™ve chosen to copy your image name for now.

  • Application version on Edgegap can match your tag or be customized.

    • Timestamps are a great option for app version names, e.g. 2024.01.30-16.50.20-UTC .

    • Multiple application versions may point to the same image tag, such as v1.1.0 and dev .

    • Learn more about Apps and Versions later.

  • Server image from step ๐Ÿ‹ 3. Containerize Server.

โ˜‘๏ธ Once youโ€™re happy with your configuration hit Upload image and create App version, wait for the process to finish, and verify there are no new errors in your Output.

โ˜‘๏ธ You will be brought to our Dashboard, where you may configure optional settings. Completing this step will result in a new Application version being created, and your build artifact being tagged and uploaded to Edgegapโ€™s Container Registry.

  • Application version on Edgegap can match your tag or be customized.

    • Timestamps are a great option for app version names, e.g. 2024.01.30-16.50.20-UTC .

    • Multiple application versions may point to the same image tag, such as v1.1.0 and dev .

    • Learn more about Apps and Versions later.

โ˜‘๏ธ You will now be prompted to define a Port for your new Application version. Make sure to set the same server port value as in step ๐Ÿงช 4. Test Server Locally (defaults to 7777).

โœ… You may now proceed to the next step.

๐Ÿš€ 6. Deploy to Cloud

This is the final step in this guide, after which you will have a server deployed on Edgegap cloud, to which players from anywhere in the world can connect.

โ˜‘๏ธ Choose an application and version from previous step to deploy.

โ˜‘๏ธ Once youโ€™re ready, hit Deploy to Cloud, wait to reach 3. Deployment Ready. Completing this step will result in a new Deployment being started on your Edgegap account.

โ˜‘๏ธ Verify there are no new errors in your console output. Ensure also that your Container Logs donโ€™t show any errors and your Container Metrics donโ€™t indicate 100% resource utilization (vCPU or memory), otherwise new player connections may be rejected, or your server stuck in a restart loop. See troubleshooting steps below to address any issues.

โ˜‘๏ธ Now weโ€™ll perform the final test and connect your Godot Editor game client to your cloud deployment. Find your client connection details and input:

The external port of your Deployment on Edgegap cloud will be chosen at random, so that a potential attacker (hacker) is slowed down and detected before they can cause damage.

โ˜‘๏ธ Once you verify youโ€™re able to connect to your Deployment without issues and are done testing, Stop your Deployment to free up capacity in your account for the next build.

๐Ÿ™Œ Congratulations on your first Deployment on Edgegap! If youโ€™d like to learn more, keep reading.

๐Ÿ‘‰ Next Steps

Once you have a working client/server setup, make sure to save a copy of your project (using version control software like git) so you can always trace back your steps in case you run into issues.

Continue reading to learn more about topics related to server lifecycle and discoverability.

If you need help, please reach out to us over Discord. For live games support see our ticketing system.

Stop Deployments

Once the match ends (or players leave), your deployment can be stopped to save cost. Running empty or only partially filled can increase your cost unnecessarily!

Injected Variables

Read useful information like deployment ID, server IP address, server location, and more; by accessing injected environment variables. Each deployment automatically includes:

Session Automation

Automate popular game flows for managing sessions and scaling on demand with either:

Matchmaking:

  • Shorter Rounds

  • On-Demand Matches

  • Skill Rating and/or Custom Rules

Server Browser:

  • Persistent or Rounds

  • Social Regional Hubs

  • Auto-Assign and/or Custom Search

Custom Backend:

Optimize Usage

A few tips to get started with optimizing your server usage:

Higher tick rate means more updates, requiring more CPU usage and data egress.

  • Godot defaults to 60 ticks per second, which works great for fast paced shooters or highly latency-sensitive games. Other genres may get away with 30 Hz or even 15 Hz.

  • The hidden cost of higher tick rate is more CPU cycles (per second) to (un)pack data, and recompute server-authoritative properties and procedures. Tread carefully if your game has many players per match (10+), many nodes with colliders, complex physical simulations, or many bot opponents/teammates.

  • Test game responsivness with different tick rates in your netcode settings. For ENET, see Project Settings / Physics / Common / Physics Ticks Per Second.

How to choose the right networking protocol? Make it work first, then make it better.

  • Godot's built-in ENET with default UDP protocol is a great default choice providing performance and compatibility across the biggest range of devices and use cases.

  • Some games may want to experiment with TCP, WS, WebRTC or other protocols. This may improve your connection reliability with mobile devices and consoles, especially on public networks (cellular, corporate, e-cafe, hotel wifi, etc...), but it will certainly require extra development efforts. Ask yourself if this is critical for your target audience.

  • Using multiple protocols side by side to ensure important updates are delivered with priority can improve player experience for some genres (e.g. MMO), but it comes with a lot of added development effort, and can add tremendous complexity to your project.

  • Pick your battles carefully, game development has no shortage of challenges.

Customize Image

We also support adding your own Dockerfile for users who need more control over their images due to build size optimization, extraneous dependencies, or requiring more complex startup process. You may optionally supply a path to your custom Dockerfile in step ๐Ÿ‹ 3. Containerize Server. Weโ€™ll now share a few โ€œdo it yourselfโ€ tips and best practices.

Always make sure you are working with a functioning server build.

  • Before assuming an issue is related to the custom Dockerfile, ensure your Unity server build can be started, and that the build process in Unity didnโ€™t throw any exceptions or errors.

Always test locally before uploading.

  • Testing your image locally will save you lots of time while waiting for the upload to finish. Itโ€™s also entirely free โœจ as it doesnโ€™t require any Edgegap resources.

  • When testing locally, make sure to set your internal port correctly:

Make sure youโ€™ve got the basics down. Every Dockerfile needs a few essential commands:

  • FROM {image} is your base image, for Unity projects we usually use a long-term supported Linux, but any Linux-based base image will do. These are usually public images stored on dockerhub. Dockerfile reference here. Dockerfile reference here.

  • COPY {source} {destination} to copy your linux server build from your host machine inside the image, so you can start it later on. Dockerfile reference here.

  • USER {user} should follow after a useradd (ubuntu) command or equivalent, itโ€™s best not to run everything as root to be on the safer side. Dockerfile reference here.

  • CMD {command} will be the last line, most likely calling a StartServer.sh or some kind of startup script to make sure your server initializes correctly once everything is set up. Dockerfile reference here.

  • do NOT use VOLUME - you will not be able to mount any local storage this way on Edgegap, consider our Endpoint Storage feature instead and use an S3 bucket, see Endpoint Storage,

  • EXPOSE 7777/UDP is not required! This will not actually make the internal server port available from outside the container, it's only a hint for the developer and the port needs to be

    • published when testing locally with docker run <image> -p 7777/udp ,

    • or mapped in Edgegap Port Mapping.

Delay declaration of parameters until latest possible moment. Configurability > composability due to long server build times. Apply this approach to Dockerfile commands to build and upload faster.

  • Scenario: you need to define parameters like deployment stage, version, game mode, map, player count per server, backup frequency, or similar.

  • Bad solution: creating a separate image for every combination of your parameters. You will spend all of your time rebuilding the images with very little benefits from this approach.

  • Better solution - substitute configuration parameters just in time:

    1. deployment parameters - supplied just before the deployment is made - matchmaking selectors passed as environment variables, or your custom session management system passing environment variables at deployment time,

    2. version parameters - shared for all deployments on an app version - deployment stage, artifact tag, third party secrets and endpoints, and similar; then

    3. one single image - contains and loads all configuration options when launched.

Do NOT run databases on Edgegap deployments.

  • Edgegap deployments are not intended for long-running processes and may be terminated after a long period of runtime without prior notice. A database (even if distributed) running in this manner may be terminated and result in an irreversible loss of data. If you need a database, please consider a third party DBaaS.

  • Consider using our Managed Clusters for hosting databases and long running services.

Last updated

Was this helpful?