SERVER / QUICK START

Linux Dedicated Server Tutorial

Step-by-step Docker deployment guide covering setup, compose files, launch, maintenance, and common issues.

This tutorial will guide you through quickly deploying a game server on Linux using Docker. Even if you don't have much technical background, you can follow the steps to completion.

1. Prerequisites

  • You must use a cloud server (Alibaba Cloud, Tencent Cloud, AWS, or a similar provider) or a VPS virtual machine.
  • Required: request a valid game authorization TOKEN (GAME_TOKEN) from the official team. Without a TOKEN, you cannot open a public server.
  • Prepare a server with a public IP address that can be pinged and reached over the network, otherwise the review will be rejected.
  • Install Docker and Docker Compose (recommended), or make sure the server runtime environment meets the game requirements.
  • When applying for a TOKEN, send the email to team@nextindie.cn.

Server application template · Game License and Services Agreement

Text
I. Applicant information
User UID: [Please enter your game account user ID]
Server-bound public IP: [Please enter the unique fixed public IP address. It must respond to ping]
Server physical region: [For example: Asia, North America]
Application purpose and community size: [For example: personal server, server for a specific player community]
II. Important: Non-commercial operation commitment and compliance notice
As the operator behind this server, I have carefully read Chapter 10 of the Game License and Services Agreement and solemnly make the following legally binding commitments:

Purely non-profit nature: This server will remain strictly non-profit.
Only gratuitous donations are allowed: This server may accept only voluntary donations made out of support for the community, without compensation or any return benefit. All sponsored funds may be used only to offset the direct costs of physical hosting, such as server hardware rental, network bandwidth, and DDoS protection.
Strictly no sale of in-game assets or stats: This server will never directly, indirectly, or in disguised form sell any in-game virtual creature or dinosaur, character data, levels, stat bonuses, weapons, equipment, building materials, game tokens, or any virtual items that affect game balance.
Strictly no disguised privilege exchange: This server will never use forms such as donation lotteries, donation bonus gifts, paid custom characters or creatures, or paywalls or entry fees for joining the server or community as an exchange condition for in-game virtual goods or privileges.
No gambling mechanisms: Neither this server nor its associated communities, such as QQ groups or Discord servers, will set up loot boxes, raffles, roulette systems, or rebate mechanisms with a gambling nature involving in-game virtual goods.
III. Privacy isolation and security acknowledgement
I acknowledge and agree that the official collection of this server IP and the generation of a TOKEN are necessary for anti-cheat security and contract performance, and that this data processing complies with privacy regulations.
I undertake to keep the issued authorization TOKEN properly secured and never transfer, lease, or disclose it to any third party in any form. I bear full responsibility for any violations caused by improper management of the TOKEN or IP configuration.
I understand that sending this server application email to the official team constitutes my digital signature and unconditional acceptance of all legal terms in the Game License and Services Agreement. If I violate any of the red lines above, the official team may revoke the authorization TOKEN, blacklist the IP, and impose a platform-wide account ban and device blacklist without prior notice.

2. Installing Docker and Docker Compose

2.1 Installing Docker

If you are using a cloud server with a pre-installed Docker container service, or if Docker is already installed and working on your system, you can skip this section and continue to the next step.

Run the following command to download and install Docker (works on most Linux distributions):

Bash
curl -fsSL https://get.docker.com | bash

After installation, start Docker and enable it to start on boot:

Bash
systemctl start docker
systemctl enable docker

Verify the installation:

Bash
docker --version

2.2 Installing Docker Compose

Modern Docker installations usually include the docker compose plugin. If not, install the standalone docker-compose binary. This tutorial uses docker-compose throughout. If your system only supports the plugin form, substitute it with docker compose.

Method 1: Check for built-in plugin

Bash
docker compose version

Method 2: Install standalone binary

Bash
curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose --version

3. Creating the Server Directory and Configuration Files

3.1 Using the default login directory

This tutorial assumes you use the default directory after login to store docker-compose.yml and .env. No additional project folder is needed. If you log in as root, this directory is typically /root.

After login, your two configuration files live side by side in your home directory (for example, when logged in as root, that is /root):

Text
/root/
├── docker-compose.yml   ← Docker Compose configuration
└── .env                  ← Environment variables (server settings)

3.2 Creating the .env environment variable file

The .env file stores server parameters. Use the system default vi editor to create it:

Bash
vi .env

