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:
LOG_STACK=single,stderrNow 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:
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:
c=$(docker ps -q --filter label=coolify.resourceName=api | head -n 1)docker exec "$c" tail -n 200 -f storage/logs/laravel.logThe 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:
docker exec "$c" grep -n 'production.ERROR' storage/logs/laravel.log | tail -n 20docker exec "$c" grep -o 'production.ERROR: [^{]*' storage/logs/laravel.log | sort | uniq -c | sort -rn | headThe 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.
▲ laraport › Production › shop-app-1 › laravel-2026-11-03.log ● ssh shop.example.com | laravel-2026-11-03.log LIVE ↑ more 2.0 MB / 2.0 MB 100% 1 error [2026-11-03 18:13:40] production.INFO: Order SH-50112 paid {"amount":"49.00","gateway":"stripe"} [2026-11-03 18:13:41] production.INFO: Invoice sent {"order":"SH-50112","to":"olena@example.com"} [2026-11-03 18:13:52] production.DEBUG: Cache miss {"key":"catalog:featured"} [2026-11-03 18:13:58] production.INFO: Order SH-50113 paid {"amount":"120.00","gateway":"stripe"} [2026-11-03 18:14:02] production.ERROR: Card declined for order SH-50117 {"exception":"[object] (R [stacktrace] #0 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Jobs\C #1 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\Contai #2 {main} "} [2026-11-03 18:14:05] production.WARNING: Slow request {"path":"/api/catalog","ms":1840} [2026-11-03 18:14:11] production.INFO: Order SH-50118 paid {"amount":"18.50","gateway":"paypal"} [2026-11-03 18:14:12] production.INFO: Invoice sent {"order":"SH-50118","to":"mark@example.com"} [2026-11-03 18:14:20] production.INFO: Stock synced {"items":412,"ms":380} [2026-11-03 18:14:31] production.INFO: Order SH-50119 paid {"amount":"64.00","gateway":"stripe"} [2026-11-03 18:14:33] production.NOTICE: Coupon AUTUMN25 used {"order":"SH-50119"} [2026-11-03 18:14:40] production.INFO: Invoice sent {"order":"SH-50119","to":"ivan@example.com"} [2026-11-03 18:14:52] production.INFO: Order SH-50120 paid {"amount":"39.00","gateway":"stripe"} [2026-11-03 18:14:53] production.INFO: Invoice sent {"order":"SH-50120","to":"sara@example.com"} [2026-11-03 18:15:01] production.INFO: Scheduled: catalog:reindex {"took_ms":2140} [2026-11-03 18:15:09] production.INFO: Order SH-50121 paid {"amount":"92.40","gateway":"stripe"} [2026-11-03 18:15:10] production.INFO: Invoice sent {"order":"SH-50121","to":"jonas@example.com"} LARAPORT Production shop-app-1 / search l level filter ]/[ next/prev error ? help
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.
▲ laraport › Production › shop-app-1 › Errors · laravel-2026-11-03.log ● ssh shop.example.com Errors · 5 kinds · 214 entries · whole file, 38M count level exception message where 87 ERROR RuntimeException Card declined for order SH-50117 app/Jobs/Char… 12 ERROR QueryException SQLSTATE[23505]: Unique violation: dupl… vendor/larave… 9 ERROR NotFoundHttpException The route api/v1/cart could not be foun… vendor/larave… 2 CRITICAL ConnectionException Connection refused [tcp://redis:6379] vendor/predis… 104 WARNING Slow request 5 rows · row 1 · col 1/7 count LARAPORT Production shop-app-1 ↑↓ move enter latest entry o order: count / latest ? help
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.