Reading Laravel logs in Coolify

Why Coolify's Logs tab doesn't show your Laravel exceptions, how to send them there or read laravel.log in the container, and how to keep it across deploys.

You deploy a Laravel app with Coolify, something throws a 500, and you open the resource’s Logs tab. You see nginx access lines and PHP-FPM notices, but not the exception. That’s not a Coolify bug: the tab shows what the container writes to stdout and stderr, and Laravel, out of the box, writes its log to a file.

Where the log actually is

With the default LOG_CHANNEL=stack and LOG_STACK=single, Laravel writes to storage/logs/laravel.log inside the container. Coolify never sees that file. There are two ways to deal with it.

Option 1: send the log to stderr

Add stderr to the stack in the resource’s environment variables in Coolify:

Terminal window
LOG_STACK=single,stderr

Now every log entry goes to the file and to stderr, and Coolify’s Logs tab shows it. LOG_CHANNEL=stderr alone drops the file. LOG_STACK came with Laravel 11: on older versions, add stderr to the stack channel’s channels in config/logging.php.

It’s the simplest fix, with trade-offs:

  • application errors are mixed with the web server’s access log;
  • a stack trace arrives as dozens of separate lines among the others;
  • you can only scroll back as far as the Docker log keeps, and there is nothing to search or count.

Option 2: read the file in the container

SSH into the server and find the container. Coolify names containers after the resource’s UUID and the time of the deploy, so the name changes with every deploy. Coolify labels them, though, so filter by the resource name you see in its dashboard:

Terminal window
docker ps --filter label=coolify.resourceName=api --format '{{.Names}}'

coolify.projectName and coolify.environmentName narrow it down further when several projects have an api. Then follow the log:

Terminal window
c=$(docker ps -q --filter label=coolify.resourceName=api | head -n 1)
docker exec "$c" tail -n 200 -f storage/logs/laravel.log

The path is relative to the image’s working directory, which is the app’s root in most images, /app with Nixpacks. With LOG_STACK=daily the file is laravel-2026-11-12.log instead.

To see only errors, or to count which ones happen most:

Terminal window
docker exec "$c" grep -n 'production.ERROR' storage/logs/laravel.log | tail -n 20
docker exec "$c" grep -o 'production.ERROR: [^{]*' storage/logs/laravel.log | sort | uniq -c | sort -rn | head

The second one lumps errors together only when their messages match exactly, so “Card declined for order SH-49231” and “for order SH-50117” count as two.

Keep the log across deploys

A Coolify deploy starts a new container, and storage/logs of the old one goes with it. To keep the log, add a Persistent Storage volume for the logs directory to the resource in Coolify (/app/storage/logs with Nixpacks), or ship the log elsewhere through a channel such as stderr plus a log driver, or a service like Papertrail or Sentry.

With laraport

laraport reads Coolify’s labels too. Containers are grouped by Coolify project and named after their resource, api or shop-db instead of a UUID, with the environment when it isn’t production (shop/staging). The names stay the same across deploys, and so do your favorites and history.

Open the container and press 3 for its Logs tab. Laravel logs lists the files in storage/logs with their size and dates. Docker logs is what Coolify’s Logs tab shows.

A log opens at its end and follows new lines. / searches as you type, l keeps only warnings and errors, and ] and [ jump from one error to the next with its stack trace attached. Files are read by byte offset, so a 2 GB laravel.log opens as fast as a small one.

Errors answers the question the uniq -c above tries to: what is failing, and how often.

Each kind of error is listed once with its count, exception class, location, and first and last time. Numbers, IDs and quoted values are blanked out before comparing, so the two declined cards above count as one kind. The grouping runs inside the container, and only the summary travels to your computer.

l on a project’s header in the container list follows the logs of all its containers in one stream, web and workers together.

More in the Logs docs.