How to Troubleshoot a FiveM Server Not Starting on Windows
Resolve startup issues on your Windows-based FiveM server with this comprehensive troubleshooting guide.
Author: Goodleaf Hosting
If your FiveM server is failing to start on a Windows environment, it can be due to configuration errors, missing dependencies, or blocked ports. This guide will help you diagnose and fix these issues so you can get your server running smoothly.
Step 1: Check for Errors in the Server Console
The server console will usually display error messages if something goes wrong during startup.
Steps:
- Open the command prompt or PowerShell you’re using to start the server.
- Look for errors or warnings in the output after running
FXServer.exe
. - Take note of errors like "missing resource," "database connection failed," or "license key invalid."
Step 2: Verify Your server.cfg
File
Errors in your configuration file are one of the most common reasons for startup failures.
Checklist for server.cfg
:
- License Key: Ensure the correct license key from FiveM Keymaster is added:
sv_licenseKey "your_license_key"
- Database Connection: Check that the MySQL connection string is properly configured:
set mysql_connection_string "server=127.0.0.1;database=your_db_name;userid=root;password=your_password"
- Resource List: Verify all resources are spelled correctly and in the right order:
ensure qb-core ensure qb-inventory ensure [resources]
Step 3: Update FiveM Artifacts
Using outdated FiveM server artifacts can cause compatibility issues.
Steps to Update Artifacts on Windows:
- Go to the FiveM Artifacts page.
- Download the latest artifact.
- Extract the downloaded files to your server directory, replacing the existing files.
- Keep a backup of your
server.cfg
to avoid overwriting it.
Step 4: Check Resources for Issues
Problematic or incompatible resources can prevent your server from starting.
Steps to Identify and Fix Resource Issues:
- Disable all resources by commenting them out in
server.cfg
:# ensure qb-core # ensure qb-inventory
- Start the server without any resources.
- Re-enable resources one by one to find the problematic script.
Common Problems with Resources:
- Missing dependencies for QBCore, ESX, or other frameworks.
- Outdated scripts incompatible with the current artifact version.
- Conflicting resources running simultaneously.
Step 5: Install Missing Dependencies
Missing dependencies can lead to server crashes or failures.
Dependencies for FiveM on Windows:
- Visual C++ Redistributable (2019 or later): Download and install from Microsoft.
- MySQL Server or MariaDB: Install a database server if your framework requires it.
- Git: Needed to clone QBCore or other frameworks. Download from git-scm.com.
Step 6: Verify Database Connection
If your server relies on a database (e.g., for QBCore or ESX), ensure the connection is properly configured.
Steps:
- Open MySQL Workbench or phpMyAdmin to check if the database is running.
- Test the database connection with the same credentials used in
server.cfg
. - Import missing SQL files if required (e.g.,
qb-core.sql
):mysql -u root -p your_database_name < qb-core.sql
Step 7: Ensure the Port Is Open
If your server port is blocked, players won’t be able to connect, and your server may fail to start.
Default FiveM Port:
- FiveM servers typically use port
30120
for both TCP and UDP traffic.
How to Open Ports on Windows Firewall:
- Open Windows Defender Firewall from the Control Panel.
- Click on Advanced Settings.
- In the left-hand menu, select Inbound Rules.
- Click New Rule in the right-hand menu.
- Select Port and click Next.
- Choose TCP and UDP, then enter
30120
in the "Specific local ports" field. - Click Next, select Allow the Connection, and click Next again.
- Name the rule (e.g., "FiveM Server Port") and save it.
Test the Port:
- Use a tool like canyouseeme.org to check if port
30120
is open.
Step 8: Reinstall FiveM Server Files
If none of the above steps work, reinstalling FiveM server files may resolve the issue.
Steps:
- Back up your
server.cfg
and essential resources. - Delete your current FiveM server directory.
- Download the latest artifacts and set up the server from scratch.
- Restore your
server.cfg
and resources.
Step 9: Seek Community or Hosting Support
If the issue persists, reach out for help.
Resources:
- FiveM Forums: https://forum.cfx.re/
- Framework Discords: Check QBCore, ESX, or other framework-specific communities.
- Goodleaf Hosting Support: Our 24/7 team can help troubleshoot and resolve server issues quickly.
Conclusion
A FiveM server not starting can result from configuration errors, missing dependencies, or blocked ports. By following these troubleshooting steps—including ensuring your port is open—you can identify and resolve the root cause of the issue, ensuring smooth server operation.
Need reliable hosting for your FiveM server? Goodleaf Hosting offers optimized servers with expert support to keep your community running smoothly!