Below are two complete, ready-to-use configurations. Choose the one that matches the mode you want, paste it in, and fill in GAME_TOKEN (for a public server, also set GAME_IP to your real public IP):

Sandbox mode server

INI
# Game authorization TOKEN (request from the official team; required for public servers)
GAME_TOKEN=
# Server name
GAME_NAME=The Sandbox
# Public IP (127.0.0.1 is only for local testing; use your real public IP so others can connect)
GAME_IP=203.0.113.10
# Server port (UDP)
GAME_PORT=26666

# Corpse despawn time (seconds)
GAME_DEAD_TIME=600
# Offspring count: 0 = disabled, 1 = one, 2 = two, and so on
GAME_CHILD=1

# Enable Sandbox mode
GAME_MODE_SANDBOX=true

# Register to the global server list
GAME_GLOBAL=true
# Maximum players
GAME_MAX_PLAYERS=50
# Server node (region hint for players only; no functional effect)
GAME_NODE=AS
# Public server
GAME_PUBLIC=true

# Allow gene proficiency
GAME_GENE_SKILLFUL=true
# Allow gaining proficiency from kills
GAME_KILL_SKILLFUL=true
# Allow gene learning
GAME_LEARN=true
# Game difficulty (higher is harder)
GAME_HARD=1
# No evolution eggs (eggs always stay in the current species)
GAME_EVOL=false

# Map name
GAME_MAP=Oasis
# Allow AI mate
GAME_AI_MATE=true

Evolution mode server

INI
# Game authorization TOKEN (request from the official team; required for public servers)
GAME_TOKEN=
# Server name
GAME_NAME=The Evolution
# Public IP (127.0.0.1 is only for local testing; use your real public IP so others can connect)
GAME_IP=203.0.113.10
# Server port (UDP)
GAME_PORT=26666

# Corpse despawn time (seconds)
GAME_DEAD_TIME=1200
# Offspring count: 0 = disabled, 1 = one, 2 = two, and so on
GAME_CHILD=1

# Enable Evolution mode
GAME_MODE_EVOL=true
# Allow eggs to contain evolution eggs (this is NOT the evolution-mode switch)
GAME_EVOL=true
# Enable Primeval mode
GAME_MODE_PRIMEVAL=true

# Register to the global server list
GAME_GLOBAL=true
# Maximum players
GAME_MAX_PLAYERS=50
# Server node (region hint for players only; no functional effect)
GAME_NODE=AS
# Public server
GAME_PUBLIC=true

# Game difficulty (higher is harder)
GAME_HARD=0
# Allow AI mate
GAME_AI_MATE=true

To save and exit: press i to enter edit mode. After editing, press Esc, type :wq and press Enter. For a complete list of parameters, see the Game Server Configuration Manual. For toggle parameters, simply set the variable name and assign any value (such as 1) to enable it.

💡 Tip: Use the Download button on the code blocks above to save them as files. Downloaded .env files are named sandbox.env or evolution.env — rename to .env before deploying.

3.3 Creating the docker-compose.yml file

Bash
vi docker-compose.yml
YAML
services:
  # Game application
  gameserv:
    image: hkccr.ccs.tencentyun.com/mesozoicdawn/gameserver:latest
    container_name: gameserv
    # Environment file (if you renamed it, e.g. sandbox.env, change the filename below)
    env_file:
      - .env
    volumes:
      - /data/Database:/app/GameServ_Data/Database
      - /data/Mods:/app/GameServ_Data/StreamingAssets/Mods
      - /data/Logs:/app/GameServ_Data/Logs
      # Mount host timezone
      - /etc/localtime:/etc/localtime:ro
      # Watchtower update notification signals
      - /data/Signals:/app/GameServ_Data/Signals
      - /data/Signals:/signals
    environment:
      - GAME_AUTO_RESTART=1
      - TZ=Asia/Shanghai

    labels:
      - "com.centurylinklabs.watchtower.scope=gameserv"
      - "com.centurylinklabs.watchtower.enable=true"
      # Notify the game server to save before update
      - "com.centurylinklabs.watchtower.lifecycle.pre-update=/usr/local/bin/watchtower-pre-update gameserv"
      - "com.centurylinklabs.watchtower.lifecycle.pre-update-timeout=2"

    restart: unless-stopped
    stop_grace_period: 60s

    healthcheck:
      test: ["CMD-SHELL", "pgrep -f GameServ.x86_64 || exit 1"]
      interval: 50s
      timeout: 5s
      retries: 3
      start_period: 60s

    # Host mode (reduces latency)
    network_mode: host

    deploy:
      resources:
        limits:
          cpus: '1.8'
          memory: 3800M

  # Watchtower auto-update
  watchtower:
    image: containrrr/watchtower
    container_name: watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      # Docker 26+ requires an explicit API version
      - DOCKER_API_VERSION=1.40
      - WATCHTOWER_POLL_INTERVAL=300
      - WATCHTOWER_CLEANUP=true
      - WATCHTOWER_LABEL_ENABLE=true
      - WATCHTOWER_TIMEOUT=120s

    command:
      - "--label-enable"
      - "--scope"
      - "gameserv"
      - "--cleanup"
      # Enable lifecycle hooks
      - "--enable-lifecycle-hooks"

    restart: unless-stopped

    deploy:
      resources:
        limits:
          cpus: '0.2'
          memory: 128M
  • network_mode: host means the container uses the host network directly, so GAME_PORT in .env must match the port opened in the firewall.
  • Data directories (/data/Database, /data/Mods, /data/Logs, and /data/Signals) are persisted on the host. Docker will create them automatically — no manual creation is needed.
  • deploy.resources.limits.memory: 3800M limits the game server to about 3.8 GB of memory, and cpus: '1.8' limits it to 1.8 cores. Adjust these values under deploy.resources.limits according to your server hardware.

