Two Servers in One
How to run two servers in one machine.
Make an exact copy of your server files that you'll be using for your dev server. You can make an exact copy by just duplicating your current files from your live server, to make sure everything matches.
- Open your new server files that you duplicated server.cfg and edit your TDC and UCP to "0.0.0.0:30121". This is going to be the default port for your developer server for FiveM.
- Change your license key so it's not the same as your main server and add it to the new server.cfg file.
- We need to create a bat file in order to run the new server.
- Create a new Notepad document and click the top result to open the text editor.
- Type the following lines in the text file to create a batch file:
@echo off "C:\QBCoreDev//FXServer.exe" +set serverProfile "dev_server" +set txAdminPort 40125 pause
- Keep in mind that you need to replace "C:\QBCoreDev" to where you currently have your FXServer.exe file for the server that you duplciated and as you can see above, the port is 40125 for txAdmin.
- Save as and enter devserver.bat
- Save to Desktop and run it to get started deploying your server files.
- Follow the prompts to install txAdmin on your new dev server.
- If txAdmin says that ports are in use already, just try a different port.
- You may also want to run a different database other than your main one, remember to rename it on server.cfg.
- Keep in mind that since this is a developer server, it's going to be using your database for your live server. I'd recommend just exporting your current database, then importing it under a different name so that there's nothing wrong with your current one.
We do not offer any support other than what is found on this guide. Please do not ask us for any support or open tickets about this, they will be auto closed.