Skip to content
FIVECRATE

FiveM Server Logs: Find Them and Send Them to Discord

Find FiveM server logs in txAdmin: the three log files, the panel pages that show them, and how to post chosen events to Discord with a webhook.

Server operator reviews event timelines and notification icons on two monitors overlooking a city at night
Author: FiveCrate
Published:
Updated:
Read time: 16 min
Applies to
txAdmin v8.1.2 (October 23, 2026) on FiveM Legacy FXServer and on the FiveM for GTAV Enhanced Cfx Server with embedded txAdmin, Windows and Linux; Discord webhook API as documented on December 3, 2026; qbx_core v1.24.1 (October 30, 2026), esx_core 1.16.4 (October 18, 2026) and qb-smallresources source of August 26, 2026; servers with or without a framework
Last verified

Direct Answer

FiveM server logs are written by txAdmin into txData/<profile>/logs/: fxserver.log holds everything the server console printed, server.log holds in-game events (joins, drops, chat, deaths, explosions, commands, admin menu actions) and admin.log holds admin actions and automatic restarts. The txAdmin panel shows the same data on Live Console, Server Log and System, Action Log. To get FiveM logs into Discord, create a webhook in your Discord channel, keep its URL secret, and post selected events to it from a server-side script or your framework’s logger.

FiveM server log location: the txAdmin log folder

txAdmin has kept persistent log files since v4.6.0, in “an organized folder (txData/<profile>/logs/)”. FXServer itself only prints to its console; txAdmin saves that output and the in-game events to disk, with rotation.

The txData folder sits in a different place on each system:

  • Windows: in the parent of the folder that contains FXServer.exe.
  • Linux: in the folder that contains your run.sh.
  • Game server hosts: the TXHOST_DATA_PATH variable overrides the location. txAdmin’s documentation says it “is usually set to /home/container when running on Pterodactyl”, so there the logs are in /home/container/<profile>/logs/. On other hosts, look for txData in the file manager of the control panel.

Inside logs/ you find one active file per log with the plain name (server.log) and older rotated copies that add the date, time and an index, such as server_ followed by YYYY-MM-DD_HH-MM-SS.

FileWhat it holdsRotation by defaultRotated copies keptSize of rotated copies
fxserver.logEverything in the FXServer console: stdin, stdout, stderr. Commands typed in the live console start with > Daily75G
server.logIn-game events: joins, leaves, deaths, chat, explosions, commands, menu eventsDaily710G
admin.logAdmin actions and automatic ones: restarts, bans, warns, settings changes, live console inputEvery 7 daysNot limited (false)Not limited (false)

The admin log “does not log the user IP unless if from an authentication endpoint”. Warns, bans and whitelist actions are also stored in txAdmin’s player database, not only in this file.

FiveM for GTAV Enhanced ships its server as Cfx Server, “with txAdmin still embedded so the setup experience remains the same”, so the same txAdmin log folder and panel pages apply there.

txAdmin logs in the web panel

Each log has a page in txAdmin v8.1.2, and each page needs its own admin permission:

PageWhereShowsPermission
Live ConsoleServer menuThe FXServer console as it happens. The Download button saves the active fxserver.log as fxserver_ plus a Unix timeConsole: View
Server LogServer menuIn-game events, live or paged with View Older and View NewerView Server Logs
Console LogSystem menutxAdmin’s own console output (not FXServer’s)View System Logs
Action LogSystem menuThe contents of the active admin.logView System Logs

Two limits matter when you look for something older:

  • Server Log reaches back 32,000 events. The page reads a buffer in txAdmin’s memory, listed in the docs as “32k events”, which starts empty each time txAdmin starts. Anything older is only in server.log and its rotated copies.
  • System Console Log is short. txAdmin keeps between 64 and 72 KB of its own output for that page and cuts older text.

Server Log has a Show Log Filters button with switches for Player Joins, Player Leaves, Chat Messages, Player Death, Menu Actions, Explosions, Commands, System Events and Other Events. Turn off what you do not need while you search.

