Skip to content
STACK IT FAST

Coolify

Curated OSSAI-agentSelf-Hosted Cloud PaaSSolo

Audited from github.com/coollabsio/coolify

Coolify is a self-hostable, open-source platform-as-a-service for deploying applications, databases and one-click services to your own servers over SSH, built as a PHP/Laravel monolith with Livewire, Redis-queued jobs and a self-hosted realtime layer.

Language
PHP
Database
PostgreSQL
Hosting
Docker
License
Apache-2.0
Running for
3 years 6 months
Team
Solo

Why this architecture

A Laravel + Livewire monolith that bundles its own buildpacks (Nixpacks, Railpack) and a self-hosted Soketi realtime server lets one application both serve the dashboard and build/deploy arbitrary user code on remote servers without depending on external SaaS.

Tech stack by layer

9 technologies · audited Sep 17, 2026
Frontend & UI
  • LivewireServer-driven reactive components render most of the dashboard (app/Livewire directory).
  • Tailwind CSSUtility-first styling, version 4 via @tailwindcss/postcss.
  • ViteBundles and serves frontend assets for the Laravel app via laravel-vite-plugin.
  • xterm.jsRenders the in-browser terminal used to attach to deployed containers and remote servers.
Backend & APIs
  • PHPRuntime for the Laravel application, pinned to 8.4.
  • LaravelCore application framework (routing, ORM, queues, auth) for the dashboard, API and CLI.
  • Laravel HorizonDashboard and supervisor for the Redis-backed queue workers that run deployments and scheduled jobs.
  • PestTest framework for unit, feature and browser (Dusk) tests.
Data & Persistence
  • PostgreSQLPrimary datastore, run as its own container alongside the app container.
  • RedisBacks cache, sessions, and Horizon-managed queues.
  • MinIOMinIO client (mc) is baked into the helper and app images for S3-compatible backup storage, alongside league/flysystem-aws-s3-v3.
Infrastructure & Deploy
  • DockerMultiple docker-compose files and purpose-built Dockerfiles drive Coolify itself and the servers it deploys to.
  • SoketiSelf-hosted Pusher-protocol-compatible WebSocket server providing realtime broadcasting and the terminal bridge.
  • NixpacksBuildpack bundled into the coolify-helper image so Coolify can build user applications that have no Dockerfile.
  • RailpackSecond, newer buildpack bundled alongside Nixpacks in the helper image (with a musl-patched mise binary) for building deployed applications.
  • SentryError tracking for the Laravel application.
  • GitHub ActionsRelease/build workflows (coolify-release, coolify-helper, coolify-realtime, coolify-sha-build, coolify-testing-host) and a claude.yml workflow.
Tooling, Testing & Ops
  • Laravel MCPShips a Model Context Protocol server (app/Mcp, .mcp.json) so AI agents can call Coolify's resources as tools.
  • Laravel BoostAI coding-agent toolkit added as a dev dependency to give coding agents Laravel-aware project context.
  • Claude CodeRuns as a GitHub Action (claude.yml) for automated PR assistance in CI.

Coolify architecture diagram

Open SVG
Coolify architecture diagramDashboard → Coolify app (HTTP); API / MCP clients → Coolify app (API); Web terminal → Realtime (WebSocket); Coolify app → Realtime (broadcast); Coolify app → PostgreSQL (Eloquent); Coolify app → Redis (enqueue); Redis → Queue workers (jobs); Queue workers → Build helper (build apps); Queue workers → Your servers (deploy · SSH); Queue workers → S3 backups (backups)CLIENTSSERVICESWORKERS & JOBSDATA & STORAGEEXTERNALDashboardLivewire · TailwindAPI / MCP clientsREST · Laravel MCPWeb terminalxterm.jsCoolify appLaravel · PHP 8.4RealtimeSoketi · terminal-serverQueue workersLaravel HorizonBuild helperNixpacks · RailpackPostgreSQLRediscache · queuesS3 backupsMinIO clientYour serversDocker hostsbroadcastbuild appsHTTPAPIWebSocketjobsbackupsEloquentenqueuedeploy · SSH
How the main components of Coolify connect, drawn from the audited repository.
Diagram as text
  • Dashboard (Livewire · Tailwind) → Coolify app (Laravel · PHP 8.4): HTTP
  • API / MCP clients (REST · Laravel MCP) → Coolify app (Laravel · PHP 8.4): API
  • Web terminal (xterm.js) → Realtime (Soketi · terminal-server): WebSocket
  • Coolify app (Laravel · PHP 8.4) → Realtime (Soketi · terminal-server): broadcast
  • Coolify app (Laravel · PHP 8.4) → PostgreSQL: Eloquent
  • Coolify app (Laravel · PHP 8.4) → Redis (cache · queues): enqueue
  • Redis (cache · queues) → Queue workers (Laravel Horizon): jobs
  • Queue workers (Laravel Horizon) → Build helper (Nixpacks · Railpack): build apps
  • Queue workers (Laravel Horizon) → Your servers (Docker hosts): deploy · SSH
  • Queue workers (Laravel Horizon) → S3 backups (MinIO client): backups

