How to Host Multiple Game Instances on One Bare Metal Server Using Docker & Pterodactyl

It’s possible to have multiple game servers running on different machines, which can be expensive and tricky to maintain. The more machines you have, the higher costs are for hosting and more maintenance tasks are involved.

The difficulty increases if several game servers have to operate simultaneously. Too much CPU or RAM usage by one server can impact the performance of other game instances and thus affect the gameplay experience. It may also be more time consuming to control resources, server files and settings across multiple machines.

A high core bare metal server is preferable. Docker allows to isolate each game server in its own environment, and Pterodactyl Panel simplifies environment creation, management and monitoring. In the right configuration, many game servers can be installed on a single machine, but still perform well.

Why Run Multiple Game Servers on One Bare Metal Server?

Bare metal server offers a separate dedicated CPU, RAM, storage and network bandwidth which is appropriate for gaming workloads. Running multiple servers for Minecraft, Rust, Terraria, modded and/or testing, all on the same supercomputer.

This can save money because resources of one server are used to run multiple instances of the game, instead of buying multiple machines. But planning of the resources is crucial. Make sure there is sufficient CPU and RAM resources left for the operating system, Docker, monitoring and unforeseen surges in player traffic.

How Docker Helps Isolate Game Servers

Docker is a container-based platform that enables multiple apps to be run independently on a single operating system. Every game server instance can operate in its own container, have its own files, configurations and limitations.

For example, the same host machine could serve multiple Minecraft and Rust servers, which use different application environments.

Docker provides:

  • Separate environments for each game server
  • Individual CPU and RAM limits
  • Independent storage locations
  • Better application organization
  • Easier deployment and management

If more players join one game server, that server may not be able to use all the resources, and therefore not impact other game servers.

Docker cannot be viewed as a full security solution, however. Additional protection, regular OS updates, firewall and access control must be provided in the host operating system.

What Is a Pterodactyl Panel?

Pterodactyl Panel is a game server management panel, compatible with Docker Containers. It offers a web-based interface to create, manage and monitor multiple game servers from a single point.

Pterodactyl uses two main components:

Panel:
The web interface used to manage servers, users, settings, and resources.

Wings:
The server-side daemon that communicates with Docker and manages individual game containers.

Using Pterodactyl, administrators can:

  • Create new game servers
  • Start and stop instances
  • Manage server files
  • Configure CPU and RAM limits
  • Assign ports
  • View console logs
  • Monitor resource usage

A Pterodactyl Panel dedicated server setup is convenient for admin who wish to operate a number of game instances from the same physical server.

Prepare Your Bare Metal Server

Ensure to install a fresh Linux OS before Docker and Pterodactyl. This is typically done with Ubuntu, but please verify the latest Pterodactyl requirements prior to deployment.

First, evaluate your hardware resources:

  • CPU core count
  • CPU frequency
  • Total RAM
  • NVMe or SSD storage
  • Network bandwidth
  • Available IP addresses
  • Storage capacity

Clock speed is important as well as CPU cores. In many games, such as game logic or player actions, single-core performance is critical.

For example, a server with:

  • 16 CPU cores
  • 64GB RAM
  • 1TB NVMe storage
  • 1Gbps network connection

may allocate resources like this:

ResourceAllocation
CPU12-14 cores for game servers
RAM50-55GB for instances
StorageBased on game requirements
NetworkShared between all servers

These numbers are only examples. Actual requirements depend on the game type, player count, mods, plugins, and expected traffic.

Install Docker for Game Server Containers

Pterodactyl Wings creates isolated environments for each game server with Docker. Servers you create with Pterodactyl are its own servers and have its own settings and resource restrictions.

After installing Docker:

  • Confirm the Docker service is running
  • Apply required configuration settings
  • Keep Docker updated
  • Monitor container performance

Security should also be considered during installation.

Recommended practices include:

  • Using strong administrator passwords
  • Disabling unnecessary services
  • Restricting network access
  • Updating the operating system regularly
  • Reviewing system logs

Install Pterodactyl Panel and Wings

Once Docker is up and running, install the Pterodactyl Panel and Wings.

The general process includes:

  • Installing the web panel
  • Creating a node
  • Installing Wings on the server
  • Connecting Wings with the panel
  • Creating game server instances

Pterodactyl’s game-specific configurations are called eggs. They specify the installation, starting and management of a specific game server.

After you have the Panel, Wings and Docker setup properly, you will be able to start to build individual game servers.

Create Separate Game Instances

Each game should be created as an independent server inside Pterodactyl.

Example:

  • Server 1: Minecraft Survival
  • Server 2: Minecraft Modded
  • Server 3: Terraria
  • Server 4: Rust

Each instance should have:

  • Separate server name
  • Dedicated storage allocation
  • Assigned network port
  • Defined CPU limit
  • Defined RAM limit

