← Blog

Accéder à txAdmin en localhost pour tester son serveur FiveM

Par Benjamin Dayan · PDG

· Mis à jour le October 26, 2026 · Lecture 6 min

Contents

txAdmin localhost access is the first hurdle most FiveM administrators hit when testing a resource pack or a fresh server.cfg before pushing anything online. The web panel listens on a specific TCP port on the loopback interface, and understanding how it binds to 127.0.0.1, where the PIN code comes from, and why the browser sometimes refuses to connect saves hours of troubleshooting during local development sessions.



Understanding txAdmin Localhost and Port 40120

txAdmin is the management layer bundled with FXServer, the engine behind FiveM and RedM. When you launch the artifact locally, txAdmin spins up alongside the game process and opens a small web service on TCP port 40120. By default this service only listens on the loopback address, which is why the panel is reachable at http://127.0.0.1:40120 and not from another machine on the network unless you explicitly change that behavior.

This loopback-only binding is intentional. txAdmin assumes that during local testing, the person launching FXServer and the person opening the browser are the same, so there's no reason to expose the panel beyond the machine itself. It only becomes reachable externally once you bind the endpoint to a public interface and open the corresponding port in your firewall, which is a separate step from local testing.

Why txAdmin Binds to 127.0.0.1 by Default

The default configuration avoids accidental exposure of an unprotected panel. Until an admin account is created through the first-run wizard, anyone reaching the panel could claim ownership of the instance. Keeping it on localhost during setup is a safety measure, not a limitation of the software.

Once your local tests are solid and you're ready to keep that resource list running around the clock instead of only on your own machine, the logical next step is a proper FiveM server hosting environment where ports, artifacts and backups are managed outside your development PC.



Retrieving the txAdmin PIN Code

On the very first launch of a fresh profile, txAdmin generates a four-digit PIN and prints it directly in the console window where FXServer is running. You won't find it anywhere else until an admin account exists, so keep an eye on the terminal output right after startup.

Starting FXServer with txAdmin...
[txAdmin] Your PIN code to access txAdmin is: 4821
[txAdmin] Open http://127.0.0.1:40120/ in your browser to continue setup.

If you missed it because the console scrolled too fast, the fastest fix is simply to stop the process and restart it. A new PIN is generated on every cold start until a persistent admin account has been created through the setup wizard.

Steps to Enter the PIN Correctly

  1. Open http://127.0.0.1:40120 in your browser (not https, not a custom port).
  2. Copy the PIN exactly as shown in the console, digits only.
  3. Submit the form before the session times out, usually after a few minutes of inactivity.
  4. Complete the admin creation flow with a username and password you will reuse for every local run.

Once the first admin account exists, the PIN step disappears entirely for that profile, and you log in directly with credentials instead.



Troubleshooting txAdmin Panel Loading Issues

A blank page, a connection refused error, or an endless spinner on 127.0.0.1:40120 almost always comes down to one of a handful of causes. Work through them in order rather than guessing.

1. Port Already in Use

If a previous FXServer process is still running in the background, port 40120 stays occupied and the new instance can't bind to it. Check what's listening before restarting.

# Windows (PowerShell or cmd)
netstat -ano | findstr 40120

# Linux
ss -tulpn | grep 40120

If a stale process shows up, kill it, then relaunch FXServer cleanly.

2. Wrong Address or Protocol

txAdmin serves plain HTTP on localhost, not HTTPS. Typing https://127.0.0.1:40120 or using localhost instead of the raw IP occasionally fails if your hosts file or browser extensions interfere with DNS resolution for that hostname. Always test with the literal IP first.

curl -I http://127.0.0.1:40120

A 200 OK or redirect response confirms the service is alive and reachable; a connection refused means FXServer either crashed or never finished booting.

3. Firewall or Antivirus Blocking Loopback

This is rare but happens with aggressive security suites. Temporarily disable third-party firewall rules or add an explicit allow rule for the executable.

# Windows firewall allow rule example
netsh advfirewall firewall add rule name="FXServer txAdmin" dir=in action=allow protocol=TCP localport=40120

# Linux ufw example
sudo ufw allow from 127.0.0.1 to any port 40120 proto tcp

4. Endpoint Misconfiguration in server.cfg

If someone edited the endpoint settings and bound txAdmin to an interface that doesn't exist on the local machine, the panel simply won't come up. Check the relevant line in your configuration file.

endpoint_add_tcp "127.0.0.1:30120"
set txAdminPort 40120

Remove any conflicting set txAdminPort overrides left over from a copied configuration file, since duplicates can confuse the binding process.

5. Docker or WSL Networking Quirks

If FXServer runs inside a container or WSL, the loopback address inside that environment is not automatically the same as your host machine's localhost. Port mapping has to be explicit.

docker run -p 40120:40120 -p 30120:30120/udp my-fxserver-image

Without that mapping, the panel might be perfectly healthy inside the container while being completely unreachable from your browser on the host.



Local FiveM Testing Tips With txAdmin

A few habits make local sessions far less frustrating once the panel is reliably reachable.

  • Keep a dedicated txData profile for testing, separate from any configuration you intend to run long-term, so a broken resource doesn't force a full reset.
  • Back up server.cfg and your resource folder before testing a new mod or plugin combination; txAdmin's panel makes restoring a previous state faster when a change breaks the boot sequence.
  • Watch the console and the txAdmin logs tab together; most startup failures throw a clear resource name and line number rather than a generic error.
  • Match your artifact build with the txAdmin version bundled in it. Mixing an old artifact with a manually updated txAdmin folder is a common cause of panel instability.
  • Never expose port 40120 beyond localhost on a machine connected to an untrusted network; finish setup locally first.

The same logic applies if you're prototyping a RedM project, since it shares the FXServer core and the same txAdmin interface; check the RedM server page for details on moving a tested build off your local machine. For a broader overview of what else can run alongside your FiveM project, the All our game servers page lists the full catalog, and the Fly-Serv blog covers more configuration guides in the same vein.

For deeper technical reference on txAdmin's internals and configuration options, the official FiveM documentation remains the most accurate source: FiveM txAdmin documentation.



Getting the local panel to load reliably comes down to checking the port, matching the address format, and keeping firewall rules out of the way. Once those basics are handled, testing resources, tweaking configuration files, and iterating on a build before going further becomes a far smoother routine.



FAQ

Why does txAdmin show a different PIN every time I restart FXServer?

The PIN only exists until an admin account is created for that profile. Each cold start without a finished setup wizard generates a new one, so complete the admin creation step once to stop seeing a new PIN each time.

Can I access txAdmin from another device on my network?

Not with the default loopback binding. You'd need to change the endpoint configuration to listen on a non-loopback interface and open the corresponding port in your firewall, which is a separate step from local-only testing.

txAdmin says the port is already in use, what should I check first?

Run netstat -ano | findstr 40120 on Windows or ss -tulpn | grep 40120 on Linux to find the process holding the port, close it, then relaunch FXServer cleanly.

Read next