Key architectural decisions

7 decisions
  1. 01

    The app is a Laravel + Livewire monolith, not a decoupled API/SPA pair

    composer.json requires laravel/framework and livewire/livewire, and app/Livewire holds the bulk of the interactive UI as server-rendered components; Vite and Tailwind (package.json, vite.config.js) only handle asset bundling and styling on top of that, not a separate frontend application.

  2. 02

    Coolify bundles two buildpacks so it can build arbitrary user apps without a Dockerfile

    docker/coolify-helper/Dockerfile pins both NIXPACKS_VERSION and RAILPACK_VERSION and installs a musl-patched mise binary at the exact path Railpack expects, because "Railpack hardcodes a glibc mise download that fails on Alpine" — letting Coolify auto-detect and build a wide range of deployed repositories.

  3. 03

    Realtime and the in-browser terminal run through self-hosted Soketi, not managed Pusher

    docker/coolify-realtime/Dockerfile is FROM quay.io/soketi/soketi and additionally runs a custom terminal-server.js (built on node-pty and ws) so the dashboard's xterm.js terminal (package.json) can attach to remote containers over the same broadcasting channel used for deployment logs.

  4. 04

    Background work is Redis-queued and supervised by Laravel Horizon

    config/horizon.php configures the queue supervisor and composer.json requires laravel/horizon; the redis service in docker-compose.yml is a dependency of the main coolify service, so deployments and scheduled tasks run as queued jobs rather than inline requests.

  5. 05

    Ships its own AI-agent surface: an MCP server, an AI dev-tool dep, and Claude Code in CI

    composer.json requires both laravel/mcp (backing app/Mcp and the root .mcp.json) and, as a dev dependency, laravel/boost; a dedicated routes/ai.php route file exists alongside the standard web/api routes, and .github/workflows/claude.yml runs Claude Code as part of CI.

  6. 06

    Postgres, Redis and Soketi are sibling containers on a shared network, not embedded

    docker-compose.yml defines coolify, postgres (postgres:15-alpine, container coolify-db), redis (redis:7-alpine, container coolify-redis) and soketi (container coolify-realtime) services on one coolify bridge network, with the app container depending on all three.

  7. 07

    Production images are staged multi-build Dockerfiles separating install, build and runtime

    docker/production/Dockerfile has a composer-install stage (serversideup/php base), a separate node:24-alpine stage that runs npm run build for frontend assets, a minio-client stage, and a final serversideup/php runtime stage that copies vendor/ and public/build/ from the earlier stages and runs under s6-overlay with nginx.

How Coolify is built

How Coolify is structured

