You can successfully run both a Core Keeper dedicated server and an Icarus dedicated server on a single VPS without conflicts by configuring separate system users, unique ports (e.g., 27015 for Core Keeper and 7778 for Icarus), and utilizing systemd units with cgroups to manage CPU and RAM resources, preventing mutual slowdowns.
In the world of online gaming, where everyone wants their own dedicated server for a comfortable experience with friends, a common dilemma arises: should you run a separate VPS for each game, or try to host multiple on a single machine? If you and your friends enjoy different projects, such as the adventure survival game Core Keeper and the hardcore survival simulator Icarus, paying for two hosting plans can be expensive. Fortunately, a modern VPS allows you to efficiently host several game servers on one VPS if you approach the setup intelligently. In this article, we'll detail how to run a Core Keeper dedicated server and an Icarus dedicated server on a single virtual machine, avoiding conflicts and ensuring stable operation.
Benefits of hosting multiple game servers on a single VPS
The decision to host multiple game servers on a single virtual machine offers several advantages, making it appealing for gaming communities and groups of friends. It's not just about saving money, but also simplifying management.
Resource and budget savings when running two servers on one VPS
The primary reason for consolidation is financial benefit. Instead of renting two or more separate VPS instances, each of which might sit idle much of the time or use only a fraction of its resources, you can opt for one, more powerful VPS. This can significantly reduce monthly hosting costs. For example, a single VPS with 8 GB RAM and 4 vCPU often costs less than two VPS instances with 4 GB RAM and 2 vCPU each. Savings can reach 20-40% of the total cost, which is especially noticeable in the long run.
Centralized management and flexibility
Managing multiple game servers from a single entry point simplifies administration. You don't need to connect to different servers to update games, restart services, or configure firewalls. All operations are performed on one machine. This also provides greater flexibility in resource allocation. If one game temporarily requires more power (e.g., during a major update or event), you can dynamically reallocate available resources without affecting other VPS instances.
Preparing your VPS: OS, users, and directories for Core Keeper and Icarus
Before proceeding with game server installation, it's crucial to properly prepare your VPS's operating system. This is a key step to ensure security, stability, and conflict prevention.
OS selection and basic settings
For game servers, Linux distributions such as Ubuntu Server (20.04 LTS or 22.04 LTS) or Debian (11 or 12) are recommended. They offer stability, performance, and broad community support. After deploying your VPS, perform a basic system update:
sudo apt update && sudo apt upgrade -y
Install necessary utilities like `screen` (for running console applications in the background), `git` (if you need to clone repositories), and `htop` (for resource monitoring):
sudo apt install screen git htop -y
We also strongly recommend configuring the UFW firewall to restrict access to ports. By default, UFW blocks all incoming connections except those explicitly allowed, which significantly enhances your server's security. Allow SSH access:
sudo ufw allow ssh
sudo ufw enable
Later, we will add rules for the game ports.
Creating separate users and directories for Core Keeper and Icarus
One of the most effective ways to isolate game servers from each other is to run each under a separate system user. This prevents potential file conflicts, simplifies permission management, and enhances security by limiting the scope of impact in case one of the servers is compromised.
User and directory for Core Keeper
Create a new user `corekeeper` without interactive shell access (for increased security) and its home directory:
sudo adduser --system --no-create-home --group corekeeper
sudo mkdir /opt/corekeeper
sudo chown corekeeper:corekeeper /opt/corekeeper
The `/opt/corekeeper` directory will be used for the Core Keeper server installation.
User and directory for Icarus
Similarly, create the `icarus` user and its directory:
sudo adduser --system --no-create-home --group icarus
sudo mkdir /opt/icarus
sudo chown icarus:icarus /opt/icarus
The `/opt/icarus` directory will be used for the Icarus server installation.
Now we have two isolated environments, which is an excellent foundation for further configuration.
Looking for a reliable server for your projects?
VPS from $10/month and dedicated servers from $9/month with NVMe, DDoS protection, and 24/7 support.
View offers →Game Servers: Understanding and resolving port conflicts
Port conflicts are the most common issue when trying to run two servers on one VPS. Every service that expects incoming connections must "listen" on a unique port. If two services attempt to use the same port, only one will be able to bind to it, and the other will fail with an error.
Understanding network ports
Network ports are logical endpoints through which programs exchange data over a network. They are numbers ranging from 1 to 65535. Game servers typically use specific ports for game traffic (UDP/TCP) and for status queries (Query UDP). For example:
- Core Keeper Dedicated Server:
- Game Port: 27015 (UDP/TCP)
- Query Port: 27016 (UDP)
- Icarus Dedicated Server:
- Game Port: 7777 (UDP)
- Query Port: 27015 (UDP)
As seen in the example above, the default configurations for Icarus and Core Keeper conflict on port 27015 (Icarus Query and Core Keeper Game). This is an ideal scenario to demonstrate how to resolve the issue.
Choosing non-conflicting ports for Core Keeper and Icarus
To avoid conflicts, we will change the ports for Icarus:
- Core Keeper:
- Game Port: 27015 (UDP/TCP)
- Query Port: 27016 (UDP)
- Icarus:
- Game Port: 7778 (UDP)
- Query Port: 27017 (UDP)
Now all ports are unique. This is critically important for the correct operation of both servers.
Configuring the firewall (UFW) for game servers
After selecting the ports, you need to allow incoming connections to these ports through the UFW firewall. Execute the following commands:
sudo ufw allow 27015/tcp comment 'Core Keeper Game TCP'
sudo ufw allow 27015/udp comment 'Core Keeper Game UDP'
sudo ufw allow 27016/udp comment 'Core Keeper Query UDP'
sudo ufw allow 7778/udp comment 'Icarus Game UDP'
sudo ufw allow 27017/udp comment 'Icarus Query UDP'
sudo ufw status verbose
Verify that UFW is active and the new rules have been added. Your VPS is now ready to accept connections to both game servers.
How to install a Core Keeper dedicated server on your VPS
Now that the VPS is prepared and ports are allocated, let's proceed with installing the Core Keeper dedicated server. We will use SteamCMD to download the server files.
Downloading SteamCMD and Core Keeper
Switch to the `corekeeper` user and download SteamCMD. If you haven't installed SteamCMD yet, do so:
sudo apt install steamcmd -y
Then navigate to the `/opt/corekeeper` directory and download the server files. Since the `corekeeper` user is a system user and does not have a home directory, we will execute commands on its behalf using `sudo -u`:
sudo -u corekeeper mkdir -p /opt/corekeeper/steamcmd
sudo -u corekeeper /usr/games/steamcmd +force_install_dir /opt/corekeeper +login anonymous +app_update 1963720 validate +quit
The App ID for Core Keeper Dedicated Server is 1963720.
For more detailed information on Core Keeper installation and configuration, you can refer to our article: How to set up your own Core Keeper server on a VPS/dedicated server.
Basic Core Keeper server configuration
After downloading the Core Keeper server files, you need to create or edit the configuration file. This is usually done in `server_settings.json` or via command-line parameters. Here's an example of a minimal configuration:
sudo -u corekeeper nano /opt/corekeeper/server_settings.json
File content (replace `YourWorldName` and `YourPassword`):
{
"world_name": "MyValebyteCoreKeeperWorld",
"world_seed": "",
"max_players": 10,
"server_password": "StrongPassword123",
"game_port": 27015,
"query_port": 27016,
"save_interval": 300
}
Ensure that `game_port` and `query_port` match the ports we selected (27015 and 27016).
Automatic Core Keeper startup via systemd with resource limits
To automatically start the server and manage its resources, we will create a systemd unit. This will allow Core Keeper to launch at system startup and limit its CPU and memory consumption so it doesn't "choke" Icarus.
sudo nano /etc/systemd/system/corekeeper.service
Unit file content:
[Unit]
Description=Core Keeper Dedicated Server
Wants=network-online.target
After=network-online.target
[Service]
User=corekeeper
Group=corekeeper
ExecStart=/opt/corekeeper/CoreKeeperServer -settings /opt/corekeeper/server_settings.json
WorkingDirectory=/opt/corekeeper
StandardOutput=journal
StandardError=journal
Restart=always
RestartSec=5
# Resource limits via cgroups
CPUWeight=500 # 50% of available CPU by default (1024)
MemoryMax=4G # Maximum memory consumption 4GB
IOWeight=500 # 50% of available I/O
[Install]
WantedBy=multi-user.target
Explanation of limits:
- `CPUWeight=500`: Sets the CPU weight for this unit. The default weight is 1000. A value of 500 means Core Keeper will receive approximately 50% of the available CPU if there are other processes with a weight of 1000. If there are no other heavily loaded processes, it can use 100%.
- `MemoryMax=4G`: Strictly limits RAM consumption to 4 gigabytes. If the server attempts to use more, it will be terminated.
- `IOWeight=500`: Similar to CPU, regulates disk I/O priority.
Save the file, then enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable corekeeper.service
sudo systemctl start corekeeper.service
sudo systemctl status corekeeper.service
Ensure that the Core Keeper server is running correctly.
How to install an Icarus dedicated server on your VPS
Now let's install the Icarus dedicated server, following the same logic of resource and user isolation.
Downloading SteamCMD and Icarus
Switch to the `icarus` user and download the Icarus server files:
sudo -u icarus mkdir -p /opt/icarus/steamcmd
sudo -u icarus /usr/games/steamcmd +force_install_dir /opt/icarus +login anonymous +app_update 2089300 validate +quit
The App ID for Icarus Dedicated Server is 2089300.
A more detailed guide on Icarus installation is available here: How to set up your own Icarus server on a VPS/dedicated server.
Basic Icarus server configuration
Icarus configuration is done via `Game.ini` and `ServerSettings.ini` files. Create them in the `Icarus/Saved/Config/LinuxServer/` directory within your Icarus installation.
sudo -u icarus mkdir -p /opt/icarus/Icarus/Saved/Config/LinuxServer/
sudo -u icarus nano /opt/icarus/Icarus/Saved/Config/LinuxServer/Game.ini
Example `Game.ini` (this file typically configures game parameters):
[/Script/Icarus.IcarusServerSettings]
ServerName="MyValebyteIcarusServer"
ServerPassword="AnotherStrongPassword456"
MaxPlayers=8
Difficulty="Medium"
AllowPvP=False
EnableProximityVoiceChat=True
Now create `ServerSettings.ini` for the ports:
sudo -u icarus nano /opt/icarus/Icarus/Saved/Config/LinuxServer/ServerSettings.ini
Content of `ServerSettings.ini`:
[IcarusServerSettings]
Port=7778
QueryPort=27017
Ensure that `Port` and `QueryPort` match the ports we selected (7778 and 27017).
Automatic Icarus startup via systemd with resource limits
Create a systemd unit for Icarus:
sudo nano /etc/systemd/system/icarus.service
Unit file content:
[Unit]
Description=Icarus Dedicated Server
Wants=network-online.target
After=network-online.target
[Service]
User=icarus
Group=icarus
ExecStart=/opt/icarus/Icarus/Binaries/Linux/IcarusServer -Port=7778 -QueryPort=27017 -log
WorkingDirectory=/opt/icarus/Icarus/Binaries/Linux/
StandardOutput=journal
StandardError=journal
Restart=always
RestartSec=5
# Resource limits via cgroups
CPUWeight=500 # 50% of available CPU by default (1024)
MemoryMax=6G # Maximum memory consumption 6GB
IOWeight=500 # 50% of available I/O
[Install]
WantedBy=multi-user.target
Explanation of limits:
- `CPUWeight=500`: Similar to Core Keeper, Icarus will receive approximately 50% of the available CPU.
- `MemoryMax=6G`: Icarus typically requires more memory than Core Keeper, so 6 GB is set here.
Save the file, then enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable icarus.service
sudo systemctl start icarus.service
sudo systemctl status icarus.service
Both servers should now be running under their respective users, with unique ports and individual resource limits.
Monitoring and Diagnostics: Tracking CPU and RAM usage
When you run multiple game servers on a single VPS, it's crucial to have tools for monitoring their performance and resource consumption. This allows you to quickly identify and resolve issues if one server starts to "choke" another.
Monitoring tools (htop, glances, systemd-cgtop)
- `htop`: An interactive process monitor that displays CPU and memory usage, as well as a list of running processes. Run `htop` in your terminal. You'll be able to see how much CPU and RAM each process, including your game servers, is consuming.
- `glances`: A more advanced monitoring tool that provides comprehensive system information: CPU, RAM, disk I/O, network, processes, etc. Install it with `sudo apt install glances` and then run `glances`.
- `systemd-cgtop`: This tool is especially useful when you're using cgroups for resource limiting. It shows resource consumption by control groups (cgroups) to which our systemd units are tied. Run `systemd-cgtop` to see how much CPU and RAM the `corekeeper.service` and `icarus.service` groups are consuming. This allows you to precisely track how your set limits are being adhered to.
Logging and debugging
Systemd by default directs the standard output and errors (StandardOutput, StandardError) of your units to the systemd journal. You can view logs for each server separately:
sudo journalctl -u corekeeper.service -f
sudo journalctl -u icarus.service -f
The `-f` flag allows you to follow the logs in real-time. These logs will help identify startup errors, configuration issues, or game server malfunctions.
How many game servers can a single VPS realistically handle?
The question of how many game servers can be run on a single VPS doesn't have a single answer. It heavily depends on several factors.
Factors affecting performance
- The game itself: Some games, like Icarus, are significantly more demanding on CPU and RAM than others, such as Core Keeper or Terraria.
- Number of players: The more concurrent players, the higher the server load.
- Mods and plugins: Additional content can significantly increase resource consumption.
- World settings: World size, object density, save frequency – all impact the load.
- VPS specifications: Number of vCPUs, amount of RAM, disk type (NVMe SSD is significantly faster than regular SSD), and network bandwidth.
For 5-10 concurrent Core Keeper players and 4-6 Icarus players (considering their demands), 4 vCPU, 8 GB RAM, and an 80 GB NVMe disk are sufficient.
| Players (Core Keeper + Icarus) | vCPU | RAM | Disk | Port | Approx. VPS Price (Valebyte, $/month) |
|---|---|---|---|---|---|
| 5 + 4 | 4 | 8 GB | 80 GB NVMe | 1 Gbps | From $25 |
| 10 + 6 | 6 | 12 GB | 120 GB NVMe | 1 Gbps | From $40 |
| 15 + 8 | 8 | 16 GB | 160 GB NVMe | 1 Gbps | From $60 |
| 20 + 10 | 12 | 24 GB | 240 GB NVMe | 1 Gbps | From $90 |
Prices are approximate for Valebyte offerings as of July 2024 and may vary depending on promotions and location.
Recommendations for choosing a VPS
For successfully hosting two servers on one VPS (especially demanding ones like Icarus), a powerful processor with a high clock speed and a fast NVMe disk are crucial. While the number of vCPUs is important, their performance (frequency and architecture) plays an equally significant role. Valebyte offers high-performance VPS instances with NVMe disks that are ideal for such tasks.
When choosing a plan, always factor in a small resource buffer, especially for RAM. If one of the servers periodically uses more memory than you expected, it can lead to instability or process termination. Using cgroups with `MemoryMax` will help prevent these issues, but it's always better to have sufficient memory for all running services.
Frequently Asked Questions
Can I run Core Keeper and Icarus on the same VPS without conflicts?
Yes, this is absolutely feasible and even recommended for resource efficiency. The key is to ensure each server has unique network ports, uses separate system users and file directories, and to configure systemd units with resource limits (CPUWeight, MemoryMax) via cgroups. This will prevent conflicts and guarantee stable operation for both game servers on a single machine.
Which ports do I need to open for Core Keeper and Icarus on a single VPS?
For Core Keeper, ports 27015 (UDP/TCP for game) and 27016 (UDP for queries) are typically used. For Icarus, in our scenario, we changed the standard ports to 7778 (UDP for game) and 27017 (UDP for queries) to avoid conflict with Core Keeper. All these ports must be allowed through a firewall, such as UFW, for players to connect.
How much RAM and CPU are required for two game servers?
Requirements depend on the games and the number of players. For Core Keeper (up to 10 players) and Icarus (up to 6 players) on a single VPS, a minimum of 8 GB RAM and 4 vCPU is recommended. Icarus is more demanding on CPU and RAM, so ensure you have sufficient headroom. For more players or more demanding games, 12-16 GB RAM and 6-8 vCPU might be needed.
How can I limit the resources of one game server to prevent it from affecting another?
To limit resources, use systemd units with cgroups directives. For example, `CPUWeight=500` will set the CPU weight, and `MemoryMax=4G` will limit RAM consumption to 4 gigabytes for a specific service. This ensures that one server cannot consume all available resources, thereby slowing down or "choking" the other.
Can systemd be used for automatic server startup and restarts?
Yes, systemd is the standard and most effective way to manage services in Linux. Creating service files for Core Keeper and Icarus not only allows them to start automatically at system boot but also enables automatic restarts in case of failures (using `Restart=always` and `RestartSec=5`), and provides centralized management of their status and resources.
Conclusion
Running two game servers, such as Core Keeper and Icarus, on a single VPS is not only an economically viable but also a technically achievable solution. The key to success lies in careful resource isolation through separate system users, unique network ports, and efficient management using systemd units and cgroups. It is recommended to use a VPS with NVMe disks and sufficient RAM (from 8 GB) and vCPU (from 4) to ensure stable operation of both servers under load.
NVMe VPS with 60-second activation: full root access, 20+ locations, pay by card or crypto.
Choose a plan