3.4 Creating data directories (optional)

Although Docker will automatically create the bound directories, creating them manually can help you verify permissions earlier:

Bash
mkdir -p /data/Database /data/Mods /data/Logs

4. Starting the Server

Make sure you are in the directory containing docker-compose.yml and .env, then run the command. Following this tutorial's default workflow, execute directly in the login directory. If you log in as root, this is typically /root.

Bash
docker-compose up -d
  • The -d flag runs the container in the background.
  • The first launch will pull the game server image from the registry — please be patient.
  • Use docker-compose logs -f to view real-time logs. Press Ctrl+C to exit log viewing without stopping the container.

If everything is set up correctly, the server will finish starting and register with the official lobby (provided valid GAME_PUBLIC and GAME_TOKEN are configured).

5. Opening Firewall Ports

To allow other players to connect, make sure to open the UDP port corresponding to GAME_PORT set in .env (default 26666).

  • If using a cloud server, add a UDP port allow rule in the security group.
  • If the server has a system firewall enabled (e.g., ufw), run the following command:
Bash
ufw allow 26666/udp

6. Daily Management Commands

OperationCommand
Start serverdocker-compose up -d
Stop serverdocker-compose down
Restart serverdocker-compose restart
View logsdocker-compose logs -f --tail=100
Update image and restartdocker-compose pull then docker-compose up -d
Enter container shelldocker exec -it gameserv bash
  • When stopping the server, Docker reserves 60 seconds to save data. Do not force kill.
  • The watchtower container automatically monitors image updates and pulls new versions with a restart at 5-minute intervals.

7. How to Modify Configuration

  1. Run cd ~, then use vi .env to open the configuration file.
  2. After saving, run docker-compose down, then docker-compose up -d to reload environment variables.

You must down first then up. A direct restart may not reload the new environment variables.

8. Common Issues

8.1 Server started but not showing in the lobby?

  • Check that GAME_TOKEN in .env is filled in correctly and that you have requested it from the official team.
  • Check that GAME_PUBLIC=1 is set.
  • Check that the server's public IP matches GAME_IP. You can use curl ifconfig.me to verify.
  • Check that the firewall and security group have allowed the UDP port.
  • View logs: docker-compose logs -f gameserv.

8.2 Port already in use?

Change GAME_PORT in .env to another port and update the firewall rules accordingly.

8.3 Container exiting due to insufficient memory?

  • Adjust mem_limit in docker-compose.yml.
  • Lower high-consumption parameters such as GAME_MAX_PLAYERS.

8.4 How to install MODs?

Place MOD files in the host's /data/Mods directory, add GAME_MODS=ModName1,ModName2 to .env, and restart the server.

8.5 How to back up data?

Back up the host's /data/Database directory. It contains player characters, nests, eggs, and other data. We recommend periodically packing it and uploading to cloud storage.

9. Getting Help

  • See the complete parameter reference: Game Server Configuration Manual.
  • Join the official Discord community or QQ group for the latest image repository address and TOKEN application instructions.