This approach is implemented by running multiple game workloads on a single machine to form a multi-instance game host environment, while maintaining order.

Proper record keeping is also important. Write down the ports, resources and configurations that are assigned to each server.

Allocate CPU Cores Per Game Server

When running multiple game servers, care must be taken in dealing with CPU allocation. Ensure that each container has a restricted amount of resources to use by not letting one server use too much of the resources for other servers.

  • Small game server: 1-2 CPU cores
  •  Medium game server: 2-4 CPU cores
  • Heavy workload: 4-8+ CPU cores
  • Consider: Game engine, players, plugins, and mods
  • Monitor usage: Adjust CPU allocation based on actual performance data

Manage RAM Allocation Carefully

Memory planning is equally important.

The RAM requirements vary from game to game. Some servers are light enough to fit in just a few gigabytes, while other Minecraft servers (particularly heavily modded) need much more.

Avoid assigning all physical RAM to game containers.

Keep memory available for:

  • Operating system
  • Docker
  • Pterodactyl services
  • Monitoring applications

Monitor:

  • RAM usage
  • Swap activity
  • CPU load
  • Disk usage
  • Network traffic

Heavy swap usage usually indicates that the server has insufficient available memory.

Configure Networking and Ports

Each game server needs to have a network connection via a specific port.

All the servers cannot be on the same machine and port. The administrator can assign to each instance a different port in Pterodactyl.

Example:

  • Minecraft Server A → Port 25565
  • Minecraft Server B → Port 25566
  • Minecraft Server C → Port 25567

The performance of the network is also crucial when it comes to multiplayer gaming as packet loss and network tuning can both have an impact on the players’ experience, and can make the game experience overall less enjoyable.

Network tuning can be done on Linux OS to minimize packet loss and enhance server connectivity. For more details on packet drops on game servers, refer to our guide on Linux Network Tuning for Game Server Packet Drops.

Monitor Performance After Deployment

Resource allocation should be an on-going process. Players are not permanently active and requirements for players’ performance might change over time.

Monitor:

  • CPU usage
  • Memory consumption
  • Disk I/O
  • Network traffic
  • Latency
  • Packet loss
  • Container failures

A server that performs well with 10 players may struggle when the player count increases to 100.

Schedule CPU limits, RAM allocation, storage and network configuration based on the monitoring data.

Best Practices for Running Multiple Game Servers

To improve stability practice the following:

Keep Resource Reserves

Allow some CPU and RAM for the system processes and unforeseen surge in traffic.

Use Fast NVMe Storage

It is common for game servers to read and write files. With faster storage, loading times will be quicker, and there will be less lag.

Separate Server Data

Use separate files and folders for each game instance.

Maintain Backups

Make backup copies of game worlds, settings, databases and other important files.

Update Software Regularly

Ensure that Docker, Pterodactyl, operating systems and game servers are updated.

When Should You Use Multiple Machines?

While using multiple game instances on the same powerful bare metal server is possible, it can be advantageous to have more machines when:

  • Player numbers become very high
  • A single game requires most resources
  • You need servers in different regions
  • Hardware failure risks need to be reduced

For small and medium sized gaming communities, one might be a good solution.

If you are looking for dedicated resources without managing multiple smaller servers, budget dedicated server hosting can be a suitable option for running multiple game workloads.

FAQs About Hosting Multiple Game Servers

Q: Can I host multiple game servers on one machine?

Yes. If the powerful bare metal server has enough CPU, RAM, storage space and network resources, it can support multiple games simultaneously.

Q: Is Pterodactyl good for multiple game servers?

Yes. Pterodactyl is designed to control multiple game servers via a web-based interface, using Docker isolation.

Q: How many game servers can one bare metal server run?

There is no maximum limit set. This is based on the requirements of the game, players, hardware, plugins and resources consumed.

Q: Does Docker improve game server performance?

Organization and isolation are the key areas of improvement of Docker. The performance is more dependent on the power of the hardware, and the correct allocation of resources and game configuration.

Q: How can I safely host multiple game servers on one machine?

Properly set limits on CPU/ram, make sure to have separate ports, secure the OS, keep backups current and constantly monitor to make sure things are running smoothly.

Wrapping Up

Running multiple game instances on a single bare metal server can be an effective method of cutting down on infrastructure expenses and still have control over resources. Docker is used to create isolated environments and Pterodactyl is a simple control panel for efficiently running multiple game servers.

The key to success is the right plan of action. Successful work is a key to success. Properly provision and utilize CPU cores and RAM, use fast storage, configure the network appropriately and monitor performance after deployment.

Multiple game servers can be hosted on one high-core bare metal server without any problems, and it can be managed more easily and is cost effective.