GameCP Logo
探索开始使用
GameCP Logo
GameCP

下一代游戏服务器管理平台。为性能、安全性和易用性而建。

产品

  • 功能
  • 集成
  • 应用商店
  • 定价
  • 定制开发
  • 面板对比

资源

  • 文档
  • API 参考
  • 推荐计划
  • 支持
  • 系统状态

公司

  • 关于
  • 联系

© 2026 GameCP. 版权所有。

隐私政策服务条款
FiveM gameplay

Host a FiveM Dedicated Server

FiveM is a modification for Grand Theft Auto V enabling you to play multiplayer on customized dedicated servers.

Skip the Setup — Deploy Nowor read the full guide below
RequirementsSetup GuideInstallation

Hardware Requirements

Here's what you need to run a FiveM dedicated server.

Economy

Small server, 1-16 players

CPU2.5 cores
RAM4 GB
Storage10 GB SSD

Standard

Medium server, 16-48 players

CPU3.5 cores
RAM6 GB
Storage10 GB SSD

Pro

Large server, 48-128 players

CPU4.5 cores
RAM10 GB
Storage10 GB SSD

Start hosting from your own computer

Run a FiveM server on your desktop, laptop, VPS, or dedicated machine — GameCP automates Docker setup, resource allocation, and FiveM configuration instantly. Automatic port forwarding means your friends can connect without touching your router. Start local, scale to a VPS when you're ready.

Get Started FreeNo credit card required

Setup in 4 Steps

Skip the manual installation, port forwarding, and configuration. Install on your own computer and start hosting instantly.

Step 01

Create a GameCP Account

Sign up for free at gamecp.com. No credit card required. Your dashboard is ready in seconds.

GameCP gives you a full control panel with Docker containerization, file management, automatic port forwarding, and automatic updates — all built in.

Step 02

Connect Your Hardware

Install GameCP on your own desktop, laptop, VPS, or dedicated machine. One-line install — no SSH expertise needed.

GameCP installs Docker, configures networking, and sets up automatic port forwarding so your friends can connect instantly. Start hosting from your own PC and scale to a VPS later. Supports Windows, macOS, and Linux.

Step 03

Deploy FiveM

Select "FiveM" from the template library and hit deploy. GameCP handles installation, ports, startup commands, and all configuration automatically.

Includes pre-configured server.cfg. Uses the yolks:debian image. ~10 GB storage.

Step 04

Start Playing

Hit start and share your server address. Automatic port forwarding handles the rest — no router config needed.

GameCP monitors your server health and provides live logs from your browser. Your friends connect using the address GameCP gives you.

The Manual Way vs. GameCP

Manual Setup

  • ✗ Configure 2+ firewall ports and router settings
  • ✗ Write systemd service files
  • ✗ SSH into server to edit configs
  • ✗ Requires a VPS or dedicated server
  • ✗ 30-60 minutes if experienced

With GameCP

  • Automatic port forwarding — no router config
  • Host from your own PC, VPS, or dedicated server
  • Docker container with auto-restart
  • Visual config editor in browser
  • Under 5 minutes total

Under the Hood

The full manual process to host a FiveM dedicated server on a VPS. Or install GameCP on your own computer and skip all of this.

Step 1

Configure & Prepare

Set your server settings, then install Docker, and pull the FiveM container image.

Server ConfigurationEdit values to update all commands
terminal
# Update system and install Docker
sudo apt update && sudo apt install -y docker.io
sudo systemctl enable --now docker

# Create game server directory
sudo mkdir -p /opt/gameserver

# Server configuration
export MAX_PLAYERS="32"
export STEAM_WEBAPIKEY="none"
export FIVEM_VERSION="recommended"
export TXADMIN_ENABLE="1"

# Pull the container image
docker pull ghcr.io/ptero-eggs/yolks:debian
Step 2

Run the Installation Script

FiveM uses a custom install script to download and configure the server files.

Installation Script
#!/bin/bash
# FiveM Installation Script
#
# Server Files: /opt/gameserver
apt update -y
apt install -y tar xz-utils file jq

mkdir -p /opt/gameserver/resources

cd /opt/gameserver

echo "updating citizenfx resource files"
git clone https://github.com/citizenfx/cfx-server-data.git /tmp
cp -Rf /tmp/resources/* resources/

RELEASE_PAGE=$(curl -sSL https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/)
CHANGELOGS_PAGE=$(curl -sSL https://changelogs-live.fivem.net/api/changelog/versions/linux/server)

if [[ "${FIVEM_VERSION}" == "recommended" ]] || [[ -z ${FIVEM_VERSION} ]]; then
  DOWNLOAD_LINK=$(echo $CHANGELOGS_PAGE | jq -r '.recommended_download')
elif [[ "${FIVEM_VERSION}" == "latest" ]]; then
  DOWNLOAD_LINK=$(echo $CHANGELOGS_PAGE | jq -r '.latest_download')
else
  VERSION_LINK=$(echo -e "${RELEASE_PAGE}" | grep -Eo '".*/*.tar.xz"' | grep -Eo '".*/*.tar.xz"' | sed 's/\"//g'  | sed 's/\.\///1' | grep -i "${FIVEM_VERSION}" | grep -o =.* |  tr -d '=')
  if [[ "${VERSION_LINK}" == "" ]]; then
    echo -e "defaulting to recommedned as the version requested was invalid."
    DOWNLOAD_LINK=$(echo $CHANGELOGS_PAGE | jq -r '.recommended_download')
  else
    DOWNLOAD_LINK=$(echo https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/${VERSION_LINK})
  fi
fi

if [ ! -z "${DOWNLOAD_URL}" ]; then
  if curl --output /dev/null --silent --head --fail ${DOWNLOAD_URL}; then
    echo -e "link is valid. setting download link to ${DOWNLOAD_URL}"
    DOWNLOAD_LINK=${DOWNLOAD_URL}
  else
    echo -e "link is invalid closing out"
    exit 2
  fi
fi

echo -e "Running curl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*/}"

