Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
Unhandled exception in Mono script environment: System.NullReferenceException: Object refe rence not set to an instance of an object
(null)GlobalError: Unhandled exception in Mono script environment: System.NullReferenceExc eption: Object reference not set to an instance of an object
(null)
Aborted
how do you start the server on startup? Im using a vps and I would like for the server to start with linux, when i try to use systemd it just reboots the server, the server itself throws out an error.
Hi,
Have you tried to use the screen function on linux VPS?
You would do
screen -R
This then creates an open screen session that you can exit and leave open at the same time.
Run your Fivem Server commands:
cd /home/FiveM/server-data
bash /home/FiveM/run.sh +exec server.cfg
Then do CRTL A+D this would then exit you out
Type screen -ls to list the open sessions you should have. You can then exit your VPS normally and FiveM will still be active.
You would need to create service for it to start with boot:
create your start up script for fivem in your fx-server-data folder like you would normally , then in /etc/systemd/system/ create a file and call it whatever you want
example:
fivem.service
Add the following adjusting for your directories:
# vi /etc/systemd/system/sample.service
[Unit]
Description=Fivem server startup script
After=network.target
[Service]
Type=simple
ExecStart=/fivem/fx-server-data/fivem.sh
TimeoutStartSec=0
[Install]
WantedBy=default.target
Hello, i’am having a problem when it comes to start the server, i am running Debian an it says i don’t have permission to start the server.
bash /home/fx-server/run.sh +exec server.cfg /home/fx-server/run.sh: line 8: /home/fx-server/alpine/opt/cfx-server/ld-musl-x86_64.so.1: Permission denied /home/fx-server/run.sh: line 8: exec: /home/fx-server/alpine/opt/cfx-server/ld-musl-x86_64.so.1: cannot execute: Permission denied
how can i solve this error?
Would just like to say nice tutorial, personally I use TCAdmin but I’ll be honest I have struggled with setting up a FX server on my linux dedicated and followed this tutorial myself.
I have the same issue of a lot of people here. Linux server starts but no connection can be made. Ports are open, I can connect using telnet but neither fivem client neither browser can connect. Did someone figured out what is wrong? Same exact configuration works on windows server. I hosted several gameserver on linux and I never had an issue like this one. I tested on ubuntu 16, 18 centos 7. All fresh new install. Seems an issue with the binaries. Please someone with experience can help?
I haven’t been participating in the community for a long time and this tutorial is very outdated. Some things might still work but a lot of it is likely different now that the project has evolved. I don’t even know if FX-Server is still a thing these days.