Guide

Fix txAdmin E5800: port 40120 already in use on FiveM

Why FiveM shows txAdmin FATAL ERROR E5800 on port 40120, how to find duplicate FXServer or crontab processes, and how to set TXHOST_TXA_PORT.

FATAL ERROR: E5800

The short answer: txAdmin failed to bind its web panel HTTP listener (port 40120 by default) because another process is already using that port. Usually a previous FXServer instance is still running or a crontab job started a duplicate server. Find the owning PID, stop the duplicate instance cleanly, or assign a dedicated port with TXHOST_TXA_PORT before starting FXServer.

What causes txAdmin E5800?

txAdmin runs an HTTP listener separately from the FiveM game port (30120 by default). Changing endpoint_add_tcp or endpoint_add_udp inside server.cfg never moves the txAdmin panel port because txAdmin starts before server.cfg is loaded.

Common triggers reported in the txAdmin documentation and on the Cfx.re forum include:

  • A duplicate FXServer process is still alive after a crash or unclean shutdown.
  • An old crontab entry or service unit launched a second txAdmin instance in the background on boot.
  • Multiple servers on one machine are trying to share port 40120 or the same txData folder.
  • Another local service already listens on port 40120.

Last checked: 3 December 2026

Fix it step by step

  1. Identify which process holds port 40120. On Linux, run:
sudo ss -ltnp '( sport = :40120 )'

On Windows Command Prompt, run both commands (replacing 1234 with the PID printed by netstat):

netstat -ano | findstr :40120
tasklist /FI "PID eq 1234"

If you previously set a custom TXHOST_TXA_PORT, check that port number instead of 40120.

  1. Check what owns the PID before stopping anything. Confirm whether it is a stale FXServer or another unrelated service so you do not terminate the wrong application.
  2. Stop duplicate FXServer instances and auto-start loops. Stop the extra instance cleanly from your service manager or host panel. On Linux, check crontab -e and systemd units if a second process keeps coming back after reboots.
  3. Separate ports and txData folders when hosting multiple servers. Each server needs its own game port (see FiveM port forwarding for 30120), its own panel port, and its own txData directory.
  4. Set TXHOST_TXA_PORT before launching FXServer (txAdmin v8+) if port 40120 must stay occupied. On Linux:
export TXHOST_TXA_PORT=40125
./run.sh

On Windows, set TXHOST_TXA_PORT inside your startup .bat file before launching the server executable. Update your firewall rules, container port mappings, or reverse proxy to match the new port.

How do I check that the fix works?

  1. Start FXServer and watch the startup console.
  2. Confirm FATAL ERROR: E5800 no longer appears and the log prints the expected txAdmin URL or PIN prompt.
  3. Open the txAdmin panel on the configured port (see txAdmin login and port guide).
  4. Start the game server from txAdmin and test a client connection.

If it still fails

  • The panel starts locally but fails externally. Open the chosen TCP port in your firewall or container allocation, and verify any reverse proxy points to the new TXHOST_TXA_PORT.
  • Two servers still collide on port 30120. Update the game endpoint port in server.cfg alongside TXHOST_TXA_PORT so neither listener overlaps.
  • Inside Docker or Pterodactyl. Adjust the container port allocation in your panel instead of picking random host ports that are not mapped.

Frequently asked questions

Does changing server.cfg change the txAdmin port?

No. txAdmin starts its HTTP listener before server.cfg loads, so endpoint_add_tcp only affects the FiveM game endpoint. Use TXHOST_TXA_PORT for txAdmin.

Is port 40120 the same as the FiveM game port 30120?

No. Port 40120 is the default txAdmin web panel port, while port 30120 is the default FXServer game port.

Should I run kill -9 on whatever uses port 40120?

Only stop a process after verifying its PID belongs to a duplicate FXServer instance. Killing another service on a shared host can break unrelated software.

Sources

FiveM.tools was founded with sponsorship from Nyru.