curl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*/}

echo "Extracting fivem files"

FILETYPE=$(file -F ',' ${DOWNLOAD_LINK##*/} | cut -d',' -f2 | cut -d' ' -f2)
if [ "$FILETYPE" == "gzip" ]; then
  tar xzvf ${DOWNLOAD_LINK##*/}
elif [ "$FILETYPE" == "Zip" ]; then
  unzip ${DOWNLOAD_LINK##*/}
elif [ "$FILETYPE" == "XZ" ]; then
  tar xvf ${DOWNLOAD_LINK##*/}
else
  echo -e "unknown filetype. Exiting"
  exit 2
fi

rm -rf ${DOWNLOAD_LINK##*/} run.sh

if [ -e server.cfg ]; then
  echo "Skipping downloading default server config file as one already exists"
else
  echo "Downloading default fivem config"
  curl https://raw.githubusercontent.com/ptero-eggs/game-eggs/main/gta/fivem/server.cfg >>server.cfg
fi

# Create txAdmin data directories and seed config
mkdir -p txData/default
if [ ! -f txData/default/config.json ]; then
  echo '{"version": 2, "serverDataPath": "/opt/gameserver", "serverEndpoint": "0.0.0.0:30120"}' > txData/default/config.json
  echo "txAdmin config.json created"
else
  echo "txAdmin config.json already exists, skipping"
fi
echo "txAdmin data directory ready"

mkdir -p logs/

echo "install complete"
Step 3

Open Firewall Ports

FiveM requires 2 ports to be open for game traffic and queries.

terminal
sudo ufw allow 30120/both
sudo ufw allow 40120/tcp
30120/BOTH(PORT)40120/TCP(TXADMIN_PORT)
Step 4

Launch the Server

Start the FiveM server using the configuration from Step 1.

Create the startup script

terminal
# Create the startup script
cat > /opt/gameserver/start.sh << 'EOF'
#!/bin/bash
# FiveM Server Startup

# Export txAdmin Host Mode environment variables
export TXHOST_DATA_PATH=/txData
export TXHOST_MAX_SLOTS=32
export TXHOST_TXA_PORT=
export TXHOST_FXS_PORT=30120
export TXHOST_DEFAULT_CFXKEY=

SERVER_BIN="/alpine/opt/cfx-server/FXServer"
if [ ! -f "" ]; then
echo "ERROR: FiveM server binary not found at "
exit 1
fi

echo "Starting FiveM server..."

/alpine/opt/cfx-server/ld-musl-x86_64.so.1 \
--library-path "/alpine/usr/lib/v8/:/alpine/lib/:/alpine/usr/lib/:/alpine/opt/cfx-server/lib/" \
-- /alpine/opt/cfx-server/FXServer \
+set citizen_dir /alpine/opt/cfx-server/citizen/ \
EOF
chmod +x /opt/gameserver/start.sh

Run the container

terminal
docker run -d \
  --name fivem-server \
  -p 30120:30120/both \
  -p 40120:40120/tcp \
  -e MAX_PLAYERS="32" \
  -e STEAM_WEBAPIKEY="none" \
  -e FIVEM_VERSION="recommended" \
  -e TXADMIN_ENABLE="1" \
  -v /opt/gameserver:/opt/gameserver \
  -w /opt/gameserver \
  ghcr.io/ptero-eggs/yolks:debian \
  ./start.sh

Or skip all of this

GameCP automates every step above: Docker, port forwarding, startup, and config. Install on your own PC and deploy a FiveM server in under 5 minutes.

Deploy with GameCP

More Hosting Guides

Explore step-by-step setup guides for other popular games supported by GameCP.

Garry's Mod

Garry's Mod

Sandbox

Hytale

Hytale

Sandbox

Minecraft - Bedrock

Minecraft - Bedrock

Sandbox

Minecraft - Fabric

Minecraft - Fabric

Sandbox

Minecraft - Forge

Minecraft - Forge

Sandbox

Minecraft - Java Edition

Minecraft - Java Edition

Sandbox

Minecraft - NeoForge

Minecraft - NeoForge

Sandbox

Minecraft - Paper

Minecraft - Paper

Sandbox

View all supported games

Ready to Host Your FiveM Server?

Install GameCP on your own computer and start hosting in minutes. Automatic port forwarding, zero config — your friends connect instantly.

Deploy NowView Pricing

No credit card required · Free tier available · Install local, scale later

Host FiveM from your own computer. Automatic port forwarding. Zero config.

No credit card requiredDeploy Free