coolify-operator について
coolify-operatorは、公式CLIまたはREST APIを使ってCoolifyインスタンスを操作するスキルです。アプリケーション、サービス、データベース、サーバーの運用に加え、データベースのインポートや外部シークレットマネージャーの操作にも対応します。
主な機能
- 01アプリケーション、サービス、DB、サーバーの管理
- 02リソースのデプロイ、再起動、停止
- 03ログとデプロイ状況の確認
- 04バックアップ設定とDBの復元
- 05コンテキストによるCoolifyインスタンス切り替え
活用シーン
- 01リポジトリやDockerイメージからのアプリデプロイ
- 02運用中のログとデプロイ状況の確認
- 03アップロード、S3、サーバーパスからのDB復元
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ fabricioctelles/ skills --skill coolify-operatorインストール後、Claude Code で/coolify-operatorを入力して読み込まれたか確認します。
同梱ファイル.env.exampleevals/evals.json
詳細
Coolify オペレーター
公式 CLI または REST API を通じて Coolify インスタンスを操作するスキルです。Coolify は、アプリケーション、データベース、サービスをデプロイするための、Heroku/Vercel/Netlify の代替となるセルフホスト可能なオープンソースプラットフォームです。
固定された上流バージョン: coolify-cli v1.10.0(e1d60947fc66c194d256b1049fd69c1ddf819760)— Coolify v4 の機能に対応しています。このタグの llms.txt / llms-full.txt に記載されたコマンド形式を優先してください。
テスト済みの Coolify バージョン: v4.4.6(2026 年 10 月)
CLI v1.10.0 の主な変更点
- 新機能:
coolify database import start|upload|statusおよびcoolify service database import ...— ローカルファイル、以前にアップロードしたファイル、S3、サーバー上のパスからバックアップを復元できます - 新機能:
coolify audit list— チーム監査ログ(管理者/オーナー向け) - 新機能:
coolify integration-token createとcoolify app secret-manager set— Doppler/Infisical/Vault のシークレットマネージャーに対応 - 新機能:
coolify app previews logs、coolify teams update --build-server-fallback、coolify project environments get - 新機能:
sqliteデータベースタイプ(--sqlite-databases) coolify service application logsで-n, --linesを指定できるようになりました
CLI v1.9.0 の主な変更点
- 新機能:
coolify app previews list|get|create|update(Coolify v4.4.0 以降のプレビュー環境デプロイ API) - 新機能:
coolify server registry list|login|check|logout— サーバー上の Docker レジストリへのログインを管理します - 新機能:
coolify server remove --force/--delete-from-provider - 新機能:
server add/server updateで--server-role deployment|build|bothを指定できます(--is-build-serverは非推奨です) - 変更点:
coolify server get <uuid> --resourcesは現在GET /servers/{uuid}/resourcesを呼び出し、サーバーの詳細ではなくフラットな一覧(uuid、name、type、status)を出力します - GitHub App コマンドでは数値のアプリ ID も使用できます
CLI v1.8.0 の主な変更点
- 新機能: インスタンス全体の SMTP/Resend 設定用コマンド(
coolify settings email get/update) - セキュリティ:
context listの出力では、API トークンはデフォルトでマスキングされます(表示するには--show-sensitiveを使用してください) - 修正: アプリの環境変数を作成/更新する際に、
is_buildtimeフィールドが正しく送信されるようになりました - 破壊的変更:
--retention-max-storage-locallyと--retention-max-storage-s3には、単位を付けた文字列ではなく、数値の GB(例:1、10.5)を指定します
このスキルの用途
- Coolify インスタンスに接続します(CLI コンテキストまたは API 経由)
- アプリケーション、サービス、データベース、サーバーを作成、一覧表示、管理します
- リソースをデプロイ、再起動、停止します
- ログとデプロイ状況を確認します
- 環境変数、共有環境変数、ストレージを管理します
- データベースのバックアップを設定します
- 複数の Coolify インスタンスを操作します(コンテキスト)
- GitHub/GitLab Apps と連携し、プライベートリポジトリを利用します
- 通知とインスタンスのメール(SMTP/Resend)を設定します
- cloud-init スクリプトを管理し、サーバーをプロビジョニングします(Hetzner、DigitalOcean、Vultr)
- データベースのバックアップを復元し(データベースインポート)、チーム監査ログを確認し、外部シークレットマネージャーを設定し、サーバー上の Docker レジストリへのログインを管理します
最近の変更(v4.4.x)
v4.4.0 — 大規模機能リリース
CLI/API の運用者に関連する主な変更点(v4.4.0 リリースを参照):
- SQLite をスタンドアロンのデータベース種別として追加(実験的)
- サードパーティーのシークレットマネージャー(Doppler、Infisical、HashiCorp Vault)。
{{vault.KEY}}の参照は、デプロイ時またはデータベース起動時に解決され、Coolify に保存されることはありません - チーム監査ログ(
GET /audit-events、管理者とオーナーのみ利用可能。イベントは90日後に削除) - スタンドアロンデータベースとサービスデータベース向けのデータベースインポート API(アップロード、サーバーパス、または S3)。アップロードと開始には
writeが必要です。サーバーパスからのインポートにはdeployも必要です - サーバーロール(
server_role:deployment / build / both)。is_build_serverは非推奨です。ビルドをデプロイサーバーにフォールバックするかどうかは、チーム設定で決まります - サーバーごとの Docker レジストリログイン(
GET/POST /servers/{uuid}/registries、.../{registry}/check、DELETE .../{registry})。Coolify はサーバー上でdocker loginを実行し、トークンを保存しません - プレビューデプロイメント API(
GET /applications/{uuid}/previews[/{pr_id}]、POST /applications/{uuid}/previewsにはdeployが必要) - クラウドプロバイダーからのサーバー削除:
DELETE /servers/{uuid}?delete_from_provider=true - 新しいマウントに名前付きボリュームを使用(既存のバインドマウントのパスは維持)
注意が必要な動作変更:
- 単一データベースの PostgreSQL 復元では、デフォルトで既存のオブジェクトが削除されなくなりました。以前の
--cleanの動作にするにはreplace_existing(--replace-existing)を指定してください。keep_owners(--keep-owners)を指定しない限り、所有者と権限はスキップされます - 環境変数名は
[A-Za-z_][A-Za-z0-9_.]*に一致する必要があります(無効なビルド時の名前があると、ビルドは停止します) - コンテナラベルは UUID を使用します(
coolify.applicationUuid、coolify.serviceUuid、coolify.databaseUuid)。生成されるコンテナ名には ISO 8601 形式のサフィックスが付きます - コンテナログとスケジュールタスクの出力エンドポイントには、API で
read:sensitiveが必要です - マルチサーバーアプリケーションでは、追加サーバーが同じプロキシを使用し、プライマリサーバーのイメージをプルする必要があります。永続ボリュームと Docker Compose アプリは、複数サーバーと組み合わせて使用できなくなりました
v4.4.1 – v4.4.6
- v4.4.1:ボリュームバックアップ通知と、ボリュームバックアップ未実施のアラート。Sentinel 1.0.2
- v4.4.2:デプロイサーバーとビルドサーバーで GitHub Actions ランナーを利用可能に。サーバーごとのトラフィック分析用 IP 保存設定
- v4.4.3:静的サイトの PR プレビューを修正。API 更新時のネストされた Base64 カスタムラベルを修正
- v4.4.4:新しい DNS レコードで Cloudflare プロキシモードを任意で利用可能に。IPv6 の修正。Infisical の参照展開を修正
- v4.4.5:更新を妨げていた 5 GB の空き容量要件を削除
- v4.4.6:セルフホスト環境での起動失敗を修正するため、PHP ベースイメージを固定
破壊的変更(v4.3.x)
v4.3.22 — ホストパスの削除
削除: 永続ボリュームの host_path 設定。host_path を含む API リクエストは拒否されるようになりました。
# WRONG (no longer works)
coolify app storage create <uuid> \
--type persistent \
--mount-path /data \
--host-path /opt/data # ❌ Rejected
# CORRECT (use named volumes only)
coolify app storage create <uuid> \
--type persistent \
--mount-path /data \
--name my-volume
v4.3.21 — 再起動上限がオプトインに変更
アプリケーション、プレビューデプロイメント、サービスアプリケーションでは、再起動上限がオプトインになりました。以前のデフォルト上限である10回の再起動が設定されていた既存のリソースは、無制限にリセットされました。
v4.3.19 — Sentinel が必須に
通常のサーバーでは、Sentinel が必須になりました。既存のサーバーでは自動的に有効になり、有効化/無効化の設定は読み取り専用になりました。これは今後の機能に必要です。Sentinel の役割はさらに拡大する予定です。
- Sentinel をアップグレード:0.0.22 → 1.0.1
- 有効なサーバーのバージョンチェックを毎時実行する設定を復元
CLI のインストール
# Linux/macOS (recommended)
curl -fsSL https://raw.githubusercontent.com/coollabsio/coolify-cli/main/scripts/install.sh | bash
# Homebrew (macOS/Linux)
brew install coollabsio/coolify-cli/coolify-cli
# Windows (PowerShell)
irm https://raw.githubusercontent.com/coollabsio/coolify-cli/main/scripts/install.ps1 | iex
# Go install
go install github.com/coollabsio/coolify-cli/coolify@latest
Windows でバージョンを固定するには、irm ... | iex の前に $env:COOLIFY_VERSION='v1.10.0' を設定します。ユーザーのローカル環境にインストールするには、$env:COOLIFY_USER_INSTALL=1 を設定します。
基本概念
認証
CLI:
- コンテキストには HOST と TOKEN が保存されます
- HOST には
/api/v1を含めません(CLI が自動的に追加します) - トークンの取得先:Coolify Dashboard → Security → API Tokens
REST API:
- ベースエンドポイント:
https://YOUR-HOST/api/v1(常に/api/v1を含めます) - ヘッダー:
Authorization: Bearer YOUR_TOKEN
トークンに | が含まれる場合の設定
Coolify のトークンには | が含まれていることがよくあります(例:3|abc123...)。source .env は絶対に使用しないでください。
# Safe .env reading
COOLIFY_KEY=$(sed -n 's/^COOLIFY_KEY=//p' .env)
COOLIFY=$(sed -n 's/^COOLIFY=//p' .env)
グローバルフラグ
すべてのコマンドで次のフラグを使用できます(coolify-cli v1.10.0 に準拠)。
--context <name> # Use specific context instead of default
--token <token> # Override authentication token
--format table|json|pretty # Output format (default: table)
-s, --show-sensitive # Reveal sensitive fields (tokens, IPs, emails)
--debug # Enable debug mode
設定ファイルにはトークンが平文で保存されます。~/.config/coolify/config.json(Windows:%APPDATA%\coolify\config.json)を絶対にコミットしないでください。
CLI の操作
ユーティリティコマンド
# Update CLI to latest version
coolify update
# Show current CLI version
coolify version
# Show configuration file location
coolify config
# Generate shell completion
coolify completion bash # or: zsh, fish, powershell
コンテキスト管理
coolify context list / get では、トークン、IP、メールアドレスはデフォルトで非表示です(v1.8.0+)。表示するには -s / --show-sensitive を指定してください。設定ファイルには引き続きトークンが平文で保存されるため、コミットしないでください。
# List all configured contexts (redacted by default — v1.8.0+ security fix)
coolify context list
coolify context list --show-sensitive # reveal tokens
# Add new context
coolify context add <context_name> <url> <token>
coolify context add -d my-coolify http://192.168.1.100:8000 "$TOKEN" # -d sets as default
coolify context add -f prod https://prod.coolify.io "$TOKEN" # -f force overwrite
# For Coolify Cloud
coolify context set-token cloud <token>
# Get context details
coolify context get <context_name>
# Delete context
coolify context delete <context_name>
# Update context token
coolify context set-token <context_name> <new_token>
# Set default context
coolify context set-default <context_name>
coolify context use <context_name> # alias
# Update context properties
coolify context update <context_name> --name <new_name>
coolify context update <context_name> --url <new_url>
coolify context update <context_name> --token <new_token>
# Verify connection and authentication
coolify context verify
# Get Coolify API version
coolify context version
プロジェクト
基本の形式は単数形の coolify project です(エイリアス projects も引き続き使用できます)。
# List all projects
coolify project list
# Get project details / environments
coolify project get <uuid>
coolify project environments list <project_uuid>
# Create new project
coolify project create --name "My Project" --description "Description"
# Get one environment and its applications, databases and services (v1.10.0+, alias: env)
coolify project environments get <project_uuid> <environment_name_or_uuid>
リソース
# List all resources (apps, databases, services)
coolify resource list
コマンドエイリアス(v1.10)
llms.txt に記載されている基本形式を優先してください。次のエイリアスも引き続き使用できます。
coolify app|apps|application|applicationscoolify service|services|svccoolify database|databases|db|dbscoolify project|projectscoolify resource|resourcescoolify server|serverscoolify teams|teamcoolify github|gh(および GitLab:gitlab|gl|gitlab-app)coolify audit|audit-events|audit-logcoolify integration-token|integration-tokenscoolify server registry|registries;coolify database import|imports
アプリケーション
一覧表示と表示
# List all applications
coolify app list
# Get application details
coolify app get <uuid>
アプリケーションの作成
パブリック Git リポジトリから
coolify app create public \
--server-uuid <uuid> \
--project-uuid <uuid> \
--environment-name production \
--git-repository "https://github.com/user/repo" \
--git-branch main \
--build-pack nixpacks \
--ports-exposes 3000 \
--domains "app.example.com" \
--instant-deploy
# Build packs: nixpacks, static, dockerfile, dockercompose
# Additional flags:
# --name, --description, --base-directory, --publish-directory
# --build-command, --start-command, --install-command
# --health-check-enabled, --health-check-path
# --limits-memory, --limits-cpus, --ports-mappings
# --git-commit-sha, --destination-uuid, --dockerfile-target-build
# --tag, --tags (for tagging)
# --compose-domain <service>=<url> (for Docker Compose)
プライベート GitHub リポジトリから(GitHub App 経由)
coolify app create github \
--server-uuid <uuid> \
--project-uuid <uuid> \
--environment-name production \
--github-app-uuid <github-app-uuid> \
--git-repository "owner/repo" \
--git-branch main \
--build-pack nixpacks \
--ports-exposes 3000
プライベートリポジトリから(デプロイキー経由)
coolify app create deploy-key \
--server-uuid <uuid> \
--project-uuid <uuid> \
--environment-name production \
--private-key-uuid <key-uuid> \
--git-repository "[email protected]:owner/repo.git" \
--git-branch main \
--build-pack nixpacks \
--ports-exposes 3000
Dockerfile から
coolify app create dockerfile \
--server-uuid <uuid> \
--project-uuid <uuid> \
--environment-name production \
--dockerfile "FROM node:20\nCOPY . .\nRUN npm install\nCMD [\"npm\", \"start\"]"
Docker イメージから
coolify app create dockerimage \
--server-uuid <uuid> \
--project-uuid <uuid> \
--environment-name production \
--docker-registry-image-name nginx \
--docker-registry-image-tag latest \
--ports-exposes 80
アプリケーションの更新
coolify app update <uuid> \
--name "New Name" \
--description "New description" \
--git-branch develop \
--git-repository "https://github.com/user/repo" \
--domains "app.example.com,www.example.com" \
--compose-domain web=https://web.example.com \
--build-command "npm run build" \
--start-command "npm start" \
--install-command "npm install" \
--base-directory "/app" \
--publish-directory "/app/dist" \
--dockerfile "FROM node:20..." \
--docker-image nginx \
--docker-tag latest \
--ports-exposes "3000,8080" \
--ports-mappings "3000:3000" \
--health-check-enabled \
--health-check-path "/health"
ドメインごとの内部ポート上書き(v4.3.15+)
アプリケーション、Docker Compose サービス、プレビュー環境で、ドメインごとに内部ポートを上書きできるようになりました。パブリック URL にはポートが表示されず、内部ルーティングでは指定したポートが使用されます。
# Via API: PATCH /api/v1/applications/{uuid}
# Use domains array with port_override field
curl -sS -X PATCH -H "Authorization: Bearer $COOLIFY_KEY" \
-H "Content-Type: application/json" \
-d '{
"domains": [
{"fqdn": "app.example.com", "port_override": 3000},
{"fqdn": "api.example.com", "port_override": 8080}
]
}' \
"$COOLIFY/applications/{uuid}"
# Note: The UI shows effective ports and warns about unrecognized ports
# Works with both Traefik and Caddy proxies
ライフサイクル管理
# Start application
coolify app start <uuid>
# Stop application
coolify app stop <uuid>
# Restart application
coolify app restart <uuid>
# Delete application
coolify app delete <uuid>
coolify app delete <uuid> -f # skip confirmation
# Move to another environment
coolify app move <uuid> --environment-uuid <env-uuid>
アプリケーションのログ
# Get logs
coolify app logs <uuid>
# Follow logs (like tail -f)
coolify app logs <uuid> -f
# Limit lines (or use 'all' / -1 for unlimited — v4.3.20+)
coolify app logs <uuid> -n 50
coolify app logs <uuid> -n all
# Show timestamps
coolify app logs <uuid> --show-timestamps
# Logs for specific Docker Compose service
coolify app logs <uuid> --service web
アプリケーションのタグ
# List tags
coolify app tag list <uuid>
# Add tag
coolify app tag add <uuid> <tag-name>
# Remove tag
coolify app tag remove <uuid> <tag-name>
アプリケーションの環境変数
# List all env vars
coolify app env list <uuid>
# Get specific env var
coolify app env get <uuid> <env_uuid_or_key>
# Create env var
coolify app env create <uuid> \
--key API_KEY \
--value secret123 \
--preview \
--build-time \
--runtime \
--comment "API key for external service" \
--is-literal \
--is-multiline
# Update env var
coolify app env update <uuid> <env_uuid_or_key> \
--value new-value \
--key NEW_KEY # optional, for renaming
# Delete env var
coolify app env delete <uuid> <env_uuid>
coolify app env delete <uuid> <env_uuid> --force
# Sync from .env file (updates existing, creates new, keeps others)
coolify app env sync <uuid> --file .env
coolify app env sync <uuid> --file .env.production --build-time --runtime --preview --is-literal
# short form also valid: -f .env
アプリケーションのストレージ
# List storages
coolify app storage list <uuid>
# Create persistent volume (named volume only — host_path removed in v4.3.22)
coolify app storage create <uuid> \
--type persistent \
--mount-path /data \
--name my-volume
# Create file mount
coolify app storage create <uuid> \
--type file \
--mount-path /app/config.json \
--content '{"key": "value"}'
# Create directory mount
coolify app storage create <uuid> \
--type file \
--mount-path /app/config \
--is-directory \
--fs-path /opt/config
# Update storage
coolify app storage update <uuid> \
--uuid <storage-uuid> \
--type persistent \
--is-preview-suffix-enabled
# Delete storage
coolify app storage delete <uuid> <storage-uuid>
アプリケーションのデプロイ
# List deployments
coolify app deployments list <uuid>
# Get deployment logs (latest)
coolify app deployments logs <uuid>
# Get specific deployment logs
coolify app deployments logs <uuid> <deployment-uuid>
# Follow deployment logs
coolify app deployments logs <uuid> -f
# Limit lines
coolify app deployments logs <uuid> -n 50
# Show debug logs
coolify app deployments logs <uuid> --debuglogs
アプリケーションのプレビュー
CLI v1.9.0 以降で CRUD 全般に対応しています(ログは v1.10.0 以降)。一覧表示/取得/作成には Coolify v4.4.0+ が必要です(create には deploy 権限を持つトークンが必要です)。
# List / get preview deployments
coolify app previews list <app_uuid>
coolify app previews get <app_uuid> <pr_id>
# Open (or redeploy) a preview and queue its deployment (aliases: open, deploy)
coolify app previews create <app_uuid> 42 --git-type github
coolify app previews create <app_uuid> 42 --git-type bitbucket --commit 1a2b3c4d
coolify app previews create <app_uuid> 42 --docker-tag pr-42 # Docker Image apps
coolify app previews create <app_uuid> 42 --git-type gitlab --no-deploy
# --git-type github|gitlab|gitea|bitbucket (not needed for GitHub App / GitLab App sources)
# --url <pr-url>, --force (rebuild without cache)
# Replace the domains of a preview (--domains and --compose-domain are mutually exclusive)
coolify app previews update <app_uuid> 42 --domains "pr-42.example.com"
coolify app previews update <app_uuid> 42 --compose-domain web=https://pr-42.example.com
coolify app previews update <app_uuid> 42 --domains "pr-42.example.com" --force-domain-override
# Runtime logs of a preview (v1.10.0+)
coolify app previews logs <app_uuid> 42
coolify app previews logs <app_uuid> 42 -n -1 --show-timestamps # -1 = all lines
coolify app previews logs <app_uuid> 42 -f --service web
# Delete preview deployment
coolify app previews delete <app_uuid> <pr_id>
coolify app previews delete <app_uuid> <pr_id> --force
# API equivalent for logs (v4.3.23+; token needs read:sensitive since v4.4.0): lines (int or "all"), timestamps (bool)
curl -sS -H "Authorization: Bearer $COOLIFY_KEY" \
"$COOLIFY/applications/{uuid}/previews/{pr_id}/logs?lines=100×tamps=true"
アプリケーションのシークレットマネージャー(v1.10.0+)
アプリケーションを外部シークレットマネージャー(Doppler、Infisical、HashiCorp Vault)に接続します。最初にインテグレーショントークンを作成し(シークレットマネージャーのインテグレーショントークンを参照)、環境変数の値で {{vault.KEY}} としてシークレットを参照してください。値はデプロイ時に解決され、Coolify には保存されません。
coolify app secret-manager set <app_uuid> --integration-token <token_uuid>
coolify app secret-manager set <app_uuid> --integration-token <token_uuid> \
--settings '{"mount":"secret","path":"apps/web"}'
# --settings per provider (JSON object):
# doppler {"project":"...","config":"..."} (required for service account tokens)
# infisical {"project_id":"...","environment":"...","secret_path":"/"}
# vault {"mount":"...","path":"..."}
データベース
一覧表示と表示
# List all databases
coolify database list
# Get database details
coolify database get <uuid>
データベースの作成
# Supported types: postgresql, mysql, mariadb, mongodb, redis, keydb, clickhouse, dragonfly, sqlite (v1.10.0+)
coolify database create postgresql \
--server-uuid <uuid> \
--project-uuid <uuid> \
--environment-name production \
--name mydb \
--description "Production database" \
--image postgres:16 \
--instant-deploy \
--is-public \
--public-port 5432 \
--limits-memory 2g \
--limits-cpus 2
# Database-specific flags available (postgres-user, mysql-root-password, etc.)
# Supports --tag and --tags for tagging
# SQLite (Coolify v4.4.0+, experimental) — no --is-public / --public-port
coolify database create sqlite \
--server-uuid <uuid> \
--project-uuid <uuid> \
--environment-name production \
--sqlite-databases app.db,cache.db
更新と削除
# Update database configuration
coolify database update <uuid> --name "New Name"
coolify database update <uuid> --sqlite-databases app.db,cache.db # SQLite only
# Delete database
coolify database delete <uuid> \
--delete-configurations \
--delete-volumes \
--docker-cleanup \
--delete-connected-networks
ライフサイクル管理
coolify database start <uuid>
coolify database stop <uuid>
coolify database restart <uuid>
coolify database logs <uuid>
coolify database move <uuid> --environment-uuid <env-uuid>
データベースのタグ
coolify database tag list <uuid>
coolify database tag add <uuid> <tag-name>
coolify database tag remove <uuid> <tag-name>
データベースの環境変数
# Same structure as app env commands
coolify database env list <uuid>
coolify database env get <uuid> <env_uuid_or_key>
coolify database env create <uuid> --key DB_DEBUG --value true
coolify database env update <uuid> <env_uuid_or_key> --value new-value
coolify database env delete <uuid> <env_uuid> --force
coolify database env sync <uuid> --file .env
データベースのストレージ
# Same structure as app storage commands
coolify database storage list <uuid>
coolify database storage create <uuid> --type persistent --mount-path /data
coolify database storage update <uuid> --uuid <storage-uuid> --type persistent
coolify database storage delete <uuid> <storage-uuid>
データベースのバックアップ
保持ストレージの単位:
--retention-max-storage-locally/--retention-max-storage-s3は float64 GB です(例:1または10)。1GB/10GBのような接尾辞は指定しないでください。v4.3.18+:S3 専用のボリュームアーカイブは S3 に直接ストリーミングされます(一時的なローカルディスクは不要です)。
v4.3.18+:スケジュールされたバックアップが X 日間実行されなかった場合のアラートを設定できます(
--alert-after-missing-daysを参照)。
# List backup configurations
coolify database backup list <uuid>
# Create backup configuration
coolify database backup create <uuid> \
--frequency "0 2 * * *" \
--enabled \
--save-s3 \
--s3-storage-uuid <uuid> \
--databases-to-backup "db1,db2" \
--dump-all \
--retention-amount-locally 10 \
--retention-days-locally 7 \
--retention-max-storage-locally 1 \
--retention-amount-s3 30 \
--retention-days-s3 30 \
--retention-max-storage-s3 10 \
--timeout 3600 \
--disable-local-backup
# Update backup configuration
coolify database backup update <uuid> <backup-uuid> --frequency "0 3 * * *"
# Delete backup configuration
coolify database backup delete <uuid> <backup-uuid>
# Trigger immediate backup
coolify database backup trigger <uuid> <backup-uuid>
# List backup executions
coolify database backup executions <uuid> <backup-uuid>
# Delete backup execution
coolify database backup delete-execution <uuid> <backup-uuid> <execution-uuid>
データベースのインポート(復元)— v1.10.0+
Coolify v4.4.0+ が必要です。start には、--file、--upload-id、--s3-storage-uuid と --s3-path の組み合わせ、または --server-path のうち、いずれか1つだけを指定してください。アップロードと開始には write 権限を持つトークンが必要です。--server-path には deploy 権限も必要です。ローカルファイルの最大サイズは 10 GiB です(10 MB 単位でアップロードされます)。
# Upload a local dump and import it, waiting for the result (non-zero exit on failure)
coolify database import start <database_uuid> --file ./dump.sql.gz --wait
# Two-step: upload first (prints an upload ID), then import
coolify database import upload <database_uuid> ./dump.sql.gz
coolify database import start <database_uuid> --upload-id <upload_id>
# From S3 storage or from a file already on the database's server
coolify database import start <database_uuid> --s3-storage-uuid <s3-uuid> --s3-path /backups/db.dump
coolify database import start <database_uuid> --server-path /path/on/server/db.dump
# Check status (activity ID is printed by start); --wait to follow, --poll-interval (default 3s)
coolify database import status <database_uuid> <activity_id> --wait
# Restore options
# --dump-all backup contains all databases
# --replace-existing PostgreSQL: drop matching objects first (old --clean behavior; off by default since v4.4.0)
# --keep-owners PostgreSQL: restore owners and privileges
# --restore-mysql-users MySQL/MariaDB all-databases: also restore users/passwords/privileges
# --sqlite-database app.db SQLite: target database file
サービス(ワンクリック)
一覧表示と表示
# List all services
coolify service list
# Get service details
coolify service get <uuid>
# List available service types
coolify service create --list-types
サービスの作成
# Examples: wordpress-with-mysql, ghost, n8n, etc.
coolify service create wordpress-with-mysql \
--server-uuid <uuid> \
--project-uuid <uuid> \
--environment-name production \
--name "My WordPress" \
--description "Company blog" \
--docker-compose "custom compose content" \
--destination-uuid <uuid> \
--instant-deploy \
--tag production \
--tags "blog,cms"
ライフサイクル管理
coolify service start <uuid>
coolify service stop <uuid>
coolify service restart <uuid>
coolify service delete <uuid>
coolify service move <uuid> --environment-uuid <env-uuid>
# Get logs (requires sub-service name)
coolify service logs <uuid> --sub-service-name wordpress
サービスのタグ
coolify service tag list <uuid>
coolify service tag add <uuid> <tag-name>
coolify service tag remove <uuid> <tag-name>
サービスアプリケーション(サブリソース)
# List applications in service
coolify service application list <service-uuid>
# Get application details
coolify service application get <service-uuid> <app-uuid>
# Update application
coolify service application update <service-uuid> <app-uuid>
# Get logs (-n/--lines, default 100 — v1.10.0+)
coolify service application logs <service-uuid> <app-uuid>
coolify service application logs <service-uuid> <app-uuid> -n 500
# Lifecycle
coolify service application start <service-uuid> <app-uuid>
coolify service application restart <service-uuid> <app-uuid>
coolify service application stop <service-uuid> <app-uuid>
サービスデータベース(サブリソース)
# List databases in service
coolify service database list <service-uuid>
# Get database details
coolify service database get <service-uuid> <db-uuid>
# Update database (image, log drain, public access)
coolify service database update <service-uuid> <db-uuid>
# Get logs
coolify service database logs <service-uuid> <db-uuid>
# Lifecycle
coolify service database start <service-uuid> <db-uuid>
coolify service database restart <service-uuid> <db-uuid>
coolify service database stop <service-uuid> <db-uuid>
# Import a backup into a service database (v1.10.0+, same source/option flags as `database import start`)
coolify service database import start <service-uuid> <db-uuid> \
--s3-storage-uuid <s3-uuid> --s3-path /backups/db.dump
coolify service database import upload <service-uuid> <db-uuid> ./dump.sql.gz
coolify service database import status <service-uuid> <db-uuid> <activity_id> --wait
サービス環境変数
# Same structure as app env (without --preview)
coolify service env list <uuid>
coolify service env get <uuid> <env_uuid_or_key>
coolify service env create <uuid> --key KEY --value value --build-time --runtime
coolify service env update <uuid> <env_uuid_or_key> --value new-value
coolify service env delete <uuid> <env_uuid> --force
coolify service env sync <uuid> --file .env --build-time --runtime
サービスストレージ
coolify service storage list <uuid>
# Requires --resource-uuid (app or db that owns the storage)
coolify service storage create <uuid> \
--resource-uuid <app-or-db-uuid> \
--type persistent \
--mount-path /data
coolify service storage update <uuid> --uuid <storage-uuid> --type persistent
coolify service storage delete <uuid> <storage-uuid>
デプロイ
リソースをデプロイする
# Deploy by UUID
coolify deploy uuid <uuid>
coolify deploy uuid <uuid> --force
coolify deploy uuid <uuid> --pull-request-id 123
coolify deploy uuid <uuid> --docker-tag 1.2.3 # requires Coolify 4.0.0-beta.471+
# Deploy by name (easier)
coolify deploy name my-application
coolify deploy name my-application --force
# Deploy multiple at once
coolify deploy batch api,worker,frontend
coolify deploy batch api,worker --force
デプロイを監視する
# List all deployments
coolify deploy list
# Get deployment details
coolify deploy get <deployment-uuid>
# Cancel deployment
coolify deploy cancel <deployment-uuid>
coolify deploy cancel <deployment-uuid> -f
サーバー
一覧表示と詳細表示
# List all servers
coolify server list
coolify servers list # alias
# Get server details
coolify server get <uuid>
# List resources deployed on the server (v1.9.0+ shape)
coolify server get <uuid> --resources
coolify server get <uuid> --resources --format json | jq -r '.[] | "\(.type)\t\(.name)\t\(.status)"'
# Since CLI v1.9.0 this calls GET /servers/{uuid}/resources and returns a flat JSON array of
# {id, uuid, name, type, status, created_at, updated_at} — it no longer prints the server
# details, and there is no top-level `resources` key (old: GET /servers/{uuid}?resources=true).
# Get server domains
coolify server domains <uuid>
追加と削除
# Add new server
coolify server add <name> <ip> <private_key_uuid>
coolify server add myserver 192.168.1.100 <key-uuid> -p 22 -u root --validate
coolify server add builder 192.168.1.101 <key-uuid> --server-role build # v1.9.0+
# Update a server (only the given flags change)
coolify server update <uuid> --server-role deployment # deployment|build|both
# 'deployment' requires another usable build server in the team.
# --is-build-server is deprecated (true → build, false → both) and cannot be combined with --server-role.
# Other flags: --name, --description, --ip, --port, --user, --private-key-uuid, --proxy-type, ...
# Remove server
coolify server remove <uuid>
coolify server remove <uuid> --force # also delete all resources on it (v1.9.0+)
coolify server remove <uuid> --force --delete-from-provider # also delete the VM at Hetzner/Vultr/DigitalOcean — irreversible
# Validate server connection
coolify server validate <uuid>
サーバーの Docker レジストリ(v1.9.0+)
Coolify v4.4.0+ が必要です。Coolify はサーバー上で docker login を実行し、パスワードを保存しません。パスワードフラグはありません。--password-stdin でパイプするか、入力内容が表示されないプロンプトで入力してください。
# List registry logins and which resources use them (token needs read:sensitive; -s shows usernames)
coolify server registry list <server_uuid>
# Log in on one or more servers
echo "$GHCR_TOKEN" | coolify server registry login <server_uuid> \
--registry ghcr.io --username octocat --password-stdin
coolify server registry login <uuid_1> <uuid_2> --registry registry.example.com:5000 -u deploy
# Check that a saved login still works / log out
coolify server registry check <server_uuid> ghcr.io
coolify server registry logout <server_uuid> ghcr.io -f
サーバーのデスティネーション
# List destinations
coolify server destinations list <server-uuid>
# Create destination
coolify server destinations create <server-uuid>
クラウドプロバイダー
# List provider options and provision servers
coolify server hetzner
coolify server digitalocean
coolify server vultr
# Optional: pass --cloud-init '<yaml>' on create (see Cloud-init Scripts)
GitHub アプリ
# List all GitHub Apps
coolify github list
# Get GitHub App details
coolify github get <app-uuid>
# Create GitHub App integration
coolify github create \
--name "My GitHub App" \
--api-url "https://api.github.com" \
--html-url "https://github.com" \
--app-id 123456 \
--installation-id 789012 \
--client-id "Iv1.abc123" \
--client-secret "secret" \
--private-key-uuid <key-uuid> \
--organization "my-org" \
--custom-user git \
--custom-port 22 \
--webhook-secret "webhook-secret" \
--system-wide # cloud only
# Update GitHub App
coolify github update <app-uuid>
# Delete GitHub App
coolify github delete <app-uuid>
coolify github delete <app-uuid> -f
# List accessible repositories
coolify github repos <app-uuid>
# List branches for a repository
coolify github branches <app-uuid> owner/repo
GitLab アプリ
GitLab アプリの統合(エイリアス:gl、gitlab-app、gitlab-apps)。
# List / get
coolify gitlab list
coolify gitlab get <app_id_or_uuid>
# Create
coolify gitlab create \
--name "My GitLab App" \
--html-url "https://gitlab.com" \
--client-id "<oauth-app-id>" \
--client-secret "<oauth-secret>" \
--redirect-uri "https://<coolify-host>/webhooks/source/gitlab/events/app" \
--api-url "https://gitlab.com/api/v4" \
--custom-user git \
--custom-port 22 \
--group-name "my-group" \
--webhook-token "<optional-secret>"
# Update / delete (must not be used by any applications)
coolify gitlab update <app_id_or_uuid> --name "Renamed"
coolify gitlab delete <app_id_or_uuid>
coolify gitlab delete <app_id_or_uuid> -f
GitLab アプリからアプリケーションを作成する
Coolify 4.3.23 で確認済みで、4.4.6 でも引き続き同じです(private-gitlab-app ルートはありません)。API は OAuth ソースを作成します。そのソースに紐付けられたアプリケーションは、「Git Repository (with GitLab App)」から UI を使って作成します。
POST /api/v1/gitlab-apps はソース(name、html_url、認証情報)のみを保存します。POST /api/v1/applications/private-gitlab-app はなく、このルートは 404 を返します。アプリケーションの作成に使用できるエンドポイントは次のとおりです。
POST /api/v1/applications/publicPOST /api/v1/applications/private-github-app(github_app_uuid)POST /api/v1/applications/private-deploy-key(private_key_uuid)POST /api/v1/applications/dockerfilePOST /api/v1/applications/dockerimage
UI でアプリケーションを作成すると、source_type は App\Models\GitlabApp になり、source_id はソースの数値 ID になります。その後は、API から通常どおり編集できます。PATCH /api/v1/applications/{uuid}、環境変数、ストレージを使用します。
build_pack が dockercompose の場合、domains は「The domains field cannot be used for dockercompose applications」というエラーで拒否されます。最初にパックを変更して(build_pack: dockerfile、dockerfile_location、ports_exposes)、その後で domains を送信してください。custom_labels を生成する最初のデプロイより前に ports_exposes を定義してください。後からポートを変更しても Traefik ラベルは再生成されません。
Coolify は GitLab プロジェクトに Webhook を作成しません。プッシュをトリガーとするデプロイには、ソースの Webhook トークンを指定した POST /webhooks/source/gitlab/events のプロジェクトフックが必要です。UI では Git アプリがこれを管理するように案内されますが、コード内に POST /api/v4/projects/:id/hooks の呼び出しはありません(issue coollabsio/coolify#11602)。
通知
チャンネル:email、discord、slack、telegram、pushover、webhook。get/update と --json で設定します。
coolify notification get webhook
coolify notification update webhook --json '{"webhook_enabled":true}'
coolify notification get discord
coolify notification update slack --json '{"slack_enabled":true}'
共有環境変数
環境、プロジェクト、サーバー、チームのスコープで共有環境変数を管理します(shared-envs/sharedenv エイリアス)。
# Environment scope
coolify shared-env environment list <project_uuid> <environment>
coolify shared-env environment create <project_uuid> production \
--key SHARED_API_URL --value "https://api.example.com"
coolify shared-env environment update <project_uuid> production <id> --value "https://api.new.example.com"
coolify shared-env environment delete <project_uuid> production <id>
# Project scope
coolify shared-env project list <project_uuid>
coolify shared-env project create <project_uuid> --key PROJECT_FLAG --value "1"
coolify shared-env project update <project_uuid> <id> --value "0"
coolify shared-env project delete <project_uuid> <id>
# Server scope
coolify shared-env server list <server_uuid>
coolify shared-env server create <server_uuid> --key NODE_ROLE --value "worker"
coolify shared-env server update <server_uuid> <id> --value "api"
coolify shared-env server delete <server_uuid> <id>
# Team scope
coolify shared-env team list
coolify shared-env team create --key ORG_NAME --value "acme"
coolify shared-env team update <id> --value "acme-corp"
coolify shared-env team delete <id>
作成/更新時に使用できるオプションのフラグ:--comment、--literal、--multiline、--shown-once。
Cloud-init スクリプト
再利用可能な cloud-init スクリプトの CRUD を行います。Hetzner/DigitalOcean/Vultr でのサーバー作成では、--cloud-init(インライン YAML)を使用できます。
coolify cloud-init list
coolify cloud-init get <uuid>
coolify cloud-init create --name bootstrap --script-file ./cloud-init.yaml
# or: --script "#!/bin/bash\necho hi"
coolify cloud-init update <uuid> --name bootstrap-v2 --script-file ./cloud-init-v2.yaml
coolify cloud-init delete <uuid>
# Attach when provisioning (example)
coolify server hetzner create \
--cloud-token <cloud-token-uuid> \
--location <location> \
--server-type <type> \
--image <id> \
--cloud-init "$(cat ./cloud-init.yaml)"
エイリアス:cloudinit、cloud-init-script。
設定(メール)
インスタンス全体に適用される SMTP/Resend 設定です。write:sensitive を持つルートチームの管理者/オーナートークンが必要です。
coolify settings email get
# Update fields via JSON
coolify settings email update --json '{"smtp_ehlo_domain":"coolify.example.com"}'
# Reset EHLO domain to system default
coolify settings email update --json '{"smtp_ehlo_domain":null}'
シークレットマネージャーの統合トークン
v1.10.0+/Coolify v4.4.0+。プロバイダー:doppler、infisical、vault。プロバイダートークン用のフラグはなく、表示されることもありません。--provider-token-stdin でパイプするか、COOLIFY_INTEGRATION_TOKEN を設定するか、入力内容が表示されないプロンプトで入力してください。
echo "$DOPPLER_TOKEN" | coolify integration-token create \
--provider doppler --name prod --provider-token-stdin
# Infisical / Vault need --metadata
# infisical {"base_url":"...","client_id":"..."}
# vault {"base_url":"...","namespace":"..."} (namespace optional)
echo "$VAULT_TOKEN" | coolify integration-token create \
--provider vault --name vault --provider-token-stdin \
--metadata '{"base_url":"https://vault.example.com"}'
その後、coolify app secret-manager set を使用してアプリに関連付けます(「Applications」を参照)。
監査ログ
v1.10.0+/Coolify v4.4.0+。監査イベントを読み取れるのはチームの管理者とオーナーのみです(新しい順)。
coolify audit list
coolify audit list --source api --per-page 50
coolify audit list --action deleted --search my-app --page 2
coolify audit list --format json
# --per-page 1-100 (default 25), --page (default 1), --search <text>
# --action created|updated|deleted|... (all = every action)
# --source all|ui|api|mcp|webhook|system|scheduler
# Actor e-mail, token, metadata, changes, IP and user agent are returned only for
# tokens with read:sensitive — use --format json to see them.
タグ
# List all tags for current team
coolify tag list
デスティネーション
# List Docker network destinations
coolify destination list
coolify destination list --server <server-uuid>
# Get destination
coolify destination get <uuid>
# Create destination
coolify destination create --server <uuid> --network my-network --type standalone
# Types: standalone, swarm
# Delete unused destination
coolify destination delete <uuid>
クラウドプロバイダートークン
# Manage Hetzner, DigitalOcean, Vultr API tokens
coolify cloud-token list
coolify cloud-token get <uuid>
coolify cloud-token create
coolify cloud-token update <uuid>
coolify cloud-token delete <uuid>
coolify cloud-token validate <uuid>
# Note: Token values redacted by default. Use --show-sensitive with sensitive-data permission
チーム
# List all teams
coolify team list
# Get team details
coolify team get <team_id>
# Get current team
coolify team current
# Allow/deny build fallback to the deployment server when no build server is usable (v1.10.0+)
coolify teams update --build-server-fallback
coolify teams update --build-server-fallback=false
# List team members
coolify team members list
coolify team members list <team_id>
秘密鍵
# Commands: private-key, private-keys, key, keys (aliases)
# List all private keys
coolify private-key list
# Add new private key (content or file path)
coolify private-key add <key_name> <private_key_or_file>
coolify private-key add mykey ~/.ssh/id_rsa
coolify private-key add mykey "-----BEGIN OPENSSH PRIVATE KEY-----..."
# Remove private key
coolify private-key remove <uuid>
REST API 操作
CLI を利用できない場合の直接 API アクセス:
認証
COOLIFY_KEY=$(sed -n 's/^COOLIFY_KEY=//p' .env)
COOLIFY=$(sed -n 's/^COOLIFY=//p' .env) # includes /api/v1
# Test connection
curl -sS -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/version"
アプリケーション(API)
# List
curl -sS -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/applications"
# Get details
curl -sS -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/applications/{uuid}"
# Start (POST required since v4.2.0)
curl -sS -X POST -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/applications/{uuid}/start"
curl -sS -X POST -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/applications/{uuid}/start?force=true"
# Stop
curl -sS -X POST -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/applications/{uuid}/stop"
# Restart
curl -sS -X POST -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/applications/{uuid}/restart"
データベース(API)
curl -sS -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/databases"
curl -sS -X POST -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/databases/{uuid}/start"
curl -sS -X POST -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/databases/{uuid}/stop"
curl -sS -X POST -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/databases/{uuid}/restart"
サービス(API)
curl -sS -X POST -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/services/{uuid}/restart"
curl -sS -X POST -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/services/{uuid}/restart?latest=true"
デプロイメント(API)
# List all ongoing
curl -sS -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/deployments"
# List for application
curl -sS -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/deployments/applications/{uuid}?skip=0&take=10"
サーバー(API)
curl -sS -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/servers"
curl -sS -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/servers/{uuid}"
# Resources deployed on a server (flat array)
curl -sS -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/servers/{uuid}/resources"
# Registry logins (v4.4.0+)
curl -sS -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/servers/{uuid}/registries"
プレビュー、インポート、監査(API、v4.4.0+)
curl -sS -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/applications/{uuid}/previews"
curl -sS -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/applications/{uuid}/previews/{pr_id}"
curl -sS -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/databases/{uuid}/imports/{activity_id}"
curl -sS -H "Authorization: Bearer $COOLIFY_KEY" "$COOLIFY/audit-events"
# Service databases: /services/{uuid}/databases/{database_uuid}/imports
マルチインスタンス環境
複数の Coolify インスタンス(例:別々のサーバー上の本番環境、ステージング環境、開発環境)を運用する場合は、混乱を避けるために次の規則に従ってください。
環境変数の命名
インスタンスを区別するために、接尾辞付きの変数名を使用します。
# .env structure for multi-instance
COOLIFY_KEY_PROD=3|abc... # Production instance token
COOLIFY_PROD=https://cool.prod.example.com/api/v1
COOLIFY_KEY_STAGING=5|def... # Staging instance token
COOLIFY_STAGING=https://cool.staging.example.com/api/v1
COOLIFY_KEY_DEV=2|ghi... # Dev instance token
COOLIFY_DEV=https://cool.dev.example.com/api/v1
マルチインスタンス向け CLI コンテキストの設定
# Add all instances as named contexts
coolify context add prod https://cool.prod.example.com "$COOLIFY_KEY_PROD"
coolify context add staging https://cool.staging.example.com "$COOLIFY_KEY_STAGING"
coolify context add dev https://cool.dev.example.com "$COOLIFY_KEY_DEV"
# Set default (usually prod)
coolify context set-default prod
# Always verify which context is active before operations
coolify context list
アプリをホストしているインスタンスの確認
特定のアプリケーションをどのインスタンスがホストしているかわからない場合:
# Search across all contexts
for ctx in prod staging dev; do
echo "=== $ctx ==="
coolify --context=$ctx app list --format json 2>/dev/null | \
jq -r '.[] | "\(.name) | \(.fqdn // "no-fqdn")"' | \
grep -i "your-app-name" || echo "(not found)"
done
デプロイ失敗の診断
クイック診断ワークフロー
# 1. List recent deployments for the app
coolify app deployments list <app-uuid> --format json | jq '.[0:3]'
# 2. Check status of latest deployment
coolify app deployments list <app-uuid> --format json | jq '.[0] | {status, commit, finished_at}'
# 3. Get deployment logs (latest)
coolify app deployments logs <app-uuid>
# 4. Get detailed debug logs (shows Docker build output)
coolify app deployments logs <app-uuid> --debuglogs
# 5. Get logs for specific deployment
coolify app deployments logs <app-uuid> <deployment-uuid> --debuglogs
よくあるビルド失敗
YAML Frontmatter の解析エラー(Astro/MDX サイト)
incomplete explicit mapping pair; a key node is missed
原因: YAML Frontmatter の値に、引用符で囲まれていないコロン(:)が含まれています。
# WRONG - colon breaks YAML parser
description: Install this tool: it's great
# CORRECT - quote the value
description: "Install this tool: it's great"
npm ci/npm install の失敗
npm ERR! Could not resolve dependency
原因: ロックファイルの不一致、または依存関係の不足です。
# Fix locally, then push
rm -rf node_modules package-lock.json
npm install
git add package-lock.json
git commit -m "fix: regenerate lock file"
git push
Dockerfile のビルド失敗
ERROR: failed to solve: process "/bin/sh -c npm run build" did not complete successfully
原因: コンテナ内でビルドコマンドが失敗しています。実際の失敗原因を確認するには、エラーの前にある行を確認してください(多くの場合、Docker ではなくコードや設定の問題です)。
ヘルスチェックのタイムアウト
Healthcheck failed after X attempts
原因: アプリが設定されたヘルスチェックのパス/ポートで時間内に応答しませんでした。
# Check health check config
coolify app get <uuid> --format json | jq '{health_check_enabled, health_check_path, health_check_port}'
# Common fixes:
# - Increase start period in Coolify UI
# - Verify the health check path returns 200
# - Check if app binds to 0.0.0.0, not 127.0.0.1
デプロイログ JSON の解釈
デプロイメント JSON の logs フィールドには、ログエントリの配列が含まれています。
# Extract just error messages
coolify app deployments list <uuid> --format json | \
jq -r '.[0].logs' | jq -r '.[] | select(.type == "stderr") | .output'
# Find the actual failure point
coolify app deployments list <uuid> --format json | \
jq -r '.[0].logs' | jq -r '.[] | select(.output | test("error|ERROR|failed|FAILED"; "i")) | .output'
トラブルシューティング
エラー:405 Method Not Allowed(v4.2.0+)
状態を変更するエンドポイントには POST メソッドが必要です。
# WRONG
curl -sS "$COOLIFY/applications/{uuid}/start"
# CORRECT
curl -sS -X POST "$COOLIFY/applications/{uuid}/start"
対象のエンドポイント:/start、/stop、/restart、/enable、/disable
エラー:403「You are not allowed to access the API」
<INSTANCE_URL>/settings/advancedで API が有効になっていることを確認します- IP 許可リストを確認します
- メンバーのロールは読み取り専用です(v4.2.0+) — 書き込みアクセスには、より高いロールに昇格させます
- ダッシュボード → セキュリティ → API トークンでトークンを再生成します
エラー:401「Unauthenticated」
# Verify Bearer prefix
Authorization: Bearer YOUR_TOKEN
# CLI: verify context
coolify context verify
エラー:永続ストレージで host_path を指定すると 400(v4.3.22+)
host_path は永続ボリュームから削除されました。API はこれを含むリクエストを拒否します。
# WRONG (v4.3.22+)
--host-path /opt/data # ❌ Rejected
# CORRECT: use named volumes only
--name my-volume
エラー:環境変数名が無効(v4.3.15+)
ビルド開始前に、ビルド時の環境変数名が検証されるようになりました。無効な名前は、具体的なエラーメッセージとともに拒否されます。
# WRONG
MY-VAR=value # Hyphens not allowed
2NDVAR=value # Cannot start with number
# CORRECT
MY_VAR=value
SECOND_VAR=value
再起動上限に到達 — コンテナが表示されない(v4.3.15 で修正)
修正済み:再起動上限に達した後も、停止したコンテナが表示されるようになりました。利用可能な操作:デプロイの再試行、コンテナの削除。
GitLab App で API 経由のアプリケーション作成ができない
Coolify 4.3.x では、POST /applications/private-gitlab-app は 404 を返します。GitLab App を使って UI からアプリケーションを作成し、その後 PATCH /applications/{uuid} で編集してください。build_pack=dockercompose の場合は、domains ではなく docker_compose_domains を使用してください。詳細は「GitLab Apps」セクションを参照してください。
エラー:context verify で 404
# CLI context: URL WITHOUT /api/v1
coolify context add my-coolify http://192.168.1.100:8000 "$TOKEN"
# Direct API: URL WITH /api/v1
COOLIFY=http://192.168.1.100:8000/api/v1
パイプ(|)を含むトークンでシェルが動作しない
# WRONG
source .env
# CORRECT
COOLIFY_KEY=$(sed -n 's/^COOLIFY_KEY=//p' .env)
DNS 解決の失敗(v4.3.22+ のフォールバック)
設定された DNS リゾルバーがアドレスレコードを返さない場合、Coolify はシステムの DNS リゾルバーに自動的にフォールバックするようになりました。
大きな Cookie ヘッダーによる HTTP 400(v4.3.18 で修正)
nginx のリクエストヘッダーバッファーが増加されました。古いバージョンを使用している場合、大きな Cookie ヘッダーにより、Coolify に到達する前に HTTP 400 が返されることがあります。
よくあるワークフロー
新しいアプリケーションのデプロイ
# 1. Setup context
coolify context add prod https://coolify.example.com "$TOKEN" --default
coolify context verify
# 2. List servers
coolify server list
# 3. Create application
coolify app create public \
--server-uuid <server-uuid> \
--project-uuid <project-uuid> \
--environment-name production \
--git-repository "https://github.com/user/repo" \
--git-branch main \
--build-pack nixpacks \
--ports-exposes 3000 \
--instant-deploy
# 4. Monitor deployment
coolify app deployments logs <uuid> -f
マルチ環境のセットアップ
# Add contexts
coolify context add prod https://prod.coolify.io "$PROD_TOKEN" --default
coolify context add staging https://staging.coolify.io "$STAGING_TOKEN"
coolify context add dev https://dev.coolify.io "$DEV_TOKEN"
# Use different contexts
coolify --context=prod app list
coolify --context=staging deploy name api
coolify --context=dev resource list
一括デプロイ
# Deploy multiple services at once
coolify deploy batch api,worker,frontend --force
# Monitor
coolify deploy list
スケジュールされたバックアップを使用するデータベース
# Create database
coolify database create postgresql \
--server-uuid <uuid> \
--project-uuid <uuid> \
--environment-name production \
--name mydb \
--instant-deploy
# Configure backup
coolify database backup create <db-uuid> \
--frequency "0 2 * * *" \
--enabled \
--retention-days-locally 7 \
--save-s3 \
--s3-storage-uuid <s3-uuid>
ファイルからの環境変数の設定
# Sync .env file (updates existing, creates new, keeps others)
coolify app env sync <uuid> --file .env.production --build-time --runtime
# Restart to apply
coolify app restart <uuid>
LLM / AI エージェントとの連携
Coolify CLI を使用する AI エージェント向け(このスキルが対象とする v1.10.0 の固定を推奨):
- クイックガイド(タグ):https://raw.githubusercontent.com/coollabsio/coolify-cli/v1.10.0/llms.txt
- コマンドカタログ全文(タグ):https://raw.githubusercontent.com/coollabsio/coolify-cli/v1.10.0/llms-full.txt
- main の最新版:https://raw.githubusercontent.com/coollabsio/coolify-cli/main/llms.txt および
llms-full.txt
参考資料
- CLI GitHub: https://github.com/coollabsio/coolify-cli
- CLI リリース: https://github.com/coollabsio/coolify-cli/releases
- CLI v1.10.0 タグ: https://github.com/coollabsio/coolify-cli/tree/v1.10.0 (
e1d60947fc66c194d256b1049fd69c1ddf819760) - Coolify v4.4.0 リリースノート: https://github.com/coollabsio/coolify/releases/tag/v4.4.0
- Coolify リリース: https://github.com/coollabsio/coolify/releases
- 公式ドキュメント: https://coolify.io/docs
- API リファレンス: https://coolify.io/docs/api-reference
- Coolify Core: https://github.com/coollabsio/coolify
変更履歴
v3.2 (2026-10-19)
- coolify-cli v1.10.0(
e1d6094)と Coolify v4.4.6 に固定 app previews list/get/create/update/logsを追加(プレビューの完全な CRUD とランタイムログ)database import start/upload/statusとservice database import ...を追加(ファイル、アップロード、S3、サーバーパスからの復元)audit list、integration-token create、app secret-manager set(Doppler/Infisical/Vault)を追加server registry list/login/check/logout、server remove --force/--delete-from-provider、server add/updateに--server-roleを追加- 新しい
server get --resourcesの形式(GET /servers/{uuid}/resourcesからのフラット配列)を記載 sqliteデータベースタイプ、teams update --build-server-fallback、project environments get、service application logs -nを追加- Coolify v4.4.x の変更(シークレットマネージャー、監査ログ、サーバーロール、復元のデフォルト設定、レジストリログイン)を追加
v3.1 (2026-09-22)
- Coolify v4.3.23 に対応するよう更新
- 破壊的変更を記載:
host_pathの削除(v4.3.22)、Sentinel の必須化(v4.3.19)、再起動制限のオプトイン化(v4.3.21) - ドメインごとの内部ポート上書き(v4.3.15 以降)を追加
- プレビュー環境のデプロイにおけるランタイムログのエンドポイントを追加(v4.3.23)
- ログ API に
lines=allパラメーターを追加(v4.3.20) - バックアップのドキュメントを更新:S3 ストリーミング、バックアップ欠落アラート(v4.3.18)
- トラブルシューティング項目を追加:host_path の拒否、環境変数の検証、DNS フォールバック
- CLI v1.8.0 の主な変更:トークンの秘匿化、SMTP/Resend 設定、保持ストレージの数値
v3.0 (2026-09-19)
- CLI v1.8.0 に固定した初回の v3 リリース