- 定义
- Requirements | How To Create a FiveM Server
- How to Install the FiveM Server Files
- Adjust Power Settings (on Windows)
- How to Add Content (Scripts, Mods, MLOs) to the Server
- 配置 FiveM 服务器
- Connecting to Your Server (The First Time)
- 添加新资源
- Setting Up Rules for your Server
- Creating a Whitelist
- How To Get New Players to your Server
- The Next Steps (After Setup)
- FAQ | FiveM Servers
This tutorial explains how to create a FiveM server.
Creating a FiveM server is an excellent way to bring your own GTA V roleplay community to life, similar to NoPixel community.
In this easy-to-follow guide, I’ll walk you through the process of setting up your own FiveM server and detail the necessary requirements for hosting it. Additionally, I’ll cover what you need to do after your FiveM server is up and running, including creating a whitelist form and drafting rules.
定义
什么是 FiveM?
FiveM 是《GTA V》的一个修改程序,允许玩家使用社区开发者创建的自定义修改程序。这些修改器可以是简单的地图更改,也可以是全新的游戏模式。FiveM 有别于基本游戏,它能让玩家更好地控制自己的游戏体验,并支持更多玩家。可访问社区托管的 FiveM 服务器 通过 FiveM 服务器列表。
While FiveM is widely known for its roleplay (RP) communities—where players assume specific roles in immersive stories or settings—it’s not limited to that. From serious to casual RP, servers like Nopixel have significantly contributed to FiveM’s popularity, especially among streamers.
什么是 FiveM 服务器?
A FiveM 服务器 is a computer or dedicated server that runs the FiveM server software, allowing players to connect and play together. Setting up a FiveM server gives you full control over your gameplay environment, from selecting the mods to enforcing the rules. These servers can be hosted on various platforms including Windows and Linux computers, as well as through dedicated server hosting providers like OVH.
If you want to know how to create a FiveM server it’s crucial to understand what hardware and resources you’ll need; for instance, a server supporting 128 players might necessitate more RAM than you expected.
Interested in creating your own FiveM server? Follow our detailed guide below. We cover everything from initial installation and configuration to ongoing maintenance and useful tips to ensure a smooth experience for you and your players.
Requirements | How To Create a FiveM Server
最初,要在 FiveM 上建立一个《GTA 5》角色扮演服务器,您需要具备以下条件:
To begin setting up a GTA 5 roleplay server on FiveM, you will require the following:
- a Server Hosting:建议使用 Zaphosting 等服务。此外,请查看我们的 托管概述 for more options. I recommend Zaphosting, Avoro or Ovh.
- 数据库服务器:MySQL 常用,通常与主机套餐集成。
如果您将服务器设置为 Windows VPS、 使用 XAMPP - 服务器文件:从 FiveM | 或 | 下载标准服务器文件。 为简单起见,使用服务器模板.此步骤可确保服务器顺利运行。
- Visual C++:在 Windows 上安装时需要。但 Linux 用户不需要。
- 服务器名称和徽标(可选):个性化您的服务器。这有助于打造品牌和吸引玩家。
Server Templates – Ready to play! (optional, recommended for a quick start though)
如果您不喜欢编码,或者时间不够,我们建议您购买完整的服务器预设来启动您的服务器设置。 Recommended if you are looking for a quick start.
-
NoPixel 4.0 (QBCore) ORIGEN V2ready to play原价为:$320.00。$284.05当前价格为:$284.05。
-
NCHUB V2.0 | NoPixel Inspiredready to play原价为:$399.00。$284.05当前价格为:$284.05。
-
QBCore NoPixel 3.5 Inspired Server V2ready to play原价为:$300.00。$190.00当前价格为:$190.00。
While using a template isn’t required, it’s often a good idea to begin with one!
Server Hosting | Choosing a Hosting Provider
Selecting the appropriate hosting option is essential for establishing your FiveM 服务器, as it affects performance, reliability, and scalability.
大多数人都是从租用 Zaphosting 服务器开始的。 点击链接租用 Zaphosting
If you prefer another host, go for Hetzner or OVH – both hosters are the best options – but you have to set up the server by yourself, while Zaphosting has a Gameserver option (so everything is set up).
Recommended FiveM Hosting Providers are…
We tested & compared the best FiveM server hosters and published our outcome here:
https://fivem-mods.net/reviews/fivem-hosting-provider-comparison/
To sum up this post, The best hosting options for your FiveM server:
- 云计算 (if you are technically skilled)
- 赫兹纳 (if you are mediate experienced)
- Zap 托管 (if you are a beginner)
It’s worth noting that Zaphosting provides an administration panel, while OvhCloud and Hetzner necessitate some technical expertise for server setup. However, if you’re able to configure the servers on your own, you’ll benefit from more powerful options with OvhCloud and Hetzner.
How to Install the FiveM Server Files
- 创建新文件夹:
- 在桌面或首选位置创建一个新文件夹。
- 例如
D:\FXServer\server
.该目录将用于您的服务器。
- 下载最新版本的 FiveM 人工制品服务器:
- 提取文件:
- 将下载的文件解压缩到创建的目录 (
D:\FXServer\server
).
- 将下载的文件解压缩到创建的目录 (
- 下载并解压 cfx-server-data:
- 下载 cfx-server-data 并将其解压缩到一个新文件夹中。
- 例如
D:\FXServer\server-data
.
- 创建 server.cfg 文件:
- 创建一个
server.cfg
文件中的服务器数据
文件夹。 - 配置文件示例: server.cfg 示例.
- 创建一个
- 生成新的 FiveM 服务器密钥:
- Go to FiveM Keymaster and generate a new server key.
- 在 server.cfg 中设置服务器许可证:
- 将生成的许可证密钥添加到
server.cfg
file:sv_licenseKey "yourLicenseKeyHere"
- 将生成的许可证密钥添加到
- 启动服务器:
- 导航至
服务器数据
文件夹,并使用相应命令启动服务器。
- 导航至
By following these steps, you’ll have your FiveM server up and running in no time, ready for an exciting experience!
Adjust Power Settings (on Windows)
If you’re running your FiveM server on a Windows operating system, it’s crucial to change the Power Settings from “Balanced” or “Power Saver” mode to “High performance.” This adjustment ensures that your server operates at its maximum potential without any performance limitations.
Follow these steps to change the Power Settings:
- Open the Control Panel: Press the
Windows key
and type “Control Panel” in the search bar, then click to open it. - Go to Power Options: In the Control Panel, select “System and Security,” then click on “Power Options.” This will display the available power plans.
- Choose “High performance”: In the Power Options menu, you’ll see several power plans listed. Select “High performance” to boost your system’s performance. If you don’t see it, click “Show additional plans” to reveal it.
- Confirm the Change: Once “High performance” is selected, the settings will automatically adjust. You can now close the Control Panel.
This ensures that your system allocates the maximum resources for your server, reducing lag and improving gameplay experience.
How to Add Content (Scripts, Mods, MLOs) to the Server
You can add new scripts, mods or MLOs to your FiveM server. I’ll show you how:
Why doing so? Well, adding new content like scripts, mods, or MLOs to your FiveM server can greatly enhance the player experience (the fun your players have) and make your server unique.
- Prepare Your Server
- Backup your server.
- Ensure you’re using the latest FiveM version.
- Download Content
- Get scripts, mods, or MLOs from trusted sources.
- Check for required dependencies.
- Install Scripts
- Upload the script folder to
server-data/resources
. - 添加
ensure script_name
至server.cfg
. - 重新启动服务器。
- Upload the script folder to
- 安装模块
- Upload mod files to a new folder in
资源
. - 配置
fxmanifest.lua
或__resource.lua
if needed. - 添加
ensure mod_name
至server.cfg
and restart.
- Upload mod files to a new folder in
- Install MLOs
- Place MLO files in
资源
. - 添加
this_is_a_map 'yes'
to the manifest file. - 更新
server.cfg
与ensure mlo_name
and restart.
- Place MLO files in
- 故障排除
- Double-check paths and dependencies.
- Resolve any conflicts or errors.
Trusted Sources for FiveM Scripts, Mods, or MLOs
- HiFiveM.com – A reliable site for FiveM mods and scripts.
- GTA5-Mods.com – Popular website for GTA V mods, including FiveM content.
- FiveM Forums (Releases Section) – https://forum.cfx.re/c/releases/7 – Community-driven resource for FiveM scripts, maps, and more.
As said, I dislike Tebex for many reasons
配置 FiveM 服务器
Editing the Server Config (.cfg)
接下来,server.cfg 文件中有许多服务器变量。在进行任何编辑之前,请确保您的服务器已关闭。编辑完成后,最后才允许重新启动服务器。
Example server.cfg:
# you probably don't want to change these! # only change them if you're using a server with multiple network interfaces endpoint_add_tcp "0.0.0.0:30120" endpoint_add_udp "0.0.0.0:30120" # These resources will start by default. ensure mapmanager ensure chat ensure spawnmanager ensure sessionmanager ensure fivem ensure hardcap ensure rconlog ensure scoreboard # This allows players to use scripthook-based plugins such as the legacy Lambda Menu. # Set this to 1 to allow scripthook. Do note that this does _not_ guarantee players won't be able to use external plugins. sv_scriptHookAllowed 0 # change this rcon_password {RCON_PASS} # Set an optional server info and connecting banner image url. # Size doesn't matter, any banner sized image will be fine. #sets banner_detail "https://url.to/image.png" #sets banner_connecting "https://url.to/image.png" # Uncomment this line if you do not want your server to be listed in the server browser # Do not edit it if you *do* want your server listed #sv_master1 "" # Loading a server icon (96x96 PNG file) #load_server_icon myLogo.png # Set your server's hostname sv_hostname "My new Dockerized FXServer" # Add system admins add_ace group.admin command allow # allow all commands add_ace group.admin command.quit deny # but don't allow quit add_principal identifier.fivem:1 group.admin # add the admin to the group # Hide player endpoints in external log output. sv_endpointprivacy true # Server player slot limit (must be between 1 and 32, unless using OneSync) sv_maxclients 32 # Steam Web API key, if you want to use Steam authentication (https://steamcommunity.com/dev/apikey) # -> replace "" with the key set steam_webApiKey ""
将自己设置为超级管理员
当然,您需要管理员权限来管理您的服务器。下面是如何让自己成为管理员的方法:
- 首先,连接 FiveM 服务器。
- 然后,打开播放器对话框(按向上箭头、F10 或 F11)。
- 然后,查找您的用户 ID。
- 最后,打开服务器控制台并键入
setgroup USERID superadmin
.
生成 Steam API 密钥
如果使用 ESX 等框架,您可能需要一个 Steam API 密钥:
- 访问 蒸汽 API 密钥网站.
- 使用 Steam 登录。
- 输入域名(服务器名称)。
- 最后,复制生成的密钥并将其粘贴到 server.cfg 文件中。
启用 OneSync
启用 OneSync:
- 首先,找到启动参数(启动文件或游戏面板)。
- 然后,添加
+set onesync on
或在游戏面板中启用 OneSync。 - 最后,重启 FiveM 服务器
If you’re on a Windows server, right-click the .bat file to edit it.
Connecting to Your Server (The First Time)
- 查找服务器地址:获得 FiveM 服务器连接地址(CFX/IP 地址)后,就可以连接了。
- 通过 FiveM 客户端连接:
- 打开 FiveM 客户端。
- 导航至 "服务器"。
- 输入 CFX/IP 地址并连接。
By following these steps, you’ll now have your FiveM server created & running, ready for players to join and enjoy!
添加新资源
- 访问服务器配置文件:配置文件通常命名为
server.cfg
并位于 FiveM 服务器的主目录中。 - 编辑服务器配置文件:开放
server.cfg
使用文本编辑器(如 Notepad++ 或 VS Code)。 - 添加资源:结束时
server.cfg
文件中,添加一行新内容,使用以下命令启动资源:开始 resourceName
更换资源名称
的实际名称。例如,如果文件夹名为酷车
您可以添加:sql启动酷车
- 保存并关闭:保存更改并关闭文本编辑器。
Setting Up Rules for your Server
Before you publish your server, it’s essential to establish a clear set of rules to ensure a fair and enjoyable gaming experience for everyone involved. Key rules to consider include prohibiting Fail RP (Roleplay) and any form of cheating, as these can significantly detract from the immersive atmosphere you aim to create.
To help you navigate this process, we’ve put together a comprehensive tutorial that outlines best practices for rule-setting in gaming communities. This resource will guide you through the necessary steps to draft effective rules and maintain a positive environment. You can find the tutorial linked here for your convenience!
Creating a Whitelist
If you’re looking to safeguard your FiveM server from disruptive trolls and maintain a positive gaming environment, implementing a whitelist is an effective solution. This tutorial will guide you through the steps to create and manage a whitelist, ensuring that only approved players can join your server.
Why using a whitelist? By restricting access to trusted individuals, you can significantly reduce the risk of harassment and unwanted behavior, allowing for a more enjoyable experience for all participants. Follow along as we explore the necessary tools and settings to establish a secure and welcoming community on your FiveM server.
How To Get New Players to your Server
The Next Steps (After Setup)
How to debug your FiveM server
Running a FiveM server allows you to create a customized multiplayer experience for Grand Theft Auto V. However, like any server software, you may encounter issues that require debugging. This […]
How To Fund Your Gaming Project or Server
Gaming servers and projects often start as passion projects, but as they grow, so do the expenses. From hosting fees to development costs, these ventures can quickly become expensive. But […]
The Ultimate Guide: Owning & Growing a Discord Server
Discord has become the go-to platform for creating communities around gaming, hobbies, and shared interests. While many people dream of owning a large Discord server with thousands of members, the […]
FAQ | FiveM Servers
What Type of Server can I create with FiveM?
You can create any server-type you want – Deathmatch, Roleplay (GTA RP) or Racing Server. We recommend creating a RP server!
What are the requirements to run a FiveM server?
To run a FiveM server, you’ll need a copy of Grand Theft Auto V, server hardware (a PC or a dedicated server), an internet connection, and the FiveM server software. Having a VPS or a dedicated server with good specifications is recommended for larger player counts.
Is it free to create a FiveM server?
Yes, setting up a FiveM server is free. However, if you choose to host your server on a dedicated machine or use a VPS (Virtual Private Server), there will be hosting costs involved.
How to make my server popular?
We wrote a tutorial about how your server gets the attention it deserves here:
How to get players
Can I monetize my FiveM server?
Yes, FiveM indeed allows server owners to monetize their servers through donations or paid memberships, as long as they follow FiveM’s community guidelines and terms of service.
点击此处了解更多信息
How to create a FiveM server fast?
Use our Complete FiveM Servers & you’ll be able to create a FiveM server within minutes!
Now you know How To Create a FiveM server! We hope you liked our tutorial :)
POSSIBLE DE VOUS CONTACTER POUR que vous puissiez code notre serveur ? je mettrais le prix veuillez me contacter sur mon adresse mail
请将我的服务器连接到您的服务器上。
Hi Alex, was meinst du genau? :)
如何在本地主机上播放
您好,只需下载服务器并按教程中提到的方法安装即可。无需在电脑上进行不同的设置,只需像在电脑上一样操作即可。
嗨!我们刚刚更新了教程(2024)!
通过 Zap 主机进行安装的任何帮助 PLEASSSE
This tutorial is very helpful and detailed for anyone looking to create their own FiveM server. It covers all the necessary steps and requirements, making it easy to follow along. Great job!
This article provides a helpful guide for choosing a hosting provider and setting up a FiveM server. The step-by-step instructions are clear and easy to follow. Great resource for beginners!
This article provides a clear and detailed guide on how to install scripts, mods, and MLOs for FiveM servers. It’s helpful to have trusted sources listed for these resources.
Great step-by-step guide for setting up a FiveM server! This is really helpful for beginners like me. Thank you!
This article provides helpful information for setting up a FiveM server, especially for beginners. It’s great that it recommends different hosting providers based on skill level. I appreciate the step-by-step guide for installing the server files and adjusting power settings. Overall, a useful resource for anyone looking to start their own FiveM server.
Great article with clear and detailed instructions on choosing a hosting provider and setting up a FiveM server. The tips on adjusting power settings and adding content are very helpful for improving performance and player experience.