When the server restarted at night, start with Action Log: monitor restarts are written there as Restarting server: with the reason, and the same line goes into fxserver.log. The server crash guide explains each restart reason and how to read the console lines before it.

What txAdmin’s server log records

txAdmin collects in-game events through the Lua resource it runs inside your server (its logger is sv_logger.lua), which buffers events and sends them to txAdmin once per second. Each line in server.log has the form:

[<local time>] [<mutex>#<id>] <player name>: <message>

The mutex identifies one run of the server, and the number after it is the player’s server ID in that run. The docs give a search tip: “If you search the file for a [mutex#id], the first result will be the player join with all his identifiers available.”

These are the messages txAdmin v8.1.2 writes:

EventMessage in the log
Joinjoined with identifiers and a summary of the identifiers
Leavedisconnected ( with the drop reason )
Refused joinplayer join denied due to and the reason
Chatsaid " with the text
Deathdied from and the cause, plus by and the killer when another player killed
Explosioncaused an explosion ( with the type name, for example ROCKET
Commandexecuted: / and the command
txAdmin menuText such as spawned a vehicle (model: ...), enabled noclip or teleported to a waypoint

The explosion handler skips explosions with a damage scale of 0, no camera shake, or that are invisible or silent, so an empty explosion list does not prove that nothing exploded. Death lines come from a network event that each player’s game sends to the server, and chat lines from the chatMessage event.

The drop reason in disconnected (...) is the text the player saw. The connection timed out guide explains how txAdmin sorts those reasons.

Keep FiveM logs longer, or turn one off

Rotation is set per log in txData/<profile>/config.json. Add a logger object with the key admin, fxserver or server, and give it options of the rotating-file-stream library that txAdmin uses. This is the example from txAdmin’s documentation, merged into the existing file:

{
  "logger": {
    "fxserver": {
      "interval": "1d",
      "maxSize": "2G",
      "maxFiles": 14
    }
  }
}

The example’s comments describe maxSize as the “max size of rotated files to keep” and maxFiles as the “max number of rotated files to keep”. Options you leave out keep txAdmin’s defaults from the table above. To stop writing one log entirely, set its key to false, for example "server": false; txAdmin then prints persistent logging disabled for: with the log name when it starts.

  1. Check the JSON. txAdmin’s settings code marks invalid logger entries as fatal instead of falling back to defaults, with the comment “storage issues might crash the server”.
  2. Restart txAdmin. The logger reads these options when it is created at startup.
  3. Watch the disk. Higher maxFiles or maxSize values keep more data on disk.

Make the console log quieter with channel filters

A script that prints every second fills the console, and so fxserver.log, with lines you never read. FXServer can filter console output by channel. A channel is the prefix in brackets: the docs use [citizen-server-impl] Found 44 resources. as an example, and script output appears as [script:<resource name>].

con_addChannelFilter takes a filter, which can be a regular expression, and an action:

ActionEffect, from the Server Commands page
noprint“Will stop anything from being printed at the trace listener level.”
drop“Will cause the output to be dropped at Printfv, so it won’t reach any print listeners.”
devonlyDrops the output only while the developer command is set to false

The docs’ example hides every resource whose name starts with gamemodePrefix-:

con_addChannelFilter script:gamemodePrefix-* noprint

con_channelFilters lists the active filters, and con_removeChannelFilter with the same two arguments removes one. Filter only noise you know: a hidden error line is missing when you need it later.

Player-side logs are on the player’s PC

Some problems never reach the server log. The FiveM Legacy client writes CitizenFX_log_ plus the date and time it started into the logs folder of its own FiveM Application Data folder (open %localappdata%/FiveM from the Windows Run box). FiveM for GTAV Enhanced keeps its logs in %AppData%\FiveM for GTAV Enhanced\logs. The loading screen guide shows what to look for in them.

FiveM logs to Discord: what each option sends

“FiveM discord logs” means a Discord channel that receives messages from the server. The documented options:

OptionWhat it sendsSet up in
txAdmin’s Discord botAnnouncements such as server restarts, to one channeltxAdmin Settings, Discord
Your framework’s loggerFramework events (Qbox, ESX, QBCore), each to the webhook you configureThe framework’s config files
Your own server scriptAny event you choose, through a webhookA small resource

The framework loggers and your own script use Discord webhooks, which Discord describes as “a low-effort way to post messages to channels in Discord. They do not require a bot user or authentication to use.”

Create a Discord webhook for FiveM

Discord’s support article gives the steps:

  1. Open the integrations. “Open your Server Settings and head into the Integrations tab”.
  2. Create the webhook. Click Create Webhook, choose the text channel it posts to and give it a name. Discord’s API requires the MANAGE_WEBHOOKS permission to create one, and rejects a name that contains “clyde” or “discord”.
  3. Copy the URL. Press Copy Webhook URL.

Treat the URL like a password. The token in it is the only key: anyone who has it can post with the webhook, and also change or delete it, because “Modify Webhook with Token” and “Delete Webhook with Token” do “not require authentication”. Keep it out of client scripts, screenshots and public repositories.

txAdmin’s Discord bot and the warnings channel

txAdmin has its own Discord bot, set up under Settings, Discord. It is a bot with a token, not a webhook: the page says “Do not reuse the same token for another bot” and notes that the bot needs the Server Members intent. Its optional Warnings Channel ID is “The ID of the channel to send Announcements (eg server restarts)”; leave it blank to turn the feature off. It is a channel for announcements, not a log feed: in the v8.1.2 source, Discord log forwarding is still listed as a task to add in txAdmin’s admin logger. The txAdmin recipe guide covers the first setup of the panel.

Framework Discord logs: Qbox, ESX and QBCore

Each framework ships a Discord logger that posts embeds through PerformHttpRequest. They differ in where the webhook URLs go:

  • Qbox. qbx_core (v1.24.1, October 30, 2026) has a logging.webhook table in config/server.lua with the keys default, joinleave, ooc, anticheat and playermoney, and a role list for tagging roles on high priority logs. The file says it “is for core events only. putting other webhooks here will have no effect”. Other resources use the @qbx_core.modules.logger module, which refuses to run on the client. The Qbox docs say it “logs to Discord if a webhook is given, and with ox_lib otherwise”; in the v1.24.1 source it passes every log to ox_lib’s logger and also posts to Discord when a webhook is given. Its Discord queue waits 60 seconds after every 5 messages. ox_lib’s logger forwards to the external log service set with the ox:logger convar.
  • ESX. es_extended reads Config.DiscordLogs.Webhooks in shared/config/logs.lua, with the entries default, test, Chat, UserActions, Resources and Paycheck. Scripts call ESX.DiscordLog or ESX.DiscordLogFields. The code falls back to default only for a name that is missing from the table (Webhooks[name] or Webhooks.default), so give every listed entry you use its own URL.
  • QBCore. qb-smallresources keeps a Webhooks table at the top of server/logs.lua with entries such as default, joinleave, death, banking, anticheat and bans, and Config.Logging = 'discord' in config.lua. An empty entry uses default; a name missing from the table prints Tried to call a log that isn't configured with the name of and is not sent. Logs are sent in batches: when 10 are waiting for one name, or every 60 seconds. The testwebhook command, limited to the god permission, posts a test message.

In all three, the URLs sit in plain Lua files, readable by anyone who can read your resources. A server without a framework, such as a racing, PvP or vMenu freeroam server, uses the script below instead.

Send FiveM server logs to Discord with a small script

This resource posts one message per player drop. It works on any server, with or without a framework, because it uses only FiveM’s own functions: the playerDropped event, GetConvar and PerformHttpRequest, which FiveM’s Lua scheduler defines only for the server side.

  1. Store the URL in a server-only convar. Standard convars “can only be used in server-side scripts. They can not be obtained or set from a client script.” Put the line set discord_log_webhook followed by the copied URL in quotes into a separate file, for example secrets.cfg next to server.cfg, so you can share server.cfg without the URL. Do not use setr, which syncs the value to clients, or sets, which publishes it in the server list and info.json.

  2. Load that file before the resource starts. exec runs a file “relative to the server data directory”. In server.cfg:

    exec secrets.cfg
    ensure discord-drop-log
  3. Create the resource. Make a folder resources/discord-drop-log with this fxmanifest.lua:

    fx_version 'cerulean'
    game 'gta5'
    
    server_script 'server.lua'

    The fxmanifest guide explains each line.

  4. Add server.lua:

    local webhook = GetConvar('discord_log_webhook', '')
    
    AddEventHandler('playerDropped', function(reason)
        if webhook == '' then return end
    
        local text = ('%s left the server (%s)'):format(GetPlayerName(source) or 'unknown', reason)
        local payload = json.encode({ username = 'Server Logs', content = text:sub(1, 2000) })
    
        PerformHttpRequest(webhook, function(status)
            if status ~= 204 then
                print(('Discord webhook answered with status %s'):format(status))
            end
        end, 'POST', payload, { ['Content-Type'] = 'application/json' })
    end)
  5. Restart and test. Restart the server, join and leave. The message appears in the channel. The script reads the convar when it starts, so restart the resource after you change the URL.

What the code relies on:

  • content holds up to 2000 characters, so the text is cut there; username overrides the webhook’s name.
  • Discord answers 204 No Content when the request does not ask it to wait (wait defaults to false). Any other status is printed to the console.
  • Player names are user input. Discord “may strip certain characters” and suggests sanitizing user strings and using allowed_mentions. In webhook messages, only user mentions are parsed by default; @everyone and role mentions are not.

To log other events, copy the pattern into the handler of that event. Send what you will read: every message is one request against Discord’s limits.

Discord webhook limits that break FiveM log scripts

LimitWhat Discord’s docs say
Message sizecontent up to 2000 characters; up to 10 embeds per message
Empty messageA message needs at least one of content, embeds, components, file or poll
Rate limit per webhookPer-route limits are counted per top-level resource, and each webhook is one (webhook_id or webhook_id + webhook_token)
Too many requestsHTTP 429 with a JSON body; wait for retry_after seconds before the next request
Requests without authorizationThe global limit of 50 requests per second applies to the IP address
Invalid requests10,000 requests per 10 minutes that end in 401, 403 or 429 get the IP temporarily restricted
Deleted webhook“If a webhook returns a 404 status you should not attempt to use it again”

The IP-based limits count every script on the machine together: a server that posts each kill and chat line separately runs into 429 answers, and a script that keeps retrying them can get the host’s IP restricted. Batching helps: the QBCore logger sends up to 10 embeds in one message, and the Qbox logger pauses after every 5 messages.

Troubleshooting

FiveM Discord webhook not working

Read the status your script printed:

  • 0: the request never started; FiveM’s scheduler reports “Failure handling HTTP request”. Check that the convar holds the full URL you copied, in quotes.
  • 404: the webhook was deleted. Create a new one; do not keep retrying the old URL.
  • 429: too many messages. Wait for retry_after and send fewer or batched messages.
  • No status printed and no message: the handler never ran, or the convar is empty. Type discord_log_webhook in the server console: an unset convar answers No such command discord_log_webhook.

The webhook URL leaked or strangers post in the log channel

Delete the webhook in Discord’s server settings and create a new one, then update the convar or framework config. Then look for the place it leaked from: a shared server.cfg, a client script or a public repository. The backdoor guide shows how to search every resource for PerformHttpRequest calls and follow where they send data.

server.log is missing or stays empty

Check config.json for "server": false under logger, and the txAdmin console for persistent logging disabled for:. The in-game events come from txAdmin’s own in-server resource, so they only exist when txAdmin starts the server.

txAdmin log pages are greyed out or show “Access Denied”

A page’s menu entry is greyed out when your admin account lacks its permission, and opening the page shows Access Denied with “You don’t have the required permission to view the” page name. The permission of each page is in the panel table above; set permissions per admin on the Admins page. The txAdmin login guide covers access problems.

Next Steps

Official documentation and repository references