Log drains overview

Coolify log drains forward workload container output to an external logging destination. Configure one destination on a server, then enable log draining for the resources you want to include.

The short version

Enable Axiom, New Relic, or a custom Fluent Bit configuration on the server. Then turn on Drain Logs for each application, database, or service component and restart or redeploy it.


What log drains forward

Coolify starts coolify-log-drain on the server. Opted-in resource containers send their stdout and stderr to this local Fluent Bit container, which forwards the records to your destination.

Log drain scope

Log drains cover opted-in workload containers, not every log available in Coolify.

Forwarded

  • Application and Docker Compose application container output
  • Standalone database container output
  • Output from opted-in application and database components inside one-click services

Not forwarded

  • Coolify deployment and build logs
  • Coolify control-plane container logs
  • Output from resources without Drain Logs enabled

Choose a destination

AxiomSend logs to an existing dataset using an Axiom API token.New RelicSend logs to the regional New Relic Log API with an ingest license key.Custom Fluent BitProvide a complete Fluent Bit configuration and optional parser definitions.

A server can have only one Coolify-managed log drain enabled at a time. Follow the destination guide for its credentials and configuration.


Configure the server

  1. Open Servers and select the validated server that runs the resources.
  2. Open Configuration > Log Drains.
  3. Enter and save the settings for one destination while Enabled is off.
  4. Turn on Enabled to start coolify-log-drain.
Verify delivery in the logging provider

Coolify checks the required field formats but does not validate provider authentication or send a test event.


Enable log draining for a resource

The server drain must be enabled first. Otherwise, Coolify turns the resource's Drain Logs setting off again.

Restart the resource after changing Drain Logs

Coolify applies the Docker logging driver when it creates the resource container. Restart or redeploy the resource after turning Drain Logs on or off.

Open the application

Open the application, then select Configuration > Advanced. This also applies to Docker Compose applications.

Enable Drain Logs

Under Logs, turn on Drain Logs.

Apply the change

Restart or redeploy the application.


Verify delivery

  1. Make the resource write a recognizable message to stdout or stderr.
  2. Open the logging provider and search recent events for that message.
  3. If the event is missing, inspect the log-drain container on the resource server:
docker ps --filter name=coolify-log-drain
docker logs --tail 100 coolify-log-drain

The built-in Axiom and New Relic destinations flush every five seconds. A custom configuration uses its own Flush value.


Limitations

  • A server can use only one Coolify-managed log drain at a time.
  • Retention, queries, dashboards, and log-based alerts are managed by the external provider.
  • Disabling the server drain stops forwarding but does not clear the saved Drain Logs settings on resources.

On this page