### Start Coolify Development Server Source: https://github.com/vignesh-oai/arp/blob/main/CONTRIBUTING.md Run this command in the local Coolify directory to start the development server. Leave the terminal open during development. Use `sudo` if permission errors occur. ```bash spin up ``` ```bash sudo spin up ``` -------------------------------- ### Verify Docker and Spin Installation Source: https://github.com/vignesh-oai/arp/blob/main/CONTRIBUTING.md Run these commands in your terminal to confirm that Docker and Spin have been installed correctly. This is a crucial step before proceeding with development. ```bash docker --version spin --version ``` -------------------------------- ### Install Coolify Source: https://context7.com/vignesh-oai/arp/llms.txt Installs Coolify on a Linux server using a curl command. Supports installing the latest version, a specific version, or a nightly build. ```bash # Install Coolify (self-hosted) curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash ``` ```bash # Install a specific version curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash -s 4.0.0-beta.332 ``` ```bash # Install nightly build curl -fsSL https://cdn.coollabs.io/coolify-nightly/install.sh | bash -s next ``` -------------------------------- ### Run Development Server with Composer Source: https://github.com/vignesh-oai/arp/blob/main/AGENTS.md An alternative command to start the development server, useful for resolving Vite manifest errors. ```bash composer run dev ``` -------------------------------- ### Install Stable Coolify Source: https://github.com/vignesh-oai/arp/blob/main/RELEASE.md Use this command to install the latest stable version of Coolify. This is recommended for production environments. ```bash curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash ``` -------------------------------- ### Develop with Vite Source: https://github.com/vignesh-oai/arp/blob/main/AGENTS.md Run this command to start the Vite development server. This is often a solution for Vite manifest errors. ```bash npm run dev ``` -------------------------------- ### Install Nightly Coolify Source: https://github.com/vignesh-oai/arp/blob/main/RELEASE.md Install the latest nightly build of Coolify using this command. This version is suitable for testing the newest features and changes. ```bash curl -fsSL https://cdn.coollabs.io/coolify-nightly/install.sh | bash -s next ``` -------------------------------- ### Frontend Development Server Source: https://github.com/vignesh-oai/arp/blob/main/CLAUDE.md Start the Vite development server for frontend development. Use 'npm run build' for a production-ready build. ```bash npm run dev # vite dev server ``` ```bash npm run build # production build ``` -------------------------------- ### Start / Stop / Restart a database Source: https://context7.com/vignesh-oai/arp/llms.txt Allows starting, stopping, or restarting a specific database instance. ```APIDOC ## POST /api/v1/databases/{uuid}/start ### Description Starts a database. ### Method POST ### Endpoint /api/v1/databases/db-uuid/start ### Request Example ```bash curl -s -X POST https://app.coolify.io/api/v1/databases/db-uuid/start \ -H "Authorization: Bearer " ``` ## POST /api/v1/databases/{uuid}/stop ### Description Stops a database. ### Method POST ### Endpoint /api/v1/databases/db-uuid/stop ### Request Example ```bash curl -s -X POST https://app.coolify.io/api/v1/databases/db-uuid/stop \ -H "Authorization: Bearer " ``` ## POST /api/v1/databases/{uuid}/restart ### Description Restarts a database. ### Method POST ### Endpoint /api/v1/databases/db-uuid/restart ### Request Example ```bash curl -s -X POST https://app.coolify.io/api/v1/databases/db-uuid/restart \ -H "Authorization: Bearer " ``` ``` -------------------------------- ### Create Application with Domain Conflict Source: https://context7.com/vignesh-oai/arp/llms.txt This example demonstrates how to create a new application. If a domain is already in use, the API will return a 409 Conflict error, providing details about the conflict and suggesting the use of `force_domain_override=true`. ```APIDOC ## POST /api/v1/applications/public ### Description Creates a new application. If the specified domain is already in use by another resource, a 409 Conflict error is returned. ### Method POST ### Endpoint /api/v1/applications/public ### Parameters #### Request Body - **domains** (string) - Required - The domain(s) to associate with the application. - **force_domain_override** (boolean) - Optional - If true, allows overriding existing domain conflicts. ### Request Example ```json { "domains": "https://taken.example.com", "...": "..." } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. #### Error Response (409 Conflict) - **message** (string) - Error message indicating domain conflict. - **warning** (string) - Warning about potential routing conflicts. - **conflicts** (array) - Details about the conflicting domains and resources. - **domain** (string) - The conflicting domain. - **resource_name** (string) - The name of the conflicting resource. - **resource_type** (string) - The type of the conflicting resource. #### Response Example (409 Conflict) ```json { "message": "Domain conflicts detected. Use force_domain_override=true to proceed.", "warning": "Using the same domain for multiple resources can cause routing conflicts.", "conflicts": [ { "domain": "taken.example.com", "resource_name": "Other App", "resource_type": "application" } ] } ``` ``` -------------------------------- ### Configure Buildx Action for Staging Builds (AARCH64) Source: https://github.com/vignesh-oai/arp/blob/main/backlog/tasks/task-00001 - Implement-Docker-build-caching-for-Coolify-staging-builds.md Configure Docker Buildx for AARCH64 architecture in your GitHub Actions workflow. This setup ensures proper Buildx installation and registry caching for AARCH64 builds, optimizing cache utilization. ```yaml - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Docker image (AARCH64) uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile push: true tags: ghcr.io/vignesh-oai/arp/buildcache-aarch64:latest cache-from: type=registry,ref=ghcr.io/vignesh-oai/arp/buildcache-aarch64:latest cache-to: type=registry,ref=ghcr.io/vignesh-oai/arp/buildcache-aarch64:latest,mode=max ``` -------------------------------- ### Start and Stop Development Environment Source: https://github.com/vignesh-oai/arp/blob/main/CLAUDE.md Use these commands to manage the Docker Compose-based development environment. The app runs on localhost:8000 by default. ```bash spin up # or: docker compose -f docker-compose.dev.yml up -d ``` ```bash spin down # stop services ``` -------------------------------- ### Configure Buildx Action for Staging Builds (AMD64) Source: https://github.com/vignesh-oai/arp/blob/main/backlog/tasks/task-00001 - Implement-Docker-build-caching-for-Coolify-staging-builds.md Set up Docker Buildx for AMD64 architecture within your GitHub Actions workflow. This includes installing Buildx and configuring registry caching for both pulling existing and pushing new cache layers. ```yaml - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Docker image (AMD64) uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile push: true tags: ghcr.io/vignesh-oai/arp/buildcache-amd64:latest cache-from: type=registry,ref=ghcr.io/vignesh-oai/arp/buildcache-amd64:latest cache-to: type=registry,ref=ghcr.io/vignesh-oai/arp/buildcache-amd64:latest,mode=max ``` -------------------------------- ### Reset Development Setup with Seeders Source: https://github.com/vignesh-oai/arp/blob/main/CONTRIBUTING.md Resets the development database to a clean state and populates it with default values using seeders. Use this to ensure a fresh environment for testing. ```bash docker exec -it coolify php artisan migrate:fresh --seed ``` -------------------------------- ### Deployment Queue Full (Rate Limit) Source: https://context7.com/vignesh-oai/arp/llms.txt This example shows the response when the deployment queue is full, indicating a rate limit has been reached. The API returns a 429 Too Many Requests status code and includes a `Retry-After` header specifying when to retry. ```APIDOC ## Response for Deployment Queue Full (Rate Limit) ### Description When the deployment queue is full, the API responds with a 429 Too Many Requests status code and a `Retry-After` header. ### Response #### Error Response (429 Too Many Requests) - **message** (string) - Message indicating the queue is full. - **Retry-After** (integer) - The number of seconds to wait before retrying the request. #### Response Example ```json { "message": "Queue is full. Please try again later." } ``` **Headers:** `Retry-After: 60` ``` -------------------------------- ### Control Database State Source: https://context7.com/vignesh-oai/arp/llms.txt Start, stop, or restart a specific database instance using its UUID. Authentication with an API token is necessary. ```bash curl -s -X POST https://app.coolify.io/api/v1/databases/db-uuid/start \ -H "Authorization: Bearer " ``` ```bash curl -s -X POST https://app.coolify.io/api/v1/databases/db-uuid/stop \ -H "Authorization: Bearer " ``` -------------------------------- ### API Error Handling Examples Source: https://context7.com/vignesh-oai/arp/llms.txt Illustrates common API error responses, including authentication failures (401), validation errors (422), and resource not found errors (404). Pay attention to the response body for specific error messages. ```bash # Example: missing or invalid token → 401 curl -s https://app.coolify.io/api/v1/projects # Response: {"message": "Unauthenticated."} ``` ```bash # Example: token lacks required ability → 403 curl -s -X POST https://app.coolify.io/api/v1/applications/app-uuid/start \ -H "Authorization: Bearer " # Response: {"message": "You are not allowed to perform this action."} ``` ```bash # Example: resource not found → 404 curl -s https://app.coolify.io/api/v1/applications/nonexistent-uuid \ -H "Authorization: Bearer " # Response: {"message": "Application not found."} ``` -------------------------------- ### List All Resources Source: https://context7.com/vignesh-oai/arp/llms.txt Retrieves a comprehensive list of all applications, databases, and services across all projects for the authenticated team. ```bash # List all resources across all projects curl -s https://app.coolify.io/api/v1/resources \ -H "Authorization: Bearer " ``` -------------------------------- ### Create Application from Public GitHub Repository Source: https://context7.com/vignesh-oai/arp/llms.txt Deploy an application from a public GitHub repository using Nixpacks for building. Specify build commands, ports, and domain information. ```bash # Create an app from a public GitHub repository (Nixpacks build) curl -s -X POST https://app.coolify.io/api/v1/applications/public \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "project_uuid": "proj-uuid", "server_uuid": "server-uuid", "environment_name": "production", "git_repository": "https://github.com/acme/my-app", "git_branch": "main", "build_pack": "nixpacks", "ports_exposes": "3000", "name": "my-web-app", "domains": "https://myapp.example.com", "is_auto_deploy_enabled": true, "instant_deploy": true, "install_command": "npm install", "build_command": "npm run build", "start_command": "npm start" }' # Response: {"uuid": "app-uuid-xyz"} ``` -------------------------------- ### Create PostgreSQL Database Source: https://context7.com/vignesh-oai/arp/llms.txt Provision a new PostgreSQL database instance. Requires project and server UUIDs, environment name, database details, and optionally image and public access settings. `instant_deploy` set to `true` enables immediate deployment. ```bash curl -s -X POST https://app.coolify.io/api/v1/databases/postgresql \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "project_uuid": "proj-uuid", "server_uuid": "server-uuid", "environment_name": "production", "name": "my-postgres", "postgres_user": "appuser", "postgres_password": "s3cr3t", "postgres_db": "myappdb", "image": "postgres:16-alpine", "is_public": false, "instant_deploy": true }' # Response: {"uuid": "db-uuid", "internal_db_url": "postgresql://appuser:s3cr3t@..."} ``` -------------------------------- ### Create Redis Database Source: https://context7.com/vignesh-oai/arp/llms.txt Create a Redis database instance. Similar to PostgreSQL creation, this requires project and server UUIDs, environment name, and database name. You can specify the Redis image and enable `instant_deploy` for immediate provisioning. ```bash curl -s -X POST https://app.coolify.io/api/v1/databases/redis \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "project_uuid": "proj-uuid", "server_uuid": "server-uuid", "environment_name": "production", "name": "session-cache", "image": "redis:7-alpine", "instant_deploy": true }' ``` -------------------------------- ### Get Team Members Source: https://context7.com/vignesh-oai/arp/llms.txt Retrieves the members of the current team. ```APIDOC ## GET /api/v1/teams/current/members — Get Team Members ### Description Get all members of the current team. ### Method GET ### Endpoint /api/v1/teams/current/members ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token with `read` ability. ### Request Example ```bash curl -s https://app.coolify.io/api/v1/teams/current/members \ -H "Authorization: Bearer " ``` ``` -------------------------------- ### Create Service from Template Source: https://context7.com/vignesh-oai/arp/llms.txt Create a new service, such as WordPress, from a discovered template. Requires specifying the template type, project, server, environment, and desired name. Instant deployment can be enabled. ```bash curl -s -X POST https://app.coolify.io/api/v1/services \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "type": "wordpress", "project_uuid": "proj-uuid", "server_uuid": "server-uuid", "environment_name": "production", "name": "my-wordpress", "instant_deploy": true }' ``` -------------------------------- ### Application Lifecycle Source: https://context7.com/vignesh-oai/arp/llms.txt Control the lifecycle of an application, including starting, restarting, and stopping it. ```APIDOC ## POST /api/v1/applications/{uuid}/start ### Description Start (deploy) an application. ### Method POST ### Endpoint /api/v1/applications/app-uuid/start ``` ```APIDOC ## POST /api/v1/applications/{uuid}/restart ### Description Restart an application. ### Method POST ### Endpoint /api/v1/applications/app-uuid/restart ``` ```APIDOC ## POST /api/v1/applications/{uuid}/stop ### Description Stop an application. ### Method POST ### Endpoint /api/v1/applications/app-uuid/stop ``` -------------------------------- ### Get Server by UUID Source: https://context7.com/vignesh-oai/arp/llms.txt Retrieves details for a specific server identified by its UUID. ```APIDOC ## GET /api/v1/servers/{uuid} — Get Server by UUID ### Description Get a specific server by its UUID. Servers must be reachable via SSH. ### Method GET ### Endpoint /api/v1/servers/{uuid} ### Parameters #### Path Parameters - **uuid** (string) - Required - The unique identifier of the server. #### Headers - **Authorization** (string) - Required - Bearer token with `read` ability. ### Request Example ```bash curl -s https://app.coolify.io/api/v1/servers/abc123-def456 \ -H "Authorization: Bearer " ``` ``` -------------------------------- ### Get Current Team Source: https://context7.com/vignesh-oai/arp/llms.txt Retrieves details for the team associated with the current API token. ```APIDOC ## GET /api/v1/teams/current — Get Current Team ### Description Gets the team associated with the current token. ### Method GET ### Endpoint /api/v1/teams/current ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token with `read` ability. ### Request Example ```bash curl -s https://app.coolify.io/api/v1/teams/current \ -H "Authorization: Bearer " ``` ``` -------------------------------- ### Create Application from Docker Image Source: https://context7.com/vignesh-oai/arp/llms.txt Deploy an application directly from a Docker image. Specify the image name and tag from a Docker registry. ```bash # Create an app from a Docker image curl -s -X POST https://app.coolify.io/api/v1/applications/dockerimage \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "project_uuid": "proj-uuid", "server_uuid": "server-uuid", "environment_name": "production", "docker_registry_image_name": "nginx", "docker_registry_image_tag": "alpine", "ports_exposes": "80", "name": "nginx-proxy" }' ``` -------------------------------- ### Get Current Team and Members Source: https://context7.com/vignesh-oai/arp/llms.txt Fetches the team associated with the current API token and lists its members. ```bash # Get the team associated with the current token curl -s https://app.coolify.io/api/v1/teams/current \ -H "Authorization: Bearer " ``` ```bash # Get team members curl -s https://app.coolify.io/api/v1/teams/current/members \ -H "Authorization: Bearer " ``` -------------------------------- ### Create Applications Source: https://context7.com/vignesh-oai/arp/llms.txt Endpoints for creating new applications with various configurations. ```APIDOC ## POST /api/v1/applications/public ### Description Creates an application from a public git repository using Nixpacks build. ### Method POST ### Endpoint /api/v1/applications/public ### Request Body - **project_uuid** (string) - Required - The UUID of the project. - **server_uuid** (string) - Required - The UUID of the server. - **environment_name** (string) - Required - The name of the environment. - **git_repository** (string) - Required - The URL of the git repository. - **git_branch** (string) - Required - The branch to build from. - **build_pack** (string) - Required - The build pack to use (e.g., "nixpacks"). - **ports_exposes** (string) - Required - The port the application exposes (e.g., "3000"). - **name** (string) - Required - The name of the application. - **domains** (string) - Optional - The domain for the application. - **is_auto_deploy_enabled** (boolean) - Optional - Whether auto-deploy is enabled. - **instant_deploy** (boolean) - Optional - Whether instant deploy is enabled. - **install_command** (string) - Optional - The command to install dependencies. - **build_command** (string) - Optional - The command to build the application. - **start_command** (string) - Optional - The command to start the application. ### Request Example ```bash curl -s -X POST https://app.coolify.io/api/v1/applications/public \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "project_uuid": "proj-uuid", "server_uuid": "server-uuid", "environment_name": "production", "git_repository": "https://github.com/acme/my-app", "git_branch": "main", "build_pack": "nixpacks", "ports_exposes": "3000", "name": "my-web-app", "domains": "https://myapp.example.com", "is_auto_deploy_enabled": true, "instant_deploy": true, "install_command": "npm install", "build_command": "npm run build", "start_command": "npm start" }' ``` ### Response #### Success Response (200) - **uuid** (string) - The UUID of the created application. ### Response Example ```json { "uuid": "app-uuid-xyz" } ``` ``` ```APIDOC ## POST /api/v1/applications/private-github-app ### Description Creates an application from a private git repository using GitHub App integration. ### Method POST ### Endpoint /api/v1/applications/private-github-app ### Request Body - **project_uuid** (string) - Required - The UUID of the project. - **server_uuid** (string) - Required - The UUID of the server. - **environment_name** (string) - Required - The name of the environment. - **github_app_uuid** (string) - Required - The UUID of the GitHub App. - **git_repository** (string) - Required - The repository name (e.g., "acme/private-repo"). - **git_branch** (string) - Required - The branch to build from. - **build_pack** (string) - Required - The build pack to use (e.g., "dockerfile"). - **ports_exposes** (string) - Required - The port the application exposes (e.g., "8080"). - **dockerfile_location** (string) - Optional - The path to the Dockerfile within the repository. ### Request Example ```bash curl -s -X POST https://app.coolify.io/api/v1/applications/private-github-app \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "project_uuid": "proj-uuid", "server_uuid": "server-uuid", "environment_name": "production", "github_app_uuid": "gh-app-uuid", "git_repository": "acme/private-repo", "git_branch": "main", "build_pack": "dockerfile", "ports_exposes": "8080", "dockerfile_location": "./Dockerfile" }' ``` ``` ```APIDOC ## POST /api/v1/applications/dockerimage ### Description Creates an application from a Docker image. ### Method POST ### Endpoint /api/v1/applications/dockerimage ### Request Body - **project_uuid** (string) - Required - The UUID of the project. - **server_uuid** (string) - Required - The UUID of the server. - **environment_name** (string) - Required - The name of the environment. - **docker_registry_image_name** (string) - Required - The name of the Docker image. - **docker_registry_image_tag** (string) - Required - The tag of the Docker image. - **ports_exposes** (string) - Required - The port the application exposes (e.g., "80"). - **name** (string) - Required - The name of the application. ### Request Example ```bash curl -s -X POST https://app.coolify.io/api/v1/applications/dockerimage \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "project_uuid": "proj-uuid", "server_uuid": "server-uuid", "environment_name": "production", "docker_registry_image_name": "nginx", "docker_registry_image_tag": "alpine", "ports_exposes": "80", "name": "nginx-proxy" }' ``` ``` ```APIDOC ## POST /api/v1/applications/dockerfile ### Description Creates an application from an inline Dockerfile without a git repository. ### Method POST ### Endpoint /api/v1/applications/dockerfile ### Request Body - **project_uuid** (string) - Required - The UUID of the project. - **server_uuid** (string) - Required - The UUID of the server. - **environment_name** (string) - Required - The name of the environment. - **dockerfile** (string) - Required - The content of the Dockerfile. - **ports_exposes** (string) - Required - The port the application exposes (e.g., "3000"). ### Request Example ```bash curl -s -X POST https://app.coolify.io/api/v1/applications/dockerfile \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "project_uuid": "proj-uuid", "server_uuid": "server-uuid", "environment_name": "production", "dockerfile": "FROM node:20-alpine\nWORKDIR /app\nCOPY . .\nRUN npm ci\nCMD [\"node\", \"server.js\"]", "ports_exposes": "3000" }' ``` ``` -------------------------------- ### Create Project Source: https://context7.com/vignesh-oai/arp/llms.txt Creates a new project in Coolify. Requires a name and an optional description. Projects group related resources. ```bash # Create a project curl -s -X POST https://app.coolify.io/api/v1/projects \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"name": "my-saas-app", "description": "Production SaaS"}' ``` -------------------------------- ### Control Service State Source: https://context7.com/vignesh-oai/arp/llms.txt Start, stop, or restart a specific service using its UUID. Authentication with an API token is required. ```bash curl -s -X POST https://app.coolify.io/api/v1/services/svc-uuid/start \ -H "Authorization: Bearer " ``` -------------------------------- ### Create Project Source: https://context7.com/vignesh-oai/arp/llms.txt Creates a new project in Coolify. ```APIDOC ## POST /api/v1/projects — Create Project ### Description Creates a new project in Coolify. ### Method POST ### Endpoint /api/v1/projects ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token with `write` ability. - **Content-Type** (string) - Required - `application/json` #### Request Body - **name** (string) - Required - The name for the new project. - **description** (string) - Optional - A description for the project. ### Request Example ```json { "name": "my-saas-app", "description": "Production SaaS" } ``` ``` -------------------------------- ### Get Specific Server Source: https://context7.com/vignesh-oai/arp/llms.txt Retrieves details for a specific server using its UUID. The server must be accessible via SSH. ```bash # Get a specific server by UUID curl -s https://app.coolify.io/api/v1/servers/abc123-def456 \ -H "Authorization: Bearer " ``` -------------------------------- ### Discover Service Templates Source: https://context7.com/vignesh-oai/arp/llms.txt Discover available one-click service templates for deployment. This is a prerequisite for creating new services from templates. ```bash curl -s https://app.coolify.io/api/v1/services/discover \ -H "Authorization: Bearer " ``` -------------------------------- ### Create Application from Inline Dockerfile Source: https://context7.com/vignesh-oai/arp/llms.txt Deploy an application using an inline Dockerfile. This method is suitable when you don't have a git repository or prefer to define the Dockerfile directly in the API request. ```bash # Create an app from an inline Dockerfile (no git) curl -s -X POST https://app.coolify.io/api/v1/applications/dockerfile \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "project_uuid": "proj-uuid", "server_uuid": "server-uuid", "environment_name": "production", "dockerfile": "FROM node:20-alpine\nWORKDIR /app\nCOPY . .\nRUN npm ci\nCMD [\"node\", \"server.js\"]", "ports_exposes": "3000" }' ``` -------------------------------- ### Manage Application Lifecycle Source: https://context7.com/vignesh-oai/arp/llms.txt Control the lifecycle of an application using dedicated API endpoints. You can start, restart, or stop an application by providing its UUID. ```bash # Start (deploy) an application curl -s -X POST https://app.coolify.io/api/v1/applications/app-uuid/start \ -H "Authorization: Bearer " ``` ```bash # Restart an application curl -s -X POST https://app.coolify.io/api/v1/applications/app-uuid/restart \ -H "Authorization: Bearer " ``` ```bash # Stop an application curl -s -X POST https://app.coolify.io/api/v1/applications/app-uuid/stop \ -H "Authorization: Bearer " ``` -------------------------------- ### Manage Database Backups Source: https://context7.com/vignesh-oai/arp/llms.txt Configure and manage database backups. This includes creating scheduled backups, listing backup configurations, viewing execution history, and deleting backup schedules. Requires a database UUID and an API token. ```bash curl -s -X POST https://app.coolify.io/api/v1/databases/db-uuid/backups \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "frequency": "daily", "keep_backups": 7, "save_s3": false }' ``` ```bash curl -s https://app.coolify.io/api/v1/databases/db-uuid/backups \ -H "Authorization: Bearer " ``` ```bash curl -s https://app.coolify.io/api/v1/databases/db-uuid/backups/backup-uuid/executions \ -H "Authorization: Bearer " ``` ```bash curl -s -X DELETE https://app.coolify.io/api/v1/databases/db-uuid/backups/backup-uuid \ -H "Authorization: Bearer " ``` -------------------------------- ### Get Specific Private SSH Key Source: https://context7.com/vignesh-oai/arp/llms.txt Retrieve details for a specific private SSH key using its UUID. Requires the key's UUID and an API token. ```bash curl -s https://app.coolify.io/api/v1/security/keys/key-uuid \ -H "Authorization: Bearer " ``` -------------------------------- ### Format Code with Laravel Pint (No Dirty) Source: https://github.com/vignesh-oai/arp/blob/main/AGENTS.md Run this command to format all PHP files in the project according to project standards. Do not use the `--test` flag. ```bash vendor/bin/pint --format agent ``` -------------------------------- ### Create New Model with Artisan Source: https://github.com/vignesh-oai/arp/blob/main/AGENTS.md Generate new models using this command. It's recommended to also create factories and seeders. Use `--help` to see available options. ```bash php artisan make:model --help ``` -------------------------------- ### Trigger Manual Webhook Deployment Source: https://context7.com/vignesh-oai/arp/llms.txt Manually trigger deployments via webhooks, useful for CI/CD pipelines. Ensure the correct signature and event headers are included. The GitLab example requires a specific webhook secret. ```bash # Manual webhook trigger (e.g., from a CI pipeline) # POST /webhooks/source/github/events/manual curl -s -X POST https://your-coolify.io/webhooks/source/github/events/manual \ -H "X-Hub-Signature-256: sha256=" \ -H "X-GitHub-Event: push" \ -H "Content-Type: application/json" \ -d '{ "ref": "refs/heads/main", "repository": {"clone_url": "https://github.com/acme/my-app.git"}, "commits": [{"id": "abc123"}] }' ``` ```bash # GitLab manual webhook curl -s -X POST https://your-coolify.io/webhooks/source/gitlab/events/manual \ -H "X-Gitlab-Token: " \ -H "Content-Type: application/json" \ -d '{"ref": "refs/heads/main", "project": {"http_url": "..."}}' ``` -------------------------------- ### List All Resources Source: https://context7.com/vignesh-oai/arp/llms.txt Retrieves a unified list of all applications, databases, and services across all projects for the current team. ```APIDOC ## GET /api/v1/resources ### Description Returns a unified list of all applications, databases, and services across all projects for the current team. ### Method GET ### Endpoint /api/v1/resources ### Response #### Success Response (200) - **uuid** (string) - Unique identifier for the resource. - **name** (string) - Name of the resource. - **type** (string) - Type of the resource (e.g., application, database, service). - **status** (string) - Current status of the resource. - **project_uuid** (string) - The UUID of the project the resource belongs to. - **environment_name** (string) - The name of the environment the resource is in. ### Request Example ```bash curl -s https://app.coolify.io/api/v1/resources \ -H "Authorization: Bearer " ``` ``` -------------------------------- ### Monitor Deployments via API Source: https://context7.com/vignesh-oai/arp/llms.txt Retrieve information about deployments, including status, logs, and timestamps. You can list all deployments, get details for a specific deployment by UUID, or list paginated deployments for an application. Deployments can also be cancelled. ```bash # List all currently running/queued deployments curl -s https://app.coolify.io/api/v1/deployments \ -H "Authorization: Bearer " ``` ```bash # Get a specific deployment by UUID (includes logs if sensitive read is enabled) curl -s https://app.coolify.io/api/v1/deployments/cm37r6cqj000008jm0veg5tkm \ -H "Authorization: Bearer " # Response includes: status (queued|in_progress|finished|failed|cancelled-by-user), logs, timestamps ``` ```bash # List paginated deployments for an application curl -s "https://app.coolify.io/api/v1/deployments/applications/app-uuid?skip=0&take=20" \ -H "Authorization: Bearer " ``` ```bash # Cancel a running deployment curl -s -X POST https://app.coolify.io/api/v1/deployments/cm37r6cqj000008jm0veg5tkm/cancel \ -H "Authorization: Bearer " # Response: {"message":"Deployment cancelled successfully.","deployment_uuid":"...","status":"cancelled-by-user"} ``` -------------------------------- ### Create Application with Domain Conflict Source: https://context7.com/vignesh-oai/arp/llms.txt Use this endpoint to create a new application. If the domain is already in use, a 409 error will be returned with details about the conflict. You can override this by setting `force_domain_override=true`. ```bash curl -s -X POST https://app.coolify.io/api/v1/applications/public \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"domains": "https://taken.example.com", ...}' ``` -------------------------------- ### Manage Applications Source: https://context7.com/vignesh-oai/arp/llms.txt Endpoints for listing, retrieving, updating, and deleting applications. Use application UUIDs for specific operations. ```bash # List all applications (optionally filter by tag) curl -s "https://app.coolify.io/api/v1/applications?tag=backend" \ -H "Authorization: Bearer " ``` ```bash # Get a specific application curl -s https://app.coolify.io/api/v1/applications/app-uuid \ -H "Authorization: Bearer " ``` ```bash # Update application configuration curl -s -X PATCH https://app.coolify.io/api/v1/applications/app-uuid \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "name": "my-app-v2", "domains": "https://v2.example.com", "health_check_enabled": true, "health_check_path": "/health", "health_check_interval": 30, "limits_memory": "512m", "limits_cpus": "0.5" }' ``` ```bash # Get application logs curl -s https://app.coolify.io/api/v1/applications/app-uuid/logs \ -H "Authorization: Bearer " ``` ```bash # Delete an application curl -s -X DELETE "https://app.coolify.io/api/v1/applications/app-uuid?delete_volumes=true" \ -H "Authorization: Bearer " ``` -------------------------------- ### List Projects Source: https://context7.com/vignesh-oai/arp/llms.txt Retrieves a list of all projects. Projects serve as the top-level grouping for environments, applications, and databases. ```bash # List all projects curl -s https://app.coolify.io/api/v1/projects \ -H "Authorization: Bearer " # Response: [{"uuid":"proj-uuid","name":"My App","description":"..."}] ``` -------------------------------- ### Enable Coolify API Source: https://context7.com/vignesh-oai/arp/llms.txt Enables the Coolify API. Requires a root or admin token with 'write' ability. ```bash # Enable the API (requires root/admin token with write ability) curl -s https://app.coolify.io/api/v1/enable \ -H "Authorization: Bearer " ``` -------------------------------- ### Provision Hetzner Cloud Servers Source: https://context7.com/vignesh-oai/arp/llms.txt Endpoints for interacting with Hetzner Cloud to provision new servers. This includes listing server types, locations, and SSH keys, as well as creating a new server with specified configurations. ```bash # List available Hetzner server types curl -s https://app.coolify.io/api/v1/hetzner/server-types \ -H "Authorization: Bearer " ``` ```bash # List Hetzner datacenter locations curl -s https://app.coolify.io/api/v1/hetzner/locations \ -H "Authorization: Bearer " ``` ```bash # List SSH keys registered in Hetzner account curl -s https://app.coolify.io/api/v1/hetzner/ssh-keys \ -H "Authorization: Bearer " ``` ```bash # Create a new Hetzner server and register it in Coolify curl -s -X POST https://app.coolify.io/api/v1/servers/hetzner \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "cloud_token_uuid": "hetzner-token-uuid", "name": "prod-worker-01", "server_type": "cpx21", "location": "nbg1", "image": "ubuntu-24.04", "ssh_key_ids": [12345678] }' ``` -------------------------------- ### Enable Telescope Debugging Tool Source: https://github.com/vignesh-oai/arp/blob/main/CONTRIBUTING.md Add this environment variable to your `.env` file to enable the Telescope debugging tool. Restart the development server after making changes. ```env TELESCOPE_ENABLED=true ``` -------------------------------- ### Manage Projects and Environments Source: https://context7.com/vignesh-oai/arp/llms.txt Use these endpoints to manage projects and their environments within Coolify. Ensure you have the correct project UUID and API token. ```bash curl -s https://app.coolify.io/api/v1/projects/proj-uuid/environments \ -H "Authorization: Bearer " ``` ```bash curl -s -X POST https://app.coolify.io/api/v1/projects/proj-uuid/environments \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"name": "staging"}' ``` ```bash curl -s https://app.coolify.io/api/v1/projects/proj-uuid/production \ -H "Authorization: Bearer " ``` ```bash curl -s -X PATCH https://app.coolify.io/api/v1/projects/proj-uuid \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"name": "my-updated-project"}' ``` ```bash curl -s -X DELETE https://app.coolify.io/api/v1/projects/proj-uuid \ -H "Authorization: Bearer " ``` -------------------------------- ### Create Application from Private GitHub Repository Source: https://context7.com/vignesh-oai/arp/llms.txt Deploy an application from a private GitHub repository using the GitHub App integration. Specify the GitHub App UUID and Dockerfile location if using a Dockerfile build pack. ```bash # Create an app from a private repository via GitHub App curl -s -X POST https://app.coolify.io/api/v1/applications/private-github-app \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "project_uuid": "proj-uuid", "server_uuid": "server-uuid", "environment_name": "production", "github_app_uuid": "gh-app-uuid", "git_repository": "acme/private-repo", "git_branch": "main", "build_pack": "dockerfile", "ports_exposes": "8080", "dockerfile_location": "./Dockerfile" }' ``` -------------------------------- ### List Available Artisan Commands Source: https://github.com/vignesh-oai/arp/blob/main/CLAUDE.md Use this command to see all available Artisan commands for your project. Check parameters for specific commands using `php artisan [command] --help`. ```bash php artisan list ``` -------------------------------- ### Create Pest Test with Artisan Source: https://github.com/vignesh-oai/arp/blob/main/AGENTS.md Use this command to create new Pest tests. Ensure you use the `--pest` flag. ```bash php artisan make:test --pest {name} ``` -------------------------------- ### Create New Class with Artisan Source: https://github.com/vignesh-oai/arp/blob/main/AGENTS.md Use this command to generate a new generic PHP class. Pass `--no-interaction` to avoid prompts and specify any necessary `--options`. ```bash php artisan make:class ``` -------------------------------- ### List Databases Source: https://context7.com/vignesh-oai/arp/llms.txt Retrieve a list of all databases managed by Coolify. Requires an API token for authentication. ```bash curl -s https://app.coolify.io/api/v1/databases \ -H "Authorization: Bearer " ``` -------------------------------- ### Run All Pest Tests Source: https://github.com/vignesh-oai/arp/blob/main/AGENTS.md Execute all tests in the project using the `--compact` flag for a cleaner output. You can also filter tests by name. ```bash php artisan test --compact ```