[FX] Simple Server Starter [Batch File]

I’m not sure if this has already been done but here it is anyways
Note this is not a FXServer script, this will only START your server, there are no commands within this

Introduction

Hello, so with FXServer, you need to run it in cmd, so I made this little batch file which will start your server, it’s just simple batch but thought it would help people out.

How to use

The only thing you need to change with this is the directory of the file, that’s about it. Since my FXServer folder is located on my desktop, I do this:

C:/users/administrator/desktop/server
The script will do the rest

Download

Windows Version

@echo off
cls

TIMEOUT /T 1
cd C:/users/administrator/desktop/server
TIMEOUT /T 1
run.cmd +exec server.cfg
pause >nul

(Just create a text file, put this in it, and when you save, do “Save As”, and call it run.bat)

Linux Version (Thanks to @zombieguy)

#!/bin/bash
echo "launching server..."
cd /home/server/fx-server
bash run.sh +exec server.cfg

If you have any questions, ask.

9 Likes

Just looked up if i could add clear cache when started and i found nothing.

1 Like

You can do this easily, although I don’t recommend it since when I start my server, when I delete the cache, i need to start the server, stop it then restart

but if you wanted to do that you would add the following to the code.

TIMEOUT /T 3
rmdir C:/users/administrator/desktop/server/cache
TIMEOUT /T 5

To add to this here is a similar script in bash for linux users. (rename /home/server/fx-server to FXserver location and save it as a .sh).

#!/bin/bash
echo "launching server..."
cd /home/server/fx-server
bash run.sh +exec server.cfg
1 Like

Jordie you are a lifesaver. works like a charm :slight_smile: Why the FX devs did not do this in the first place I shall never know!

1 Like

Glad to hear your enjoying it

Hello! What to do if it displays this error. Although everything works. But I would like to understand.

Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
Failed to get instance for guid a7242855-0350-4cb5-a0fe-61021e7eafaa and iid 567634c6-3bdd-4d0e-af39-7472aed479b7: System.InvalidOperationException: Sequence contains no matching element

need to run latest files i had same issue thats what fixed my error

I can’t find out whenever I start my Server it says it can’t find any resources, Can I get some help please?

cannot open http

showing problem bro

Wait Jordie i need help so when i try to run the server the cmd window suddenly opens and then closes as quickly as it opened

i have this solution you have to do this only its working perfect

Start_Server.cmd (91 Bytes) you have just change your c:fxserver etc which you have to save that flolder and just click and lets go to your server any you get anny problem jsut mail me i will help you (ayushgaba2515@gmail.com)

this file give me dunko who help me alots

1 Like

I tried your cmd but it its’t working to . It worked for 2 days then the same error came

you change your location in notepad of bat whta kind of problem showing send ss

guys i create a server and it says: Error: Could not authenticate server license key. Invalid key specified.

what if my files are saved and located in my D drive ?