Coolify API expert for self-hosted PaaS management. Use when users need to deploy apps, manage databases, or configure servers on Coolify.
/plugin marketplace add leobrival/topographic-studio-plugins/plugin install dev@topographic-plugins-officialThis skill inherits all available tools. When active, it can use any tool Claude has access to.
reference/api-reference.mdreference/common-patterns.mdreference/troubleshooting.mdCoolify is a self-hosted Platform-as-a-Service (PaaS) that simplifies deploying applications, databases, and services. This guide provides essential workflows and quick references for managing Coolify via REST API.
# Set environment variables
export COOLIFY_URL="http://your-coolify-ip:8000"
export COOLIFY_TOKEN="your-api-token"
# Test authentication
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/version"
# Check system health
curl "$COOLIFY_URL/api/health"
# List all applications
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/applications"
# List all servers
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/servers"
Authentication Setup:
# Complete deployment workflow
# 1. Create project
curl -X POST \
-H "Authorization: Bearer $COOLIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "my-project"}' \
"$COOLIFY_URL/api/v1/projects"
# 2. Deploy application
curl -X POST \
-H "Authorization: Bearer $COOLIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"project_uuid": "project-uuid",
"environment_name": "production",
"server_uuid": "server-uuid",
"destination_uuid": "destination-uuid",
"type": "public",
"name": "my-app",
"git_repository": "https://github.com/user/repo",
"git_branch": "main",
"build_pack": "nixpacks",
"ports_exposes": "3000"
}' \
"$COOLIFY_URL/api/v1/applications"
# 3. Add environment variables
curl -X POST \
-H "Authorization: Bearer $COOLIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"key": "NODE_ENV", "value": "production"}' \
"$COOLIFY_URL/api/v1/applications/{app-uuid}/environment-variables"
# 4. Start application
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/applications/{app-uuid}/start"
# 5. Check logs
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/applications/{app-uuid}/logs"
# Deploy from private repository using GitHub App
# 1. Register GitHub App
curl -X POST \
-H "Authorization: Bearer $COOLIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "my-github-app",
"app_id": 123456,
"installation_id": 654321,
"client_id": "client-id",
"client_secret": "client-secret",
"private_key": "-----BEGIN RSA PRIVATE KEY-----\n..."
}' \
"$COOLIFY_URL/api/v1/github-apps"
# 2. Create application with GitHub App
curl -X POST \
-H "Authorization: Bearer $COOLIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"project_uuid": "project-uuid",
"environment_name": "production",
"server_uuid": "server-uuid",
"destination_uuid": "destination-uuid",
"type": "private-gh-app",
"name": "my-private-app",
"github_app_uuid": "gh-app-uuid",
"git_repository": "user/private-repo",
"git_branch": "main",
"build_pack": "nixpacks",
"ports_exposes": "3000"
}' \
"$COOLIFY_URL/api/v1/applications"
# Create database with automated backup configuration
# 1. Create PostgreSQL database
curl -X POST \
-H "Authorization: Bearer $COOLIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"project_uuid": "project-uuid",
"environment_name": "production",
"server_uuid": "server-uuid",
"destination_uuid": "destination-uuid",
"type": "postgresql",
"name": "production-db",
"postgres_user": "app",
"postgres_password": "secure-password",
"postgres_db": "myapp"
}' \
"$COOLIFY_URL/api/v1/databases"
# 2. Configure daily backups at 2 AM, keep 14 days
curl -X PATCH \
-H "Authorization: Bearer $COOLIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"frequency": "0 2 * * *",
"number_of_backups_to_keep": 14
}' \
"$COOLIFY_URL/api/v1/databases/{db-uuid}/backup"
# 3. Start database
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/databases/{db-uuid}/start"
# Deploy pre-built Docker image from registry
curl -X POST \
-H "Authorization: Bearer $COOLIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"project_uuid": "project-uuid",
"environment_name": "production",
"server_uuid": "server-uuid",
"destination_uuid": "destination-uuid",
"type": "docker-image",
"name": "my-image-app",
"docker_image": "nginx:latest",
"ports_exposes": "80"
}' \
"$COOLIFY_URL/api/v1/applications"
# Trigger deployment from CI/CD pipeline
# Deploy by tag
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/deployments/deploy?tag=v1.2.3"
# Deploy by application UUID
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/deployments/deploy?uuid={app-uuid}"
When to use which approach:
type: public with git_repository URLtype: private-gh-app) or deploy key (type: private-deploy-key)type: docker-image with docker_image nametype: dockerfile with Dockerfile contenttype: docker-compose with compose YAML/api/v1/databases with database type (postgresql, mysql, redis, mongodb, etc.)/api/v1/deployments/deploy with tag or UUID# List variables
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/applications/{app-uuid}/environment-variables"
# Add single variable
curl -X POST \
-H "Authorization: Bearer $COOLIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"key": "DATABASE_URL",
"value": "postgres://user:pass@host:5432/db",
"is_build_time": false
}' \
"$COOLIFY_URL/api/v1/applications/{app-uuid}/environment-variables"
# Bulk update variables
curl -X PATCH \
-H "Authorization: Bearer $COOLIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"variables": [
{"key": "VAR1", "value": "value1"},
{"key": "VAR2", "value": "value2"}
]
}' \
"$COOLIFY_URL/api/v1/applications/{app-uuid}/environment-variables/bulk"
# Restart after changes
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/applications/{app-uuid}/restart"
# Start application
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/applications/{app-uuid}/start"
# Stop application
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/applications/{app-uuid}/stop"
# Restart application
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/applications/{app-uuid}/restart"
# View logs
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/applications/{app-uuid}/logs"
# List deployments
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/applications/{app-uuid}/deployments"
# List all servers
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/servers"
# Get server details
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/servers/{server-uuid}"
# Validate server connectivity
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/servers/{server-uuid}/validate"
# List server resources
curl -H "Authorization: Bearer $COOLIFY_TOKEN" \
"$COOLIFY_URL/api/v1/servers/{server-uuid}/resources"
Common Issues:
401 Unauthorized
Application won't start
Build fails
Git repository access denied
Database won't start
For detailed troubleshooting steps, see the Troubleshooting Guide.
Load as needed for detailed information:
API Reference - Complete REST API endpoint documentation with all request/response formats, authentication details, and HTTP status codes. Use when you need exact API syntax for any Coolify operation.
Common Patterns - Real-world deployment patterns including multi-environment setups, CI/CD integration, database backups, and shell helper functions. Use for implementing complete workflows or automation scripts.
Troubleshooting Guide - Detailed error messages, diagnosis steps, and solutions for authentication, deployment, server, database, and API issues. Use when encountering errors or unexpected behavior.
When to use each reference:
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.