Coolify is a single Laravel application, not a split frontend/backend pair. The app/ directory follows Laravel conventions (Actions, Http, Jobs, Models, Policies, Services) with app/Livewire holding the interactive dashboard components and app/Mcp holding the MCP server. Configuration for the running services lives in docker-compose.yml, which defines the app container alongside postgres, redis and soketi services on one bridge network. The docker/ directory holds purpose-specific images: docker/coolify-helper (build tooling bundled for deploying user apps), docker/coolify-realtime (the Soketi/terminal server), docker/development and docker/production (the app's own runtime images), and docker/testing-host (a Debian image used to simulate a remote server in tests). templates/ holds the JSON/YAML catalog of one-click service templates the README says covers "more than 300" services.

Frontend

The UI is server-driven: Livewire components under app/Livewire render most of the dashboard without a separate JavaScript application. package.json lists Tailwind CSS 4 (tailwindcss, @tailwindcss/postcss, @tailwindcss/forms, @tailwindcss/typography) for styling and Vite 8 (via laravel-vite-plugin) as the asset bundler, configured in vite.config.js. Two additional frontend libraries stand out: @xterm/xterm and @xterm/addon-fit, which render the in-browser terminal used to attach to deployed containers, and playwright, used for end-to-end browser testing.

Backend & APIs

The backend is Laravel 12 on PHP 8.4 (composer.json: "php": "^8.4", laravel/framework). Authentication and API access are handled by laravel/fortify and laravel/sanctum, with OAuth login covered by laravel/socialite plus a set of socialiteproviders/* packages for Authentik, Clerk, Discord, Google, Infomaniak, Microsoft Azure and Zitadel. Background work — deployments, scheduled backups, notifications — runs through Laravel's queue system, supervised by laravel/horizon (config/horizon.php). An OpenAPI spec is checked in (openapi.json, openapi.yaml, generated with zircote/swagger-php) alongside the REST routes in routes/api.php. Testing uses pestphp/pest and pestphp/pest-plugin-browser, plus laravel/dusk for browser tests, run from tests/Feature, tests/Unit and tests/Browser.

Data & persistence

PostgreSQL is the primary datastore, run from the official postgres:15-alpine image in docker-compose.yml as the coolify-db container; database/migrations and database/schema hold the Laravel migration history, and doctrine/dbal is a composer dependency used for schema introspection. Redis (redis:7-alpine, container coolify-redis) backs caching, sessions and the Horizon queue. For backups and object storage, the helper and production images bundle the MinIO client (mc, copied from quay.io/minio/aistor/mc), and composer.json includes league/flysystem-aws-s3-v3 and league/flysystem-sftp-v3 for S3-compatible and SFTP storage targets.

Realtime / collaboration

Realtime features run through a self-hosted Soketi server rather than a managed Pusher plan: docker/coolify-realtime/Dockerfile is built FROM quay.io/soketi/soketi, configured via config/broadcasting.php and routes/channels.php. The same image also runs a custom terminal-server.js (dependencies node-pty and ws in docker/coolify-realtime/package.json) that bridges the dashboard's xterm.js terminal to live container/server sessions, and bundles cloudflared for tunneled access.

Build, test & deploy

CI is GitHub Actions-driven, with workflows for helper/realtime image builds (coolify-helper.yml, coolify-realtime.yml), versioned releases (coolify-release.yml, coolify-rc-release.yml), SHA-tagged builds (coolify-sha-build.yml), a testing-host image (coolify-testing-host.yml), branch syncing (sync-main-to-next.yml) and a claude.yml workflow. Production Docker images are multi-stage: docker/production/Dockerfile runs composer install --no-dev in one stage, npm run build in a node:24-alpine stage for frontend assets, pulls in the MinIO client in a third stage, then assembles the final serversideup/php runtime image with s6-overlay and a patched nginx build from nginx.org's Alpine repository. Code quality tooling includes laravel/pint and rector/driftingly/rector-laravel (rector.php), plus phpstan/phpstan.

Self-hosting notes

Self-hosting is the product: the README documents a one-line install (curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash, script at scripts/install.sh) and contrasts it directly with Coolify Cloud. The recommended topology is one server running Coolify itself plus one or more separate servers it manages purely over SSH — the README notes that if you stop using Coolify, resources it already deployed keep running. scripts/upgrade.sh and scripts/upgrade-postgres.sh handle in-place upgrades.

What to copy (and what not to)

The buildpack-bundling approach in docker/coolify-helper/Dockerfile — vendoring both Nixpacks and Railpack, plus a hand-patched mise binary to work around a glibc/musl mismatch — is a good pattern to study for any tool that needs to build arbitrary third-party repositories without requiring a Dockerfile from the user. The Laravel MCP server and laravel/boost dev dependency are a concrete example of adding agent-facing tooling to an existing monolith rather than building a separate service for it. The multi-stage production Dockerfile (Composer stage, Node asset stage, runtime stage) is a reasonable template for any PHP app with a Vite frontend; smaller projects likely don't need Coolify's five separate Dockerfiles (helper, realtime, development, production, testing-host), which exist mainly because Coolify both runs itself and remotely manages other servers.

Sources & repo audit

Audited
Sep 17, 2026
Commit
255ee92
License
Apache-2.0

Independent analysis of repository at github.com/coollabsio/coolify. Spotted an inaccuracy? Use the claim form to request a correction.

Show this stack on your README or website
Tech stack of Coolify
[![Tech stack of Coolify on STACK IT FAST](https://stackitfast.com/badge/coolify.svg)](https://stackitfast.com/project/coolify)

Paste it into your README. It shows your current stack and links to this page.

Use this stack

Scaffold it with your agent

Paste this prompt into Claude Code, Cursor, Windsurf or AGY to start a project with Coolify's architecture.

  1. 1Copy the promptThe full markdown spec, with every layer and decision.
  2. 2Open your AI toolClaude Code, Cursor, Windsurf or Copilot, in a new repo.
  3. 3Paste and scaffoldUse it as the first instruction; review before you ship.
use-this-stack.md · 62 lines · 8.9 KB
# MISSION: Scaffold "Coolify" Production Architecture
You are an expert Senior Staff Software Architect and Full-Stack Engineer. Your mission is to scaffold and implement a production-grade, highly reliable, and modular codebase following the proven architecture of **Coolify**.
---
## 1. PROJECT SPECIFICATIONS & BENCHMARK
- **Reference Architecture**: Coolify
- **What It Does**: Coolify is a self-hostable, open-source platform-as-a-service for deploying applications, databases and one-click services to your own servers over SSH, built as a PHP/Laravel monolith with Livewire, Redis-queued jobs and a self-hosted realtime layer.
- **Domain & Category**: Self-Hosted Cloud PaaS
- **Production Scale**: Solo
- **Development Mode**: AI-AGENT
- **Architectural Rationale**: A Laravel + Livewire monolith that bundles its own buildpacks (Nixpacks, Railpack) and a self-hosted Soketi realtime server lets one application both serve the dashboard and build/deploy arbitrary user code on remote servers without depending on external SaaS.
- **Live Website Reference**: https://coolify.io
- **Source Repository**: https://github.com/coollabsio/coolify
---
## 2. PRODUCTION TECH STACK
- **Full Stack Array**: PHP, Laravel, Livewire, Tailwind CSS, Vite, PostgreSQL, Redis, Docker, Soketi
- **Primary Language(s)**: PHP, Blade, Shell
- **License of the reference repo**: Apache-2.0
- **Frontend**: Livewire — Server-driven reactive components render most of the dashboard (app/Livewire directory).; Tailwind CSS — Utility-first styling, version 4 via @tailwindcss/postcss.; Vite — Bundles and serves frontend assets for the Laravel app via laravel-vite-plugin.; xterm.js — Renders the in-browser terminal used to attach to deployed containers and remote servers.
- **Backend & APIs**: PHP — Runtime for the Laravel application, pinned to 8.4.; Laravel — Core application framework (routing, ORM, queues, auth) for the dashboard, API and CLI.; Laravel Horizon — Dashboard and supervisor for the Redis-backed queue workers that run deployments and scheduled jobs.; Pest — Test framework for unit, feature and browser (Dusk) tests.
- **Data & persistence**: PostgreSQL — Primary datastore, run as its own container alongside the app container.; Redis — Backs cache, sessions, and Horizon-managed queues.; MinIO — MinIO client (mc) is baked into the helper and app images for S3-compatible backup storage, alongside league/flysystem-aws-s3-v3.
- **Infrastructure & deploy**: Docker — Multiple docker-compose files and purpose-built Dockerfiles drive Coolify itself and the servers it deploys to.; Soketi — Self-hosted Pusher-protocol-compatible WebSocket server providing realtime broadcasting and the terminal bridge.; Nixpacks — Buildpack bundled into the coolify-helper image so Coolify can build user applications that have no Dockerfile.; Railpack — Second, newer buildpack bundled alongside Nixpacks in the helper image (with a musl-patched mise binary) for building deployed applications.; Sentry — Error tracking for the Laravel application.; GitHub Actions — Release/build workflows (coolify-release, coolify-helper, coolify-realtime, coolify-sha-build, coolify-testing-host) and a claude.yml workflow.
- **Tooling, testing & ops**: Laravel MCP — Ships a Model Context Protocol server (app/Mcp, .mcp.json) so AI agents can call Coolify's resources as tools.; Laravel Boost — AI coding-agent toolkit added as a dev dependency to give coding agents Laravel-aware project context.; Claude Code — Runs as a GitHub Action (claude.yml) for automated PR assistance in CI.
---
## 3. KEY ARCHITECTURAL DECISIONS (audited from https://github.com/coollabsio/coolify @ 255ee92)
1. **The app is a Laravel + Livewire monolith, not a decoupled API/SPA pair**: composer.json requires laravel/framework and livewire/livewire, and app/Livewire holds the bulk of the interactive UI as server-rendered components; Vite and Tailwind (package.json, vite.config.js) only handle asset bundling and styling on top of that, not a separate frontend application.
2. **Coolify bundles two buildpacks so it can build arbitrary user apps without a Dockerfile**: docker/coolify-helper/Dockerfile pins both NIXPACKS_VERSION and RAILPACK_VERSION and installs a musl-patched mise binary at the exact path Railpack expects, because "Railpack hardcodes a glibc mise download that fails on Alpine" — letting Coolify auto-detect and build a wide range of deployed repositories.
3. **Realtime and the in-browser terminal run through self-hosted Soketi, not managed Pusher**: docker/coolify-realtime/Dockerfile is FROM quay.io/soketi/soketi and additionally runs a custom terminal-server.js (built on node-pty and ws) so the dashboard's xterm.js terminal (package.json) can attach to remote containers over the same broadcasting channel used for deployment logs.
4. **Background work is Redis-queued and supervised by Laravel Horizon**: config/horizon.php configures the queue supervisor and composer.json requires laravel/horizon; the redis service in docker-compose.yml is a dependency of the main coolify service, so deployments and scheduled tasks run as queued jobs rather than inline requests.
5. **Ships its own AI-agent surface: an MCP server, an AI dev-tool dep, and Claude Code in CI**: composer.json requires both laravel/mcp (backing app/Mcp and the root .mcp.json) and, as a dev dependency, laravel/boost; a dedicated routes/ai.php route file exists alongside the standard web/api routes, and .github/workflows/claude.yml runs Claude Code as part of CI.
6. **Postgres, Redis and Soketi are sibling containers on a shared network, not embedded**: docker-compose.yml defines coolify, postgres (postgres:15-alpine, container coolify-db), redis (redis:7-alpine, container coolify-redis) and soketi (container coolify-realtime) services on one coolify bridge network, with the app container depending on all three.
7. **Production images are staged multi-build Dockerfiles separating install, build and runtime**: docker/production/Dockerfile has a composer-install stage (serversideup/php base), a separate node:24-alpine stage that runs npm run build for frontend assets, a minio-client stage, and a final serversideup/php runtime stage that copies vendor/ and public/build/ from the earlier stages and runs under s6-overlay with nginx.
---
## 4. NON-NEGOTIABLE ARCHITECTURAL GUARDRAILS
1. **Monorepo & Modular Separation**:
   - Structure as a Turborepo monorepo with strict package boundaries:
     - `apps/web`: Application UI, routing, layouts, and server endpoints.
     - `packages/ui`: Shared design tokens, CSS variables, and Radix UI primitive components.
     - `packages/db`: Database schemas, client singleton, declarative migrations, and seed scripts.
     - `packages/config`: Shared TypeScript, ESLint, and build configurations.
2. **Strict Type Safety & Zero `any` Policy**:
   - Enable `strict: true`, `noImplicitAny: true`, and `strictNullChecks: true`.
   - Validate ALL external inputs, API request bodies, and query parameters with **Zod** schemas before execution.
3. **Frontend & Rendering Guidelines**:
   - Utilize Vite 6 with TanStack Router for fully type-safe routing. Manage server state and caching via TanStack Query v5 with optimistic UI updates.
4. **Design System & Aesthetics**:
   - Keep every color, radius, shadow and font in a single token file (CSS variables) and consume tokens everywhere; never hardcode hex values in components.
   - Prefer crisp 1px borders and one subtle shadow scale over blurry default shadows. Pair one sans-serif for body/headings with one monospace for tags, badges, metrics, and code.
5. **Data Layer & Reliability**:
   - Write declarative schema definitions with foreign keys, composite indexes on queried filters, and automated timestamp triggers.
   - Use connection pooling and prepared statements for serverless database execution.
---
## 5. STEP-BY-STEP SCAFFOLDING ROADMAP
- **Phase 1: Workspace & Root Config**: Initialize package manager, monorepo configuration (`turbo.json`, `tsconfig.base.json`, `package.json`).
- **Phase 2: Database Schema & Client**: Set up the data layer (PostgreSQL, Redis, MinIO): client, connection pool, models, and migration scripts.
- **Phase 3: Design Tokens & UI Primitives**: Build accessible `Button`, `Input`, `Card`, `Badge`, and layout wrappers inside `packages/ui`.
- **Phase 4: Core Application Routes & Handlers**: Implement primary authentication, user session handling, and application routes.
- **Phase 5: Quality Assurance & Build Verification**: Run `tsc --noEmit`, ESLint, Prettier, and smoke test suites to ensure zero compilation or runtime errors.
---
## 6. EXECUTION INSTRUCTIONS
1. Review all specifications, architectural guardrails, and stack choices above.
2. Present the full monorepo directory tree structure.
3. Systematically generate the complete, production-ready codebase according to the 5-phase roadmap above — starting with the root workspace setup, followed by the database schema, UI design system package, and full-stack application routes until the repository is fully scaffolded and ready to run.
Scaffolded something with this prompt?
Would you pick this stack for a self-hosted cloud paas project?

Copied 1 time

Frequently asked about Coolify

What is Coolify built with?

A PHP 8.4 / Laravel backend with Livewire driving server-rendered UI, Tailwind CSS and Vite for styling and asset bundling, PostgreSQL as the primary datastore, Redis-backed Horizon queues, and a self-hosted Soketi server for realtime and terminal features, all wired together by docker-compose.yml.

Does Coolify need a backend?

Coolify is itself the backend: its dashboard, REST API, CLI and MCP server all run from the same Laravel application (composer.json, app/Mcp). It is not a frontend that talks to a separately hosted service — you deploy Coolify's own PHP application to get all of that.

Can I self-host Coolify?

Yes, self-hosting is its primary purpose. The README documents a one-line install script (scripts/install.sh) and explicitly lays out the tradeoffs between self-hosting on your own server versus using Coolify Cloud.

How does Coolify handle realtime features like the container terminal?

Through a self-hosted Soketi instance (docker/coolify-realtime/Dockerfile), a Pusher-protocol-compatible WebSocket server. The same image also runs a custom terminal-server.js built on node-pty and ws, which the dashboard's xterm.js terminal connects to for live container/server access.

Does Coolify have any AI agent integrations?

Yes. composer.json requires laravel/mcp, which backs an MCP server (app/Mcp, .mcp.json) exposing Coolify resources as agent-callable tools, plus laravel/boost as a dev dependency for AI-agent-aware project context, and .github/workflows/claude.yml runs Claude Code in CI.

Is Coolify written in PHP?

Yes. Coolify is a Laravel application written in PHP, with Livewire and Blade templates for the dashboard and laravel-vite-plugin bundling frontend assets, rather than a separate JavaScript SPA.

One email a month: new deep dives and stack trends

New source-audited architectures, head-to-head comparisons and the monthly stack report. No spam, unsubscribe anytime.

use-this-stack.md