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, Amazon CloudWatch Logs, or a custom Fluent Bit configuration on the server. Then turn on Log drain for each application, database, or service component and restart or redeploy it.


What log drains forward

For Axiom, New Relic, and custom Fluent Bit, 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.

For Amazon CloudWatch Logs, Coolify does not start coolify-log-drain. Opted-in resource containers use the Docker awslogs logging driver, and the Docker daemon sends the records directly to CloudWatch Logs.

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.Amazon CloudWatch LogsSend logs to a CloudWatch Logs log group with the Docker awslogs driver.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 Log Drains.
  3. Enter and save the settings for one destination while Status is Disabled.
  4. Set Status to Enabled. For Axiom, New Relic, and custom Fluent Bit, this starts 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 Log drain 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 Log drain on or off.

Open the application

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

Enable Drain Logs

Under Logs, set Log drain to Send logs to the log drain endpoint.

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. For Amazon CloudWatch Logs, inspect the Docker daemon logs instead, as described in Fix missing logs.
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. Amazon CloudWatch Logs does not use Fluent Bit, so no Flush value applies.


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 Log drain settings on resources.

On this page