diff --git a/.ai/lessons.md b/.ai/lessons.md index 3e7fc4e3e..97c2d8485 100644 --- a/.ai/lessons.md +++ b/.ai/lessons.md @@ -1 +1,3 @@ - In custom MDX components, use `fumadocs-core/link` instead of raw anchor elements so internal links include the configured `/docs` base path. +- The Coolify UI links each one-click service to `/docs/services/`. A variant template (`-with-*`) without its own page needs a redirect in `nginx/redirects.conf`. +- Headings inside `` are not in the prerendered HTML of `.output/public`, so an anchor check on the build output reports false "missing anchor" hits for them. diff --git a/config/openapi.json b/config/openapi.json index 7dd21c89b..d73c18a58 100644 --- a/config/openapi.json +++ b/config/openapi.json @@ -62,7 +62,7 @@ "Applications" ], "summary": "Create Preview Deployment", - "description": "Open a preview deployment for a pull request and queue its deployment. When the preview already exists, it is redeployed. Git based applications need git_type unless they use a GitHub or GitLab App source; Bitbucket also needs commit. Docker Image applications need docker_tag for a new preview.", + "description": "Open a preview deployment for a pull request and queue its deployment. When the preview already exists, it is redeployed. A token with the deploy permission can only redeploy an existing preview without changes; opening a preview, changing its pull request URL, git type, or docker tag, or choosing a commit also needs the write permission. Git based applications need git_type unless they use a GitHub or GitLab App source; Bitbucket also needs commit. Docker Image applications need docker_tag for a new preview.", "operationId": "create-preview-deployment-by-application-uuid", "parameters": [ { @@ -111,7 +111,7 @@ ] }, "commit": { - "description": "Commit SHA to deploy. Required for Bitbucket.", + "description": "Commit SHA to deploy. Required for a new Bitbucket preview. Needs the write permission.", "type": [ "string", "null" @@ -167,6 +167,9 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "Missing permissions. Opening or changing a preview needs the write permission." + }, "404": { "$ref": "#/components/responses/404" }, @@ -410,66 +413,6 @@ ] } }, - "/applications/{uuid}/secret-manager": { - "patch": { - "tags": [ - "Secret Managers" - ], - "summary": "Configure Application Secret Manager", - "description": "Configure the secret manager source used by an application.", - "operationId": "configure-application-secret-manager", - "parameters": [ - { - "name": "uuid", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "integration_token_uuid" - ], - "properties": { - "integration_token_uuid": { - "type": "string" - }, - "settings": { - "type": "object" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "description": "Secret manager configured." - }, - "401": { - "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, "/applications": { "get": { "tags": [ @@ -563,6 +506,16 @@ "type": "string", "description": "The git branch." }, + "git_https_username": { + "type": "string", + "nullable": true, + "description": "Username for HTTPS access to a private repository on a custom Git host (not github.com)." + }, + "git_https_password": { + "type": "string", + "nullable": true, + "description": "Password or access token for HTTPS access to a private repository on a custom Git host (not github.com). It is stored encrypted and never returned." + }, "build_pack": { "type": "string", "enum": [ @@ -876,6 +829,14 @@ "type": "boolean", "description": "Use a shallow Git clone." }, + "is_auto_cancel_queued_deployments_enabled": { + "type": "boolean", + "description": "Cancel older queued webhook deployments when a newer push arrives. Default: true." + }, + "is_auto_cancel_building_deployments_enabled": { + "type": "boolean", + "description": "Also stop an older webhook deployment that is still building when a newer push arrives. A deployment that already started to replace containers always finishes. This also cancels queued webhook deployments. Default: false." + }, "disable_build_cache": { "type": "boolean", "description": "Disable the build cache." @@ -888,6 +849,10 @@ "type": "boolean", "description": "Include the source commit in the build." }, + "include_network_hosts_in_build": { + "type": "boolean", + "description": "Add the containers of the destination network as build hosts." + }, "is_env_sorting_enabled": { "type": "boolean", "description": "Sort environment variables." @@ -982,6 +947,10 @@ "type": "boolean", "description": "Use a consistent container name across deployments." }, + "is_image_scan_enabled": { + "type": "boolean", + "description": "Scan the images of the application for vulnerabilities. Needs image scanning on the server. Default true." + }, "custom_internal_name": { "type": "string", "nullable": true, @@ -1532,6 +1501,14 @@ "type": "boolean", "description": "Use a shallow Git clone." }, + "is_auto_cancel_queued_deployments_enabled": { + "type": "boolean", + "description": "Cancel older queued webhook deployments when a newer push arrives. Default: true." + }, + "is_auto_cancel_building_deployments_enabled": { + "type": "boolean", + "description": "Also stop an older webhook deployment that is still building when a newer push arrives. A deployment that already started to replace containers always finishes. This also cancels queued webhook deployments. Default: false." + }, "disable_build_cache": { "type": "boolean", "description": "Disable the build cache." @@ -1544,6 +1521,10 @@ "type": "boolean", "description": "Include the source commit in the build." }, + "include_network_hosts_in_build": { + "type": "boolean", + "description": "Add the containers of the destination network as build hosts." + }, "is_env_sorting_enabled": { "type": "boolean", "description": "Sort environment variables." @@ -1638,6 +1619,10 @@ "type": "boolean", "description": "Use a consistent container name across deployments." }, + "is_image_scan_enabled": { + "type": "boolean", + "description": "Scan the images of the application for vulnerabilities. Needs image scanning on the server. Default true." + }, "custom_internal_name": { "type": "string", "nullable": true, @@ -1824,14 +1809,14 @@ ] } }, - "/applications/private-deploy-key": { + "/applications/private-gitea-app": { "post": { "tags": [ "Applications" ], - "summary": "Create (Private - Deploy Key)", - "description": "Create new application based on a private repository through a Deploy Key.", - "operationId": "create-private-deploy-key-application", + "summary": "Create (Private - Gitea App)", + "description": "Create new application based on a private repository through a Gitea App.", + "operationId": "create-private-gitea-app-application", "requestBody": { "description": "Application object that needs to be created.", "required": true, @@ -1841,7 +1826,7 @@ "required": [ "project_uuid", "server_uuid", - "private_key_uuid", + "gitea_app_uuid", "git_repository", "git_branch", "build_pack" @@ -1863,13 +1848,13 @@ "type": "string", "description": "The environment UUID. You need to provide at least one of environment_name or environment_uuid." }, - "private_key_uuid": { + "gitea_app_uuid": { "type": "string", - "description": "The private key UUID." + "description": "The Gitea App UUID. The source must be connected." }, "git_repository": { "type": "string", - "description": "The git repository URL." + "description": "The repository as owner/name, or its URL on the Gitea instance." }, "git_branch": { "type": "string", @@ -2116,7 +2101,7 @@ }, "dockerfile_location": { "type": "string", - "description": "The Dockerfile location in the repository." + "description": "The Dockerfile location in the repository" }, "dockerfile_target_build": { "type": "string", @@ -2188,6 +2173,14 @@ "type": "boolean", "description": "Use a shallow Git clone." }, + "is_auto_cancel_queued_deployments_enabled": { + "type": "boolean", + "description": "Cancel older queued webhook deployments when a newer push arrives. Default: true." + }, + "is_auto_cancel_building_deployments_enabled": { + "type": "boolean", + "description": "Also stop an older webhook deployment that is still building when a newer push arrives. A deployment that already started to replace containers always finishes. This also cancels queued webhook deployments. Default: false." + }, "disable_build_cache": { "type": "boolean", "description": "Disable the build cache." @@ -2200,6 +2193,10 @@ "type": "boolean", "description": "Include the source commit in the build." }, + "include_network_hosts_in_build": { + "type": "boolean", + "description": "Add the containers of the destination network as build hosts." + }, "is_env_sorting_enabled": { "type": "boolean", "description": "Sort environment variables." @@ -2294,6 +2291,10 @@ "type": "boolean", "description": "Use a consistent container name across deployments." }, + "is_image_scan_enabled": { + "type": "boolean", + "description": "Scan the images of the application for vulnerabilities. Needs image scanning on the server. Default true." + }, "custom_internal_name": { "type": "string", "nullable": true, @@ -2480,14 +2481,14 @@ ] } }, - "/applications/dockerfile": { + "/applications/private-deploy-key": { "post": { "tags": [ "Applications" ], - "summary": "Create (Dockerfile without git)", - "description": "Create new application based on a simple Dockerfile (without git).", - "operationId": "create-dockerfile-application", + "summary": "Create (Private - Deploy Key)", + "description": "Create new application based on a private repository through a Deploy Key.", + "operationId": "create-private-deploy-key-application", "requestBody": { "description": "Application object that needs to be created.", "required": true, @@ -2497,7 +2498,10 @@ "required": [ "project_uuid", "server_uuid", - "dockerfile" + "private_key_uuid", + "git_repository", + "git_branch", + "build_pack" ], "properties": { "project_uuid": { @@ -2516,16 +2520,17 @@ "type": "string", "description": "The environment UUID. You need to provide at least one of environment_name or environment_uuid." }, - "dockerfile": { + "private_key_uuid": { "type": "string", - "description": "The Dockerfile content." + "description": "The private key UUID." }, - "build_pack": { + "git_repository": { "type": "string", - "enum": [ - "dockerfile" - ], - "description": "The build pack type." + "description": "The git repository URL." + }, + "git_branch": { + "type": "string", + "description": "The git branch." }, "ports_exposes": { "type": "string", @@ -2535,6 +2540,17 @@ "type": "string", "description": "The destination UUID." }, + "build_pack": { + "type": "string", + "enum": [ + "nixpacks", + "railpack", + "static", + "dockerfile", + "dockercompose" + ], + "description": "The build pack type." + }, "name": { "type": "string", "description": "The application name." @@ -2554,6 +2570,10 @@ }, "description": "The subset of the application domains served with an X-Robots-Tag: noindex, nofollow response header, keeping them out of search engines. Entries that are not among the application domains are ignored." }, + "git_commit_sha": { + "type": "string", + "description": "The git commit SHA." + }, "docker_registry_image_name": { "type": "string", "description": "The docker registry image name." @@ -2562,6 +2582,45 @@ "type": "string", "description": "The docker registry image tag." }, + "is_static": { + "type": "boolean", + "description": "The flag to indicate if the application is static." + }, + "is_spa": { + "type": "boolean", + "description": "The flag to indicate if the application is a single-page application (SPA). Only relevant when is_static is true." + }, + "is_auto_deploy_enabled": { + "type": "boolean", + "description": "The flag to indicate if auto-deploy is enabled on git push. Defaults to true." + }, + "is_force_https_enabled": { + "type": "boolean", + "description": "The flag to indicate if HTTPS is forced. Defaults to true." + }, + "is_preview_deployments_enabled": { + "type": "boolean", + "description": "Enable preview deployments for pull requests." + }, + "static_image": { + "type": "string", + "enum": [ + "nginx:alpine" + ], + "description": "The static image." + }, + "install_command": { + "type": "string", + "description": "The install command." + }, + "build_command": { + "type": "string", + "description": "The build command." + }, + "start_command": { + "type": "string", + "description": "The start command." + }, "ports_mappings": { "type": "string", "description": "The ports mappings." @@ -2570,6 +2629,10 @@ "type": "string", "description": "The base directory for all commands." }, + "publish_directory": { + "type": "string", + "description": "The publish directory." + }, "health_check_enabled": { "type": "boolean", "description": "Health check enabled." @@ -2704,13 +2767,61 @@ "type": "boolean", "description": "The flag to indicate if the application should be deployed instantly." }, - "is_force_https_enabled": { - "type": "boolean", - "description": "The flag to indicate if HTTPS is forced. Defaults to true." + "dockerfile": { + "type": "string", + "description": "The Dockerfile content." }, - "is_preview_deployments_enabled": { - "type": "boolean", - "description": "Enable preview deployments for pull requests." + "dockerfile_location": { + "type": "string", + "description": "The Dockerfile location in the repository." + }, + "dockerfile_target_build": { + "type": "string", + "nullable": true, + "description": "The Docker build target (stage) in the Dockerfile." + }, + "docker_compose_location": { + "type": "string", + "description": "The Docker Compose location." + }, + "docker_compose_custom_start_command": { + "type": "string", + "description": "The Docker Compose custom start command." + }, + "docker_compose_custom_build_command": { + "type": "string", + "description": "The Docker Compose custom build command." + }, + "docker_compose_domains": { + "type": "array", + "description": "Array of URLs to be applied to containers of a dockercompose application.", + "items": { + "properties": { + "name": { + "type": "string", + "description": "The service name as defined in docker-compose." + }, + "domain": { + "type": "string", + "description": "Comma-separated list of URLs (e.g. \"https://app.coolify.io,https://app2.coolify.io\")" + }, + "redirect": { + "type": "string", + "nullable": true, + "description": "Per-service www/non-www redirect for this compose service.", + "enum": [ + "www", + "non-www", + "both" + ] + } + }, + "type": "object" + } + }, + "watch_paths": { + "type": "string", + "description": "Watch path patterns, one per line (newline-separated). Commas do not separate patterns." }, "use_build_server": { "type": "boolean", @@ -2734,6 +2845,14 @@ "type": "boolean", "description": "Use a shallow Git clone." }, + "is_auto_cancel_queued_deployments_enabled": { + "type": "boolean", + "description": "Cancel older queued webhook deployments when a newer push arrives. Default: true." + }, + "is_auto_cancel_building_deployments_enabled": { + "type": "boolean", + "description": "Also stop an older webhook deployment that is still building when a newer push arrives. A deployment that already started to replace containers always finishes. This also cancels queued webhook deployments. Default: false." + }, "disable_build_cache": { "type": "boolean", "description": "Disable the build cache." @@ -2746,6 +2865,10 @@ "type": "boolean", "description": "Include the source commit in the build." }, + "include_network_hosts_in_build": { + "type": "boolean", + "description": "Add the containers of the destination network as build hosts." + }, "is_env_sorting_enabled": { "type": "boolean", "description": "Sort environment variables." @@ -2840,6 +2963,10 @@ "type": "boolean", "description": "Use a consistent container name across deployments." }, + "is_image_scan_enabled": { + "type": "boolean", + "description": "Scan the images of the application for vulnerabilities. Needs image scanning on the server. Default true." + }, "custom_internal_name": { "type": "string", "nullable": true, @@ -2927,7 +3054,12 @@ "type": "string" }, "description": "Tags to assign to the application." - } + }, + "is_preserve_repository_enabled": { + "type": "boolean", + "default": false, + "description": "Preserve repository during deployment." + } }, "type": "object" } @@ -3021,14 +3153,14 @@ ] } }, - "/applications/dockerimage": { + "/applications/dockerfile": { "post": { "tags": [ "Applications" ], - "summary": "Create (Docker Image without git)", - "description": "Create new application based on a prebuilt docker image (without git).", - "operationId": "create-dockerimage-application", + "summary": "Create (Dockerfile without git)", + "description": "Create new application based on a simple Dockerfile (without git).", + "operationId": "create-dockerfile-application", "requestBody": { "description": "Application object that needs to be created.", "required": true, @@ -3038,7 +3170,7 @@ "required": [ "project_uuid", "server_uuid", - "docker_registry_image_name" + "dockerfile" ], "properties": { "project_uuid": { @@ -3057,13 +3189,16 @@ "type": "string", "description": "The environment UUID. You need to provide at least one of environment_name or environment_uuid." }, - "docker_registry_image_name": { + "dockerfile": { "type": "string", - "description": "The docker registry image name." + "description": "The Dockerfile content." }, - "docker_registry_image_tag": { + "build_pack": { "type": "string", - "description": "The docker registry image tag." + "enum": [ + "dockerfile" + ], + "description": "The build pack type." }, "ports_exposes": { "type": "string", @@ -3092,10 +3227,22 @@ }, "description": "The subset of the application domains served with an X-Robots-Tag: noindex, nofollow response header, keeping them out of search engines. Entries that are not among the application domains are ignored." }, + "docker_registry_image_name": { + "type": "string", + "description": "The docker registry image name." + }, + "docker_registry_image_tag": { + "type": "string", + "description": "The docker registry image tag." + }, "ports_mappings": { "type": "string", "description": "The ports mappings." }, + "base_directory": { + "type": "string", + "description": "The base directory for all commands." + }, "health_check_enabled": { "type": "boolean", "description": "Health check enabled." @@ -3260,6 +3407,14 @@ "type": "boolean", "description": "Use a shallow Git clone." }, + "is_auto_cancel_queued_deployments_enabled": { + "type": "boolean", + "description": "Cancel older queued webhook deployments when a newer push arrives. Default: true." + }, + "is_auto_cancel_building_deployments_enabled": { + "type": "boolean", + "description": "Also stop an older webhook deployment that is still building when a newer push arrives. A deployment that already started to replace containers always finishes. This also cancels queued webhook deployments. Default: false." + }, "disable_build_cache": { "type": "boolean", "description": "Disable the build cache." @@ -3272,6 +3427,10 @@ "type": "boolean", "description": "Include the source commit in the build." }, + "include_network_hosts_in_build": { + "type": "boolean", + "description": "Add the containers of the destination network as build hosts." + }, "is_env_sorting_enabled": { "type": "boolean", "description": "Sort environment variables." @@ -3366,6 +3525,10 @@ "type": "boolean", "description": "Use a consistent container name across deployments." }, + "is_image_scan_enabled": { + "type": "boolean", + "description": "Scan the images of the application for vulnerabilities. Needs image scanning on the server. Default true." + }, "custom_internal_name": { "type": "string", "nullable": true, @@ -3547,197 +3710,57 @@ ] } }, - "/applications/{uuid}": { - "get": { - "tags": [ - "Applications" - ], - "summary": "Get", - "description": "Get application by UUID.", - "operationId": "get-application-by-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the application.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Get application by UUID.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Application" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - }, - "delete": { - "tags": [ - "Applications" - ], - "summary": "Delete", - "description": "Delete application by UUID. Needs a token with the write and deploy permissions.", - "operationId": "delete-application-by-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the application.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "delete_configurations", - "in": "query", - "description": "Delete configurations.", - "required": false, - "schema": { - "type": "boolean", - "default": true - } - }, - { - "name": "delete_volumes", - "in": "query", - "description": "Delete volumes.", - "required": false, - "schema": { - "type": "boolean", - "default": true - } - }, - { - "name": "docker_cleanup", - "in": "query", - "description": "Run docker cleanup when the server disk usage is at or above its cleanup threshold. Skipped when a cleanup ran on the server in the last hour.", - "required": false, - "schema": { - "type": "boolean", - "default": true - } - }, - { - "name": "delete_connected_networks", - "in": "query", - "description": "Delete connected networks.", - "required": false, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Application deleted.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "Application deleted." - } - }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "description": "The token needs the write and deploy permissions." - }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - }, - "patch": { + "/applications/dockerimage": { + "post": { "tags": [ "Applications" ], - "summary": "Update", - "description": "Update application by UUID.", - "operationId": "update-application-by-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the application.", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Create (Docker Image without git)", + "description": "Create new application based on a prebuilt docker image (without git).", + "operationId": "create-dockerimage-application", "requestBody": { - "description": "Application updated.", + "description": "Application object that needs to be created.", "required": true, "content": { "application/json": { "schema": { + "required": [ + "project_uuid", + "server_uuid", + "docker_registry_image_name" + ], "properties": { - "github_app_uuid": { + "project_uuid": { "type": "string", - "description": "The Github App UUID." + "description": "The project UUID." }, - "git_repository": { + "server_uuid": { "type": "string", - "description": "The git repository URL." + "description": "The server UUID." }, - "git_branch": { + "environment_name": { "type": "string", - "description": "The git branch." + "description": "The environment name. You need to provide at least one of environment_name or environment_uuid." + }, + "environment_uuid": { + "type": "string", + "description": "The environment UUID. You need to provide at least one of environment_name or environment_uuid." + }, + "docker_registry_image_name": { + "type": "string", + "description": "The docker registry image name." + }, + "docker_registry_image_tag": { + "type": "string", + "description": "The docker registry image tag." }, "ports_exposes": { "type": "string", "description": "The ports to expose." }, - "build_pack": { + "destination_uuid": { "type": "string", - "enum": [ - "nixpacks", - "railpack", - "static", - "dockerfile", - "dockercompose" - ], - "description": "The build pack type." + "description": "The destination UUID." }, "name": { "type": "string", @@ -3758,61 +3781,9 @@ }, "description": "The subset of the application domains served with an X-Robots-Tag: noindex, nofollow response header, keeping them out of search engines. Entries that are not among the application domains are ignored." }, - "git_commit_sha": { + "ports_mappings": { "type": "string", - "description": "The git commit SHA." - }, - "docker_registry_image_name": { - "type": "string", - "description": "The docker registry image name." - }, - "docker_registry_image_tag": { - "type": "string", - "description": "The docker registry image tag." - }, - "is_static": { - "type": "boolean", - "description": "The flag to indicate if the application is static." - }, - "is_spa": { - "type": "boolean", - "description": "The flag to indicate if the application is a single-page application (SPA). Only relevant when is_static is true." - }, - "is_auto_deploy_enabled": { - "type": "boolean", - "description": "The flag to indicate if auto-deploy is enabled on git push. Defaults to true." - }, - "is_force_https_enabled": { - "type": "boolean", - "description": "The flag to indicate if HTTPS is forced. Defaults to true." - }, - "is_preview_deployments_enabled": { - "type": "boolean", - "description": "Enable preview deployments for pull requests." - }, - "install_command": { - "type": "string", - "description": "The install command." - }, - "build_command": { - "type": "string", - "description": "The build command." - }, - "start_command": { - "type": "string", - "description": "The start command." - }, - "ports_mappings": { - "type": "string", - "description": "The ports mappings." - }, - "base_directory": { - "type": "string", - "description": "The base directory for all commands." - }, - "publish_directory": { - "type": "string", - "description": "The publish directory." + "description": "The ports mappings." }, "health_check_enabled": { "type": "boolean", @@ -3948,61 +3919,13 @@ "type": "boolean", "description": "The flag to indicate if the application should be deployed instantly." }, - "dockerfile": { - "type": "string", - "description": "The Dockerfile content." - }, - "dockerfile_location": { - "type": "string", - "description": "The Dockerfile location in the repository." - }, - "dockerfile_target_build": { - "type": "string", - "nullable": true, - "description": "The Docker build target (stage) in the Dockerfile." - }, - "docker_compose_location": { - "type": "string", - "description": "The Docker Compose location." - }, - "docker_compose_custom_start_command": { - "type": "string", - "description": "The Docker Compose custom start command." - }, - "docker_compose_custom_build_command": { - "type": "string", - "description": "The Docker Compose custom build command." - }, - "docker_compose_domains": { - "type": "array", - "description": "Array of URLs to be applied to containers of a dockercompose application.", - "items": { - "properties": { - "name": { - "type": "string", - "description": "The service name as defined in docker-compose." - }, - "domain": { - "type": "string", - "description": "Comma-separated list of URLs (e.g. \"https://app.coolify.io,https://app2.coolify.io\")" - }, - "redirect": { - "type": "string", - "nullable": true, - "description": "Per-service www/non-www redirect for this compose service.", - "enum": [ - "www", - "non-www", - "both" - ] - } - }, - "type": "object" - } + "is_force_https_enabled": { + "type": "boolean", + "description": "The flag to indicate if HTTPS is forced. Defaults to true." }, - "watch_paths": { - "type": "string", - "description": "Watch path patterns, one per line (newline-separated). Commas do not separate patterns." + "is_preview_deployments_enabled": { + "type": "boolean", + "description": "Enable preview deployments for pull requests." }, "use_build_server": { "type": "boolean", @@ -4011,34 +3934,9 @@ }, "use_build_secrets": { "type": "boolean", + "default": false, "description": "Use Docker Build Secrets for build-time environment variables." }, - "http_basic_auth_hash_algorithm": { - "type": "string", - "enum": [ - "bcrypt", - "argon2id" - ], - "description": "Hash algorithm for the HTTP Basic Authentication password. Argon2id needs the Caddy proxy, version 2.11 or newer." - }, - "http_basic_auth_bcrypt_cost": { - "type": "integer", - "minimum": 4, - "maximum": 14, - "description": "Bcrypt cost for the HTTP Basic Authentication password." - }, - "http_basic_auth_argon2id_memory_cost": { - "type": "integer", - "minimum": 8192, - "maximum": 262144, - "description": "Argon2id memory cost in KiB for the HTTP Basic Authentication password." - }, - "http_basic_auth_argon2id_time_cost": { - "type": "integer", - "minimum": 1, - "maximum": 12, - "description": "Argon2id time cost (iterations) for the HTTP Basic Authentication password." - }, "is_git_submodules_enabled": { "type": "boolean", "description": "Clone Git submodules." @@ -4051,6 +3949,14 @@ "type": "boolean", "description": "Use a shallow Git clone." }, + "is_auto_cancel_queued_deployments_enabled": { + "type": "boolean", + "description": "Cancel older queued webhook deployments when a newer push arrives. Default: true." + }, + "is_auto_cancel_building_deployments_enabled": { + "type": "boolean", + "description": "Also stop an older webhook deployment that is still building when a newer push arrives. A deployment that already started to replace containers always finishes. This also cancels queued webhook deployments. Default: false." + }, "disable_build_cache": { "type": "boolean", "description": "Disable the build cache." @@ -4063,6 +3969,10 @@ "type": "boolean", "description": "Include the source commit in the build." }, + "include_network_hosts_in_build": { + "type": "boolean", + "description": "Add the containers of the destination network as build hosts." + }, "is_env_sorting_enabled": { "type": "boolean", "description": "Sort environment variables." @@ -4157,6 +4067,10 @@ "type": "boolean", "description": "Use a consistent container name across deployments." }, + "is_image_scan_enabled": { + "type": "boolean", + "description": "Scan the images of the application for vulnerabilities. Needs image scanning on the server. Default true." + }, "custom_internal_name": { "type": "string", "nullable": true, @@ -4176,6 +4090,50 @@ "minimum": 0, "description": "Maximum container restart count before stopping." }, + "is_http_basic_auth_enabled": { + "type": "boolean", + "description": "HTTP Basic Authentication enabled." + }, + "http_basic_auth_username": { + "type": "string", + "nullable": true, + "description": "Username for HTTP Basic Authentication" + }, + "http_basic_auth_password": { + "type": "string", + "nullable": true, + "description": "Password for HTTP Basic Authentication" + }, + "http_basic_auth_hash_algorithm": { + "type": "string", + "enum": [ + "bcrypt", + "argon2id" + ], + "default": "bcrypt", + "description": "Hash algorithm for the HTTP Basic Authentication password. Argon2id needs the Caddy proxy, version 2.11 or newer." + }, + "http_basic_auth_bcrypt_cost": { + "type": "integer", + "minimum": 4, + "maximum": 14, + "default": 10, + "description": "Bcrypt cost for the HTTP Basic Authentication password." + }, + "http_basic_auth_argon2id_memory_cost": { + "type": "integer", + "minimum": 8192, + "maximum": 262144, + "default": 65536, + "description": "Argon2id memory cost in KiB for the HTTP Basic Authentication password." + }, + "http_basic_auth_argon2id_time_cost": { + "type": "integer", + "minimum": 1, + "maximum": 12, + "default": 4, + "description": "Argon2id time cost (iterations) for the HTTP Basic Authentication password." + }, "connect_to_docker_network": { "type": "boolean", "description": "The flag to connect the service to the predefined Docker network." @@ -4184,14 +4142,22 @@ "type": "boolean", "description": "Force domain usage even if conflicts are detected. Default is false." }, + "autogenerate_domain": { + "type": "boolean", + "default": true, + "description": "If true and domains is empty, auto-generate a domain using the server's wildcard domain or sslip.io fallback. Ignored for the dockercompose build pack, which uses docker_compose_domains. Default: true." + }, "is_container_label_escape_enabled": { "type": "boolean", "default": true, "description": "Escape special characters in labels. By default, $ (and other chars) is escaped. So if you write $ in the labels, it will be saved as $$. If you want to use env variables inside the labels, turn this off." }, - "is_preserve_repository_enabled": { - "type": "boolean", - "description": "Preserve git repository during application update. If false, the existing repository will be removed and replaced with the new one. If true, the existing repository will be kept and the new one will be ignored. Default is false." + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags to assign to the application." } }, "type": "object" @@ -4200,8 +4166,8 @@ } }, "responses": { - "200": { - "description": "Application updated.", + "201": { + "description": "Application created successfully.", "content": { "application/json": { "schema": { @@ -4224,9 +4190,6 @@ "403": { "description": "The token needs the deploy ability to set a manual webhook secret." }, - "404": { - "$ref": "#/components/responses/404" - }, "409": { "description": "Domain conflicts detected.", "content": { @@ -4289,14 +4252,14 @@ ] } }, - "/applications/{uuid}/logs": { + "/applications/{uuid}": { "get": { "tags": [ "Applications" ], - "summary": "Get application logs.", - "description": "Get application logs by UUID. Requires the `read:sensitive` or `root` token ability.", - "operationId": "get-application-logs-by-uuid", + "summary": "Get", + "description": "Get application by UUID.", + "operationId": "get-application-by-uuid", "parameters": [ { "name": "uuid", @@ -4306,64 +4269,17 @@ "schema": { "type": "string" } - }, - { - "name": "lines", - "in": "query", - "description": "Number of lines to show from the end of the logs. Use `all` to return all logs. `-1` remains available as a compatibility alias.", - "required": false, - "schema": { - "oneOf": [ - { - "type": "integer", - "format": "int32", - "default": 100, - "maximum": 10000, - "minimum": -1 - }, - { - "type": "string", - "enum": [ - "all" - ] + } + ], + "responses": { + "200": { + "description": "Get application by UUID.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Application" } - ] - } - }, - { - "name": "show_timestamps", - "in": "query", - "description": "Show timestamps in the logs.", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "service_name", - "in": "query", - "description": "Return logs only from the container of the Docker Compose service with this name. Returns 404 when no container matches. Stopped containers are included.", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Get application logs by UUID.", - "content": { - "application/json": { - "schema": { - "properties": { - "logs": { - "type": "string" - } - }, - "type": "object" - } - } + } } }, "400": { @@ -4381,16 +4297,14 @@ "bearerAuth": [] } ] - } - }, - "/applications/{uuid}/previews/{pull_request_id}/logs": { - "get": { + }, + "delete": { "tags": [ "Applications" ], - "summary": "Get preview application logs.", - "description": "Get runtime container logs for a preview deployment by application UUID and pull request ID. Requires the `read:sensitive` or `root` token ability.", - "operationId": "get-preview-application-logs-by-pull-request-id", + "summary": "Delete", + "description": "Delete application by UUID. Needs a token with the write and deploy permissions.", + "operationId": "delete-application-by-uuid", "parameters": [ { "name": "uuid", @@ -4402,67 +4316,56 @@ } }, { - "name": "pull_request_id", - "in": "path", - "description": "Pull request ID of the preview deployment.", - "required": true, + "name": "delete_configurations", + "in": "query", + "description": "Delete configurations.", + "required": false, "schema": { - "type": "integer", - "minimum": 1 + "type": "boolean", + "default": true } }, { - "name": "lines", + "name": "delete_volumes", "in": "query", - "description": "Number of lines to show from the end of the logs. Use `all` to return all logs. `-1` remains available as a compatibility alias.", + "description": "Delete volumes.", "required": false, "schema": { - "oneOf": [ - { - "type": "integer", - "format": "int32", - "default": 100, - "maximum": 10000, - "minimum": -1 - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] + "type": "boolean", + "default": true } }, { - "name": "show_timestamps", + "name": "docker_cleanup", "in": "query", - "description": "Show timestamps in the logs.", + "description": "Run docker cleanup when the server disk usage is at or above its cleanup threshold. Skipped when a cleanup ran on the server in the last hour.", "required": false, "schema": { "type": "boolean", - "default": false + "default": true } }, { - "name": "service_name", + "name": "delete_connected_networks", "in": "query", - "description": "Return logs only from the container of the Docker Compose service with this name. Returns 404 when no container matches. Stopped containers are included.", + "description": "Delete connected networks.", "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": true } } ], "responses": { "200": { - "description": "Preview runtime logs.", + "description": "Application deleted.", "content": { "application/json": { "schema": { "properties": { - "logs": { - "type": "string" + "message": { + "type": "string", + "example": "Application deleted." } }, "type": "object" @@ -4476,58 +4379,8 @@ "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/applications/{uuid}/envs": { - "get": { - "tags": [ - "Applications" - ], - "summary": "List Envs", - "description": "List all envs by application UUID.", - "operationId": "list-envs-by-application-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the application.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "All environment variables by application UUID.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EnvironmentVariable" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" + "403": { + "description": "The token needs the write and deploy permissions." }, "404": { "$ref": "#/components/responses/404" @@ -4539,13 +4392,13 @@ } ] }, - "post": { + "patch": { "tags": [ "Applications" ], - "summary": "Create Env", - "description": "Create env by application UUID.", - "operationId": "create-env-by-application-uuid", + "summary": "Update", + "description": "Update application by UUID.", + "operationId": "update-application-by-uuid", "parameters": [ { "name": "uuid", @@ -4558,53 +4411,1850 @@ } ], "requestBody": { - "description": "Env created.", + "description": "Application updated.", "required": true, "content": { "application/json": { "schema": { "properties": { - "key": { + "github_app_uuid": { "type": "string", - "description": "The key of the environment variable." + "description": "The Github App UUID." }, - "value": { + "gitea_app_uuid": { "type": "string", - "description": "The value of the environment variable." + "description": "The Gitea App UUID. The source must be connected. Do not send it together with github_app_uuid." }, - "is_preview": { + "git_repository": { + "type": "string", + "description": "The git repository URL." + }, + "git_branch": { + "type": "string", + "description": "The git branch." + }, + "git_https_username": { + "type": "string", + "nullable": true, + "description": "Username for HTTPS access to a private repository on a custom Git host. Send null to remove it." + }, + "git_https_password": { + "type": "string", + "nullable": true, + "description": "Password or access token for HTTPS access to a private repository on a custom Git host. It is stored encrypted and never returned. Send null or an empty string to remove the credentials." + }, + "ports_exposes": { + "type": "string", + "description": "The ports to expose." + }, + "build_pack": { + "type": "string", + "enum": [ + "nixpacks", + "railpack", + "static", + "dockerfile", + "dockercompose" + ], + "description": "The build pack type." + }, + "name": { + "type": "string", + "description": "The application name." + }, + "description": { + "type": "string", + "description": "The application description." + }, + "domains": { + "type": "string", + "description": "The application URLs in a comma-separated list." + }, + "noindex_domains": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The subset of the application domains served with an X-Robots-Tag: noindex, nofollow response header, keeping them out of search engines. Entries that are not among the application domains are ignored." + }, + "git_commit_sha": { + "type": "string", + "description": "The git commit SHA." + }, + "docker_registry_image_name": { + "type": "string", + "description": "The docker registry image name." + }, + "docker_registry_image_tag": { + "type": "string", + "description": "The docker registry image tag." + }, + "is_static": { "type": "boolean", - "description": "The flag to indicate if the environment variable is used in preview deployments." + "description": "The flag to indicate if the application is static." }, - "is_literal": { + "is_spa": { "type": "boolean", - "description": "The flag to indicate if the environment variable is a literal, nothing espaced." + "description": "The flag to indicate if the application is a single-page application (SPA). Only relevant when is_static is true." }, - "is_multiline": { + "is_auto_deploy_enabled": { "type": "boolean", - "description": "The flag to indicate if the environment variable is multiline." + "description": "The flag to indicate if auto-deploy is enabled on git push. Defaults to true." }, - "is_shown_once": { + "is_force_https_enabled": { "type": "boolean", - "description": "If true, the saved value is hidden in the UI and API responses. MCP never returns environment variable values." - } - }, - "type": "object" - } - } - } - }, - "responses": { - "201": { - "description": "Environment variable created.", - "content": { - "application/json": { - "schema": { - "properties": { - "uuid": { - "type": "string", - "example": "nc0k04gk8g0cgsk440g0koko" - } + "description": "The flag to indicate if HTTPS is forced. Defaults to true." + }, + "is_preview_deployments_enabled": { + "type": "boolean", + "description": "Enable preview deployments for pull requests." + }, + "install_command": { + "type": "string", + "description": "The install command." + }, + "build_command": { + "type": "string", + "description": "The build command." + }, + "start_command": { + "type": "string", + "description": "The start command." + }, + "ports_mappings": { + "type": "string", + "description": "The ports mappings." + }, + "base_directory": { + "type": "string", + "description": "The base directory for all commands." + }, + "publish_directory": { + "type": "string", + "description": "The publish directory." + }, + "health_check_enabled": { + "type": "boolean", + "description": "Health check enabled." + }, + "health_check_path": { + "type": "string", + "description": "Health check path." + }, + "health_check_port": { + "type": "string", + "nullable": true, + "description": "Health check port." + }, + "health_check_host": { + "type": "string", + "nullable": true, + "description": "Health check host." + }, + "health_check_method": { + "type": "string", + "description": "Health check method." + }, + "health_check_return_code": { + "type": "integer", + "description": "Health check return code." + }, + "health_check_scheme": { + "type": "string", + "description": "Health check scheme." + }, + "health_check_response_text": { + "type": "string", + "nullable": true, + "description": "Health check response text." + }, + "health_check_interval": { + "type": "integer", + "description": "Health check interval in seconds." + }, + "health_check_timeout": { + "type": "integer", + "description": "Health check timeout in seconds." + }, + "health_check_retries": { + "type": "integer", + "description": "Health check retries count." + }, + "health_check_start_period": { + "type": "integer", + "description": "Health check start period in seconds." + }, + "limits_memory": { + "type": "string", + "description": "Memory limit." + }, + "limits_memory_swap": { + "type": "string", + "description": "Memory swap limit." + }, + "limits_memory_swappiness": { + "type": "integer", + "description": "Memory swappiness." + }, + "limits_memory_reservation": { + "type": "string", + "description": "Memory reservation." + }, + "limits_cpus": { + "type": "string", + "description": "CPU limit." + }, + "limits_cpuset": { + "type": "string", + "nullable": true, + "description": "CPU set." + }, + "limits_cpu_shares": { + "type": "integer", + "description": "CPU shares." + }, + "custom_labels": { + "type": "string", + "description": "Custom labels." + }, + "custom_docker_run_options": { + "type": "string", + "description": "Custom docker run options." + }, + "post_deployment_command": { + "type": "string", + "description": "Post deployment command." + }, + "post_deployment_command_container": { + "type": "string", + "description": "Post deployment command container." + }, + "pre_deployment_command": { + "type": "string", + "description": "Pre deployment command." + }, + "pre_deployment_command_container": { + "type": "string", + "description": "Pre deployment command container." + }, + "manual_webhook_secret_github": { + "type": "string", + "description": "Manual webhook secret for Github. Needs the deploy ability." + }, + "manual_webhook_secret_gitlab": { + "type": "string", + "description": "Manual webhook secret for Gitlab. Needs the deploy ability." + }, + "manual_webhook_secret_bitbucket": { + "type": "string", + "description": "Manual webhook secret for Bitbucket. Needs the deploy ability." + }, + "manual_webhook_secret_gitea": { + "type": "string", + "description": "Manual webhook secret for Gitea. Needs the deploy ability." + }, + "redirect": { + "type": "string", + "nullable": true, + "description": "How to set redirect with Traefik / Caddy. www<->non-www.", + "enum": [ + "www", + "non-www", + "both" + ] + }, + "instant_deploy": { + "type": "boolean", + "description": "The flag to indicate if the application should be deployed instantly." + }, + "dockerfile": { + "type": "string", + "description": "The Dockerfile content." + }, + "dockerfile_location": { + "type": "string", + "description": "The Dockerfile location in the repository." + }, + "dockerfile_target_build": { + "type": "string", + "nullable": true, + "description": "The Docker build target (stage) in the Dockerfile." + }, + "docker_compose_location": { + "type": "string", + "description": "The Docker Compose location." + }, + "docker_compose_custom_start_command": { + "type": "string", + "description": "The Docker Compose custom start command." + }, + "docker_compose_custom_build_command": { + "type": "string", + "description": "The Docker Compose custom build command." + }, + "docker_compose_domains": { + "type": "array", + "description": "Array of URLs to be applied to containers of a dockercompose application.", + "items": { + "properties": { + "name": { + "type": "string", + "description": "The service name as defined in docker-compose." + }, + "domain": { + "type": "string", + "description": "Comma-separated list of URLs (e.g. \"https://app.coolify.io,https://app2.coolify.io\")" + }, + "redirect": { + "type": "string", + "nullable": true, + "description": "Per-service www/non-www redirect for this compose service.", + "enum": [ + "www", + "non-www", + "both" + ] + } + }, + "type": "object" + } + }, + "watch_paths": { + "type": "string", + "description": "Watch path patterns, one per line (newline-separated). Commas do not separate patterns." + }, + "use_build_server": { + "type": "boolean", + "nullable": true, + "description": "Use build server." + }, + "use_build_secrets": { + "type": "boolean", + "description": "Use Docker Build Secrets for build-time environment variables." + }, + "http_basic_auth_hash_algorithm": { + "type": "string", + "enum": [ + "bcrypt", + "argon2id" + ], + "description": "Hash algorithm for the HTTP Basic Authentication password. Argon2id needs the Caddy proxy, version 2.11 or newer." + }, + "http_basic_auth_bcrypt_cost": { + "type": "integer", + "minimum": 4, + "maximum": 14, + "description": "Bcrypt cost for the HTTP Basic Authentication password." + }, + "http_basic_auth_argon2id_memory_cost": { + "type": "integer", + "minimum": 8192, + "maximum": 262144, + "description": "Argon2id memory cost in KiB for the HTTP Basic Authentication password." + }, + "http_basic_auth_argon2id_time_cost": { + "type": "integer", + "minimum": 1, + "maximum": 12, + "description": "Argon2id time cost (iterations) for the HTTP Basic Authentication password." + }, + "is_git_submodules_enabled": { + "type": "boolean", + "description": "Clone Git submodules." + }, + "is_git_lfs_enabled": { + "type": "boolean", + "description": "Enable Git LFS." + }, + "is_git_shallow_clone_enabled": { + "type": "boolean", + "description": "Use a shallow Git clone." + }, + "is_auto_cancel_queued_deployments_enabled": { + "type": "boolean", + "description": "Cancel older queued webhook deployments when a newer push arrives. Default: true." + }, + "is_auto_cancel_building_deployments_enabled": { + "type": "boolean", + "description": "Also stop an older webhook deployment that is still building when a newer push arrives. A deployment that already started to replace containers always finishes. This also cancels queued webhook deployments. Default: false." + }, + "disable_build_cache": { + "type": "boolean", + "description": "Disable the build cache." + }, + "inject_build_args_to_dockerfile": { + "type": "boolean", + "description": "Inject build arguments into the Dockerfile build." + }, + "include_source_commit_in_build": { + "type": "boolean", + "description": "Include the source commit in the build." + }, + "include_network_hosts_in_build": { + "type": "boolean", + "description": "Add the containers of the destination network as build hosts." + }, + "is_env_sorting_enabled": { + "type": "boolean", + "description": "Sort environment variables." + }, + "redact_all_env_values_in_logs": { + "type": "boolean", + "description": "Redact all environment variable values in logs. When false, only locked (shown once) values are redacted. Requires team admin permissions." + }, + "include_coolify_default_variables": { + "type": "boolean", + "default": true, + "description": "Add the predefined COOLIFY_* variables (COOLIFY_URL, COOLIFY_FQDN, ...) to the environment. Requires team admin permissions. Redeploy to apply it." + }, + "is_pr_deployments_public_enabled": { + "type": "boolean", + "description": "Make pull request deployments public." + }, + "stop_grace_period": { + "type": "integer", + "nullable": true, + "minimum": 1, + "maximum": 3600, + "description": "Container stop grace period in seconds." + }, + "rolling_update_drain_seconds": { + "type": "integer", + "minimum": 0, + "maximum": 300, + "description": "Seconds to wait after the new container is healthy before old containers stop during a rolling update. 0 turns the wait off. Default: 5." + }, + "docker_images_to_keep": { + "type": "integer", + "minimum": 0, + "maximum": 100, + "description": "Number of Docker images to retain." + }, + "is_gzip_enabled": { + "type": "boolean", + "description": "Enable gzip compression." + }, + "is_stripprefix_enabled": { + "type": "boolean", + "description": "Enable path prefix stripping." + }, + "is_permanent_redirect_enabled": { + "type": "boolean", + "description": "Use permanent redirects (301/308) instead of temporary (302/307) for the HTTP to HTTPS and www redirects. Defaults to false." + }, + "traefik_certificate_resolver": { + "type": "string", + "nullable": true, + "description": "Traefik certificate resolver for this application. Null uses the server setting, \"none\" uses no resolver." + }, + "is_container_label_readonly_enabled": { + "type": "boolean", + "default": true, + "description": "Let Coolify manage the container labels. True regenerates custom_labels from domains, redirect, and proxy settings. False keeps custom_labels as you set them: domains, redirect, and basic auth changes then do not change the labels." + }, + "is_raw_compose_deployment_enabled": { + "type": "boolean", + "description": "Deploy the raw Docker Compose definition." + }, + "is_log_drain_enabled": { + "type": "boolean", + "description": "Enable log drain for the application." + }, + "is_gpu_enabled": { + "type": "boolean", + "description": "Enable GPU support." + }, + "gpu_driver": { + "type": "string", + "nullable": true, + "description": "GPU driver name." + }, + "gpu_count": { + "type": "string", + "nullable": true, + "description": "Number of GPUs to allocate." + }, + "gpu_device_ids": { + "type": "string", + "nullable": true, + "description": "Comma-separated GPU device IDs." + }, + "gpu_options": { + "type": "string", + "nullable": true, + "description": "Additional GPU options." + }, + "is_consistent_container_name_enabled": { + "type": "boolean", + "description": "Use a consistent container name across deployments." + }, + "is_image_scan_enabled": { + "type": "boolean", + "description": "Scan the images of the application for vulnerabilities. Needs image scanning on the server. Default true." + }, + "custom_internal_name": { + "type": "string", + "nullable": true, + "description": "Custom internal container name. Turns is_consistent_container_name_enabled on when that field is not sent; sending it as false together with a name returns 422." + }, + "custom_container_name_prefix": { + "type": "string", + "nullable": true, + "description": "Prefix for generated container names (prefix-20260908T141530). Slugified and unique across the instance." + }, + "preview_url_template": { + "type": "string", + "description": "Preview URL template." + }, + "max_restart_count": { + "type": "integer", + "minimum": 0, + "description": "Maximum container restart count before stopping." + }, + "connect_to_docker_network": { + "type": "boolean", + "description": "The flag to connect the service to the predefined Docker network." + }, + "force_domain_override": { + "type": "boolean", + "description": "Force domain usage even if conflicts are detected. Default is false." + }, + "is_container_label_escape_enabled": { + "type": "boolean", + "default": true, + "description": "Escape special characters in labels. By default, $ (and other chars) is escaped. So if you write $ in the labels, it will be saved as $$. If you want to use env variables inside the labels, turn this off." + }, + "is_preserve_repository_enabled": { + "type": "boolean", + "description": "Preserve git repository during application update. If false, the existing repository will be removed and replaced with the new one. If true, the existing repository will be kept and the new one will be ignored. Default is false." + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Application updated.", + "content": { + "application/json": { + "schema": { + "properties": { + "uuid": { + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "The token needs the deploy ability to set a manual webhook secret." + }, + "404": { + "$ref": "#/components/responses/404" + }, + "409": { + "description": "Domain conflicts detected.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Domain conflicts detected. Use force_domain_override=true to proceed." + }, + "warning": { + "type": "string", + "example": "Using the same domain for multiple resources can cause routing conflicts and unpredictable behavior." + }, + "conflicts": { + "type": "array", + "items": { + "properties": { + "domain": { + "type": "string", + "example": "example.com" + }, + "resource_name": { + "type": "string", + "example": "My Application" + }, + "resource_uuid": { + "type": "string", + "nullable": true, + "example": "abc123-def456" + }, + "resource_type": { + "type": "string", + "enum": [ + "application", + "service", + "instance" + ], + "example": "application" + }, + "message": { + "type": "string", + "example": "Domain example.com is already in use by application 'My Application'" + } + }, + "type": "object" + } + } + }, + "type": "object" + } + } + } + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/applications/{uuid}/logs": { + "get": { + "tags": [ + "Applications" + ], + "summary": "Get application logs.", + "description": "Get application logs by UUID. Requires the `read:sensitive` or `root` token ability.", + "operationId": "get-application-logs-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "lines", + "in": "query", + "description": "Number of lines to show from the end of the logs. Use `all` to return all logs. `-1` remains available as a compatibility alias.", + "required": false, + "schema": { + "oneOf": [ + { + "type": "integer", + "format": "int32", + "default": 100, + "maximum": 10000, + "minimum": -1 + }, + { + "type": "string", + "enum": [ + "all" + ] + } + ] + } + }, + { + "name": "show_timestamps", + "in": "query", + "description": "Show timestamps in the logs.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "service_name", + "in": "query", + "description": "Return logs only from the container of the Docker Compose service with this name. Returns 404 when no container matches. Stopped containers are included.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Get application logs by UUID.", + "content": { + "application/json": { + "schema": { + "properties": { + "logs": { + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/applications/{uuid}/previews/{pull_request_id}/logs": { + "get": { + "tags": [ + "Applications" + ], + "summary": "Get preview application logs.", + "description": "Get runtime container logs for a preview deployment by application UUID and pull request ID. Requires the `read:sensitive` or `root` token ability.", + "operationId": "get-preview-application-logs-by-pull-request-id", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_request_id", + "in": "path", + "description": "Pull request ID of the preview deployment.", + "required": true, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "lines", + "in": "query", + "description": "Number of lines to show from the end of the logs. Use `all` to return all logs. `-1` remains available as a compatibility alias.", + "required": false, + "schema": { + "oneOf": [ + { + "type": "integer", + "format": "int32", + "default": 100, + "maximum": 10000, + "minimum": -1 + }, + { + "type": "string", + "enum": [ + "all" + ] + } + ] + } + }, + { + "name": "show_timestamps", + "in": "query", + "description": "Show timestamps in the logs.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "service_name", + "in": "query", + "description": "Return logs only from the container of the Docker Compose service with this name. Returns 404 when no container matches. Stopped containers are included.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Preview runtime logs.", + "content": { + "application/json": { + "schema": { + "properties": { + "logs": { + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/applications/{uuid}/envs": { + "get": { + "tags": [ + "Applications" + ], + "summary": "List Envs", + "description": "List all envs by application UUID.", + "operationId": "list-envs-by-application-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "All environment variables by application UUID.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Applications" + ], + "summary": "Create Env", + "description": "Create env by application UUID.", + "operationId": "create-env-by-application-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Env created.", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "key": { + "type": "string", + "description": "The key of the environment variable." + }, + "value": { + "type": "string", + "description": "The value of the environment variable." + }, + "is_preview": { + "type": "boolean", + "description": "The flag to indicate if the environment variable is used in preview deployments." + }, + "is_literal": { + "type": "boolean", + "description": "The flag to indicate if the environment variable is a literal, nothing espaced." + }, + "is_multiline": { + "type": "boolean", + "description": "The flag to indicate if the environment variable is multiline." + }, + "is_shown_once": { + "type": "boolean", + "description": "If true, the saved value is hidden in the UI and API responses. A lock is permanent: false does not unlock a locked variable, but a new value can still replace the locked one. MCP never returns environment variable values." + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "Environment variable created.", + "content": { + "application/json": { + "schema": { + "properties": { + "uuid": { + "type": "string", + "example": "nc0k04gk8g0cgsk440g0koko" + } + }, + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "patch": { + "tags": [ + "Applications" + ], + "summary": "Update Env", + "description": "Update env by application UUID.", + "operationId": "update-env-by-application-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Env updated.", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The key of the environment variable." + }, + "value": { + "type": "string", + "description": "The value of the environment variable." + }, + "is_preview": { + "type": "boolean", + "description": "The flag to indicate if the environment variable is used in preview deployments." + }, + "is_literal": { + "type": "boolean", + "description": "The flag to indicate if the environment variable is a literal, nothing espaced." + }, + "is_multiline": { + "type": "boolean", + "description": "The flag to indicate if the environment variable is multiline." + }, + "is_shown_once": { + "type": "boolean", + "description": "If true, the saved value is hidden in the UI and API responses. A lock is permanent: false does not unlock a locked variable, but a new value can still replace the locked one. MCP never returns environment variable values." + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "Environment variable updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/applications/{uuid}/envs/bulk": { + "patch": { + "tags": [ + "Applications" + ], + "summary": "Update Envs (Bulk)", + "description": "Update multiple envs by application UUID.", + "operationId": "update-envs-by-application-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Bulk envs updated.", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "key": { + "type": "string", + "description": "The key of the environment variable." + }, + "value": { + "type": "string", + "description": "The value of the environment variable." + }, + "is_preview": { + "type": "boolean", + "description": "The flag to indicate if the environment variable is used in preview deployments." + }, + "is_literal": { + "type": "boolean", + "description": "The flag to indicate if the environment variable is a literal, nothing espaced." + }, + "is_multiline": { + "type": "boolean", + "description": "The flag to indicate if the environment variable is multiline." + }, + "is_shown_once": { + "type": "boolean", + "description": "If true, the saved value is hidden in the UI and API responses. A lock is permanent: false does not unlock a locked variable, but a new value can still replace the locked one. MCP never returns environment variable values." + } + }, + "type": "object" + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "Environment variables updated.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/applications/{uuid}/envs/{env_uuid}": { + "delete": { + "tags": [ + "Applications" + ], + "summary": "Delete Env", + "description": "Delete env by UUID.", + "operationId": "delete-env-by-application-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "env_uuid", + "in": "path", + "description": "UUID of the environment variable.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Environment variable deleted.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Environment variable deleted." + } + }, + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/applications/{uuid}/start": { + "post": { + "tags": [ + "Applications" + ], + "summary": "Start", + "description": "Start application.", + "operationId": "start-application-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "force", + "in": "query", + "description": "Force rebuild.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "instant_deploy", + "in": "query", + "description": "Instant deploy (skip queuing).", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Start application.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Deployment request queued.", + "description": "Message." + }, + "deployment_uuid": { + "type": "string", + "example": "doogksw", + "description": "UUID of the deployment." + } + }, + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/applications/{uuid}/stop": { + "post": { + "tags": [ + "Applications" + ], + "summary": "Stop", + "description": "Stop application.", + "operationId": "stop-application-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "docker_cleanup", + "in": "query", + "description": "Run docker cleanup when the server disk usage is at or above its cleanup threshold. Skipped when a cleanup ran on the server in the last hour.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Stop application.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Application stopping request queued." + } + }, + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/applications/{uuid}/restart": { + "post": { + "tags": [ + "Applications" + ], + "summary": "Restart", + "description": "Restart application.", + "operationId": "restart-application-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Restart application.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Restart request queued." + }, + "deployment_uuid": { + "type": "string", + "example": "doogksw", + "description": "UUID of the deployment." + } + }, + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/applications/{uuid}/move": { + "post": { + "tags": [ + "Applications" + ], + "summary": "Move", + "description": "Move application to another project/environment. This is a purely organizational change — running containers are not affected. Note: after moving, the application will pick up shared environment variables from the new environment on the next deployment.", + "operationId": "move-application-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Target environment to move the application to.", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "environment_uuid" + ], + "properties": { + "environment_uuid": { + "type": "string", + "description": "UUID of the target environment." + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Application moved successfully.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Application moved successfully." + }, + "uuid": { + "type": "string" + }, + "project_uuid": { + "type": "string" + }, + "environment_uuid": { + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/applications/{uuid}/migrate": { + "post": { + "tags": [ + "Applications" + ], + "summary": "Migrate to Server", + "description": "Migrate an application to another destination/server owned by the authenticated team. Stops the application, optionally transfers persistent volume data when both servers are managed by Coolify, and updates database records. Redeploy after migration completes.", + "operationId": "migrate-application-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "destination_uuid" + ], + "properties": { + "destination_uuid": { + "description": "UUID of the target destination.", + "type": "string" + }, + "migrate_volumes": { + "description": "Whether to transfer persistent volume data when migrating across servers.", + "type": "boolean", + "default": true + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Application migration started or completed." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/applications/{uuid}/storages": { + "get": { + "tags": [ + "Applications" + ], + "summary": "List Storages", + "description": "List all persistent storages and file storages by application UUID.", + "operationId": "list-storages-by-application-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "All storages by application UUID.", + "content": { + "application/json": { + "schema": { + "properties": { + "persistent_storages": { + "type": "array", + "items": { + "type": "object" + } + }, + "file_storages": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Applications" + ], + "summary": "Create Storage", + "description": "Create a persistent storage or file storage for an application.", + "operationId": "create-storage-by-application-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "type", + "mount_path" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "persistent", + "file" + ], + "description": "The type of storage." + }, + "name": { + "type": "string", + "description": "Volume name (persistent only, required for persistent)." + }, + "mount_path": { + "type": "string", + "description": "The container mount path." + }, + "content": { + "type": "string", + "nullable": true, + "description": "File content (file only, optional). Needs the deploy ability when set." + }, + "is_directory": { + "type": "boolean", + "description": "Whether this is a directory mount (file only, default false)." + }, + "fs_path": { + "type": "string", + "description": "Host path. Required for directory mounts and host file mounts. Optional for file mounts with content (default: inside the resource directory). An absolute path can be anywhere on the host; a relative path is inside the resource directory. A directory or file mount outside the resource directory needs a token with the deploy permission. Coolify never deletes a path outside the resource directory." + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "responses": { + "201": { + "description": "Storage created.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "The token needs the deploy permission for a mount outside the resource directory or for a file storage with content." + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "patch": { + "tags": [ + "Applications" + ], + "summary": "Update Storage", + "description": "Update a persistent storage or file storage by application UUID. Changed file content is saved right away and written to the server in the background, so a failed write does not change the response.", + "operationId": "update-storage-by-application-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Storage updated. For read-only storages (from docker-compose or services), only is_preview_suffix_enabled can be updated.", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "type" + ], + "properties": { + "uuid": { + "type": "string", + "description": "The UUID of the storage (preferred)." + }, + "id": { + "type": "integer", + "description": "The ID of the storage (deprecated, use uuid instead)." + }, + "type": { + "type": "string", + "enum": [ + "persistent", + "file" + ], + "description": "The type of storage: persistent or file." + }, + "is_preview_suffix_enabled": { + "type": "boolean", + "description": "Whether to add -pr-N suffix for preview deployments." + }, + "name": { + "type": "string", + "description": "The volume name (persistent only, not allowed for read-only storages)." + }, + "mount_path": { + "type": "string", + "description": "The container mount path (not allowed for read-only storages)." + }, + "content": { + "type": "string", + "nullable": true, + "description": "The file content (file only, not allowed for read-only storages). Changing the content needs the deploy permission." + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, + "responses": { + "200": { + "description": "Storage updated.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "The token needs the deploy permission to change the content of a file outside the resource directory." + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/applications/{uuid}/storages/{storage_uuid}": { + "delete": { + "tags": [ + "Applications" + ], + "summary": "Delete Storage", + "description": "Delete a persistent storage or file storage by application UUID.", + "operationId": "delete-storage-by-application-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "storage_uuid", + "in": "path", + "description": "UUID of the storage.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Storage deleted.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } }, "type": "object" } @@ -4619,6 +6269,133 @@ }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/applications/{uuid}/tags": { + "get": { + "tags": [ + "Applications" + ], + "summary": "List Tags", + "description": "List tags for an application by UUID.", + "operationId": "list-tags-by-application-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "List of tags.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Applications" + ], + "summary": "Create Tag", + "description": "Add tag(s) to an application by UUID.", + "operationId": "create-tag-by-application-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "tag_name": { + "type": "string", + "description": "The tag name (min 2 characters). Required if tag_names is not provided." + }, + "tag_names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Array of tag names (each min 2 characters). Required if tag_name is not provided." + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "Tags added successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -4626,14 +6403,65 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/applications/{uuid}/tags/{tag_uuid}": { + "delete": { "tags": [ "Applications" ], - "summary": "Update Env", - "description": "Update env by application UUID.", - "operationId": "update-env-by-application-uuid", + "summary": "Delete Tag", + "description": "Remove a tag from an application by UUID.", + "operationId": "delete-tag-by-application-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tag_uuid", + "in": "path", + "description": "UUID of the tag.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Tag removed." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/applications/{uuid}/clone": { + "post": { + "tags": [ + "Applications" + ], + "summary": "Clone", + "description": "Clone an application to a destination owned by the authenticated team.", + "operationId": "clone-application-by-uuid", "parameters": [ { "name": "uuid", @@ -4646,60 +6474,141 @@ } ], "requestBody": { - "description": "Env updated.", "required": true, "content": { "application/json": { "schema": { "required": [ - "key", - "value" + "destination_uuid" ], "properties": { - "key": { - "type": "string", - "description": "The key of the environment variable." - }, - "value": { - "type": "string", - "description": "The value of the environment variable." + "destination_uuid": { + "description": "UUID of the destination to clone into.", + "type": "string" }, - "is_preview": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is used in preview deployments." + "name": { + "description": "Optional name for the cloned application.", + "type": [ + "string", + "null" + ] }, - "is_literal": { + "clone_volumes": { + "description": "Whether to clone volume data. Needs the deploy ability.", "type": "boolean", - "description": "The flag to indicate if the environment variable is a literal, nothing espaced." + "default": false + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "Application cloned.", + "content": { + "application/json": { + "schema": { + "properties": { + "uuid": { + "type": "string" + }, + "message": { + "type": "string", + "example": "Application cloned." + } }, - "is_multiline": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is multiline." + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "The token needs the deploy ability to clone volume data." + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/applications/{uuid}/rollback-images": { + "get": { + "tags": [ + "Applications" + ], + "summary": "List Rollback Images", + "description": "List available Docker images for rolling back an application: images on the server (`local`) and, when a Docker registry image name is set, images of recent successful deployments in the registry (`registry`). Returns an empty list when the server is unavailable or remote inspection is not possible.", + "operationId": "list-application-rollback-images", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Rollback images.", + "content": { + "application/json": { + "schema": { + "properties": { + "current": { + "type": [ + "string", + "null" + ] + }, + "images": { + "type": "array", + "items": { + "properties": { + "tag": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "is_current": { + "type": "boolean" + }, + "source": { + "type": "string", + "enum": [ + "local", + "registry" + ] + } + }, + "type": "object" + } + } }, - "is_shown_once": { - "type": "boolean", - "description": "If true, the saved value is hidden in the UI and API responses. MCP never returns environment variable values." - } - }, - "type": "object" - } - } - } - }, - "responses": { - "201": { - "description": "Environment variable updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnvironmentVariable" + "type": "object" } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, @@ -4714,14 +6623,14 @@ ] } }, - "/applications/{uuid}/envs/bulk": { - "patch": { + "/applications/{uuid}/rollback": { + "post": { "tags": [ "Applications" ], - "summary": "Update Envs (Bulk)", - "description": "Update multiple envs by application UUID.", - "operationId": "update-envs-by-application-uuid", + "summary": "Rollback", + "description": "Queue a rollback deployment for an application to a previous image commit/tag.", + "operationId": "rollback-application-by-uuid", "parameters": [ { "name": "uuid", @@ -4734,46 +6643,17 @@ } ], "requestBody": { - "description": "Bulk envs updated.", "required": true, "content": { "application/json": { "schema": { "required": [ - "data" + "commit" ], "properties": { - "data": { - "type": "array", - "items": { - "properties": { - "key": { - "type": "string", - "description": "The key of the environment variable." - }, - "value": { - "type": "string", - "description": "The value of the environment variable." - }, - "is_preview": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is used in preview deployments." - }, - "is_literal": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is a literal, nothing espaced." - }, - "is_multiline": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is multiline." - }, - "is_shown_once": { - "type": "boolean", - "description": "If true, the saved value is hidden in the UI and API responses. MCP never returns environment variable values." - } - }, - "type": "object" - } + "commit": { + "description": "Image tag / commit to roll back to. Must be a tag from the rollback images list or the commit of a successful production deployment.", + "type": "string" } }, "type": "object" @@ -4782,15 +6662,20 @@ } }, "responses": { - "201": { - "description": "Environment variables updated.", + "200": { + "description": "Rollback deployment queued.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EnvironmentVariable" - } + "properties": { + "message": { + "type": "string" + }, + "deployment_uuid": { + "type": "string" + } + }, + "type": "object" } } } @@ -4803,6 +6688,9 @@ }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -4812,14 +6700,14 @@ ] } }, - "/applications/{uuid}/envs/{env_uuid}": { - "delete": { + "/applications/{uuid}/destinations": { + "get": { "tags": [ "Applications" ], - "summary": "Delete Env", - "description": "Delete env by UUID.", - "operationId": "delete-env-by-application-uuid", + "summary": "List Destinations", + "description": "List primary and additional destinations for a standalone application.", + "operationId": "list-application-destinations", "parameters": [ { "name": "uuid", @@ -4829,33 +6717,64 @@ "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Application destinations." }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ { - "name": "env_uuid", + "bearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Applications" + ], + "summary": "Add Destination", + "description": "Attach an additional standalone Docker destination to an application.", + "operationId": "add-application-destination", + "parameters": [ + { + "name": "uuid", "in": "path", - "description": "UUID of the environment variable.", + "description": "UUID of the application.", "required": true, "schema": { "type": "string" } } ], - "responses": { - "200": { - "description": "Environment variable deleted.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "Environment variable deleted." - } - }, - "type": "object" - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "destination_uuid" + ], + "properties": { + "destination_uuid": { + "type": "string" + } + }, + "type": "object" } } + } + }, + "responses": { + "201": { + "description": "Destination attached." }, "400": { "$ref": "#/components/responses/400" @@ -4865,6 +6784,9 @@ }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -4874,14 +6796,14 @@ ] } }, - "/applications/{uuid}/start": { - "post": { + "/applications/{uuid}/destinations/{destination_uuid}": { + "delete": { "tags": [ "Applications" ], - "summary": "Start", - "description": "Start application.", - "operationId": "start-application-by-uuid", + "summary": "Remove Destination", + "description": "Detach an additional destination from an application.", + "operationId": "remove-application-destination", "parameters": [ { "name": "uuid", @@ -4893,55 +6815,27 @@ } }, { - "name": "force", - "in": "query", - "description": "Force rebuild.", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "instant_deploy", - "in": "query", - "description": "Instant deploy (skip queuing).", + "name": "destination_uuid", + "in": "path", + "description": "UUID of the destination.", + "required": true, "schema": { - "type": "boolean", - "default": false + "type": "string" } } ], "responses": { "200": { - "description": "Start application.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "Deployment request queued.", - "description": "Message." - }, - "deployment_uuid": { - "type": "string", - "example": "doogksw", - "description": "UUID of the deployment." - } - }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "description": "Destination detached." }, "401": { "$ref": "#/components/responses/401" }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -4951,44 +6845,154 @@ ] } }, - "/applications/{uuid}/stop": { - "post": { + "/audit-events": { + "get": { "tags": [ - "Applications" + "Audit Events" ], - "summary": "Stop", - "description": "Stop application.", - "operationId": "stop-application-by-uuid", + "summary": "List", + "description": "List audit events of the team. Only team admins and owners can view audit events. Actor e-mail, token, metadata, changes, IP address, and user agent are returned only for tokens with the read:sensitive or root permission.", + "operationId": "list-audit-events", "parameters": [ { - "name": "uuid", - "in": "path", - "description": "UUID of the application.", - "required": true, + "name": "per_page", + "in": "query", + "description": "Items per page.", + "required": false, + "schema": { + "type": "integer", + "default": 25, + "maximum": 100, + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Page number.", + "required": false, + "schema": { + "type": "integer", + "default": 1, + "minimum": 1 + } + }, + { + "name": "search", + "in": "query", + "description": "Search text.", + "required": false, "schema": { - "type": "string" + "type": "string", + "maxLength": 255 } }, { - "name": "docker_cleanup", + "name": "action", "in": "query", - "description": "Run docker cleanup when the server disk usage is at or above its cleanup threshold. Skipped when a cleanup ran on the server in the last hour.", + "description": "Filter by action. Use all for every action.", + "required": false, "schema": { - "type": "boolean", - "default": true + "type": "string", + "maxLength": 255 + } + }, + { + "name": "source", + "in": "query", + "description": "Filter by source.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "all", + "ui", + "api", + "mcp", + "webhook", + "system", + "scheduler" + ] } } ], "responses": { "200": { - "description": "Stop application.", + "description": "A page of audit events, newest first.", "content": { "application/json": { "schema": { "properties": { - "message": { - "type": "string", - "example": "Application stopping request queued." + "current_page": { + "type": "integer" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "team_id": { + "type": "integer", + "nullable": true + }, + "event": { + "type": "string" + }, + "source": { + "type": "string" + }, + "action": { + "type": "string" + }, + "level": { + "type": "string" + }, + "actor_type": { + "type": "string", + "nullable": true + }, + "actor_id": { + "type": "integer", + "nullable": true + }, + "actor_name": { + "type": "string", + "nullable": true + }, + "resource_type": { + "type": "string", + "nullable": true + }, + "resource_uuid": { + "type": "string", + "nullable": true + }, + "resource_name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + } + }, + "per_page": { + "type": "integer" + }, + "last_page": { + "type": "integer" + }, + "total": { + "type": "integer" } }, "type": "object" @@ -4996,14 +7000,14 @@ } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" + "403": { + "description": "Only team admins and owners can view audit logs." + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -5013,55 +7017,23 @@ ] } }, - "/applications/{uuid}/restart": { - "post": { + "/cloud-init-scripts": { + "get": { "tags": [ - "Applications" - ], - "summary": "Restart", - "description": "Restart application.", - "operationId": "restart-application-by-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the application.", - "required": true, - "schema": { - "type": "string" - } - } + "Cloud-init Scripts" ], + "summary": "List Cloud-init Scripts", + "description": "List all cloud-init scripts for the authenticated team.", + "operationId": "list-cloud-init-scripts", "responses": { "200": { - "description": "Restart application.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "Restart request queued." - }, - "deployment_uuid": { - "type": "string", - "example": "doogksw", - "description": "UUID of the deployment." - } - }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "description": "Cloud-init scripts for the team." }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" + "403": { + "description": "Forbidden." } }, "security": [ @@ -5069,40 +7041,30 @@ "bearerAuth": [] } ] - } - }, - "/applications/{uuid}/move": { + }, "post": { "tags": [ - "Applications" - ], - "summary": "Move", - "description": "Move application to another project/environment. This is a purely organizational change — running containers are not affected. Note: after moving, the application will pick up shared environment variables from the new environment on the next deployment.", - "operationId": "move-application-by-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the application.", - "required": true, - "schema": { - "type": "string" - } - } + "Cloud-init Scripts" ], + "summary": "Create Cloud-init Script", + "description": "Create a new cloud-init script for the authenticated team.", + "operationId": "create-cloud-init-script", "requestBody": { - "description": "Target environment to move the application to.", "required": true, "content": { "application/json": { "schema": { "required": [ - "environment_uuid" + "name", + "script" ], "properties": { - "environment_uuid": { - "type": "string", - "description": "UUID of the target environment." + "name": { + "type": "string" + }, + "script": { + "description": "Bash script (#!) or cloud-config YAML.", + "type": "string" } }, "type": "object" @@ -5111,39 +7073,14 @@ } }, "responses": { - "200": { - "description": "Application moved successfully.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "Application moved successfully." - }, - "uuid": { - "type": "string" - }, - "project_uuid": { - "type": "string" - }, - "environment_uuid": { - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "201": { + "description": "Cloud-init script created." }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" + "403": { + "description": "Forbidden." }, "422": { "$ref": "#/components/responses/422" @@ -5156,64 +7093,36 @@ ] } }, - "/applications/{uuid}/migrate": { - "post": { + "/cloud-init-scripts/{uuid}": { + "get": { "tags": [ - "Applications" - ], - "summary": "Migrate to Server", - "description": "Migrate an application to another destination/server owned by the authenticated team. Stops the application, optionally transfers persistent volume data when both servers are managed by Coolify, and updates database records. Redeploy after migration completes.", - "operationId": "migrate-application-by-uuid", + "Cloud-init Scripts" + ], + "summary": "Get Cloud-init Script", + "description": "Get a cloud-init script by UUID.", + "operationId": "get-cloud-init-script-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the application.", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "destination_uuid" - ], - "properties": { - "destination_uuid": { - "description": "UUID of the target destination.", - "type": "string" - }, - "migrate_volumes": { - "description": "Whether to transfer persistent volume data when migrating across servers.", - "type": "boolean", - "default": true - } - }, - "type": "object" - } - } - } - }, "responses": { "200": { - "description": "Application migration started or completed." - }, - "400": { - "$ref": "#/components/responses/400" + "description": "Cloud-init script." }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "Forbidden." + }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -5221,21 +7130,18 @@ "bearerAuth": [] } ] - } - }, - "/applications/{uuid}/storages": { - "get": { + }, + "delete": { "tags": [ - "Applications" + "Cloud-init Scripts" ], - "summary": "List Storages", - "description": "List all persistent storages and file storages by application UUID.", - "operationId": "list-storages-by-application-uuid", + "summary": "Delete Cloud-init Script", + "description": "Delete a cloud-init script by UUID.", + "operationId": "delete-cloud-init-script-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the application.", "required": true, "schema": { "type": "string" @@ -5244,35 +7150,14 @@ ], "responses": { "200": { - "description": "All storages by application UUID.", - "content": { - "application/json": { - "schema": { - "properties": { - "persistent_storages": { - "type": "array", - "items": { - "type": "object" - } - }, - "file_storages": { - "type": "array", - "items": { - "type": "object" - } - } - }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "description": "Cloud-init script deleted." }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "Forbidden." + }, "404": { "$ref": "#/components/responses/404" } @@ -5283,18 +7168,17 @@ } ] }, - "post": { + "patch": { "tags": [ - "Applications" + "Cloud-init Scripts" ], - "summary": "Create Storage", - "description": "Create a persistent storage or file storage for an application.", - "operationId": "create-storage-by-application-uuid", + "summary": "Update Cloud-init Script", + "description": "Update a cloud-init script by UUID.", + "operationId": "update-cloud-init-script-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the application.", "required": true, "schema": { "type": "string" @@ -5306,54 +7190,90 @@ "content": { "application/json": { "schema": { - "required": [ - "type", - "mount_path" - ], "properties": { - "type": { - "type": "string", - "enum": [ - "persistent", - "file" - ], - "description": "The type of storage." - }, "name": { - "type": "string", - "description": "Volume name (persistent only, required for persistent)." - }, - "mount_path": { - "type": "string", - "description": "The container mount path." - }, - "content": { - "type": "string", - "nullable": true, - "description": "File content (file only, optional). Needs the deploy ability when set." - }, - "is_directory": { - "type": "boolean", - "description": "Whether this is a directory mount (file only, default false)." + "type": "string" }, - "fs_path": { - "type": "string", - "description": "Host path. Required for directory mounts and host file mounts. Optional for file mounts with content (default: inside the resource directory). An absolute path can be anywhere on the host; a relative path is inside the resource directory. A directory or file mount outside the resource directory needs a token with the deploy permission. Coolify never deletes a path outside the resource directory." + "script": { + "type": "string" } }, - "type": "object", - "additionalProperties": false + "type": "object" } } } }, "responses": { - "201": { - "description": "Storage created.", + "200": { + "description": "Cloud-init script updated." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "Forbidden." + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/cloud-tokens": { + "get": { + "tags": [ + "Cloud Tokens" + ], + "summary": "List Cloud Provider Tokens", + "description": "List all cloud provider tokens for the authenticated team.", + "operationId": "list-cloud-tokens", + "responses": { + "200": { + "description": "Get all cloud provider tokens.", "content": { "application/json": { "schema": { - "type": "object" + "type": "array", + "items": { + "properties": { + "uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "provider": { + "type": "string", + "enum": [ + "hetzner", + "digitalocean", + "vultr", + "hostinger" + ] + }, + "team_id": { + "type": "integer" + }, + "servers_count": { + "type": "integer" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "type": "object" + } } } } @@ -5365,13 +7285,7 @@ "$ref": "#/components/responses/401" }, "403": { - "description": "The token needs the deploy permission for a mount outside the resource directory or for a file storage with content." - }, - "404": { - "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" + "description": "Only team admins and owners can manage cloud provider tokens." } }, "security": [ @@ -5380,80 +7294,65 @@ } ] }, - "patch": { + "post": { "tags": [ - "Applications" - ], - "summary": "Update Storage", - "description": "Update a persistent storage or file storage by application UUID. Changed file content is saved right away and written to the server in the background, so a failed write does not change the response.", - "operationId": "update-storage-by-application-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the application.", - "required": true, - "schema": { - "type": "string" - } - } + "Cloud Tokens" ], + "summary": "Create Cloud Provider Token", + "description": "Create a new cloud provider token. The token will be validated before being stored.", + "operationId": "create-cloud-token", "requestBody": { - "description": "Storage updated. For read-only storages (from docker-compose or services), only is_preview_suffix_enabled can be updated.", + "description": "Cloud provider token details", "required": true, "content": { "application/json": { "schema": { "required": [ - "type" + "provider", + "token", + "name" ], "properties": { - "uuid": { - "type": "string", - "description": "The UUID of the storage (preferred)." - }, - "id": { - "type": "integer", - "description": "The ID of the storage (deprecated, use uuid instead)." - }, - "type": { - "type": "string", - "enum": [ - "persistent", - "file" - ], - "description": "The type of storage: persistent or file." - }, - "is_preview_suffix_enabled": { - "type": "boolean", - "description": "Whether to add -pr-N suffix for preview deployments." - }, - "name": { + "provider": { "type": "string", - "description": "The volume name (persistent only, not allowed for read-only storages)." + "enum": [ + "hetzner", + "digitalocean", + "vultr", + "hostinger" + ], + "example": "hetzner", + "description": "The cloud provider." }, - "mount_path": { + "token": { "type": "string", - "description": "The container mount path (not allowed for read-only storages)." + "example": "your-api-token-here", + "description": "The API token for the cloud provider." }, - "content": { + "name": { "type": "string", - "nullable": true, - "description": "The file content (file only, not allowed for read-only storages). Changing the content needs the deploy permission." + "example": "My Hetzner Token", + "description": "A friendly name for the token." } }, - "type": "object", - "additionalProperties": false + "type": "object" } } } }, "responses": { - "200": { - "description": "Storage updated.", + "201": { + "description": "Cloud provider token created.", "content": { "application/json": { "schema": { + "properties": { + "uuid": { + "type": "string", + "example": "og888os", + "description": "The UUID of the token." + } + }, "type": "object" } } @@ -5466,10 +7365,7 @@ "$ref": "#/components/responses/401" }, "403": { - "description": "The token needs the deploy permission to change the content of a file outside the resource directory." - }, - "404": { - "$ref": "#/components/responses/404" + "description": "Only team admins and owners can manage cloud provider tokens." }, "422": { "$ref": "#/components/responses/422" @@ -5482,28 +7378,19 @@ ] } }, - "/applications/{uuid}/storages/{storage_uuid}": { - "delete": { + "/cloud-tokens/{uuid}": { + "get": { "tags": [ - "Applications" + "Cloud Tokens" ], - "summary": "Delete Storage", - "description": "Delete a persistent storage or file storage by application UUID.", - "operationId": "delete-storage-by-application-uuid", + "summary": "Get Cloud Provider Token", + "description": "Get cloud provider token by UUID.", + "operationId": "get-cloud-token-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the application.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "storage_uuid", - "in": "path", - "description": "UUID of the storage.", + "description": "Token UUID", "required": true, "schema": { "type": "string" @@ -5512,12 +7399,30 @@ ], "responses": { "200": { - "description": "Storage deleted.", + "description": "Get cloud provider token by UUID", "content": { "application/json": { "schema": { "properties": { - "message": { + "uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "team_id": { + "type": "integer" + }, + "servers_count": { + "type": "integer" + }, + "created_at": { + "type": "string" + }, + "updated_at": { "type": "string" } }, @@ -5526,17 +7431,14 @@ } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "Only team admins and owners can manage cloud provider tokens." + }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -5544,21 +7446,19 @@ "bearerAuth": [] } ] - } - }, - "/applications/{uuid}/tags": { - "get": { + }, + "delete": { "tags": [ - "Applications" + "Cloud Tokens" ], - "summary": "List Tags", - "description": "List tags for an application by UUID.", - "operationId": "list-tags-by-application-uuid", + "summary": "Delete Cloud Provider Token", + "description": "Delete cloud provider token by UUID. Cannot delete if token is used by any servers.", + "operationId": "delete-cloud-token-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the application.", + "description": "UUID of the cloud provider token.", "required": true, "schema": { "type": "string" @@ -5567,14 +7467,17 @@ ], "responses": { "200": { - "description": "List of tags.", + "description": "Cloud provider token deleted.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Tag" - } + "properties": { + "message": { + "type": "string", + "example": "Cloud provider token deleted." + } + }, + "type": "object" } } } @@ -5585,6 +7488,9 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "Only team admins and owners can manage cloud provider tokens." + }, "404": { "$ref": "#/components/responses/404" } @@ -5595,18 +7501,18 @@ } ] }, - "post": { + "patch": { "tags": [ - "Applications" + "Cloud Tokens" ], - "summary": "Create Tag", - "description": "Add tag(s) to an application by UUID.", - "operationId": "create-tag-by-application-uuid", + "summary": "Update Cloud Provider Token", + "description": "Update cloud provider token name.", + "operationId": "update-cloud-token-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the application.", + "description": "Token UUID", "required": true, "schema": { "type": "string" @@ -5614,21 +7520,15 @@ } ], "requestBody": { + "description": "Cloud provider token updated.", "required": true, "content": { "application/json": { "schema": { "properties": { - "tag_name": { + "name": { "type": "string", - "description": "The tag name (min 2 characters). Required if tag_names is not provided." - }, - "tag_names": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Array of tag names (each min 2 characters). Required if tag_name is not provided." + "description": "The friendly name for the token." } }, "type": "object" @@ -5637,25 +7537,27 @@ } }, "responses": { - "201": { - "description": "Tags added successfully.", + "200": { + "description": "Cloud provider token updated.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Tag" - } + "properties": { + "uuid": { + "type": "string" + } + }, + "type": "object" } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "Only team admins and owners can manage cloud provider tokens." + }, "404": { "$ref": "#/components/responses/404" }, @@ -5670,28 +7572,75 @@ ] } }, - "/applications/{uuid}/tags/{tag_uuid}": { - "delete": { + "/cloud-tokens/{uuid}/validate": { + "post": { "tags": [ - "Applications" + "Cloud Tokens" ], - "summary": "Delete Tag", - "description": "Remove a tag from an application by UUID.", - "operationId": "delete-tag-by-application-uuid", + "summary": "Validate Cloud Provider Token", + "description": "Validate a cloud provider token against the provider API.", + "operationId": "validate-cloud-token-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the application.", + "description": "Token UUID", "required": true, "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Token validation result.", + "content": { + "application/json": { + "schema": { + "properties": { + "valid": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Token is valid." + } + }, + "type": "object" + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "Only team admins and owners can manage cloud provider tokens." }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ { - "name": "tag_uuid", + "bearerAuth": [] + } + ] + } + }, + "/databases/{uuid}/imports/uploads": { + "post": { + "tags": [ + "Databases" + ], + "summary": "Upload database import", + "operationId": "upload-database-import", + "parameters": [ + { + "name": "uuid", "in": "path", - "description": "UUID of the tag.", + "description": "UUID of the database.", "required": true, "schema": { "type": "string" @@ -5699,17 +7648,11 @@ } ], "responses": { - "200": { - "description": "Tag removed." - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" + "201": { + "description": "Upload completed" }, - "404": { - "$ref": "#/components/responses/404" + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -5719,19 +7662,19 @@ ] } }, - "/applications/{uuid}/clone": { + "/databases/{uuid}/imports": { "post": { "tags": [ - "Applications" + "Databases" ], - "summary": "Clone", - "description": "Clone an application to a destination owned by the authenticated team.", - "operationId": "clone-application-by-uuid", + "summary": "Import database backup", + "description": "Restore a backup into the database. Every import source requires the deploy ability.", + "operationId": "create-database-import", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the application.", + "description": "UUID of the database.", "required": true, "schema": { "type": "string" @@ -5743,63 +7686,20 @@ "content": { "application/json": { "schema": { - "required": [ - "destination_uuid" - ], - "properties": { - "destination_uuid": { - "description": "UUID of the destination to clone into.", - "type": "string" - }, - "name": { - "description": "Optional name for the cloned application.", - "type": [ - "string", - "null" - ] - }, - "clone_volumes": { - "description": "Whether to clone volume data. Needs the deploy ability.", - "type": "boolean", - "default": false - } - }, - "type": "object" + "$ref": "#/components/schemas/DatabaseImportRequest" } } } }, "responses": { - "201": { - "description": "Application cloned.", - "content": { - "application/json": { - "schema": { - "properties": { - "uuid": { - "type": "string" - }, - "message": { - "type": "string", - "example": "Application cloned." - } - }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" + "202": { + "description": "Import queued" }, "403": { - "description": "The token needs the deploy ability to clone volume data." + "description": "The token needs the deploy ability." }, - "404": { - "$ref": "#/components/responses/404" + "409": { + "description": "Another start, restart or import of this database is already in progress." }, "422": { "$ref": "#/components/responses/422" @@ -5812,71 +7712,44 @@ ] } }, - "/applications/{uuid}/rollback-images": { + "/databases/{uuid}/imports/{activity_id}": { "get": { "tags": [ - "Applications" + "Databases" ], - "summary": "List Rollback Images", - "description": "List available Docker images for rolling back an application: images on the server (`local`) and, when a Docker registry image name is set, images of recent successful deployments in the registry (`registry`). Returns an empty list when the server is unavailable or remote inspection is not possible.", - "operationId": "list-application-rollback-images", + "summary": "Get database import status", + "operationId": "get-database-import", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the application.", + "description": "UUID of the database.", "required": true, "schema": { "type": "string" } + }, + { + "name": "activity_id", + "in": "path", + "description": "Import activity ID.", + "required": true, + "schema": { + "type": "integer" + } } ], "responses": { "200": { - "description": "Rollback images.", + "description": "Import status", "content": { "application/json": { "schema": { - "properties": { - "current": { - "type": [ - "string", - "null" - ] - }, - "images": { - "type": "array", - "items": { - "properties": { - "tag": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "is_current": { - "type": "boolean" - }, - "source": { - "type": "string", - "enum": [ - "local", - "registry" - ] - } - }, - "type": "object" - } - } - }, - "type": "object" + "$ref": "#/components/schemas/DatabaseImportStatus" } } } }, - "401": { - "$ref": "#/components/responses/401" - }, "404": { "$ref": "#/components/responses/404" } @@ -5888,59 +7761,24 @@ ] } }, - "/applications/{uuid}/rollback": { - "post": { + "/databases": { + "get": { "tags": [ - "Applications" - ], - "summary": "Rollback", - "description": "Queue a rollback deployment for an application to a previous image commit/tag.", - "operationId": "rollback-application-by-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the application.", - "required": true, - "schema": { - "type": "string" - } - } + "Databases" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "commit" - ], - "properties": { - "commit": { - "description": "Image tag / commit to roll back to.", - "type": "string" - } - }, - "type": "object" - } - } - } - }, + "summary": "List", + "description": "List all databases.", + "operationId": "list-databases", "responses": { "200": { - "description": "Rollback deployment queued.", + "description": "Get all databases", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" - }, - "deployment_uuid": { - "type": "string" - } - }, - "type": "object" + "type": "array", + "items": { + "$ref": "#/components/schemas/Database" + } } } } @@ -5950,12 +7788,6 @@ }, "401": { "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -5965,19 +7797,19 @@ ] } }, - "/applications/{uuid}/destinations": { + "/databases/{uuid}/backups": { "get": { "tags": [ - "Applications" + "Databases" ], - "summary": "List Destinations", - "description": "List primary and additional destinations for a standalone application.", - "operationId": "list-application-destinations", + "summary": "Get", + "description": "Get backups details by database UUID.", + "operationId": "get-database-backups-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the application.", + "description": "UUID of the database.", "required": true, "schema": { "type": "string" @@ -5986,7 +7818,18 @@ ], "responses": { "200": { - "description": "Application destinations." + "description": "Get all backups for a database. Each backup includes s3_storage_uuid (primary S3 destination) and s3_storage_uuids (every S3 destination, primary first).", + "content": { + "application/json": { + "schema": { + "type": "string" + }, + "example": "Content is very complex. Will be implemented later." + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" @@ -6003,16 +7846,16 @@ }, "post": { "tags": [ - "Applications" + "Databases" ], - "summary": "Add Destination", - "description": "Attach an additional standalone Docker destination to an application.", - "operationId": "add-application-destination", + "summary": "Create Backup", + "description": "Create a new scheduled backup configuration for a database", + "operationId": "create-database-backup", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the application.", + "description": "UUID of the database.", "required": true, "schema": { "type": "string" @@ -6020,16 +7863,93 @@ } ], "requestBody": { + "description": "Backup configuration data", "required": true, "content": { "application/json": { "schema": { "required": [ - "destination_uuid" + "frequency" ], "properties": { - "destination_uuid": { - "type": "string" + "frequency": { + "type": "string", + "description": "Backup frequency (cron expression or: every_minute, hourly, daily, weekly, monthly, yearly)" + }, + "enabled": { + "type": "boolean", + "description": "Whether the backup is enabled", + "default": true + }, + "save_s3": { + "type": "boolean", + "description": "Whether to save backups to S3", + "default": false + }, + "disable_local_backup": { + "type": "boolean", + "description": "Delete the local backup file after the upload to S3. Only allowed when save_s3 is true.", + "default": false + }, + "s3_storage_uuid": { + "type": "string", + "description": "Primary S3 storage UUID. Sent without s3_storage_uuids, it selects this storage as the only destination. Either field is required if save_s3 is true." + }, + "s3_storage_uuids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "UUIDs of every S3 storage the backup is uploaded to. Replaces the current destinations. When s3_storage_uuid is also sent, it must be in this list and becomes the primary destination; otherwise the first entry is the primary destination." + }, + "databases_to_backup": { + "type": "string", + "description": "Comma separated list of databases to backup" + }, + "dump_all": { + "type": "boolean", + "description": "Whether to dump all databases", + "default": false + }, + "backup_now": { + "type": "boolean", + "description": "Whether to trigger backup immediately after creation. Needs a token with the deploy permission." + }, + "database_backup_retention_amount_locally": { + "type": "integer", + "description": "Number of backups to retain locally" + }, + "database_backup_retention_days_locally": { + "type": "integer", + "description": "Number of days to retain backups locally" + }, + "database_backup_retention_max_storage_locally": { + "type": "number", + "description": "Max storage (GB) for local backups" + }, + "database_backup_retention_amount_s3": { + "type": "integer", + "description": "Number of backups to retain in S3" + }, + "database_backup_retention_days_s3": { + "type": "integer", + "description": "Number of days to retain backups in S3" + }, + "database_backup_retention_max_storage_s3": { + "type": "number", + "description": "Max storage (GB) for S3 backups" + }, + "timeout": { + "type": "integer", + "description": "Backup job timeout in seconds (min: 60, max: 36000)", + "default": 3600 + }, + "missing_backup_notification_days": { + "type": "integer", + "description": "Alert after this many days without an execution; 0 disables alerts", + "minimum": 0, + "maximum": 365, + "default": 0 } }, "type": "object" @@ -6039,7 +7959,25 @@ }, "responses": { "201": { - "description": "Destination attached." + "description": "Backup configuration created successfully", + "content": { + "application/json": { + "schema": { + "properties": { + "uuid": { + "type": "string", + "format": "uuid", + "example": "550e8400-e29b-41d4-a716-446655440000" + }, + "message": { + "type": "string", + "example": "Backup configuration created successfully." + } + }, + "type": "object" + } + } + } }, "400": { "$ref": "#/components/responses/400" @@ -6047,6 +7985,9 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the deploy permission to use backup_now." + }, "404": { "$ref": "#/components/responses/404" }, @@ -6061,28 +8002,19 @@ ] } }, - "/applications/{uuid}/destinations/{destination_uuid}": { - "delete": { + "/databases/{uuid}": { + "get": { "tags": [ - "Applications" + "Databases" ], - "summary": "Remove Destination", - "description": "Detach an additional destination from an application.", - "operationId": "remove-application-destination", + "summary": "Get", + "description": "Get database by UUID.", + "operationId": "get-database-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the application.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "destination_uuid", - "in": "path", - "description": "UUID of the destination.", + "description": "UUID of the database.", "required": true, "schema": { "type": "string" @@ -6091,16 +8023,23 @@ ], "responses": { "200": { - "description": "Destination detached." + "description": "Get database by UUID", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Database" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -6108,197 +8047,93 @@ "bearerAuth": [] } ] - } - }, - "/audit-events": { - "get": { + }, + "delete": { "tags": [ - "Audit Events" + "Databases" ], - "summary": "List", - "description": "List audit events of the team. Only team admins and owners can view audit events. Actor e-mail, token, metadata, changes, IP address, and user agent are returned only for tokens with the read:sensitive or root permission.", - "operationId": "list-audit-events", + "summary": "Delete", + "description": "Delete database by UUID. Needs a token with the write and deploy permissions.", + "operationId": "delete-database-by-uuid", "parameters": [ { - "name": "per_page", - "in": "query", - "description": "Items per page.", - "required": false, - "schema": { - "type": "integer", - "default": 25, - "maximum": 100, - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Page number.", - "required": false, - "schema": { - "type": "integer", - "default": 1, - "minimum": 1 - } - }, - { - "name": "search", - "in": "query", - "description": "Search text.", - "required": false, - "schema": { - "type": "string", - "maxLength": 255 - } - }, - { - "name": "action", - "in": "query", - "description": "Filter by action. Use all for every action.", - "required": false, - "schema": { - "type": "string", - "maxLength": 255 - } - }, - { - "name": "source", - "in": "query", - "description": "Filter by source.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "all", - "ui", - "api", - "mcp", - "webhook", - "system", - "scheduler" - ] - } - } - ], - "responses": { - "200": { - "description": "A page of audit events, newest first.", - "content": { - "application/json": { - "schema": { - "properties": { - "current_page": { - "type": "integer" - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "team_id": { - "type": "integer", - "nullable": true - }, - "event": { - "type": "string" - }, - "source": { - "type": "string" - }, - "action": { - "type": "string" - }, - "level": { - "type": "string" - }, - "actor_type": { - "type": "string", - "nullable": true - }, - "actor_id": { - "type": "integer", - "nullable": true - }, - "actor_name": { - "type": "string", - "nullable": true - }, - "resource_type": { - "type": "string", - "nullable": true - }, - "resource_uuid": { - "type": "string", - "nullable": true - }, - "resource_name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time" - } - } - } - }, - "per_page": { - "type": "integer" - }, - "last_page": { - "type": "integer" - }, - "total": { - "type": "integer" - } - }, - "type": "object" - } - } + "name": "uuid", + "in": "path", + "description": "UUID of the database.", + "required": true, + "schema": { + "type": "string" } }, - "401": { - "$ref": "#/components/responses/401" + { + "name": "delete_configurations", + "in": "query", + "description": "Delete configurations.", + "required": false, + "schema": { + "type": "boolean", + "default": true + } }, - "403": { - "description": "Only team admins and owners can view audit logs." + { + "name": "delete_volumes", + "in": "query", + "description": "Delete volumes.", + "required": false, + "schema": { + "type": "boolean", + "default": true + } }, - "422": { - "$ref": "#/components/responses/422" - } - }, - "security": [ { - "bearerAuth": [] + "name": "docker_cleanup", + "in": "query", + "description": "Run docker cleanup when the server disk usage is at or above its cleanup threshold. Skipped when a cleanup ran on the server in the last hour.", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "delete_connected_networks", + "in": "query", + "description": "Delete connected networks.", + "required": false, + "schema": { + "type": "boolean", + "default": true + } } - ] - } - }, - "/cloud-init-scripts": { - "get": { - "tags": [ - "Cloud-init Scripts" ], - "summary": "List Cloud-init Scripts", - "description": "List all cloud-init scripts for the authenticated team.", - "operationId": "list-cloud-init-scripts", "responses": { "200": { - "description": "Cloud-init scripts for the team." + "description": "Database deleted.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Database deleted." + } + }, + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, "403": { - "description": "Forbidden." + "description": "The token needs the write and deploy permissions." + }, + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -6307,29 +8142,239 @@ } ] }, - "post": { + "patch": { "tags": [ - "Cloud-init Scripts" + "Databases" + ], + "summary": "Update", + "description": "Update database by UUID.", + "operationId": "update-database-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the database.", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Create Cloud-init Script", - "description": "Create a new cloud-init script for the authenticated team.", - "operationId": "create-cloud-init-script", "requestBody": { + "description": "Database data", "required": true, "content": { "application/json": { "schema": { - "required": [ - "name", - "script" - ], "properties": { "name": { - "type": "string" + "type": "string", + "description": "Name of the database" + }, + "description": { + "type": "string", + "description": "Description of the database" + }, + "image": { + "type": "string", + "description": "Docker Image of the database" + }, + "is_public": { + "type": "boolean", + "description": "Is the database public? Changing it starts or stops the database proxy, so it needs a token with the deploy permission." + }, + "public_port": { + "type": "integer", + "description": "Public port of the database (1024-65535)" + }, + "public_port_timeout": { + "type": "integer", + "description": "Public port timeout in seconds (default: 3600)" + }, + "limits_memory": { + "type": "string", + "description": "Memory limit of the database" + }, + "limits_memory_swap": { + "type": "string", + "description": "Memory swap limit of the database" + }, + "limits_memory_swappiness": { + "type": "integer", + "description": "Memory swappiness of the database" + }, + "limits_memory_reservation": { + "type": "string", + "description": "Memory reservation of the database" + }, + "limits_cpus": { + "type": "string", + "description": "CPU limit of the database" + }, + "limits_cpuset": { + "type": "string", + "description": "CPU set of the database" + }, + "limits_cpu_shares": { + "type": "integer", + "description": "CPU shares of the database" + }, + "instant_deploy": { + "type": "boolean", + "description": "Restart the database after the update. Requires the deploy ability." + }, + "postgres_user": { + "type": "string", + "description": "PostgreSQL user" + }, + "postgres_password": { + "type": "string", + "description": "PostgreSQL password" + }, + "postgres_db": { + "type": "string", + "description": "PostgreSQL database" + }, + "postgres_initdb_args": { + "type": "string", + "description": "PostgreSQL initdb args" + }, + "postgres_host_auth_method": { + "type": "string", + "description": "PostgreSQL host auth method" + }, + "postgres_conf": { + "type": "string", + "description": "PostgreSQL conf" + }, + "clickhouse_admin_user": { + "type": "string", + "description": "Clickhouse admin user" + }, + "clickhouse_admin_password": { + "type": "string", + "description": "Clickhouse admin password" + }, + "dragonfly_password": { + "type": "string", + "description": "DragonFly password" + }, + "redis_password": { + "type": "string", + "description": "Redis password" + }, + "redis_conf": { + "type": "string", + "description": "Redis conf" + }, + "keydb_password": { + "type": "string", + "description": "KeyDB password" + }, + "keydb_conf": { + "type": "string", + "description": "KeyDB conf" + }, + "mariadb_conf": { + "type": "string", + "description": "MariaDB conf" + }, + "mariadb_root_password": { + "type": "string", + "description": "MariaDB root password" + }, + "mariadb_user": { + "type": "string", + "description": "MariaDB user" + }, + "mariadb_password": { + "type": "string", + "description": "MariaDB password" + }, + "mariadb_database": { + "type": "string", + "description": "MariaDB database" + }, + "mongo_conf": { + "type": "string", + "description": "Mongo conf" + }, + "mongo_initdb_root_username": { + "type": "string", + "description": "Mongo initdb root username" + }, + "mongo_initdb_root_password": { + "type": "string", + "description": "Mongo initdb root password" + }, + "mongo_initdb_database": { + "type": "string", + "description": "Mongo initdb init database" + }, + "mysql_root_password": { + "type": "string", + "description": "MySQL root password" }, - "script": { - "description": "Bash script (#!) or cloud-config YAML.", - "type": "string" + "mysql_password": { + "type": "string", + "description": "MySQL password" + }, + "mysql_user": { + "type": "string", + "description": "MySQL user" + }, + "mysql_database": { + "type": "string", + "description": "MySQL database" + }, + "mysql_conf": { + "type": "string", + "description": "MySQL conf" + }, + "sqlite_databases": { + "type": "string", + "description": "Comma-separated SQLite database file names" + }, + "health_check_enabled": { + "type": "boolean", + "description": "Enable the database healthcheck probe.", + "default": true + }, + "health_check_interval": { + "type": "integer", + "description": "Healthcheck interval in seconds.", + "minimum": 1, + "default": 15 + }, + "health_check_timeout": { + "type": "integer", + "description": "Healthcheck timeout in seconds.", + "minimum": 1, + "default": 5 + }, + "health_check_retries": { + "type": "integer", + "description": "Healthcheck retries count.", + "minimum": 1, + "default": 5 + }, + "health_check_start_period": { + "type": "integer", + "description": "Healthcheck start period in seconds.", + "minimum": 0, + "default": 5 + }, + "redact_all_env_values_in_logs": { + "type": "boolean", + "description": "Redact all environment variable values in logs. When false, only locked (shown once) values, database passwords, and remote secrets are redacted. Requires team admin permissions." + }, + "include_coolify_default_variables": { + "type": "boolean", + "description": "Add the predefined COOLIFY_* variables (COOLIFY_URL, COOLIFY_FQDN, ...) to the environment. Requires team admin permissions. Restart the database to apply it." + }, + "is_log_drain_enabled": { + "type": "boolean", + "description": "Send the database logs to the log drain of the server. Log drain must be enabled on the server. Restart the database to apply it." } }, "type": "object" @@ -6338,14 +8383,20 @@ } }, "responses": { - "201": { - "description": "Cloud-init script created." + "200": { + "description": "Database updated" + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, "403": { - "description": "Forbidden." + "description": "The token needs the deploy permission to change is_public or to use instant_deploy." + }, + "404": { + "$ref": "#/components/responses/404" }, "422": { "$ref": "#/components/responses/422" @@ -6358,36 +8409,76 @@ ] } }, - "/cloud-init-scripts/{uuid}": { - "get": { + "/databases/{uuid}/backups/{scheduled_backup_uuid}": { + "delete": { "tags": [ - "Cloud-init Scripts" + "Databases" ], - "summary": "Get Cloud-init Script", - "description": "Get a cloud-init script by UUID.", - "operationId": "get-cloud-init-script-by-uuid", + "summary": "Delete backup configuration", + "description": "Deletes a backup configuration and all its executions.", + "operationId": "delete-backup-configuration-by-uuid", "parameters": [ { "name": "uuid", "in": "path", + "description": "UUID of the database", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "scheduled_backup_uuid", + "in": "path", + "description": "UUID of the backup configuration to delete", "required": true, "schema": { "type": "string" } + }, + { + "name": "delete_s3", + "in": "query", + "description": "Whether to delete all backup files from S3", + "required": false, + "schema": { + "type": "boolean", + "default": false + } } ], "responses": { "200": { - "description": "Cloud-init script." - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "description": "Forbidden." + "description": "Backup configuration deleted.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Backup configuration and all executions deleted." + } + }, + "type": "object" + } + } + } }, "404": { - "$ref": "#/components/responses/404" + "description": "Backup configuration not found.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Backup configuration not found." + } + }, + "type": "object" + } + } + } } }, "security": [ @@ -6396,35 +8487,138 @@ } ] }, - "delete": { + "patch": { "tags": [ - "Cloud-init Scripts" + "Databases" ], - "summary": "Delete Cloud-init Script", - "description": "Delete a cloud-init script by UUID.", - "operationId": "delete-cloud-init-script-by-uuid", + "summary": "Update", + "description": "Update a specific backup configuration for a given database, identified by its UUID and the backup ID", + "operationId": "update-database-backup", "parameters": [ { "name": "uuid", "in": "path", + "description": "UUID of the database.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "scheduled_backup_uuid", + "in": "path", + "description": "UUID of the backup configuration.", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "description": "Database backup configuration data", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "save_s3": { + "type": "boolean", + "description": "Whether data is saved in s3 or not" + }, + "disable_local_backup": { + "type": "boolean", + "description": "Delete the local backup file after the upload to S3. Only allowed when save_s3 is true. Turning save_s3 off also turns this off." + }, + "s3_storage_uuid": { + "type": "string", + "description": "Primary S3 storage UUID. Sent without s3_storage_uuids, it selects this storage as the only destination; when it is already a destination, it becomes the primary destination and the other destinations stay." + }, + "s3_storage_uuids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "UUIDs of every S3 storage the backup is uploaded to. Replaces the current destinations. When s3_storage_uuid is also sent, it must be in this list and becomes the primary destination; otherwise the first entry is the primary destination." + }, + "backup_now": { + "type": "boolean", + "description": "Whether to take a backup now or not. Needs a token with the deploy permission." + }, + "enabled": { + "type": "boolean", + "description": "Whether the backup is enabled or not" + }, + "databases_to_backup": { + "type": "string", + "description": "Comma separated list of databases to backup" + }, + "dump_all": { + "type": "boolean", + "description": "Whether all databases are dumped or not" + }, + "frequency": { + "type": "string", + "description": "Frequency of the backup" + }, + "database_backup_retention_amount_locally": { + "type": "integer", + "description": "Retention amount of the backup locally" + }, + "database_backup_retention_days_locally": { + "type": "integer", + "description": "Retention days of the backup locally" + }, + "database_backup_retention_max_storage_locally": { + "type": "number", + "description": "Max storage of the backup locally" + }, + "database_backup_retention_amount_s3": { + "type": "integer", + "description": "Retention amount of the backup in s3" + }, + "database_backup_retention_days_s3": { + "type": "integer", + "description": "Retention days of the backup in s3" + }, + "database_backup_retention_max_storage_s3": { + "type": "number", + "description": "Max storage of the backup in S3" + }, + "timeout": { + "type": "integer", + "description": "Backup job timeout in seconds (min: 60, max: 36000)", + "default": 3600 + }, + "missing_backup_notification_days": { + "type": "integer", + "description": "Alert after this many days without an execution; 0 disables alerts", + "minimum": 0, + "maximum": 365 + } + }, + "type": "object" + } + } + } + }, "responses": { "200": { - "description": "Cloud-init script deleted." + "description": "Database backup configuration updated" + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, "403": { - "description": "Forbidden." + "description": "The token needs the deploy permission to use backup_now." }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -6432,35 +8626,133 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/databases/postgresql": { + "post": { "tags": [ - "Cloud-init Scripts" - ], - "summary": "Update Cloud-init Script", - "description": "Update a cloud-init script by UUID.", - "operationId": "update-cloud-init-script-by-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } + "Databases" ], + "summary": "Create (PostgreSQL)", + "description": "Create a new PostgreSQL database.", + "operationId": "create-database-postgresql", "requestBody": { + "description": "Database data", "required": true, "content": { "application/json": { "schema": { + "required": [ + "server_uuid", + "project_uuid" + ], "properties": { + "server_uuid": { + "type": "string", + "description": "UUID of the server" + }, + "project_uuid": { + "type": "string", + "description": "UUID of the project" + }, + "environment_name": { + "type": "string", + "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." + }, + "environment_uuid": { + "type": "string", + "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." + }, + "postgres_user": { + "type": "string", + "description": "PostgreSQL user" + }, + "postgres_password": { + "type": "string", + "description": "PostgreSQL password" + }, + "postgres_db": { + "type": "string", + "description": "PostgreSQL database" + }, + "postgres_initdb_args": { + "type": "string", + "description": "PostgreSQL initdb args" + }, + "postgres_host_auth_method": { + "type": "string", + "description": "PostgreSQL host auth method" + }, + "postgres_conf": { + "type": "string", + "description": "PostgreSQL conf" + }, + "destination_uuid": { + "type": "string", + "description": "UUID of the destination if the server has multiple destinations" + }, "name": { - "type": "string" + "type": "string", + "description": "Name of the database" }, - "script": { - "type": "string" + "description": { + "type": "string", + "description": "Description of the database" + }, + "image": { + "type": "string", + "description": "Docker Image of the database" + }, + "is_public": { + "type": "boolean", + "description": "Is the database public?" + }, + "public_port": { + "type": "integer", + "description": "Public port of the database" + }, + "public_port_timeout": { + "type": "integer", + "description": "Public port timeout in seconds (default: 3600)" + }, + "limits_memory": { + "type": "string", + "description": "Memory limit of the database" + }, + "limits_memory_swap": { + "type": "string", + "description": "Memory swap limit of the database" + }, + "limits_memory_swappiness": { + "type": "integer", + "description": "Memory swappiness of the database" + }, + "limits_memory_reservation": { + "type": "string", + "description": "Memory reservation of the database" + }, + "limits_cpus": { + "type": "string", + "description": "CPU limit of the database" + }, + "limits_cpuset": { + "type": "string", + "description": "CPU set of the database" + }, + "limits_cpu_shares": { + "type": "integer", + "description": "CPU shares of the database" + }, + "instant_deploy": { + "type": "boolean", + "description": "Instant deploy the database" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags to assign to the database." } }, "type": "object" @@ -6470,17 +8762,14 @@ }, "responses": { "200": { - "description": "Cloud-init script updated." + "description": "Database updated" + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "Forbidden." - }, - "404": { - "$ref": "#/components/responses/404" - }, "422": { "$ref": "#/components/responses/422" } @@ -6492,62 +8781,134 @@ ] } }, - "/cloud-tokens": { - "get": { + "/databases/clickhouse": { + "post": { "tags": [ - "Cloud Tokens" + "Databases" ], - "summary": "List Cloud Provider Tokens", - "description": "List all cloud provider tokens for the authenticated team.", - "operationId": "list-cloud-tokens", - "responses": { - "200": { - "description": "Get all cloud provider tokens.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "properties": { - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider": { - "type": "string", - "enum": [ - "hetzner", - "digitalocean", - "vultr", - "hostinger" - ] - }, - "team_id": { - "type": "integer" - }, - "servers_count": { - "type": "integer" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } + "summary": "Create (Clickhouse)", + "description": "Create a new Clickhouse database.", + "operationId": "create-database-clickhouse", + "requestBody": { + "description": "Database data", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "server_uuid", + "project_uuid" + ], + "properties": { + "server_uuid": { + "type": "string", + "description": "UUID of the server" + }, + "project_uuid": { + "type": "string", + "description": "UUID of the project" + }, + "environment_name": { + "type": "string", + "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." + }, + "environment_uuid": { + "type": "string", + "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." + }, + "destination_uuid": { + "type": "string", + "description": "UUID of the destination if the server has multiple destinations" + }, + "clickhouse_admin_user": { + "type": "string", + "description": "Clickhouse admin user" + }, + "clickhouse_admin_password": { + "type": "string", + "description": "Clickhouse admin password" + }, + "name": { + "type": "string", + "description": "Name of the database" + }, + "description": { + "type": "string", + "description": "Description of the database" + }, + "image": { + "type": "string", + "description": "Docker Image of the database" + }, + "is_public": { + "type": "boolean", + "description": "Is the database public?" + }, + "public_port": { + "type": "integer", + "description": "Public port of the database" + }, + "public_port_timeout": { + "type": "integer", + "description": "Public port timeout in seconds (default: 3600)" + }, + "limits_memory": { + "type": "string", + "description": "Memory limit of the database" + }, + "limits_memory_swap": { + "type": "string", + "description": "Memory swap limit of the database" + }, + "limits_memory_swappiness": { + "type": "integer", + "description": "Memory swappiness of the database" + }, + "limits_memory_reservation": { + "type": "string", + "description": "Memory reservation of the database" + }, + "limits_cpus": { + "type": "string", + "description": "CPU limit of the database" + }, + "limits_cpuset": { + "type": "string", + "description": "CPU set of the database" + }, + "limits_cpu_shares": { + "type": "integer", + "description": "CPU shares of the database" + }, + "instant_deploy": { + "type": "boolean", + "description": "Instant deploy the database" + }, + "tags": { + "type": "array", + "items": { + "type": "string" }, - "type": "object" + "description": "Tags to assign to the database." } - } + }, + "type": "object" } } + } + }, + "responses": { + "200": { + "description": "Database updated" }, "400": { "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -6555,146 +8916,132 @@ "bearerAuth": [] } ] - }, + } + }, + "/databases/dragonfly": { "post": { "tags": [ - "Cloud Tokens" + "Databases" ], - "summary": "Create Cloud Provider Token", - "description": "Create a new cloud provider token. The token will be validated before being stored.", - "operationId": "create-cloud-token", + "summary": "Create (DragonFly)", + "description": "Create a new DragonFly database.", + "operationId": "create-database-dragonfly", "requestBody": { - "description": "Cloud provider token details", + "description": "Database data", "required": true, "content": { "application/json": { "schema": { "required": [ - "provider", - "token", - "name" + "server_uuid", + "project_uuid" ], "properties": { - "provider": { + "server_uuid": { "type": "string", - "enum": [ - "hetzner", - "digitalocean", - "vultr", - "hostinger" - ], - "example": "hetzner", - "description": "The cloud provider." + "description": "UUID of the server" }, - "token": { + "project_uuid": { "type": "string", - "example": "your-api-token-here", - "description": "The API token for the cloud provider." + "description": "UUID of the project" + }, + "environment_name": { + "type": "string", + "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." + }, + "environment_uuid": { + "type": "string", + "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." + }, + "destination_uuid": { + "type": "string", + "description": "UUID of the destination if the server has multiple destinations" + }, + "dragonfly_password": { + "type": "string", + "description": "DragonFly password" }, "name": { "type": "string", - "example": "My Hetzner Token", - "description": "A friendly name for the token." - } - }, - "type": "object" - } - } - } - }, - "responses": { - "201": { - "description": "Cloud provider token created.", - "content": { - "application/json": { - "schema": { - "properties": { - "uuid": { - "type": "string", - "example": "og888os", - "description": "The UUID of the token." - } + "description": "Name of the database" }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "422": { - "$ref": "#/components/responses/422" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/cloud-tokens/{uuid}": { - "get": { - "tags": [ - "Cloud Tokens" - ], - "summary": "Get Cloud Provider Token", - "description": "Get cloud provider token by UUID.", - "operationId": "get-cloud-token-by-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "Token UUID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Get cloud provider token by UUID", - "content": { - "application/json": { - "schema": { - "properties": { - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "team_id": { - "type": "integer" - }, - "servers_count": { - "type": "integer" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } + "description": { + "type": "string", + "description": "Description of the database" }, - "type": "object" - } + "image": { + "type": "string", + "description": "Docker Image of the database" + }, + "is_public": { + "type": "boolean", + "description": "Is the database public?" + }, + "public_port": { + "type": "integer", + "description": "Public port of the database" + }, + "public_port_timeout": { + "type": "integer", + "description": "Public port timeout in seconds (default: 3600)" + }, + "limits_memory": { + "type": "string", + "description": "Memory limit of the database" + }, + "limits_memory_swap": { + "type": "string", + "description": "Memory swap limit of the database" + }, + "limits_memory_swappiness": { + "type": "integer", + "description": "Memory swappiness of the database" + }, + "limits_memory_reservation": { + "type": "string", + "description": "Memory reservation of the database" + }, + "limits_cpus": { + "type": "string", + "description": "CPU limit of the database" + }, + "limits_cpuset": { + "type": "string", + "description": "CPU set of the database" + }, + "limits_cpu_shares": { + "type": "integer", + "description": "CPU shares of the database" + }, + "instant_deploy": { + "type": "boolean", + "description": "Instant deploy the database" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags to assign to the database." + } + }, + "type": "object" } } + } + }, + "responses": { + "200": { + "description": "Database updated" + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -6702,41 +9049,127 @@ "bearerAuth": [] } ] - }, - "delete": { + } + }, + "/databases/redis": { + "post": { "tags": [ - "Cloud Tokens" + "Databases" ], - "summary": "Delete Cloud Provider Token", - "description": "Delete cloud provider token by UUID. Cannot delete if token is used by any servers.", - "operationId": "delete-cloud-token-by-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the cloud provider token.", - "required": true, - "schema": { - "type": "string" + "summary": "Create (Redis / Valkey)", + "description": "Create a new Redis or Valkey database. Valkey (valkey/valkey:9-alpine) is the default. Set image to a Redis image (for example redis:8) for Redis.", + "operationId": "create-database-redis", + "requestBody": { + "description": "Database data", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "server_uuid", + "project_uuid" + ], + "properties": { + "server_uuid": { + "type": "string", + "description": "UUID of the server" + }, + "project_uuid": { + "type": "string", + "description": "UUID of the project" + }, + "environment_name": { + "type": "string", + "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." + }, + "environment_uuid": { + "type": "string", + "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." + }, + "destination_uuid": { + "type": "string", + "description": "UUID of the destination if the server has multiple destinations" + }, + "redis_password": { + "type": "string", + "description": "Redis password" + }, + "redis_conf": { + "type": "string", + "description": "Redis conf" + }, + "name": { + "type": "string", + "description": "Name of the database" + }, + "description": { + "type": "string", + "description": "Description of the database" + }, + "image": { + "type": "string", + "description": "Docker image of the database. Default: valkey/valkey:9-alpine. For Redis, use a Redis image, for example redis:8." + }, + "is_public": { + "type": "boolean", + "description": "Is the database public?" + }, + "public_port": { + "type": "integer", + "description": "Public port of the database" + }, + "public_port_timeout": { + "type": "integer", + "description": "Public port timeout in seconds (default: 3600)" + }, + "limits_memory": { + "type": "string", + "description": "Memory limit of the database" + }, + "limits_memory_swap": { + "type": "string", + "description": "Memory swap limit of the database" + }, + "limits_memory_swappiness": { + "type": "integer", + "description": "Memory swappiness of the database" + }, + "limits_memory_reservation": { + "type": "string", + "description": "Memory reservation of the database" + }, + "limits_cpus": { + "type": "string", + "description": "CPU limit of the database" + }, + "limits_cpuset": { + "type": "string", + "description": "CPU set of the database" + }, + "limits_cpu_shares": { + "type": "integer", + "description": "CPU shares of the database" + }, + "instant_deploy": { + "type": "boolean", + "description": "Instant deploy the database" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags to assign to the database." + } + }, + "type": "object" + } } } - ], + }, "responses": { "200": { - "description": "Cloud provider token deleted.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "Cloud provider token deleted." - } - }, - "type": "object" - } - } - } + "description": "Database updated" }, "400": { "$ref": "#/components/responses/400" @@ -6744,8 +9177,8 @@ "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -6753,35 +9186,117 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/databases/keydb": { + "post": { "tags": [ - "Cloud Tokens" - ], - "summary": "Update Cloud Provider Token", - "description": "Update cloud provider token name.", - "operationId": "update-cloud-token-by-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "Token UUID", - "required": true, - "schema": { - "type": "string" - } - } + "Databases" ], + "summary": "Create (KeyDB)", + "description": "Create a new KeyDB database.", + "operationId": "create-database-keydb", "requestBody": { - "description": "Cloud provider token updated.", + "description": "Database data", "required": true, "content": { "application/json": { "schema": { + "required": [ + "server_uuid", + "project_uuid" + ], "properties": { + "server_uuid": { + "type": "string", + "description": "UUID of the server" + }, + "project_uuid": { + "type": "string", + "description": "UUID of the project" + }, + "environment_name": { + "type": "string", + "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." + }, + "environment_uuid": { + "type": "string", + "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." + }, + "destination_uuid": { + "type": "string", + "description": "UUID of the destination if the server has multiple destinations" + }, + "keydb_password": { + "type": "string", + "description": "KeyDB password" + }, + "keydb_conf": { + "type": "string", + "description": "KeyDB conf" + }, "name": { "type": "string", - "description": "The friendly name for the token." + "description": "Name of the database" + }, + "description": { + "type": "string", + "description": "Description of the database" + }, + "image": { + "type": "string", + "description": "Docker Image of the database" + }, + "is_public": { + "type": "boolean", + "description": "Is the database public?" + }, + "public_port": { + "type": "integer", + "description": "Public port of the database" + }, + "public_port_timeout": { + "type": "integer", + "description": "Public port timeout in seconds (default: 3600)" + }, + "limits_memory": { + "type": "string", + "description": "Memory limit of the database" + }, + "limits_memory_swap": { + "type": "string", + "description": "Memory swap limit of the database" + }, + "limits_memory_swappiness": { + "type": "integer", + "description": "Memory swappiness of the database" + }, + "limits_memory_reservation": { + "type": "string", + "description": "Memory reservation of the database" + }, + "limits_cpus": { + "type": "string", + "description": "CPU limit of the database" + }, + "limits_cpuset": { + "type": "string", + "description": "CPU set of the database" + }, + "limits_cpu_shares": { + "type": "integer", + "description": "CPU shares of the database" + }, + "instant_deploy": { + "type": "boolean", + "description": "Instant deploy the database" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags to assign to the database." } }, "type": "object" @@ -6791,113 +9306,14 @@ }, "responses": { "200": { - "description": "Cloud provider token updated.", - "content": { - "application/json": { - "schema": { - "properties": { - "uuid": { - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" + "description": "Database updated" }, - "422": { - "$ref": "#/components/responses/422" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/cloud-tokens/{uuid}/validate": { - "post": { - "tags": [ - "Cloud Tokens" - ], - "summary": "Validate Cloud Provider Token", - "description": "Validate a cloud provider token against the provider API.", - "operationId": "validate-cloud-token-by-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "Token UUID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Token validation result.", - "content": { - "application/json": { - "schema": { - "properties": { - "valid": { - "type": "boolean", - "example": true - }, - "message": { - "type": "string", - "example": "Token is valid." - } - }, - "type": "object" - } - } - } + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/databases/{uuid}/imports/uploads": { - "post": { - "tags": [ - "Databases" - ], - "summary": "Upload database import", - "operationId": "upload-database-import", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the database.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "201": { - "description": "Upload completed" - }, "422": { "$ref": "#/components/responses/422" } @@ -6909,44 +9325,143 @@ ] } }, - "/databases/{uuid}/imports": { + "/databases/mariadb": { "post": { "tags": [ "Databases" ], - "summary": "Import database backup", - "description": "Restore a backup into the database. Every import source requires the deploy ability.", - "operationId": "create-database-import", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the database.", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Create (MariaDB)", + "description": "Create a new MariaDB database.", + "operationId": "create-database-mariadb", "requestBody": { + "description": "Database data", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DatabaseImportRequest" + "required": [ + "server_uuid", + "project_uuid" + ], + "properties": { + "server_uuid": { + "type": "string", + "description": "UUID of the server" + }, + "project_uuid": { + "type": "string", + "description": "UUID of the project" + }, + "environment_name": { + "type": "string", + "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." + }, + "environment_uuid": { + "type": "string", + "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." + }, + "destination_uuid": { + "type": "string", + "description": "UUID of the destination if the server has multiple destinations" + }, + "mariadb_conf": { + "type": "string", + "description": "MariaDB conf" + }, + "mariadb_root_password": { + "type": "string", + "description": "MariaDB root password" + }, + "mariadb_user": { + "type": "string", + "description": "MariaDB user" + }, + "mariadb_password": { + "type": "string", + "description": "MariaDB password" + }, + "mariadb_database": { + "type": "string", + "description": "MariaDB database" + }, + "name": { + "type": "string", + "description": "Name of the database" + }, + "description": { + "type": "string", + "description": "Description of the database" + }, + "image": { + "type": "string", + "description": "Docker Image of the database" + }, + "is_public": { + "type": "boolean", + "description": "Is the database public?" + }, + "public_port": { + "type": "integer", + "description": "Public port of the database" + }, + "public_port_timeout": { + "type": "integer", + "description": "Public port timeout in seconds (default: 3600)" + }, + "limits_memory": { + "type": "string", + "description": "Memory limit of the database" + }, + "limits_memory_swap": { + "type": "string", + "description": "Memory swap limit of the database" + }, + "limits_memory_swappiness": { + "type": "integer", + "description": "Memory swappiness of the database" + }, + "limits_memory_reservation": { + "type": "string", + "description": "Memory reservation of the database" + }, + "limits_cpus": { + "type": "string", + "description": "CPU limit of the database" + }, + "limits_cpuset": { + "type": "string", + "description": "CPU set of the database" + }, + "limits_cpu_shares": { + "type": "integer", + "description": "CPU shares of the database" + }, + "instant_deploy": { + "type": "boolean", + "description": "Instant deploy the database" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags to assign to the database." + } + }, + "type": "object" } } } }, "responses": { - "202": { - "description": "Import queued" + "200": { + "description": "Database updated" }, - "403": { - "description": "The token needs the deploy ability." + "400": { + "$ref": "#/components/responses/400" }, - "409": { - "description": "Another start, restart or import of this database is already in progress." + "401": { + "$ref": "#/components/responses/401" }, "422": { "$ref": "#/components/responses/422" @@ -6959,46 +9474,146 @@ ] } }, - "/databases/{uuid}/imports/{activity_id}": { - "get": { + "/databases/mysql": { + "post": { "tags": [ "Databases" ], - "summary": "Get database import status", - "operationId": "get-database-import", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the database.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "activity_id", - "in": "path", - "description": "Import activity ID.", - "required": true, - "schema": { - "type": "integer" + "summary": "Create (MySQL)", + "description": "Create a new MySQL database.", + "operationId": "create-database-mysql", + "requestBody": { + "description": "Database data", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "server_uuid", + "project_uuid" + ], + "properties": { + "server_uuid": { + "type": "string", + "description": "UUID of the server" + }, + "project_uuid": { + "type": "string", + "description": "UUID of the project" + }, + "environment_name": { + "type": "string", + "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." + }, + "environment_uuid": { + "type": "string", + "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." + }, + "destination_uuid": { + "type": "string", + "description": "UUID of the destination if the server has multiple destinations" + }, + "mysql_root_password": { + "type": "string", + "description": "MySQL root password" + }, + "mysql_password": { + "type": "string", + "description": "MySQL password" + }, + "mysql_user": { + "type": "string", + "description": "MySQL user" + }, + "mysql_database": { + "type": "string", + "description": "MySQL database" + }, + "mysql_conf": { + "type": "string", + "description": "MySQL conf" + }, + "name": { + "type": "string", + "description": "Name of the database" + }, + "description": { + "type": "string", + "description": "Description of the database" + }, + "image": { + "type": "string", + "description": "Docker Image of the database" + }, + "is_public": { + "type": "boolean", + "description": "Is the database public?" + }, + "public_port": { + "type": "integer", + "description": "Public port of the database" + }, + "public_port_timeout": { + "type": "integer", + "description": "Public port timeout in seconds (default: 3600)" + }, + "limits_memory": { + "type": "string", + "description": "Memory limit of the database" + }, + "limits_memory_swap": { + "type": "string", + "description": "Memory swap limit of the database" + }, + "limits_memory_swappiness": { + "type": "integer", + "description": "Memory swappiness of the database" + }, + "limits_memory_reservation": { + "type": "string", + "description": "Memory reservation of the database" + }, + "limits_cpus": { + "type": "string", + "description": "CPU limit of the database" + }, + "limits_cpuset": { + "type": "string", + "description": "CPU set of the database" + }, + "limits_cpu_shares": { + "type": "integer", + "description": "CPU shares of the database" + }, + "instant_deploy": { + "type": "boolean", + "description": "Instant deploy the database" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags to assign to the database." + } + }, + "type": "object" + } } } - ], + }, "responses": { "200": { - "description": "Import status", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DatabaseImportStatus" - } - } - } + "description": "Database updated" }, - "404": { - "$ref": "#/components/responses/404" + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -7008,72 +9623,125 @@ ] } }, - "/databases": { - "get": { + "/databases/mongodb": { + "post": { "tags": [ "Databases" ], - "summary": "List", - "description": "List all databases.", - "operationId": "list-databases", - "responses": { - "200": { - "description": "Get all databases", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Database" + "summary": "Create (MongoDB)", + "description": "Create a new MongoDB database.", + "operationId": "create-database-mongodb", + "requestBody": { + "description": "Database data", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "server_uuid", + "project_uuid" + ], + "properties": { + "server_uuid": { + "type": "string", + "description": "UUID of the server" + }, + "project_uuid": { + "type": "string", + "description": "UUID of the project" + }, + "environment_name": { + "type": "string", + "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." + }, + "environment_uuid": { + "type": "string", + "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." + }, + "destination_uuid": { + "type": "string", + "description": "UUID of the destination if the server has multiple destinations" + }, + "mongo_conf": { + "type": "string", + "description": "MongoDB conf" + }, + "mongo_initdb_root_username": { + "type": "string", + "description": "MongoDB initdb root username" + }, + "name": { + "type": "string", + "description": "Name of the database" + }, + "description": { + "type": "string", + "description": "Description of the database" + }, + "image": { + "type": "string", + "description": "Docker Image of the database" + }, + "is_public": { + "type": "boolean", + "description": "Is the database public?" + }, + "public_port": { + "type": "integer", + "description": "Public port of the database" + }, + "public_port_timeout": { + "type": "integer", + "description": "Public port timeout in seconds (default: 3600)" + }, + "limits_memory": { + "type": "string", + "description": "Memory limit of the database" + }, + "limits_memory_swap": { + "type": "string", + "description": "Memory swap limit of the database" + }, + "limits_memory_swappiness": { + "type": "integer", + "description": "Memory swappiness of the database" + }, + "limits_memory_reservation": { + "type": "string", + "description": "Memory reservation of the database" + }, + "limits_cpus": { + "type": "string", + "description": "CPU limit of the database" + }, + "limits_cpuset": { + "type": "string", + "description": "CPU set of the database" + }, + "limits_cpu_shares": { + "type": "integer", + "description": "CPU shares of the database" + }, + "instant_deploy": { + "type": "boolean", + "description": "Instant deploy the database" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags to assign to the database." } - } + }, + "type": "object" } } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" } }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/databases/{uuid}/backups": { - "get": { - "tags": [ - "Databases" - ], - "summary": "Get", - "description": "Get backups details by database UUID.", - "operationId": "get-database-backups-by-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the database.", - "required": true, - "schema": { - "type": "string" - } - } - ], "responses": { "200": { - "description": "Get all backups for a database. Each backup includes s3_storage_uuid (primary S3 destination) and s3_storage_uuids (every S3 destination, primary first).", - "content": { - "application/json": { - "schema": { - "type": "string" - }, - "example": "Content is very complex. Will be implemented later." - } - } + "description": "Database updated" }, "400": { "$ref": "#/components/responses/400" @@ -7081,8 +9749,8 @@ "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -7090,141 +9758,111 @@ "bearerAuth": [] } ] - }, + } + }, + "/databases/sqlite": { "post": { "tags": [ "Databases" ], - "summary": "Create Backup", - "description": "Create a new scheduled backup configuration for a database", - "operationId": "create-database-backup", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the database.", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Create (SQLite)", + "description": "Create a new SQLite database.", + "operationId": "create-database-sqlite", "requestBody": { - "description": "Backup configuration data", + "description": "Database data", "required": true, "content": { "application/json": { "schema": { "required": [ - "frequency" + "server_uuid", + "project_uuid" ], "properties": { - "frequency": { + "server_uuid": { "type": "string", - "description": "Backup frequency (cron expression or: every_minute, hourly, daily, weekly, monthly, yearly)" - }, - "enabled": { - "type": "boolean", - "description": "Whether the backup is enabled", - "default": true + "description": "UUID of the server" }, - "save_s3": { - "type": "boolean", - "description": "Whether to save backups to S3", - "default": false + "project_uuid": { + "type": "string", + "description": "UUID of the project" }, - "disable_local_backup": { - "type": "boolean", - "description": "Delete the local backup file after the upload to S3. Only allowed when save_s3 is true.", - "default": false + "environment_name": { + "type": "string", + "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." }, - "s3_storage_uuid": { + "environment_uuid": { "type": "string", - "description": "Primary S3 storage UUID. Sent without s3_storage_uuids, it selects this storage as the only destination. Either field is required if save_s3 is true." + "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." }, - "s3_storage_uuids": { - "type": "array", - "items": { - "type": "string" - }, - "description": "UUIDs of every S3 storage the backup is uploaded to. Replaces the current destinations. When s3_storage_uuid is also sent, it must be in this list and becomes the primary destination; otherwise the first entry is the primary destination." + "destination_uuid": { + "type": "string", + "description": "UUID of the destination if the server has multiple destinations" }, - "databases_to_backup": { + "sqlite_databases": { "type": "string", - "description": "Comma separated list of databases to backup" + "description": "Comma-separated SQLite database file names" }, - "dump_all": { - "type": "boolean", - "description": "Whether to dump all databases", - "default": false + "name": { + "type": "string", + "description": "Name of the database" }, - "backup_now": { - "type": "boolean", - "description": "Whether to trigger backup immediately after creation. Needs a token with the deploy permission." + "description": { + "type": "string", + "description": "Description of the database" }, - "database_backup_retention_amount_locally": { - "type": "integer", - "description": "Number of backups to retain locally" + "image": { + "type": "string", + "description": "Docker Image of the database" }, - "database_backup_retention_days_locally": { - "type": "integer", - "description": "Number of days to retain backups locally" + "limits_memory": { + "type": "string", + "description": "Memory limit of the database" }, - "database_backup_retention_max_storage_locally": { - "type": "number", - "description": "Max storage (GB) for local backups" + "limits_memory_swap": { + "type": "string", + "description": "Memory swap limit of the database" }, - "database_backup_retention_amount_s3": { + "limits_memory_swappiness": { "type": "integer", - "description": "Number of backups to retain in S3" + "description": "Memory swappiness of the database" }, - "database_backup_retention_days_s3": { - "type": "integer", - "description": "Number of days to retain backups in S3" + "limits_memory_reservation": { + "type": "string", + "description": "Memory reservation of the database" }, - "database_backup_retention_max_storage_s3": { - "type": "number", - "description": "Max storage (GB) for S3 backups" + "limits_cpus": { + "type": "string", + "description": "CPU limit of the database" }, - "timeout": { - "type": "integer", - "description": "Backup job timeout in seconds (min: 60, max: 36000)", - "default": 3600 + "limits_cpuset": { + "type": "string", + "description": "CPU set of the database" }, - "missing_backup_notification_days": { + "limits_cpu_shares": { "type": "integer", - "description": "Alert after this many days without an execution; 0 disables alerts", - "minimum": 0, - "maximum": 365, - "default": 0 + "description": "CPU shares of the database" + }, + "instant_deploy": { + "type": "boolean", + "description": "Instant deploy the database" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags to assign to the database." } }, "type": "object" } } - } - }, - "responses": { - "201": { - "description": "Backup configuration created successfully", - "content": { - "application/json": { - "schema": { - "properties": { - "uuid": { - "type": "string", - "format": "uuid", - "example": "550e8400-e29b-41d4-a716-446655440000" - }, - "message": { - "type": "string", - "example": "Backup configuration created successfully." - } - }, - "type": "object" - } - } - } + } + }, + "responses": { + "200": { + "description": "Database updated" }, "400": { "$ref": "#/components/responses/400" @@ -7232,12 +9870,6 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the deploy permission to use backup_now." - }, - "404": { - "$ref": "#/components/responses/404" - }, "422": { "$ref": "#/components/responses/422" } @@ -7249,14 +9881,14 @@ ] } }, - "/databases/{uuid}": { + "/databases/{uuid}/logs": { "get": { "tags": [ "Databases" ], - "summary": "Get", - "description": "Get database by UUID.", - "operationId": "get-database-by-uuid", + "summary": "Get database logs.", + "description": "Get database logs by UUID. Requires the `read:sensitive` or `root` token ability.", + "operationId": "get-database-logs-by-uuid", "parameters": [ { "name": "uuid", @@ -7264,17 +9896,56 @@ "description": "UUID of the database.", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" + } + }, + { + "name": "lines", + "in": "query", + "description": "Number of lines to show from the end of the logs. Use `all` to return all logs. `-1` remains available as a compatibility alias.", + "required": false, + "schema": { + "oneOf": [ + { + "type": "integer", + "format": "int32", + "default": 100, + "maximum": 10000, + "minimum": -1 + }, + { + "type": "string", + "enum": [ + "all" + ] + } + ] + } + }, + { + "name": "show_timestamps", + "in": "query", + "description": "Show timestamps in the logs.", + "required": false, + "schema": { + "type": "boolean", + "default": false } } ], "responses": { "200": { - "description": "Get database by UUID", + "description": "Get database logs by UUID.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Database" + "properties": { + "logs": { + "type": "string" + } + }, + "type": "object" } } } @@ -7294,75 +9965,236 @@ "bearerAuth": [] } ] - }, + } + }, + "/databases/{uuid}/backups/{scheduled_backup_uuid}/executions/{execution_uuid}": { "delete": { "tags": [ "Databases" ], - "summary": "Delete", - "description": "Delete database by UUID. Needs a token with the write and deploy permissions.", - "operationId": "delete-database-by-uuid", + "summary": "Delete backup execution", + "description": "Deletes a specific backup execution.", + "operationId": "delete-backup-execution-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the database.", + "description": "UUID of the database", "required": true, "schema": { "type": "string" } }, { - "name": "delete_configurations", - "in": "query", - "description": "Delete configurations.", - "required": false, + "name": "scheduled_backup_uuid", + "in": "path", + "description": "UUID of the backup configuration", + "required": true, "schema": { - "type": "boolean", - "default": true + "type": "string" } }, { - "name": "delete_volumes", - "in": "query", - "description": "Delete volumes.", - "required": false, + "name": "execution_uuid", + "in": "path", + "description": "UUID of the backup execution to delete", + "required": true, "schema": { - "type": "boolean", - "default": true + "type": "string" } }, { - "name": "docker_cleanup", + "name": "delete_s3", "in": "query", - "description": "Run docker cleanup when the server disk usage is at or above its cleanup threshold. Skipped when a cleanup ran on the server in the last hour.", + "description": "Whether to delete the backup from S3", "required": false, "schema": { "type": "boolean", - "default": true + "default": false + } + } + ], + "responses": { + "200": { + "description": "Backup execution deleted.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Backup execution deleted." + } + }, + "type": "object" + } + } + } + }, + "404": { + "description": "Backup execution not found.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Backup execution not found." + } + }, + "type": "object" + } + } + } + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/databases/{uuid}/backups/{scheduled_backup_uuid}/executions": { + "get": { + "tags": [ + "Databases" + ], + "summary": "List backup executions", + "description": "Get all executions for a specific backup configuration. The execution `message` is only returned (redacted) to tokens with the `read:sensitive` or `root` ability; otherwise it is `null`.", + "operationId": "list-backup-executions", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the database", + "required": true, + "schema": { + "type": "string" } }, { - "name": "delete_connected_networks", - "in": "query", - "description": "Delete connected networks.", - "required": false, + "name": "scheduled_backup_uuid", + "in": "path", + "description": "UUID of the backup configuration", + "required": true, "schema": { - "type": "boolean", - "default": true + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "List of backup executions", + "content": { + "application/json": { + "schema": { + "properties": { + "executions": { + "type": "array", + "items": { + "properties": { + "uuid": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "created_at": { + "type": "string" + }, + "message": { + "description": "Redacted execution output. Null unless the token has the `read:sensitive` or `root` ability.", + "type": [ + "string", + "null" + ] + }, + "status": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "type": "object" + } + } + } + }, + "404": { + "description": "Backup configuration not found." + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/databases/{uuid}/move": { + "post": { + "tags": [ + "Databases" + ], + "summary": "Move", + "description": "Move database to another project/environment. This is a purely organizational change — running containers are not affected. Note: after moving, the database will pick up shared environment variables from the new environment on the next deployment.", + "operationId": "move-database-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the database.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Target environment to move the database to.", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "environment_uuid" + ], + "properties": { + "environment_uuid": { + "type": "string", + "description": "UUID of the target environment." + } + }, + "type": "object" + } } } - ], + }, "responses": { "200": { - "description": "Database deleted.", + "description": "Database moved successfully.", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", - "example": "Database deleted." + "example": "Database moved successfully." + }, + "uuid": { + "type": "string" + }, + "project_uuid": { + "type": "string" + }, + "environment_uuid": { + "type": "string" } }, "type": "object" @@ -7376,11 +10208,11 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the write and deploy permissions." - }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -7388,14 +10220,16 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/databases/{uuid}/migrate": { + "post": { "tags": [ "Databases" ], - "summary": "Update", - "description": "Update database by UUID.", - "operationId": "update-database-by-uuid", + "summary": "Migrate to Server", + "description": "Migrate a database to another destination/server owned by the authenticated team. Stops the database, optionally transfers persistent volume data when both servers are managed by Coolify, and updates database records. Redeploy after migration completes.", + "operationId": "migrate-database-by-uuid", "parameters": [ { "name": "uuid", @@ -7407,221 +10241,23 @@ } } ], - "requestBody": { - "description": "Database data", - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "name": { - "type": "string", - "description": "Name of the database" - }, - "description": { - "type": "string", - "description": "Description of the database" - }, - "image": { - "type": "string", - "description": "Docker Image of the database" - }, - "is_public": { - "type": "boolean", - "description": "Is the database public? Changing it starts or stops the database proxy, so it needs a token with the deploy permission." - }, - "public_port": { - "type": "integer", - "description": "Public port of the database (1024-65535)" - }, - "public_port_timeout": { - "type": "integer", - "description": "Public port timeout in seconds (default: 3600)" - }, - "limits_memory": { - "type": "string", - "description": "Memory limit of the database" - }, - "limits_memory_swap": { - "type": "string", - "description": "Memory swap limit of the database" - }, - "limits_memory_swappiness": { - "type": "integer", - "description": "Memory swappiness of the database" - }, - "limits_memory_reservation": { - "type": "string", - "description": "Memory reservation of the database" - }, - "limits_cpus": { - "type": "string", - "description": "CPU limit of the database" - }, - "limits_cpuset": { - "type": "string", - "description": "CPU set of the database" - }, - "limits_cpu_shares": { - "type": "integer", - "description": "CPU shares of the database" - }, - "instant_deploy": { - "type": "boolean", - "description": "Restart the database after the update. Requires the deploy ability." - }, - "postgres_user": { - "type": "string", - "description": "PostgreSQL user" - }, - "postgres_password": { - "type": "string", - "description": "PostgreSQL password" - }, - "postgres_db": { - "type": "string", - "description": "PostgreSQL database" - }, - "postgres_initdb_args": { - "type": "string", - "description": "PostgreSQL initdb args" - }, - "postgres_host_auth_method": { - "type": "string", - "description": "PostgreSQL host auth method" - }, - "postgres_conf": { - "type": "string", - "description": "PostgreSQL conf" - }, - "clickhouse_admin_user": { - "type": "string", - "description": "Clickhouse admin user" - }, - "clickhouse_admin_password": { - "type": "string", - "description": "Clickhouse admin password" - }, - "dragonfly_password": { - "type": "string", - "description": "DragonFly password" - }, - "redis_password": { - "type": "string", - "description": "Redis password" - }, - "redis_conf": { - "type": "string", - "description": "Redis conf" - }, - "keydb_password": { - "type": "string", - "description": "KeyDB password" - }, - "keydb_conf": { - "type": "string", - "description": "KeyDB conf" - }, - "mariadb_conf": { - "type": "string", - "description": "MariaDB conf" - }, - "mariadb_root_password": { - "type": "string", - "description": "MariaDB root password" - }, - "mariadb_user": { - "type": "string", - "description": "MariaDB user" - }, - "mariadb_password": { - "type": "string", - "description": "MariaDB password" - }, - "mariadb_database": { - "type": "string", - "description": "MariaDB database" - }, - "mongo_conf": { - "type": "string", - "description": "Mongo conf" - }, - "mongo_initdb_root_username": { - "type": "string", - "description": "Mongo initdb root username" - }, - "mongo_initdb_root_password": { - "type": "string", - "description": "Mongo initdb root password" - }, - "mongo_initdb_database": { - "type": "string", - "description": "Mongo initdb init database" - }, - "mysql_root_password": { - "type": "string", - "description": "MySQL root password" - }, - "mysql_password": { - "type": "string", - "description": "MySQL password" - }, - "mysql_user": { - "type": "string", - "description": "MySQL user" - }, - "mysql_database": { - "type": "string", - "description": "MySQL database" - }, - "mysql_conf": { - "type": "string", - "description": "MySQL conf" - }, - "sqlite_databases": { - "type": "string", - "description": "Comma-separated SQLite database file names" - }, - "health_check_enabled": { - "type": "boolean", - "description": "Enable the database healthcheck probe.", - "default": true - }, - "health_check_interval": { - "type": "integer", - "description": "Healthcheck interval in seconds.", - "minimum": 1, - "default": 15 - }, - "health_check_timeout": { - "type": "integer", - "description": "Healthcheck timeout in seconds.", - "minimum": 1, - "default": 5 - }, - "health_check_retries": { - "type": "integer", - "description": "Healthcheck retries count.", - "minimum": 1, - "default": 5 - }, - "health_check_start_period": { - "type": "integer", - "description": "Healthcheck start period in seconds.", - "minimum": 0, - "default": 5 - }, - "redact_all_env_values_in_logs": { - "type": "boolean", - "description": "Redact all environment variable values in logs. When false, only locked (shown once) values, database passwords, and remote secrets are redacted. Requires team admin permissions." - }, - "include_coolify_default_variables": { - "type": "boolean", - "description": "Add the predefined COOLIFY_* variables (COOLIFY_URL, COOLIFY_FQDN, ...) to the environment. Requires team admin permissions. Restart the database to apply it." + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "destination_uuid" + ], + "properties": { + "destination_uuid": { + "description": "UUID of the target destination.", + "type": "string" }, - "is_log_drain_enabled": { + "migrate_volumes": { + "description": "Whether to transfer persistent volume data when migrating across servers.", "type": "boolean", - "description": "Send the database logs to the log drain of the server. Log drain must be enabled on the server. Restart the database to apply it." + "default": true } }, "type": "object" @@ -7631,7 +10267,7 @@ }, "responses": { "200": { - "description": "Database updated" + "description": "Database migration started or completed." }, "400": { "$ref": "#/components/responses/400" @@ -7639,9 +10275,6 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the deploy permission to change is_public or to use instant_deploy." - }, "404": { "$ref": "#/components/responses/404" }, @@ -7656,54 +10289,103 @@ ] } }, - "/databases/{uuid}/backups/{scheduled_backup_uuid}": { - "delete": { + "/databases/{uuid}/start": { + "post": { "tags": [ "Databases" ], - "summary": "Delete backup configuration", - "description": "Deletes a backup configuration and all its executions.", - "operationId": "delete-backup-configuration-by-uuid", + "summary": "Start", + "description": "Start database.", + "operationId": "start-database-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the database", + "description": "UUID of the database.", "required": true, "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Start database.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Database starting request queued." + } + }, + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "409": { + "description": "Another start, restart or import of this database is already in progress." }, + "422": { + "description": "The database cannot start yet, for example because a CA certificate is missing." + } + }, + "security": [ { - "name": "scheduled_backup_uuid", + "bearerAuth": [] + } + ] + } + }, + "/databases/{uuid}/stop": { + "post": { + "tags": [ + "Databases" + ], + "summary": "Stop", + "description": "Stop database.", + "operationId": "stop-database-by-uuid", + "parameters": [ + { + "name": "uuid", "in": "path", - "description": "UUID of the backup configuration to delete", + "description": "UUID of the database.", "required": true, "schema": { "type": "string" } }, { - "name": "delete_s3", + "name": "docker_cleanup", "in": "query", - "description": "Whether to delete all backup files from S3", - "required": false, + "description": "Run docker cleanup when the server disk usage is at or above its cleanup threshold. Skipped when a cleanup ran on the server in the last hour.", "schema": { "type": "boolean", - "default": false + "default": true } } ], "responses": { "200": { - "description": "Backup configuration deleted.", + "description": "Stop database.", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", - "example": "Backup configuration and all executions deleted." + "example": "Database stopping request queued." } }, "type": "object" @@ -7711,21 +10393,14 @@ } } }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, "404": { - "description": "Backup configuration not found.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "Backup configuration not found." - } - }, - "type": "object" - } - } - } + "$ref": "#/components/responses/404" } }, "security": [ @@ -7733,14 +10408,16 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/databases/{uuid}/restart": { + "post": { "tags": [ "Databases" ], - "summary": "Update", - "description": "Update a specific backup configuration for a given database, identified by its UUID and the backup ID", - "operationId": "update-database-backup", + "summary": "Restart", + "description": "Restart database.", + "operationId": "restart-database-by-uuid", "parameters": [ { "name": "uuid", @@ -7750,107 +10427,80 @@ "schema": { "type": "string" } - }, - { - "name": "scheduled_backup_uuid", - "in": "path", - "description": "UUID of the backup configuration.", - "required": true, - "schema": { - "type": "string" - } } ], - "requestBody": { - "description": "Database backup configuration data", - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "save_s3": { - "type": "boolean", - "description": "Whether data is saved in s3 or not" - }, - "disable_local_backup": { - "type": "boolean", - "description": "Delete the local backup file after the upload to S3. Only allowed when save_s3 is true. Turning save_s3 off also turns this off." - }, - "s3_storage_uuid": { - "type": "string", - "description": "Primary S3 storage UUID. Sent without s3_storage_uuids, it selects this storage as the only destination; when it is already a destination, it becomes the primary destination and the other destinations stay." - }, - "s3_storage_uuids": { - "type": "array", - "items": { - "type": "string" - }, - "description": "UUIDs of every S3 storage the backup is uploaded to. Replaces the current destinations. When s3_storage_uuid is also sent, it must be in this list and becomes the primary destination; otherwise the first entry is the primary destination." - }, - "backup_now": { - "type": "boolean", - "description": "Whether to take a backup now or not. Needs a token with the deploy permission." - }, - "enabled": { - "type": "boolean", - "description": "Whether the backup is enabled or not" - }, - "databases_to_backup": { - "type": "string", - "description": "Comma separated list of databases to backup" - }, - "dump_all": { - "type": "boolean", - "description": "Whether all databases are dumped or not" - }, - "frequency": { - "type": "string", - "description": "Frequency of the backup" - }, - "database_backup_retention_amount_locally": { - "type": "integer", - "description": "Retention amount of the backup locally" - }, - "database_backup_retention_days_locally": { - "type": "integer", - "description": "Retention days of the backup locally" - }, - "database_backup_retention_max_storage_locally": { - "type": "number", - "description": "Max storage of the backup locally" - }, - "database_backup_retention_amount_s3": { - "type": "integer", - "description": "Retention amount of the backup in s3" - }, - "database_backup_retention_days_s3": { - "type": "integer", - "description": "Retention days of the backup in s3" - }, - "database_backup_retention_max_storage_s3": { - "type": "number", - "description": "Max storage of the backup in S3" - }, - "timeout": { - "type": "integer", - "description": "Backup job timeout in seconds (min: 60, max: 36000)", - "default": 3600 + "responses": { + "200": { + "description": "Restart database.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Database restaring request queued." + } }, - "missing_backup_notification_days": { - "type": "integer", - "description": "Alert after this many days without an execution; 0 disables alerts", - "minimum": 0, - "maximum": 365 - } - }, - "type": "object" + "type": "object" + } } } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "409": { + "description": "Another start, restart or import of this database is already in progress." + }, + "422": { + "description": "The database cannot start yet, for example because a CA certificate is missing." + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/databases/{uuid}/envs": { + "get": { + "tags": [ + "Databases" + ], + "summary": "List Envs", + "description": "List all envs by database UUID.", + "operationId": "list-envs-by-database-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the database.", + "required": true, + "schema": { + "type": "string" + } } - }, + ], "responses": { "200": { - "description": "Database backup configuration updated" + "description": "Environment variables.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + } + } + } }, "400": { "$ref": "#/components/responses/400" @@ -7858,14 +10508,8 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the deploy permission to use backup_now." - }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -7873,133 +10517,51 @@ "bearerAuth": [] } ] - } - }, - "/databases/postgresql": { + }, "post": { "tags": [ "Databases" ], - "summary": "Create (PostgreSQL)", - "description": "Create a new PostgreSQL database.", - "operationId": "create-database-postgresql", + "summary": "Create Env", + "description": "Create env by database UUID.", + "operationId": "create-env-by-database-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the database.", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { - "description": "Database data", + "description": "Env created.", "required": true, "content": { "application/json": { "schema": { - "required": [ - "server_uuid", - "project_uuid" - ], "properties": { - "server_uuid": { - "type": "string", - "description": "UUID of the server" - }, - "project_uuid": { - "type": "string", - "description": "UUID of the project" - }, - "environment_name": { - "type": "string", - "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." - }, - "environment_uuid": { - "type": "string", - "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." - }, - "postgres_user": { - "type": "string", - "description": "PostgreSQL user" - }, - "postgres_password": { - "type": "string", - "description": "PostgreSQL password" - }, - "postgres_db": { - "type": "string", - "description": "PostgreSQL database" - }, - "postgres_initdb_args": { - "type": "string", - "description": "PostgreSQL initdb args" - }, - "postgres_host_auth_method": { - "type": "string", - "description": "PostgreSQL host auth method" - }, - "postgres_conf": { - "type": "string", - "description": "PostgreSQL conf" - }, - "destination_uuid": { - "type": "string", - "description": "UUID of the destination if the server has multiple destinations" - }, - "name": { - "type": "string", - "description": "Name of the database" - }, - "description": { + "key": { "type": "string", - "description": "Description of the database" + "description": "The key of the environment variable." }, - "image": { + "value": { "type": "string", - "description": "Docker Image of the database" + "description": "The value of the environment variable." }, - "is_public": { + "is_literal": { "type": "boolean", - "description": "Is the database public?" - }, - "public_port": { - "type": "integer", - "description": "Public port of the database" - }, - "public_port_timeout": { - "type": "integer", - "description": "Public port timeout in seconds (default: 3600)" - }, - "limits_memory": { - "type": "string", - "description": "Memory limit of the database" - }, - "limits_memory_swap": { - "type": "string", - "description": "Memory swap limit of the database" - }, - "limits_memory_swappiness": { - "type": "integer", - "description": "Memory swappiness of the database" - }, - "limits_memory_reservation": { - "type": "string", - "description": "Memory reservation of the database" - }, - "limits_cpus": { - "type": "string", - "description": "CPU limit of the database" - }, - "limits_cpuset": { - "type": "string", - "description": "CPU set of the database" - }, - "limits_cpu_shares": { - "type": "integer", - "description": "CPU shares of the database" + "description": "The flag to indicate if the environment variable is a literal, nothing espaced." }, - "instant_deploy": { + "is_multiline": { "type": "boolean", - "description": "Instant deploy the database" + "description": "The flag to indicate if the environment variable is multiline." }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Tags to assign to the database." + "is_shown_once": { + "type": "boolean", + "description": "If true, the saved value is hidden in the UI and API responses. A lock is permanent: false does not unlock a locked variable, but a new value can still replace the locked one. MCP never returns environment variable values." } }, "type": "object" @@ -8008,8 +10570,21 @@ } }, "responses": { - "200": { - "description": "Database updated" + "201": { + "description": "Environment variable created.", + "content": { + "application/json": { + "schema": { + "properties": { + "uuid": { + "type": "string", + "example": "nc0k04gk8g0cgsk440g0koko" + } + }, + "type": "object" + } + } + } }, "400": { "$ref": "#/components/responses/400" @@ -8017,6 +10592,9 @@ "401": { "$ref": "#/components/responses/401" }, + "404": { + "$ref": "#/components/responses/404" + }, "422": { "$ref": "#/components/responses/422" } @@ -8026,117 +10604,55 @@ "bearerAuth": [] } ] - } - }, - "/databases/clickhouse": { - "post": { + }, + "patch": { "tags": [ "Databases" ], - "summary": "Create (Clickhouse)", - "description": "Create a new Clickhouse database.", - "operationId": "create-database-clickhouse", - "requestBody": { - "description": "Database data", - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "server_uuid", - "project_uuid" - ], - "properties": { - "server_uuid": { - "type": "string", - "description": "UUID of the server" - }, - "project_uuid": { - "type": "string", - "description": "UUID of the project" - }, - "environment_name": { - "type": "string", - "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." - }, - "environment_uuid": { - "type": "string", - "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." - }, - "destination_uuid": { - "type": "string", - "description": "UUID of the destination if the server has multiple destinations" - }, - "clickhouse_admin_user": { - "type": "string", - "description": "Clickhouse admin user" - }, - "clickhouse_admin_password": { - "type": "string", - "description": "Clickhouse admin password" - }, - "name": { - "type": "string", - "description": "Name of the database" - }, - "description": { + "summary": "Update Env", + "description": "Update env by database UUID.", + "operationId": "update-env-by-database-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the database.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Env updated.", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "key", + "value" + ], + "properties": { + "key": { "type": "string", - "description": "Description of the database" + "description": "The key of the environment variable." }, - "image": { + "value": { "type": "string", - "description": "Docker Image of the database" + "description": "The value of the environment variable." }, - "is_public": { + "is_literal": { "type": "boolean", - "description": "Is the database public?" - }, - "public_port": { - "type": "integer", - "description": "Public port of the database" - }, - "public_port_timeout": { - "type": "integer", - "description": "Public port timeout in seconds (default: 3600)" - }, - "limits_memory": { - "type": "string", - "description": "Memory limit of the database" - }, - "limits_memory_swap": { - "type": "string", - "description": "Memory swap limit of the database" - }, - "limits_memory_swappiness": { - "type": "integer", - "description": "Memory swappiness of the database" - }, - "limits_memory_reservation": { - "type": "string", - "description": "Memory reservation of the database" - }, - "limits_cpus": { - "type": "string", - "description": "CPU limit of the database" - }, - "limits_cpuset": { - "type": "string", - "description": "CPU set of the database" - }, - "limits_cpu_shares": { - "type": "integer", - "description": "CPU shares of the database" + "description": "The flag to indicate if the environment variable is a literal, nothing espaced." }, - "instant_deploy": { + "is_multiline": { "type": "boolean", - "description": "Instant deploy the database" + "description": "The flag to indicate if the environment variable is multiline." }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Tags to assign to the database." + "is_shown_once": { + "type": "boolean", + "description": "If true, the saved value is hidden in the UI and API responses. A lock is permanent: false does not unlock a locked variable, but a new value can still replace the locked one. MCP never returns environment variable values." } }, "type": "object" @@ -8145,8 +10661,15 @@ } }, "responses": { - "200": { - "description": "Database updated" + "201": { + "description": "Environment variable updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + } + } }, "400": { "$ref": "#/components/responses/400" @@ -8154,6 +10677,9 @@ "401": { "$ref": "#/components/responses/401" }, + "404": { + "$ref": "#/components/responses/404" + }, "422": { "$ref": "#/components/responses/422" } @@ -8165,121 +10691,147 @@ ] } }, - "/databases/dragonfly": { - "post": { + "/databases/{uuid}/envs/bulk": { + "patch": { "tags": [ "Databases" ], - "summary": "Create (DragonFly)", - "description": "Create a new DragonFly database.", - "operationId": "create-database-dragonfly", + "summary": "Update Envs (Bulk)", + "description": "Update multiple envs by database UUID.", + "operationId": "update-envs-by-database-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the database.", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { - "description": "Database data", + "description": "Bulk envs updated.", "required": true, "content": { "application/json": { "schema": { "required": [ - "server_uuid", - "project_uuid" + "data" ], "properties": { - "server_uuid": { - "type": "string", - "description": "UUID of the server" - }, - "project_uuid": { - "type": "string", - "description": "UUID of the project" - }, - "environment_name": { - "type": "string", - "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." - }, - "environment_uuid": { - "type": "string", - "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." - }, - "destination_uuid": { - "type": "string", - "description": "UUID of the destination if the server has multiple destinations" - }, - "dragonfly_password": { - "type": "string", - "description": "DragonFly password" - }, - "name": { - "type": "string", - "description": "Name of the database" - }, - "description": { - "type": "string", - "description": "Description of the database" - }, - "image": { - "type": "string", - "description": "Docker Image of the database" - }, - "is_public": { - "type": "boolean", - "description": "Is the database public?" - }, - "public_port": { - "type": "integer", - "description": "Public port of the database" - }, - "public_port_timeout": { - "type": "integer", - "description": "Public port timeout in seconds (default: 3600)" - }, - "limits_memory": { - "type": "string", - "description": "Memory limit of the database" - }, - "limits_memory_swap": { - "type": "string", - "description": "Memory swap limit of the database" - }, - "limits_memory_swappiness": { - "type": "integer", - "description": "Memory swappiness of the database" - }, - "limits_memory_reservation": { - "type": "string", - "description": "Memory reservation of the database" - }, - "limits_cpus": { - "type": "string", - "description": "CPU limit of the database" - }, - "limits_cpuset": { - "type": "string", - "description": "CPU set of the database" - }, - "limits_cpu_shares": { - "type": "integer", - "description": "CPU shares of the database" - }, - "instant_deploy": { - "type": "boolean", - "description": "Instant deploy the database" - }, - "tags": { + "data": { "type": "array", "items": { - "type": "string" - }, - "description": "Tags to assign to the database." + "properties": { + "key": { + "type": "string", + "description": "The key of the environment variable." + }, + "value": { + "type": "string", + "description": "The value of the environment variable." + }, + "is_literal": { + "type": "boolean", + "description": "The flag to indicate if the environment variable is a literal, nothing espaced." + }, + "is_multiline": { + "type": "boolean", + "description": "The flag to indicate if the environment variable is multiline." + }, + "is_shown_once": { + "type": "boolean", + "description": "If true, the saved value is hidden in the UI and API responses. A lock is permanent: false does not unlock a locked variable, but a new value can still replace the locked one. MCP never returns environment variable values." + } + }, + "type": "object" + } } }, "type": "object" } } } - }, + }, + "responses": { + "201": { + "description": "Environment variables updated.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/databases/{uuid}/envs/{env_uuid}": { + "delete": { + "tags": [ + "Databases" + ], + "summary": "Delete Env", + "description": "Delete env by UUID.", + "operationId": "delete-env-by-database-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the database.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "env_uuid", + "in": "path", + "description": "UUID of the environment variable.", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "Database updated" + "description": "Environment variable deleted.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Environment variable deleted." + } + }, + "type": "object" + } + } + } }, "400": { "$ref": "#/components/responses/400" @@ -8287,8 +10839,8 @@ "401": { "$ref": "#/components/responses/401" }, - "422": { - "$ref": "#/components/responses/422" + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -8298,125 +10850,49 @@ ] } }, - "/databases/redis": { - "post": { + "/databases/{uuid}/storages": { + "get": { "tags": [ "Databases" ], - "summary": "Create (Redis)", - "description": "Create a new Redis database.", - "operationId": "create-database-redis", - "requestBody": { - "description": "Database data", - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "server_uuid", - "project_uuid" - ], - "properties": { - "server_uuid": { - "type": "string", - "description": "UUID of the server" - }, - "project_uuid": { - "type": "string", - "description": "UUID of the project" - }, - "environment_name": { - "type": "string", - "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." - }, - "environment_uuid": { - "type": "string", - "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." - }, - "destination_uuid": { - "type": "string", - "description": "UUID of the destination if the server has multiple destinations" - }, - "redis_password": { - "type": "string", - "description": "Redis password" - }, - "redis_conf": { - "type": "string", - "description": "Redis conf" - }, - "name": { - "type": "string", - "description": "Name of the database" - }, - "description": { - "type": "string", - "description": "Description of the database" - }, - "image": { - "type": "string", - "description": "Docker Image of the database" - }, - "is_public": { - "type": "boolean", - "description": "Is the database public?" - }, - "public_port": { - "type": "integer", - "description": "Public port of the database" - }, - "public_port_timeout": { - "type": "integer", - "description": "Public port timeout in seconds (default: 3600)" - }, - "limits_memory": { - "type": "string", - "description": "Memory limit of the database" - }, - "limits_memory_swap": { - "type": "string", - "description": "Memory swap limit of the database" - }, - "limits_memory_swappiness": { - "type": "integer", - "description": "Memory swappiness of the database" - }, - "limits_memory_reservation": { - "type": "string", - "description": "Memory reservation of the database" - }, - "limits_cpus": { - "type": "string", - "description": "CPU limit of the database" - }, - "limits_cpuset": { - "type": "string", - "description": "CPU set of the database" - }, - "limits_cpu_shares": { - "type": "integer", - "description": "CPU shares of the database" - }, - "instant_deploy": { - "type": "boolean", - "description": "Instant deploy the database" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Tags to assign to the database." - } - }, - "type": "object" - } + "summary": "List Storages", + "description": "List all persistent storages and file storages by database UUID.", + "operationId": "list-storages-by-database-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the database.", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { - "description": "Database updated" + "description": "All storages by database UUID.", + "content": { + "application/json": { + "schema": { + "properties": { + "persistent_storages": { + "type": "array", + "items": { + "type": "object" + } + }, + "file_storages": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "type": "object" + } + } + } }, "400": { "$ref": "#/components/responses/400" @@ -8424,8 +10900,8 @@ "401": { "$ref": "#/components/responses/401" }, - "422": { - "$ref": "#/components/responses/422" + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -8433,127 +10909,81 @@ "bearerAuth": [] } ] - } - }, - "/databases/keydb": { + }, "post": { "tags": [ "Databases" ], - "summary": "Create (KeyDB)", - "description": "Create a new KeyDB database.", - "operationId": "create-database-keydb", - "requestBody": { - "description": "Database data", - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "server_uuid", - "project_uuid" - ], - "properties": { - "server_uuid": { - "type": "string", - "description": "UUID of the server" - }, - "project_uuid": { - "type": "string", - "description": "UUID of the project" - }, - "environment_name": { - "type": "string", - "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." - }, - "environment_uuid": { - "type": "string", - "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." - }, - "destination_uuid": { - "type": "string", - "description": "UUID of the destination if the server has multiple destinations" - }, - "keydb_password": { - "type": "string", - "description": "KeyDB password" - }, - "keydb_conf": { + "summary": "Create Storage", + "description": "Create a persistent storage or file storage for a database.", + "operationId": "create-storage-by-database-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the database.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "type", + "mount_path" + ], + "properties": { + "type": { "type": "string", - "description": "KeyDB conf" + "enum": [ + "persistent", + "file" + ], + "description": "The type of storage." }, "name": { "type": "string", - "description": "Name of the database" + "description": "Volume name (persistent only, required for persistent)." }, - "description": { + "mount_path": { "type": "string", - "description": "Description of the database" + "description": "The container mount path." }, - "image": { + "content": { "type": "string", - "description": "Docker Image of the database" + "nullable": true, + "description": "File content (file only, optional). Needs the deploy ability when set." }, - "is_public": { + "is_directory": { "type": "boolean", - "description": "Is the database public?" - }, - "public_port": { - "type": "integer", - "description": "Public port of the database" - }, - "public_port_timeout": { - "type": "integer", - "description": "Public port timeout in seconds (default: 3600)" - }, - "limits_memory": { - "type": "string", - "description": "Memory limit of the database" - }, - "limits_memory_swap": { - "type": "string", - "description": "Memory swap limit of the database" - }, - "limits_memory_swappiness": { - "type": "integer", - "description": "Memory swappiness of the database" - }, - "limits_memory_reservation": { - "type": "string", - "description": "Memory reservation of the database" - }, - "limits_cpus": { - "type": "string", - "description": "CPU limit of the database" + "description": "Whether this is a directory mount (file only, default false)." }, - "limits_cpuset": { + "fs_path": { "type": "string", - "description": "CPU set of the database" - }, - "limits_cpu_shares": { - "type": "integer", - "description": "CPU shares of the database" - }, - "instant_deploy": { - "type": "boolean", - "description": "Instant deploy the database" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Tags to assign to the database." + "description": "Host path. Required for directory mounts and host file mounts. Optional for file mounts with content (default: inside the resource directory). An absolute path can be anywhere on the host; a relative path is inside the resource directory. A directory or file mount outside the resource directory needs a token with the deploy permission. Coolify never deletes a path outside the resource directory." } }, - "type": "object" + "type": "object", + "additionalProperties": false } } } }, "responses": { - "200": { - "description": "Database updated" + "201": { + "description": "Storage created.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } }, "400": { "$ref": "#/components/responses/400" @@ -8561,6 +10991,12 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the deploy permission for a mount outside the resource directory or for a file storage with content." + }, + "404": { + "$ref": "#/components/responses/404" + }, "422": { "$ref": "#/components/responses/422" } @@ -8570,139 +11006,152 @@ "bearerAuth": [] } ] - } - }, - "/databases/mariadb": { - "post": { + }, + "patch": { "tags": [ "Databases" ], - "summary": "Create (MariaDB)", - "description": "Create a new MariaDB database.", - "operationId": "create-database-mariadb", + "summary": "Update Storage", + "description": "Update a persistent storage or file storage by database UUID. Changed file content is saved right away and written to the server in the background, so a failed write does not change the response.", + "operationId": "update-storage-by-database-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the database.", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { - "description": "Database data", + "description": "Storage updated. For read-only storages (from docker-compose or services), only is_preview_suffix_enabled can be updated.", "required": true, "content": { "application/json": { "schema": { "required": [ - "server_uuid", - "project_uuid" + "type" ], "properties": { - "server_uuid": { - "type": "string", - "description": "UUID of the server" - }, - "project_uuid": { - "type": "string", - "description": "UUID of the project" - }, - "environment_name": { - "type": "string", - "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." - }, - "environment_uuid": { - "type": "string", - "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." - }, - "destination_uuid": { - "type": "string", - "description": "UUID of the destination if the server has multiple destinations" - }, - "mariadb_conf": { - "type": "string", - "description": "MariaDB conf" - }, - "mariadb_root_password": { - "type": "string", - "description": "MariaDB root password" - }, - "mariadb_user": { - "type": "string", - "description": "MariaDB user" - }, - "mariadb_password": { - "type": "string", - "description": "MariaDB password" - }, - "mariadb_database": { - "type": "string", - "description": "MariaDB database" - }, - "name": { - "type": "string", - "description": "Name of the database" - }, - "description": { - "type": "string", - "description": "Description of the database" - }, - "image": { + "uuid": { "type": "string", - "description": "Docker Image of the database" - }, - "is_public": { - "type": "boolean", - "description": "Is the database public?" - }, - "public_port": { - "type": "integer", - "description": "Public port of the database" + "description": "The UUID of the storage (preferred)." }, - "public_port_timeout": { + "id": { "type": "integer", - "description": "Public port timeout in seconds (default: 3600)" - }, - "limits_memory": { - "type": "string", - "description": "Memory limit of the database" + "description": "The ID of the storage (deprecated, use uuid instead)." }, - "limits_memory_swap": { + "type": { "type": "string", - "description": "Memory swap limit of the database" + "enum": [ + "persistent", + "file" + ], + "description": "The type of storage: persistent or file." }, - "limits_memory_swappiness": { - "type": "integer", - "description": "Memory swappiness of the database" + "is_preview_suffix_enabled": { + "type": "boolean", + "description": "Whether to add -pr-N suffix for preview deployments." }, - "limits_memory_reservation": { + "name": { "type": "string", - "description": "Memory reservation of the database" + "description": "The volume name (persistent only, not allowed for read-only storages)." }, - "limits_cpus": { + "mount_path": { "type": "string", - "description": "CPU limit of the database" + "description": "The container mount path (not allowed for read-only storages)." }, - "limits_cpuset": { + "content": { "type": "string", - "description": "CPU set of the database" - }, - "limits_cpu_shares": { - "type": "integer", - "description": "CPU shares of the database" - }, - "instant_deploy": { - "type": "boolean", - "description": "Instant deploy the database" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Tags to assign to the database." + "nullable": true, + "description": "The file content (file only, not allowed for read-only storages). Changing the content needs the deploy permission." } }, - "type": "object" + "type": "object", + "additionalProperties": false + } + } + } + }, + "responses": { + "200": { + "description": "Storage updated.", + "content": { + "application/json": { + "schema": { + "type": "object" + } } } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "The token needs the deploy permission to change the content of a file outside the resource directory." + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/databases/{uuid}/storages/{storage_uuid}": { + "delete": { + "tags": [ + "Databases" + ], + "summary": "Delete Storage", + "description": "Delete a persistent storage or file storage by database UUID.", + "operationId": "delete-storage-by-database-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the database.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "storage_uuid", + "in": "path", + "description": "UUID of the storage.", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "Database updated" + "description": "Storage deleted.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string" + } + }, + "type": "object" + } + } + } }, "400": { "$ref": "#/components/responses/400" @@ -8710,6 +11159,9 @@ "401": { "$ref": "#/components/responses/401" }, + "404": { + "$ref": "#/components/responses/404" + }, "422": { "$ref": "#/components/responses/422" } @@ -8721,127 +11173,89 @@ ] } }, - "/databases/mysql": { + "/databases/{uuid}/tags": { + "get": { + "tags": [ + "Databases" + ], + "summary": "List Tags", + "description": "List tags for a database by UUID.", + "operationId": "list-tags-by-database-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the database.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "List of tags.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, "post": { "tags": [ "Databases" ], - "summary": "Create (MySQL)", - "description": "Create a new MySQL database.", - "operationId": "create-database-mysql", + "summary": "Create Tag", + "description": "Add tag(s) to a database by UUID.", + "operationId": "create-tag-by-database-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the database.", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { - "description": "Database data", "required": true, "content": { "application/json": { "schema": { - "required": [ - "server_uuid", - "project_uuid" - ], "properties": { - "server_uuid": { - "type": "string", - "description": "UUID of the server" - }, - "project_uuid": { - "type": "string", - "description": "UUID of the project" - }, - "environment_name": { - "type": "string", - "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." - }, - "environment_uuid": { - "type": "string", - "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." - }, - "destination_uuid": { - "type": "string", - "description": "UUID of the destination if the server has multiple destinations" - }, - "mysql_root_password": { - "type": "string", - "description": "MySQL root password" - }, - "mysql_password": { - "type": "string", - "description": "MySQL password" - }, - "mysql_user": { - "type": "string", - "description": "MySQL user" - }, - "mysql_database": { - "type": "string", - "description": "MySQL database" - }, - "mysql_conf": { - "type": "string", - "description": "MySQL conf" - }, - "name": { - "type": "string", - "description": "Name of the database" - }, - "description": { - "type": "string", - "description": "Description of the database" - }, - "image": { - "type": "string", - "description": "Docker Image of the database" - }, - "is_public": { - "type": "boolean", - "description": "Is the database public?" - }, - "public_port": { - "type": "integer", - "description": "Public port of the database" - }, - "public_port_timeout": { - "type": "integer", - "description": "Public port timeout in seconds (default: 3600)" - }, - "limits_memory": { - "type": "string", - "description": "Memory limit of the database" - }, - "limits_memory_swap": { - "type": "string", - "description": "Memory swap limit of the database" - }, - "limits_memory_swappiness": { - "type": "integer", - "description": "Memory swappiness of the database" - }, - "limits_memory_reservation": { - "type": "string", - "description": "Memory reservation of the database" - }, - "limits_cpus": { - "type": "string", - "description": "CPU limit of the database" - }, - "limits_cpuset": { + "tag_name": { "type": "string", - "description": "CPU set of the database" - }, - "limits_cpu_shares": { - "type": "integer", - "description": "CPU shares of the database" - }, - "instant_deploy": { - "type": "boolean", - "description": "Instant deploy the database" + "description": "The tag name (min 2 characters). Required if tag_names is not provided." }, - "tags": { + "tag_names": { "type": "array", "items": { "type": "string" }, - "description": "Tags to assign to the database." + "description": "Array of tag names (each min 2 characters). Required if tag_name is not provided." } }, "type": "object" @@ -8849,9 +11263,71 @@ } } }, + "responses": { + "201": { + "description": "Tags added successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/databases/{uuid}/tags/{tag_uuid}": { + "delete": { + "tags": [ + "Databases" + ], + "summary": "Delete Tag", + "description": "Remove a tag from a database by UUID.", + "operationId": "delete-tag-by-database-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the database.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tag_uuid", + "in": "path", + "description": "UUID of the tag.", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "Database updated" + "description": "Tag removed." }, "400": { "$ref": "#/components/responses/400" @@ -8859,8 +11335,8 @@ "401": { "$ref": "#/components/responses/401" }, - "422": { - "$ref": "#/components/responses/422" + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -8870,115 +11346,47 @@ ] } }, - "/databases/mongodb": { + "/databases/{uuid}/clone": { "post": { "tags": [ "Databases" ], - "summary": "Create (MongoDB)", - "description": "Create a new MongoDB database.", - "operationId": "create-database-mongodb", + "summary": "Clone", + "description": "Clone a database to a destination owned by the authenticated team.", + "operationId": "clone-database-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the database.", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { - "description": "Database data", "required": true, "content": { "application/json": { "schema": { "required": [ - "server_uuid", - "project_uuid" + "destination_uuid" ], "properties": { - "server_uuid": { - "type": "string", - "description": "UUID of the server" - }, - "project_uuid": { - "type": "string", - "description": "UUID of the project" - }, - "environment_name": { - "type": "string", - "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." - }, - "environment_uuid": { - "type": "string", - "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." - }, "destination_uuid": { - "type": "string", - "description": "UUID of the destination if the server has multiple destinations" - }, - "mongo_conf": { - "type": "string", - "description": "MongoDB conf" - }, - "mongo_initdb_root_username": { - "type": "string", - "description": "MongoDB initdb root username" + "type": "string" }, "name": { - "type": "string", - "description": "Name of the database" - }, - "description": { - "type": "string", - "description": "Description of the database" - }, - "image": { - "type": "string", - "description": "Docker Image of the database" - }, - "is_public": { - "type": "boolean", - "description": "Is the database public?" - }, - "public_port": { - "type": "integer", - "description": "Public port of the database" - }, - "public_port_timeout": { - "type": "integer", - "description": "Public port timeout in seconds (default: 3600)" - }, - "limits_memory": { - "type": "string", - "description": "Memory limit of the database" - }, - "limits_memory_swap": { - "type": "string", - "description": "Memory swap limit of the database" - }, - "limits_memory_swappiness": { - "type": "integer", - "description": "Memory swappiness of the database" - }, - "limits_memory_reservation": { - "type": "string", - "description": "Memory reservation of the database" - }, - "limits_cpus": { - "type": "string", - "description": "CPU limit of the database" - }, - "limits_cpuset": { - "type": "string", - "description": "CPU set of the database" - }, - "limits_cpu_shares": { - "type": "integer", - "description": "CPU shares of the database" + "type": [ + "string", + "null" + ] }, - "instant_deploy": { + "clone_volumes": { + "description": "Whether to clone volume data. Needs the deploy ability.", "type": "boolean", - "description": "Instant deploy the database" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Tags to assign to the database." + "default": false } }, "type": "object" @@ -8986,9 +11394,98 @@ } } }, + "responses": { + "201": { + "description": "Database cloned." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "The token needs the deploy ability to clone volume data." + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/deployments": { + "get": { + "tags": [ + "Deployments" + ], + "summary": "List", + "description": "List currently running deployments", + "operationId": "list-deployments", + "responses": { + "200": { + "description": "Get all currently running deployments.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationDeploymentQueue" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/deployments/{uuid}": { + "get": { + "tags": [ + "Deployments" + ], + "summary": "Get", + "description": "Get deployment by UUID.", + "operationId": "get-deployment-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Deployment UUID", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "Database updated" + "description": "Get deployment by UUID.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationDeploymentQueue" + } + } + } }, "400": { "$ref": "#/components/responses/400" @@ -8996,8 +11493,8 @@ "401": { "$ref": "#/components/responses/401" }, - "422": { - "$ref": "#/components/responses/422" + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -9007,118 +11504,205 @@ ] } }, - "/databases/sqlite": { + "/deployments/{uuid}/cancel": { "post": { "tags": [ - "Databases" + "Deployments" ], - "summary": "Create (SQLite)", - "description": "Create a new SQLite database.", - "operationId": "create-database-sqlite", - "requestBody": { - "description": "Database data", - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "server_uuid", - "project_uuid" - ], - "properties": { - "server_uuid": { - "type": "string", - "description": "UUID of the server" - }, - "project_uuid": { - "type": "string", - "description": "UUID of the project" - }, - "environment_name": { - "type": "string", - "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid." - }, - "environment_uuid": { - "type": "string", - "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid." - }, - "destination_uuid": { - "type": "string", - "description": "UUID of the destination if the server has multiple destinations" - }, - "sqlite_databases": { - "type": "string", - "description": "Comma-separated SQLite database file names" - }, - "name": { - "type": "string", - "description": "Name of the database" - }, - "description": { - "type": "string", - "description": "Description of the database" - }, - "image": { - "type": "string", - "description": "Docker Image of the database" - }, - "limits_memory": { - "type": "string", - "description": "Memory limit of the database" - }, - "limits_memory_swap": { - "type": "string", - "description": "Memory swap limit of the database" - }, - "limits_memory_swappiness": { - "type": "integer", - "description": "Memory swappiness of the database" - }, - "limits_memory_reservation": { - "type": "string", - "description": "Memory reservation of the database" - }, - "limits_cpus": { - "type": "string", - "description": "CPU limit of the database" + "summary": "Cancel", + "description": "Cancel a deployment by UUID.", + "operationId": "cancel-deployment-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Deployment UUID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Deployment cancelled successfully.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Deployment cancelled successfully." + }, + "deployment_uuid": { + "type": "string", + "example": "cm37r6cqj000008jm0veg5tkm" + }, + "status": { + "type": "string", + "example": "cancelled-by-user" + } }, - "limits_cpuset": { - "type": "string", - "description": "CPU set of the database" + "type": "object" + } + } + } + }, + "400": { + "description": "Deployment cannot be cancelled (already finished/failed/cancelled).", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Deployment cannot be cancelled. Current status: finished" + } }, - "limits_cpu_shares": { - "type": "integer", - "description": "CPU shares of the database" + "type": "object" + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "User doesn't have permission to cancel this deployment.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "You do not have permission to cancel this deployment." + } }, - "instant_deploy": { - "type": "boolean", - "description": "Instant deploy the database" + "type": "object" + } + } + } + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/deploy": { + "post": { + "tags": [ + "Deployments" + ], + "summary": "Deploy", + "description": "Deploy by tag or UUID using query parameters or a JSON body.", + "operationId": "deploy-by-tag-or-uuid", + "parameters": [ + { + "name": "tag", + "in": "query", + "description": "Tag name(s). Comma separated list is also accepted.", + "schema": { + "type": "string" + } + }, + { + "name": "uuid", + "in": "query", + "description": "Resource UUID(s). Comma separated list is also accepted.", + "schema": { + "type": "string" + } + }, + { + "name": "force", + "in": "query", + "description": "Force rebuild (without cache)", + "schema": { + "type": "boolean" + } + }, + { + "name": "pr", + "in": "query", + "description": "Pull Request Id for deploying specific PR builds. Cannot be used with tag parameter.", + "schema": { + "type": "integer", + "maximum": 2147483647 + } + }, + { + "name": "pull_request_id", + "in": "query", + "description": "Preview deployment identifier. Alias of pr.", + "schema": { + "type": "integer", + "maximum": 2147483647 + } + }, + { + "name": "docker_tag", + "in": "query", + "description": "Docker image tag for Docker Image preview deployments. Requires pull_request_id. Opening a preview or changing its tag also needs the write permission.", + "schema": { + "type": "string" + } + }, + { + "name": "cancel_previous", + "in": "query", + "description": "Cancel the older webhook, API, and MCP deployments of the same application, pull request, and server. `queued` cancels the ones that wait in the queue. `building` also stops the ones that are still building; a deployment that already started to replace containers always finishes. Manual, restart, and rollback deployments are never cancelled. Default: `none`.", + "schema": { + "type": "string", + "default": "none", + "enum": [ + "none", + "queued", + "building" + ] + } + } + ], + "responses": { + "200": { + "description": "Get deployment(s) UUID's", + "content": { + "application/json": { + "schema": { + "properties": { + "deployments": { + "type": "array", + "items": { + "properties": { + "message": { + "type": "string" + }, + "resource_uuid": { + "type": "string" + }, + "deployment_uuid": { + "type": "string" + } + }, + "type": "object" + } + } }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Tags to assign to the database." - } - }, - "type": "object" + "type": "object" + } } } - } - }, - "responses": { - "200": { - "description": "Database updated" }, "400": { "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -9128,71 +11712,57 @@ ] } }, - "/databases/{uuid}/logs": { + "/deployments/applications/{uuid}": { "get": { "tags": [ - "Databases" + "Deployments" ], - "summary": "Get database logs.", - "description": "Get database logs by UUID. Requires the `read:sensitive` or `root` token ability.", - "operationId": "get-database-logs-by-uuid", + "summary": "List application deployments", + "description": "List application deployments by using the app uuid", + "operationId": "list-deployments-by-app-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the database.", + "description": "UUID of the application.", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } }, { - "name": "lines", + "name": "skip", "in": "query", - "description": "Number of lines to show from the end of the logs. Use `all` to return all logs. `-1` remains available as a compatibility alias.", + "description": "Number of records to skip.", "required": false, "schema": { - "oneOf": [ - { - "type": "integer", - "format": "int32", - "default": 100, - "maximum": 10000, - "minimum": -1 - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] + "type": "integer", + "default": 0, + "minimum": 0 } }, { - "name": "show_timestamps", + "name": "take", "in": "query", - "description": "Show timestamps in the logs.", + "description": "Number of records to take.", "required": false, "schema": { - "type": "boolean", - "default": false + "type": "integer", + "default": 10, + "minimum": 1 } } ], "responses": { "200": { - "description": "Get database logs by UUID.", + "description": "List application deployments by using the app uuid.", "content": { "application/json": { "schema": { - "properties": { - "logs": { - "type": "string" - } - }, - "type": "object" + "type": "array", + "items": { + "$ref": "#/components/schemas/Application" + } } } } @@ -9202,9 +11772,6 @@ }, "401": { "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" } }, "security": [ @@ -9214,85 +11781,157 @@ ] } }, - "/databases/{uuid}/backups/{scheduled_backup_uuid}/executions/{execution_uuid}": { - "delete": { + "/destinations": { + "get": { "tags": [ - "Databases" + "Destinations" ], - "summary": "Delete backup execution", - "description": "Deletes a specific backup execution.", - "operationId": "delete-backup-execution-by-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the database", - "required": true, - "schema": { - "type": "string" + "summary": "List destinations", + "description": "List all Docker network destinations for the authenticated team.", + "operationId": "list-destinations", + "responses": { + "200": { + "description": "Destinations for the authenticated team.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Destination" + } + } + } } }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "security": [ { - "name": "scheduled_backup_uuid", - "in": "path", - "description": "UUID of the backup configuration", - "required": true, - "schema": { - "type": "string" - } - }, + "bearerAuth": [] + } + ] + } + }, + "/servers/{server_uuid}/destinations": { + "get": { + "tags": [ + "Destinations" + ], + "summary": "List destinations by server", + "description": "List Docker network destinations attached to a server owned by the authenticated team.", + "operationId": "list-server-destinations", + "parameters": [ { - "name": "execution_uuid", + "name": "server_uuid", "in": "path", - "description": "UUID of the backup execution to delete", + "description": "Server UUID", "required": true, "schema": { "type": "string" } - }, - { - "name": "delete_s3", - "in": "query", - "description": "Whether to delete the backup from S3", - "required": false, - "schema": { - "type": "boolean", - "default": false - } } ], "responses": { "200": { - "description": "Backup execution deleted.", + "description": "Destinations attached to the server.", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string", - "example": "Backup execution deleted." - } - }, - "type": "object" + "type": "array", + "items": { + "$ref": "#/components/schemas/Destination" + } } } } }, + "401": { + "$ref": "#/components/responses/401" + }, "404": { - "description": "Backup execution not found.", + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Destinations" + ], + "summary": "Create destination", + "description": "Create a Docker network destination on a server owned by the authenticated team. The network must be new: Docker's built-in networks (bridge, host, none) and networks that already exist on a standalone server are rejected, because Coolify connects the proxy to the destination network.", + "operationId": "create-server-destination", + "parameters": [ + { + "name": "server_uuid", + "in": "path", + "description": "Server UUID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "network" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 255 + }, + "network": { + "description": "Name of a new Docker network. Must not be bridge, host, none, or a network that already exists on the server.", + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$", + "maxLength": 255 + }, + "type": { + "type": "string", + "enum": [ + "standalone", + "swarm" + ] + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "Destination created.", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string", - "example": "Backup execution not found." - } - }, - "type": "object" + "$ref": "#/components/schemas/Destination" } } } + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "409": { + "description": "A destination with this network already exists." + }, + "422": { + "description": "Validation failed, the network is reserved or already exists on the server, or the server could not be checked." } }, "security": [ @@ -9302,28 +11941,19 @@ ] } }, - "/databases/{uuid}/backups/{scheduled_backup_uuid}/executions": { + "/destinations/{uuid}": { "get": { "tags": [ - "Databases" + "Destinations" ], - "summary": "List backup executions", - "description": "Get all executions for a specific backup configuration. The execution `message` is only returned (redacted) to tokens with the `read:sensitive` or `root` ability; otherwise it is `null`.", - "operationId": "list-backup-executions", + "summary": "Get destination", + "description": "Get a Docker network destination by UUID.", + "operationId": "get-destination-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the database", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "scheduled_backup_uuid", - "in": "path", - "description": "UUID of the backup configuration", + "description": "Destination UUID", "required": true, "schema": { "type": "string" @@ -9332,49 +11962,20 @@ ], "responses": { "200": { - "description": "List of backup executions", + "description": "Destination details.", "content": { "application/json": { "schema": { - "properties": { - "executions": { - "type": "array", - "items": { - "properties": { - "uuid": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "created_at": { - "type": "string" - }, - "message": { - "description": "Redacted execution output. Null unless the token has the `read:sensitive` or `root` ability.", - "type": [ - "string", - "null" - ] - }, - "status": { - "type": "string" - } - }, - "type": "object" - } - } - }, - "type": "object" + "$ref": "#/components/schemas/Destination" } } } }, + "401": { + "$ref": "#/components/responses/401" + }, "404": { - "description": "Backup configuration not found." + "$ref": "#/components/responses/404" } }, "security": [ @@ -9382,66 +11983,35 @@ "bearerAuth": [] } ] - } - }, - "/databases/{uuid}/move": { - "post": { + }, + "delete": { "tags": [ - "Databases" + "Destinations" ], - "summary": "Move", - "description": "Move database to another project/environment. This is a purely organizational change — running containers are not affected. Note: after moving, the database will pick up shared environment variables from the new environment on the next deployment.", - "operationId": "move-database-by-uuid", + "summary": "Delete destination", + "description": "Delete an unused Docker network destination.", + "operationId": "delete-destination-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the database.", + "description": "Destination UUID", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "description": "Target environment to move the database to.", - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "environment_uuid" - ], - "properties": { - "environment_uuid": { - "type": "string", - "description": "UUID of the target environment." - } - }, - "type": "object" - } - } - } - }, "responses": { "200": { - "description": "Database moved successfully.", + "description": "Destination deleted.", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", - "example": "Database moved successfully." - }, - "uuid": { - "type": "string" - }, - "project_uuid": { - "type": "string" - }, - "environment_uuid": { - "type": "string" + "example": "Deleted." } }, "type": "object" @@ -9449,17 +12019,14 @@ } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, "404": { "$ref": "#/components/responses/404" }, - "422": { - "$ref": "#/components/responses/422" + "409": { + "description": "Destination has attached resources." } }, "security": [ @@ -9467,21 +12034,19 @@ "bearerAuth": [] } ] - } - }, - "/databases/{uuid}/migrate": { - "post": { + }, + "patch": { "tags": [ - "Databases" + "Destinations" ], - "summary": "Migrate to Server", - "description": "Migrate a database to another destination/server owned by the authenticated team. Stops the database, optionally transfers persistent volume data when both servers are managed by Coolify, and updates database records. Redeploy after migration completes.", - "operationId": "migrate-database-by-uuid", + "summary": "Update destination", + "description": "Update a Docker network destination name. Network cannot be changed via the API.", + "operationId": "update-destination-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the database.", + "description": "Destination UUID", "required": true, "schema": { "type": "string" @@ -9493,18 +12058,10 @@ "content": { "application/json": { "schema": { - "required": [ - "destination_uuid" - ], "properties": { - "destination_uuid": { - "description": "UUID of the target destination.", - "type": "string" - }, - "migrate_volumes": { - "description": "Whether to transfer persistent volume data when migrating across servers.", - "type": "boolean", - "default": true + "name": { + "type": "string", + "maxLength": 255 } }, "type": "object" @@ -9514,10 +12071,14 @@ }, "responses": { "200": { - "description": "Database migration started or completed." - }, - "400": { - "$ref": "#/components/responses/400" + "description": "Destination updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Destination" + } + } + } }, "401": { "$ref": "#/components/responses/401" @@ -9536,20 +12097,27 @@ ] } }, - "/databases/{uuid}/start": { - "post": { + "/digitalocean/regions": { + "get": { "tags": [ - "Databases" + "DigitalOcean" ], - "summary": "Start", - "description": "Start database.", - "operationId": "start-database-by-uuid", + "summary": "Get DigitalOcean regions", + "operationId": "get-digitalocean-regions", "parameters": [ { - "name": "uuid", - "in": "path", - "description": "UUID of the database.", - "required": true, + "name": "cloud_provider_token_uuid", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "cloud_provider_token_id", + "in": "query", + "required": false, + "deprecated": true, "schema": { "type": "string" } @@ -9557,35 +12125,13 @@ ], "responses": { "200": { - "description": "Start database.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "Database starting request queued." - } - }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "description": "List of DigitalOcean regions." }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" - }, - "409": { - "description": "Another start, restart or import of this database is already in progress." - }, "422": { - "description": "The database cannot start yet, for example because a CA certificate is missing." + "description": "Validation failed." } }, "security": [ @@ -9595,59 +12141,41 @@ ] } }, - "/databases/{uuid}/stop": { - "post": { + "/digitalocean/sizes": { + "get": { "tags": [ - "Databases" + "DigitalOcean" ], - "summary": "Stop", - "description": "Stop database.", - "operationId": "stop-database-by-uuid", + "summary": "Get DigitalOcean sizes", + "operationId": "get-digitalocean-sizes", "parameters": [ { - "name": "uuid", - "in": "path", - "description": "UUID of the database.", - "required": true, + "name": "cloud_provider_token_uuid", + "in": "query", + "required": false, "schema": { "type": "string" } }, { - "name": "docker_cleanup", - "in": "query", - "description": "Run docker cleanup when the server disk usage is at or above its cleanup threshold. Skipped when a cleanup ran on the server in the last hour.", - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Stop database.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "Database stopping request queued." - } - }, - "type": "object" - } - } + "name": "cloud_provider_token_id", + "in": "query", + "required": false, + "deprecated": true, + "schema": { + "type": "string" } - }, - "400": { - "$ref": "#/components/responses/400" + } + ], + "responses": { + "200": { + "description": "List of DigitalOcean sizes." }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" + "422": { + "description": "Validation failed." } }, "security": [ @@ -9657,20 +12185,27 @@ ] } }, - "/databases/{uuid}/restart": { - "post": { + "/digitalocean/images": { + "get": { "tags": [ - "Databases" + "DigitalOcean" ], - "summary": "Restart", - "description": "Restart database.", - "operationId": "restart-database-by-uuid", + "summary": "Get DigitalOcean images", + "operationId": "get-digitalocean-images", "parameters": [ { - "name": "uuid", - "in": "path", - "description": "UUID of the database.", - "required": true, + "name": "cloud_provider_token_uuid", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "cloud_provider_token_id", + "in": "query", + "required": false, + "deprecated": true, "schema": { "type": "string" } @@ -9678,35 +12213,13 @@ ], "responses": { "200": { - "description": "Restart database.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "Database restaring request queued." - } - }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "description": "List of DigitalOcean images." }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" - }, - "409": { - "description": "Another start, restart or import of this database is already in progress." - }, "422": { - "description": "The database cannot start yet, for example because a CA certificate is missing." + "description": "Validation failed." } }, "security": [ @@ -9716,20 +12229,27 @@ ] } }, - "/databases/{uuid}/envs": { + "/digitalocean/ssh-keys": { "get": { "tags": [ - "Databases" + "DigitalOcean" ], - "summary": "List Envs", - "description": "List all envs by database UUID.", - "operationId": "list-envs-by-database-uuid", + "summary": "Get DigitalOcean SSH keys", + "operationId": "get-digitalocean-ssh-keys", "parameters": [ { - "name": "uuid", - "in": "path", - "description": "UUID of the database.", - "required": true, + "name": "cloud_provider_token_uuid", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "cloud_provider_token_id", + "in": "query", + "required": false, + "deprecated": true, "schema": { "type": "string" } @@ -9737,26 +12257,13 @@ ], "responses": { "200": { - "description": "Environment variables.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EnvironmentVariable" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "description": "List of DigitalOcean SSH keys." }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" + "422": { + "description": "Validation failed." } }, "security": [ @@ -9764,86 +12271,34 @@ "bearerAuth": [] } ] - }, + } + }, + "/servers/digitalocean": { "post": { "tags": [ - "Databases" - ], - "summary": "Create Env", - "description": "Create env by database UUID.", - "operationId": "create-env-by-database-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the database.", - "required": true, - "schema": { - "type": "string" - } - } + "DigitalOcean" ], - "requestBody": { - "description": "Env created.", - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "key": { - "type": "string", - "description": "The key of the environment variable." - }, - "value": { - "type": "string", - "description": "The value of the environment variable." - }, - "is_literal": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is a literal, nothing espaced." - }, - "is_multiline": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is multiline." - }, - "is_shown_once": { - "type": "boolean", - "description": "If true, the saved value is hidden in the UI and API responses. MCP never returns environment variable values." - } - }, - "type": "object" - } - } - } - }, + "summary": "Create a server on DigitalOcean", + "description": "Create a DigitalOcean droplet and link it as a Coolify server. A cloud-init script or extra SSH key IDs need a token with the deploy permission.", + "operationId": "create-digitalocean-server", "responses": { "201": { - "description": "Environment variable created.", - "content": { - "application/json": { - "schema": { - "properties": { - "uuid": { - "type": "string", - "example": "nc0k04gk8g0cgsk440g0koko" - } - }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "description": "DigitalOcean droplet created and linked to a Coolify server." }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" + "403": { + "description": "The token needs the deploy permission for a cloud-init script or extra SSH keys." }, "422": { - "$ref": "#/components/responses/422" + "description": "Validation failed." + }, + "429": { + "description": "DigitalOcean rate limit exceeded." + }, + "502": { + "$ref": "#/components/responses/502" } }, "security": [ @@ -9851,84 +12306,55 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/dns/zones": { + "get": { "tags": [ - "Databases" - ], - "summary": "Update Env", - "description": "Update env by database UUID.", - "operationId": "update-env-by-database-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the database.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "Env updated.", - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "key", - "value" - ], - "properties": { - "key": { - "type": "string", - "description": "The key of the environment variable." - }, - "value": { - "type": "string", - "description": "The value of the environment variable." - }, - "is_literal": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is a literal, nothing espaced." - }, - "is_multiline": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is multiline." - }, - "is_shown_once": { - "type": "boolean", - "description": "If true, the saved value is hidden in the UI and API responses. MCP never returns environment variable values." - } - }, - "type": "object" - } - } - } - }, + "DNS" + ], + "summary": "List DNS Zones", + "description": "List the DNS zones that the Cloudflare tokens of the team can access. Requires admin or owner.", + "operationId": "list-dns-zones", "responses": { - "201": { - "description": "Environment variable updated.", + "200": { + "description": "DNS zones.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvironmentVariable" + "type": "array", + "items": { + "properties": { + "zone": { + "type": "string" + }, + "account_name": { + "type": [ + "string", + "null" + ] + }, + "integration_token_uuid": { + "type": "string" + }, + "integration_token_name": { + "type": "string" + }, + "managed_records_count": { + "type": "integer" + } + }, + "type": "object" + } } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" + "403": { + "description": "Not an admin or owner of the team." } }, "security": [ @@ -9938,94 +12364,44 @@ ] } }, - "/databases/{uuid}/envs/bulk": { - "patch": { + "/applications/{uuid}/dns": { + "get": { "tags": [ - "Databases" + "DNS" ], - "summary": "Update Envs (Bulk)", - "description": "Update multiple envs by database UUID.", - "operationId": "update-envs-by-database-uuid", + "summary": "Get Application DNS", + "description": "DNS providers and managed DNS records for the domains of an application.", + "operationId": "get-application-dns", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the database.", + "description": "Application UUID.", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "description": "Bulk envs updated.", - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "data" - ], - "properties": { - "data": { - "type": "array", - "items": { - "properties": { - "key": { - "type": "string", - "description": "The key of the environment variable." - }, - "value": { - "type": "string", - "description": "The value of the environment variable." - }, - "is_literal": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is a literal, nothing espaced." - }, - "is_multiline": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is multiline." - }, - "is_shown_once": { - "type": "boolean", - "description": "If true, the saved value is hidden in the UI and API responses. MCP never returns environment variable values." - } - }, - "type": "object" - } - } - }, - "type": "object" - } - } - } - }, "responses": { - "201": { - "description": "Environment variables updated.", + "200": { + "description": "DNS status.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EnvironmentVariable" - } + "$ref": "#/components/schemas/ResourceDnsStatus" } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "No access to the application." + }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -10033,46 +12409,44 @@ "bearerAuth": [] } ] - } - }, - "/databases/{uuid}/envs/{env_uuid}": { - "delete": { + }, + "post": { "tags": [ - "Databases" + "DNS" ], - "summary": "Delete Env", - "description": "Delete env by UUID.", - "operationId": "delete-env-by-database-uuid", + "summary": "Create Application DNS Record", + "description": "Create a DNS record at Cloudflare that points a domain of the application to its server. An existing record with the same address is adopted.", + "operationId": "create-application-dns-record", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the database.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "env_uuid", - "in": "path", - "description": "UUID of the environment variable.", + "description": "Application UUID.", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateDnsRecordRequest" + } + } + } + }, "responses": { - "200": { - "description": "Environment variable deleted.", + "201": { + "description": "DNS record created.", "content": { "application/json": { "schema": { "properties": { - "message": { - "type": "string", - "example": "Environment variable deleted." + "record": { + "$ref": "#/components/schemas/ManagedDnsRecord" } }, "type": "object" @@ -10081,13 +12455,32 @@ } }, "400": { - "$ref": "#/components/responses/400" + "description": "Cloudflare rejected the change." }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "No write access to the application." + }, "404": { "$ref": "#/components/responses/404" + }, + "409": { + "description": "Another record uses the hostname. Replace it with the replace endpoint.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DnsRecordConflict" + } + } + } + }, + "422": { + "$ref": "#/components/responses/422" + }, + "423": { + "description": "Another DNS change for the hostname is in progress. Try again." } }, "security": [ @@ -10097,19 +12490,19 @@ ] } }, - "/databases/{uuid}/storages": { + "/services/{uuid}/dns": { "get": { "tags": [ - "Databases" + "DNS" ], - "summary": "List Storages", - "description": "List all persistent storages and file storages by database UUID.", - "operationId": "list-storages-by-database-uuid", + "summary": "Get Service DNS", + "description": "DNS providers and managed DNS records for the domains of a service.", + "operationId": "get-service-dns", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the database.", + "description": "Service UUID.", "required": true, "schema": { "type": "string" @@ -10118,35 +12511,21 @@ ], "responses": { "200": { - "description": "All storages by database UUID.", + "description": "DNS status.", "content": { "application/json": { "schema": { - "properties": { - "persistent_storages": { - "type": "array", - "items": { - "type": "object" - } - }, - "file_storages": { - "type": "array", - "items": { - "type": "object" - } - } - }, - "type": "object" + "$ref": "#/components/schemas/ResourceDnsStatus" } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "No access to the service." + }, "404": { "$ref": "#/components/responses/404" } @@ -10159,16 +12538,16 @@ }, "post": { "tags": [ - "Databases" + "DNS" ], - "summary": "Create Storage", - "description": "Create a persistent storage or file storage for a database.", - "operationId": "create-storage-by-database-uuid", + "summary": "Create Service DNS Record", + "description": "Create a DNS record at Cloudflare that points a domain of the service to its server. An existing record with the same address is adopted.", + "operationId": "create-service-dns-record", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the database.", + "description": "Service UUID.", "required": true, "schema": { "type": "string" @@ -10180,72 +12559,125 @@ "content": { "application/json": { "schema": { - "required": [ - "type", - "mount_path" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "persistent", - "file" - ], - "description": "The type of storage." - }, - "name": { - "type": "string", - "description": "Volume name (persistent only, required for persistent)." - }, - "mount_path": { - "type": "string", - "description": "The container mount path." - }, - "content": { - "type": "string", - "nullable": true, - "description": "File content (file only, optional). Needs the deploy ability when set." - }, - "is_directory": { - "type": "boolean", - "description": "Whether this is a directory mount (file only, default false)." + "$ref": "#/components/schemas/CreateDnsRecordRequest" + } + } + } + }, + "responses": { + "201": { + "description": "DNS record created.", + "content": { + "application/json": { + "schema": { + "properties": { + "record": { + "$ref": "#/components/schemas/ManagedDnsRecord" + } }, - "fs_path": { - "type": "string", - "description": "Host path. Required for directory mounts and host file mounts. Optional for file mounts with content (default: inside the resource directory). An absolute path can be anywhere on the host; a relative path is inside the resource directory. A directory or file mount outside the resource directory needs a token with the deploy permission. Coolify never deletes a path outside the resource directory." - } - }, - "type": "object", - "additionalProperties": false + "type": "object" + } + } + } + }, + "400": { + "description": "Cloudflare rejected the change." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "No write access to the service." + }, + "404": { + "$ref": "#/components/responses/404" + }, + "409": { + "description": "Another record uses the hostname. Replace it with the replace endpoint.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DnsRecordConflict" + } + } + } + }, + "422": { + "$ref": "#/components/responses/422" + }, + "423": { + "description": "Another DNS change for the hostname is in progress. Try again." + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/applications/{uuid}/dns/replace": { + "post": { + "tags": [ + "DNS" + ], + "summary": "Replace Application DNS Record", + "description": "Point the conflicting record from a 409 create response to the server of the application.", + "operationId": "replace-application-dns-record", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Application UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReplaceDnsRecordRequest" } } } }, "responses": { - "201": { - "description": "Storage created.", + "200": { + "description": "DNS record replaced.", "content": { "application/json": { "schema": { + "properties": { + "record": { + "$ref": "#/components/schemas/ManagedDnsRecord" + } + }, "type": "object" } } } }, "400": { - "$ref": "#/components/responses/400" + "description": "Cloudflare rejected the change, or the record changed since the conflict." }, "401": { "$ref": "#/components/responses/401" }, "403": { - "description": "The token needs the deploy permission for a mount outside the resource directory or for a file storage with content." + "description": "No write access to the application." }, "404": { "$ref": "#/components/responses/404" }, "422": { "$ref": "#/components/responses/422" + }, + "423": { + "description": "Another DNS change for the hostname is in progress. Try again." } }, "security": [ @@ -10253,19 +12685,21 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/services/{uuid}/dns/replace": { + "post": { "tags": [ - "Databases" + "DNS" ], - "summary": "Update Storage", - "description": "Update a persistent storage or file storage by database UUID. Changed file content is saved right away and written to the server in the background, so a failed write does not change the response.", - "operationId": "update-storage-by-database-uuid", + "summary": "Replace Service DNS Record", + "description": "Point the conflicting record from a 409 create response to the server of the service.", + "operationId": "replace-service-dns-record", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the database.", + "description": "Service UUID.", "required": true, "schema": { "type": "string" @@ -10273,80 +12707,48 @@ } ], "requestBody": { - "description": "Storage updated. For read-only storages (from docker-compose or services), only is_preview_suffix_enabled can be updated.", "required": true, "content": { "application/json": { "schema": { - "required": [ - "type" - ], - "properties": { - "uuid": { - "type": "string", - "description": "The UUID of the storage (preferred)." - }, - "id": { - "type": "integer", - "description": "The ID of the storage (deprecated, use uuid instead)." - }, - "type": { - "type": "string", - "enum": [ - "persistent", - "file" - ], - "description": "The type of storage: persistent or file." - }, - "is_preview_suffix_enabled": { - "type": "boolean", - "description": "Whether to add -pr-N suffix for preview deployments." - }, - "name": { - "type": "string", - "description": "The volume name (persistent only, not allowed for read-only storages)." - }, - "mount_path": { - "type": "string", - "description": "The container mount path (not allowed for read-only storages)." - }, - "content": { - "type": "string", - "nullable": true, - "description": "The file content (file only, not allowed for read-only storages). Changing the content needs the deploy permission." - } - }, - "type": "object", - "additionalProperties": false + "$ref": "#/components/schemas/ReplaceDnsRecordRequest" } } } }, "responses": { "200": { - "description": "Storage updated.", + "description": "DNS record replaced.", "content": { "application/json": { "schema": { + "properties": { + "record": { + "$ref": "#/components/schemas/ManagedDnsRecord" + } + }, "type": "object" } } } }, "400": { - "$ref": "#/components/responses/400" + "description": "Cloudflare rejected the change, or the record changed since the conflict." }, "401": { "$ref": "#/components/responses/401" }, "403": { - "description": "The token needs the deploy permission to change the content of a file outside the resource directory." + "description": "No write access to the service." }, "404": { "$ref": "#/components/responses/404" }, "422": { "$ref": "#/components/responses/422" + }, + "423": { + "description": "Another DNS change for the hostname is in progress. Try again." } }, "security": [ @@ -10356,41 +12758,60 @@ ] } }, - "/databases/{uuid}/storages/{storage_uuid}": { + "/applications/{uuid}/dns/{hostname}": { "delete": { "tags": [ - "Databases" + "DNS" ], - "summary": "Delete Storage", - "description": "Delete a persistent storage or file storage by database UUID.", - "operationId": "delete-storage-by-database-uuid", + "summary": "Release Application DNS Record", + "description": "Release the managed DNS record of a hostname that the application no longer uses. Coolify deletes the record at Cloudflare only when it created the record, the record did not change, and no other resource uses the hostname. Removing a domain through the API already queues this release; use this endpoint to retry it or to keep the record.", + "operationId": "release-application-dns-record", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the database.", + "description": "Application UUID.", "required": true, "schema": { "type": "string" } }, { - "name": "storage_uuid", + "name": "hostname", "in": "path", - "description": "UUID of the storage.", + "description": "Hostname of the record.", "required": true, "schema": { "type": "string" } + }, + { + "name": "delete_record", + "in": "query", + "description": "Delete the record at Cloudflare. Default: true.", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { "200": { - "description": "Storage deleted.", + "description": "Record released.", "content": { "application/json": { "schema": { "properties": { + "result": { + "type": "string", + "enum": [ + "deleted", + "already_gone", + "not_owned", + "changed_externally", + "kept" + ] + }, "message": { "type": "string" } @@ -10400,17 +12821,23 @@ } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "No write access to the application." + }, "404": { - "$ref": "#/components/responses/404" + "description": "No managed record of the application for the hostname." }, "422": { - "$ref": "#/components/responses/422" + "description": "The application still uses the hostname." + }, + "423": { + "description": "Another DNS change for the hostname is in progress. Try again." + }, + "502": { + "description": "Cloudflare did not respond. Try again." } }, "security": [ @@ -10420,47 +12847,86 @@ ] } }, - "/databases/{uuid}/tags": { - "get": { + "/services/{uuid}/dns/{hostname}": { + "delete": { "tags": [ - "Databases" + "DNS" ], - "summary": "List Tags", - "description": "List tags for a database by UUID.", - "operationId": "list-tags-by-database-uuid", + "summary": "Release Service DNS Record", + "description": "Release the managed DNS record of a hostname that the service no longer uses. Coolify deletes the record at Cloudflare only when it created the record, the record did not change, and no other resource uses the hostname. Removing a domain through the API already queues this release; use this endpoint to retry it or to keep the record.", + "operationId": "release-service-dns-record", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the database.", + "description": "Service UUID.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "hostname", + "in": "path", + "description": "Hostname of the record.", "required": true, "schema": { "type": "string" } + }, + { + "name": "delete_record", + "in": "query", + "description": "Delete the record at Cloudflare. Default: true.", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { "200": { - "description": "List of tags.", + "description": "Record released.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Tag" - } + "properties": { + "result": { + "type": "string", + "enum": [ + "deleted", + "already_gone", + "not_owned", + "changed_externally", + "kept" + ] + }, + "message": { + "type": "string" + } + }, + "type": "object" } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "No write access to the service." + }, "404": { - "$ref": "#/components/responses/404" + "description": "No managed record of the service for the hostname." + }, + "422": { + "description": "The service still uses the hostname." + }, + "423": { + "description": "Another DNS change for the hostname is in progress. Try again." + }, + "502": { + "description": "Cloudflare did not respond. Try again." } }, "security": [ @@ -10468,57 +12934,73 @@ "bearerAuth": [] } ] - }, - "post": { + } + }, + "/gitea-apps": { + "get": { "tags": [ - "Databases" - ], - "summary": "Create Tag", - "description": "Add tag(s) to a database by UUID.", - "operationId": "create-tag-by-database-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the database.", - "required": true, - "schema": { - "type": "string" - } - } + "Gitea Apps" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "tag_name": { - "type": "string", - "description": "The tag name (min 2 characters). Required if tag_names is not provided." - }, - "tag_names": { - "type": "array", - "items": { - "type": "string" + "summary": "List", + "description": "List all Gitea apps for the current team (and system-wide sources).", + "operationId": "list-gitea-apps", + "responses": { + "200": { + "description": "List of Gitea apps.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "id": { + "type": "integer" + }, + "uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "organization": { + "type": "string", + "nullable": true + }, + "api_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "custom_user": { + "type": "string" + }, + "custom_port": { + "type": "integer" + }, + "client_id": { + "type": "string", + "nullable": true + }, + "redirect_uri": { + "type": "string", + "nullable": true + }, + "is_system_wide": { + "type": "boolean" + }, + "is_public": { + "type": "boolean" + }, + "is_connected": { + "type": "boolean", + "description": "True when the OAuth connection is complete and the source can deploy private repositories." + }, + "team_id": { + "type": "integer" + } }, - "description": "Array of tag names (each min 2 characters). Required if tag_name is not provided." - } - }, - "type": "object" - } - } - } - }, - "responses": { - "201": { - "description": "Tags added successfully.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Tag" + "type": "object" } } } @@ -10529,12 +13011,6 @@ }, "401": { "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -10544,46 +13020,84 @@ ] } }, - "/databases/{uuid}/tags/{tag_uuid}": { - "delete": { + "/github-apps": { + "get": { "tags": [ - "Databases" - ], - "summary": "Delete Tag", - "description": "Remove a tag from a database by UUID.", - "operationId": "delete-tag-by-database-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the database.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tag_uuid", - "in": "path", - "description": "UUID of the tag.", - "required": true, - "schema": { - "type": "string" - } - } + "GitHub Apps" ], + "summary": "List", + "description": "List all GitHub apps.", + "operationId": "list-github-apps", "responses": { "200": { - "description": "Tag removed." + "description": "List of GitHub apps.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "id": { + "type": "integer" + }, + "uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "organization": { + "type": "string", + "nullable": true + }, + "api_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "custom_user": { + "type": "string" + }, + "custom_port": { + "type": "integer" + }, + "app_id": { + "type": "integer" + }, + "installation_id": { + "type": "integer" + }, + "client_id": { + "type": "string" + }, + "private_key_id": { + "type": "integer" + }, + "is_system_wide": { + "type": "boolean" + }, + "is_public": { + "type": "boolean" + }, + "team_id": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "type": "object" + } + } + } + } }, "400": { "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" } }, "security": [ @@ -10591,59 +13105,144 @@ "bearerAuth": [] } ] - } - }, - "/databases/{uuid}/clone": { + }, "post": { "tags": [ - "Databases" - ], - "summary": "Clone", - "description": "Clone a database to a destination owned by the authenticated team.", - "operationId": "clone-database-by-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the database.", - "required": true, - "schema": { - "type": "string" - } - } + "GitHub Apps" ], + "summary": "Create GitHub App", + "description": "Create a new GitHub app.", + "operationId": "create-github-app", "requestBody": { + "description": "GitHub app creation payload.", "required": true, "content": { "application/json": { "schema": { "required": [ - "destination_uuid" + "name", + "html_url", + "app_id", + "installation_id", + "client_id", + "client_secret", + "private_key_uuid" ], "properties": { - "destination_uuid": { - "type": "string" - }, "name": { - "type": [ - "string", - "null" - ] + "type": "string", + "description": "Name of the GitHub app." + }, + "organization": { + "type": "string", + "nullable": true, + "description": "Organization to associate the app with." + }, + "api_url": { + "type": "string", + "description": "API URL for the GitHub app (e.g., https://api.github.com)." + }, + "html_url": { + "type": "string", + "description": "HTML URL for the GitHub app (e.g., https://github.com)." + }, + "custom_user": { + "type": "string", + "description": "Custom user for SSH access (default: git)." + }, + "custom_port": { + "type": "integer", + "description": "Custom port for SSH access (default: 22)." + }, + "app_id": { + "type": "integer", + "description": "GitHub App ID from GitHub." + }, + "installation_id": { + "type": "integer", + "description": "GitHub Installation ID." + }, + "client_id": { + "type": "string", + "description": "GitHub OAuth App Client ID." + }, + "client_secret": { + "type": "string", + "description": "GitHub OAuth App Client Secret." + }, + "webhook_secret": { + "type": "string", + "description": "Webhook secret for GitHub webhooks." + }, + "private_key_uuid": { + "type": "string", + "description": "UUID of an existing private key for GitHub App authentication." + }, + "is_system_wide": { + "type": "boolean", + "description": "Is this app system-wide (cloud only)." + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "GitHub app created successfully.", + "content": { + "application/json": { + "schema": { + "properties": { + "id": { + "type": "integer" + }, + "uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "organization": { + "type": "string", + "nullable": true + }, + "api_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "custom_user": { + "type": "string" + }, + "custom_port": { + "type": "integer" + }, + "app_id": { + "type": "integer" + }, + "installation_id": { + "type": "integer" + }, + "client_id": { + "type": "string" + }, + "private_key_id": { + "type": "integer" + }, + "is_system_wide": { + "type": "boolean" + }, + "team_id": { + "type": "integer" + } }, - "clone_volumes": { - "description": "Whether to clone volume data. Needs the deploy ability.", - "type": "boolean", - "default": false - } - }, - "type": "object" + "type": "object" + } } } - } - }, - "responses": { - "201": { - "description": "Database cloned." }, "400": { "$ref": "#/components/responses/400" @@ -10651,12 +13250,6 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the deploy ability to clone volume data." - }, - "404": { - "$ref": "#/components/responses/404" - }, "422": { "$ref": "#/components/responses/422" } @@ -10668,24 +13261,40 @@ ] } }, - "/deployments": { + "/github-apps/{github_app_id}/repositories": { "get": { "tags": [ - "Deployments" + "GitHub Apps" + ], + "summary": "Load Repositories for a GitHub App", + "description": "Fetch repositories from GitHub for a given GitHub app.", + "operationId": "load-repositories", + "parameters": [ + { + "name": "github_app_id", + "in": "path", + "description": "GitHub App ID", + "required": true, + "schema": { + "type": "integer" + } + } ], - "summary": "List", - "description": "List currently running deployments", - "operationId": "list-deployments", "responses": { "200": { - "description": "Get all currently running deployments.", + "description": "Repositories loaded successfully.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationDeploymentQueue" - } + "properties": { + "repositories": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "type": "object" } } } @@ -10695,6 +13304,9 @@ }, "401": { "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -10704,19 +13316,37 @@ ] } }, - "/deployments/{uuid}": { + "/github-apps/{github_app_id}/repositories/{owner}/{repo}/branches": { "get": { "tags": [ - "Deployments" + "GitHub Apps" ], - "summary": "Get", - "description": "Get deployment by UUID.", - "operationId": "get-deployment-by-uuid", + "summary": "Load Branches for a GitHub Repository", + "description": "Fetch branches from GitHub for a given repository.", + "operationId": "load-branches", "parameters": [ { - "name": "uuid", + "name": "github_app_id", "in": "path", - "description": "Deployment UUID", + "description": "GitHub App ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "owner", + "in": "path", + "description": "Repository owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "description": "Repository name", "required": true, "schema": { "type": "string" @@ -10725,11 +13355,19 @@ ], "responses": { "200": { - "description": "Get deployment by UUID.", + "description": "Branches loaded successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApplicationDeploymentQueue" + "properties": { + "branches": { + "type": "array", + "items": { + "type": "object" + } + } + }, + "type": "object" } } } @@ -10751,43 +13389,35 @@ ] } }, - "/deployments/{uuid}/cancel": { - "post": { + "/github-apps/{github_app_id}": { + "delete": { "tags": [ - "Deployments" + "GitHub Apps" ], - "summary": "Cancel", - "description": "Cancel a deployment by UUID.", - "operationId": "cancel-deployment-by-uuid", + "summary": "Delete GitHub App", + "description": "Delete a GitHub app if it's not being used by any applications.", + "operationId": "deleteGithubApp", "parameters": [ { - "name": "uuid", + "name": "github_app_id", "in": "path", - "description": "Deployment UUID", + "description": "GitHub App ID", "required": true, "schema": { - "type": "string" + "type": "integer" } } ], "responses": { "200": { - "description": "Deployment cancelled successfully.", + "description": "GitHub app deleted successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", - "example": "Deployment cancelled successfully." - }, - "deployment_uuid": { - "type": "string", - "example": "cm37r6cqj000008jm0veg5tkm" - }, - "status": { - "type": "string", - "example": "cancelled-by-user" + "example": "GitHub app deleted successfully" } }, "type": "object" @@ -10795,34 +13425,132 @@ } } }, - "400": { - "description": "Deployment cannot be cancelled (already finished/failed/cancelled).", + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "GitHub app not found" + }, + "409": { + "description": "Conflict - GitHub app is in use", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", - "example": "Deployment cannot be cancelled. Current status: finished" + "example": "This GitHub app is being used by 5 application(s). Please delete all applications first." } }, "type": "object" } } } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "description": "User doesn't have permission to cancel this deployment.", + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "patch": { + "tags": [ + "GitHub Apps" + ], + "summary": "Update GitHub App", + "description": "Update an existing GitHub app.", + "operationId": "updateGithubApp", + "parameters": [ + { + "name": "github_app_id", + "in": "path", + "description": "GitHub App ID", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "type": "string", + "description": "GitHub App name" + }, + "organization": { + "type": "string", + "nullable": true, + "description": "GitHub organization" + }, + "api_url": { + "type": "string", + "description": "GitHub API URL" + }, + "html_url": { + "type": "string", + "description": "GitHub HTML URL" + }, + "custom_user": { + "type": "string", + "description": "Custom user for SSH" + }, + "custom_port": { + "type": "integer", + "description": "Custom port for SSH" + }, + "app_id": { + "type": "integer", + "description": "GitHub App ID" + }, + "installation_id": { + "type": "integer", + "description": "GitHub Installation ID" + }, + "client_id": { + "type": "string", + "description": "GitHub Client ID" + }, + "client_secret": { + "type": "string", + "description": "GitHub Client Secret" + }, + "webhook_secret": { + "type": "string", + "description": "GitHub Webhook Secret" + }, + "private_key_uuid": { + "type": "string", + "description": "Private key UUID" + }, + "is_system_wide": { + "type": "boolean", + "description": "Is system wide (non-cloud instances only)" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "GitHub app updated successfully", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", - "example": "You do not have permission to cancel this deployment." + "example": "GitHub app updated successfully" + }, + "data": { + "type": "object", + "description": "Updated GitHub app data" } }, "type": "object" @@ -10830,8 +13558,14 @@ } } }, + "401": { + "description": "Unauthorized" + }, "404": { - "$ref": "#/components/responses/404" + "description": "GitHub app not found" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -10841,89 +13575,203 @@ ] } }, - "/deploy": { - "post": { + "/gitlab-apps": { + "get": { "tags": [ - "Deployments" + "GitLab Apps" ], - "summary": "Deploy", - "description": "Deploy by tag or UUID using query parameters or a JSON body.", - "operationId": "deploy-by-tag-or-uuid", - "parameters": [ - { - "name": "tag", - "in": "query", - "description": "Tag name(s). Comma separated list is also accepted.", - "schema": { - "type": "string" - } - }, - { - "name": "uuid", - "in": "query", - "description": "Resource UUID(s). Comma separated list is also accepted.", - "schema": { - "type": "string" - } - }, - { - "name": "force", - "in": "query", - "description": "Force rebuild (without cache)", - "schema": { - "type": "boolean" - } - }, - { - "name": "pr", - "in": "query", - "description": "Pull Request Id for deploying specific PR builds. Cannot be used with tag parameter.", - "schema": { - "type": "integer", - "maximum": 2147483647 + "summary": "List", + "description": "List all GitLab apps for the current team (and system-wide sources).", + "operationId": "list-gitlab-apps", + "responses": { + "200": { + "description": "List of GitLab apps.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "id": { + "type": "integer" + }, + "uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "api_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "custom_user": { + "type": "string" + }, + "custom_port": { + "type": "integer" + }, + "client_id": { + "type": "string", + "nullable": true + }, + "group_name": { + "type": "string", + "nullable": true + }, + "redirect_uri": { + "type": "string", + "nullable": true + }, + "is_system_wide": { + "type": "boolean" + }, + "is_public": { + "type": "boolean" + }, + "team_id": { + "type": "integer" + } + }, + "type": "object" + } + } + } } }, - { - "name": "pull_request_id", - "in": "query", - "description": "Preview deployment identifier. Alias of pr.", - "schema": { - "type": "integer", - "maximum": 2147483647 - } + "400": { + "$ref": "#/components/responses/400" }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "security": [ { - "name": "docker_tag", - "in": "query", - "description": "Docker image tag for Docker Image preview deployments. Requires pull_request_id.", - "schema": { - "type": "string" - } + "bearerAuth": [] } + ] + }, + "post": { + "tags": [ + "GitLab Apps" ], + "summary": "Create GitLab App", + "description": "Create a new GitLab app (OAuth source). Credentials may be supplied later via the UI or update endpoint.", + "operationId": "create-gitlab-app", + "requestBody": { + "description": "GitLab app creation payload.", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "name", + "html_url" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the GitLab app." + }, + "html_url": { + "type": "string", + "description": "GitLab instance URL (e.g., https://gitlab.com)." + }, + "api_url": { + "type": "string", + "description": "GitLab API URL (defaults to {html_url}/api/v4)." + }, + "custom_user": { + "type": "string", + "description": "Custom user for SSH access (default: git)." + }, + "custom_port": { + "type": "integer", + "description": "Custom port for SSH access (default: 22)." + }, + "group_name": { + "type": "string", + "nullable": true, + "description": "Optional comma-separated group names to filter repositories." + }, + "client_id": { + "type": "string", + "nullable": true, + "description": "GitLab OAuth Application ID." + }, + "client_secret": { + "type": "string", + "nullable": true, + "description": "GitLab OAuth Application Secret." + }, + "webhook_token": { + "type": "string", + "nullable": true, + "description": "Webhook secret token (auto-generated when omitted)." + }, + "redirect_uri": { + "type": "string", + "nullable": true, + "description": "OAuth redirect URI registered in GitLab." + }, + "is_system_wide": { + "type": "boolean", + "description": "Is this app system-wide (non-cloud instances only)." + } + }, + "type": "object" + } + } + } + }, "responses": { - "200": { - "description": "Get deployment(s) UUID's", + "201": { + "description": "GitLab app created successfully.", "content": { "application/json": { "schema": { "properties": { - "deployments": { - "type": "array", - "items": { - "properties": { - "message": { - "type": "string" - }, - "resource_uuid": { - "type": "string" - }, - "deployment_uuid": { - "type": "string" - } - }, - "type": "object" - } + "id": { + "type": "integer" + }, + "uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "api_url": { + "type": "string" + }, + "html_url": { + "type": "string" + }, + "custom_user": { + "type": "string" + }, + "custom_port": { + "type": "integer" + }, + "client_id": { + "type": "string", + "nullable": true + }, + "group_name": { + "type": "string", + "nullable": true + }, + "redirect_uri": { + "type": "string", + "nullable": true + }, + "is_system_wide": { + "type": "boolean" + }, + "team_id": { + "type": "integer" } }, "type": "object" @@ -10936,6 +13784,9 @@ }, "401": { "$ref": "#/components/responses/401" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -10945,66 +13796,179 @@ ] } }, - "/deployments/applications/{uuid}": { - "get": { + "/gitlab-apps/{gitlab_app_id}": { + "delete": { "tags": [ - "Deployments" + "GitLab Apps" ], - "summary": "List application deployments", - "description": "List application deployments by using the app uuid", - "operationId": "list-deployments-by-app-uuid", + "summary": "Delete GitLab App", + "description": "Delete a GitLab app if it is not being used by any applications.", + "operationId": "deleteGitlabApp", "parameters": [ { - "name": "uuid", + "name": "gitlab_app_id", "in": "path", - "description": "UUID of the application.", + "description": "GitLab App ID", "required": true, "schema": { - "type": "string" + "type": "integer" } - }, - { - "name": "skip", - "in": "query", - "description": "Number of records to skip.", - "required": false, - "schema": { - "type": "integer", - "default": 0, - "minimum": 0 + } + ], + "responses": { + "200": { + "description": "GitLab app deleted successfully", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "GitLab app deleted successfully" + } + }, + "type": "object" + } + } } }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "GitLab app not found" + }, + "409": { + "description": "Conflict - GitLab app is in use", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "This GitLab app is being used by 5 application(s). Please delete all applications first." + } + }, + "type": "object" + } + } + } + } + }, + "security": [ { - "name": "take", - "in": "query", - "description": "Number of records to take.", - "required": false, + "bearerAuth": [] + } + ] + }, + "patch": { + "tags": [ + "GitLab Apps" + ], + "summary": "Update GitLab App", + "description": "Update an existing GitLab app.", + "operationId": "updateGitlabApp", + "parameters": [ + { + "name": "gitlab_app_id", + "in": "path", + "description": "GitLab App ID", + "required": true, "schema": { - "type": "integer", - "default": 10, - "minimum": 1 + "type": "integer" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "type": "string", + "description": "GitLab App name" + }, + "html_url": { + "type": "string", + "description": "GitLab HTML URL" + }, + "api_url": { + "type": "string", + "description": "GitLab API URL" + }, + "custom_user": { + "type": "string", + "description": "Custom user for SSH" + }, + "custom_port": { + "type": "integer", + "description": "Custom port for SSH" + }, + "group_name": { + "type": "string", + "nullable": true, + "description": "Optional group filter" + }, + "client_id": { + "type": "string", + "nullable": true, + "description": "OAuth Application ID" + }, + "client_secret": { + "type": "string", + "nullable": true, + "description": "OAuth Application Secret" + }, + "webhook_token": { + "type": "string", + "nullable": true, + "description": "Webhook secret token" + }, + "redirect_uri": { + "type": "string", + "nullable": true, + "description": "OAuth redirect URI" + }, + "is_system_wide": { + "type": "boolean", + "description": "Is system wide (non-cloud instances only)" + } + }, + "type": "object" + } + } + } + }, "responses": { "200": { - "description": "List application deployments by using the app uuid.", + "description": "GitLab app updated successfully", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Application" - } + "properties": { + "message": { + "type": "string", + "example": "GitLab app updated successfully" + }, + "data": { + "type": "object", + "description": "Updated GitLab app data" + } + }, + "type": "object" } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { - "$ref": "#/components/responses/401" + "description": "Unauthorized" + }, + "404": { + "description": "GitLab app not found" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -11014,23 +13978,67 @@ ] } }, - "/destinations": { + "/hetzner/locations": { "get": { "tags": [ - "Destinations" + "Hetzner" + ], + "summary": "Get Hetzner Locations", + "description": "Get all available Hetzner datacenter locations.", + "operationId": "get-hetzner-locations", + "parameters": [ + { + "name": "cloud_provider_token_uuid", + "in": "query", + "description": "Cloud provider token UUID. Required if cloud_provider_token_id is not provided.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "cloud_provider_token_id", + "in": "query", + "description": "Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.", + "required": false, + "deprecated": true, + "schema": { + "type": "string" + } + } ], - "summary": "List destinations", - "description": "List all Docker network destinations for the authenticated team.", - "operationId": "list-destinations", "responses": { "200": { - "description": "Destinations for the authenticated team.", + "description": "List of Hetzner locations.", "content": { "application/json": { "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/Destination" + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "country": { + "type": "string" + }, + "city": { + "type": "string" + }, + "latitude": { + "type": "number" + }, + "longitude": { + "type": "number" + } + }, + "type": "object" } } } @@ -11038,6 +14046,12 @@ }, "401": { "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "502": { + "$ref": "#/components/responses/502" } }, "security": [ @@ -11047,20 +14061,39 @@ ] } }, - "/servers/{server_uuid}/destinations": { + "/hetzner/server-types": { "get": { "tags": [ - "Destinations" + "Hetzner" ], - "summary": "List destinations by server", - "description": "List Docker network destinations attached to a server owned by the authenticated team.", - "operationId": "list-server-destinations", + "summary": "Get Hetzner Server Types", + "description": "Get the Hetzner server types (instance sizes) that can be ordered now. Each type lists only the locations where it is in stock and not deprecated.", + "operationId": "get-hetzner-server-types", "parameters": [ { - "name": "server_uuid", - "in": "path", - "description": "Server UUID", - "required": true, + "name": "location", + "in": "query", + "description": "Return only the server types that can be ordered in this location, for example nbg1.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "cloud_provider_token_uuid", + "in": "query", + "description": "Cloud provider token UUID. Required if cloud_provider_token_id is not provided.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "cloud_provider_token_id", + "in": "query", + "description": "Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.", + "required": false, + "deprecated": true, "schema": { "type": "string" } @@ -11068,13 +14101,67 @@ ], "responses": { "200": { - "description": "Destinations attached to the server.", + "description": "List of Hetzner server types.", "content": { "application/json": { "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/Destination" + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "cores": { + "type": "integer" + }, + "memory": { + "type": "number" + }, + "disk": { + "type": "integer" + }, + "prices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "Datacenter location name" + }, + "price_hourly": { + "type": "object", + "properties": { + "net": { + "type": "string" + }, + "gross": { + "type": "string" + } + } + }, + "price_monthly": { + "type": "object", + "properties": { + "net": { + "type": "string" + }, + "gross": { + "type": "string" + } + } + } + } + } + } + }, + "type": "object" } } } @@ -11085,6 +14172,9 @@ }, "404": { "$ref": "#/components/responses/404" + }, + "502": { + "$ref": "#/components/responses/502" } }, "security": [ @@ -11092,64 +14182,70 @@ "bearerAuth": [] } ] - }, - "post": { + } + }, + "/hetzner/images": { + "get": { "tags": [ - "Destinations" + "Hetzner" ], - "summary": "Create destination", - "description": "Create a Docker network destination on a server owned by the authenticated team. The network must be new: Docker's built-in networks (bridge, host, none) and networks that already exist on a standalone server are rejected, because Coolify connects the proxy to the destination network.", - "operationId": "create-server-destination", + "summary": "Get Hetzner Images", + "description": "Get all available Hetzner system images (operating systems).", + "operationId": "get-hetzner-images", "parameters": [ { - "name": "server_uuid", - "in": "path", - "description": "Server UUID", - "required": true, + "name": "cloud_provider_token_uuid", + "in": "query", + "description": "Cloud provider token UUID. Required if cloud_provider_token_id is not provided.", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "network" - ], - "properties": { - "name": { - "type": "string", - "maxLength": 255 - }, - "network": { - "description": "Name of a new Docker network. Must not be bridge, host, none, or a network that already exists on the server.", - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$", - "maxLength": 255 - }, - "type": { - "type": "string", - "enum": [ - "standalone", - "swarm" - ] - } - }, - "type": "object" - } + }, + { + "name": "cloud_provider_token_id", + "in": "query", + "description": "Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.", + "required": false, + "deprecated": true, + "schema": { + "type": "string" } } - }, + ], "responses": { - "201": { - "description": "Destination created.", + "200": { + "description": "List of Hetzner images.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Destination" + "type": "array", + "items": { + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + }, + "os_flavor": { + "type": "string" + }, + "os_version": { + "type": "string" + }, + "architecture": { + "type": "string" + } + }, + "type": "object" + } } } } @@ -11160,11 +14256,8 @@ "404": { "$ref": "#/components/responses/404" }, - "409": { - "description": "A destination with this network already exists." - }, - "422": { - "description": "Validation failed, the network is reserved or already exists on the server, or the server could not be checked." + "502": { + "$ref": "#/components/responses/502" } }, "security": [ @@ -11174,20 +14267,30 @@ ] } }, - "/destinations/{uuid}": { + "/hetzner/ssh-keys": { "get": { "tags": [ - "Destinations" + "Hetzner" ], - "summary": "Get destination", - "description": "Get a Docker network destination by UUID.", - "operationId": "get-destination-by-uuid", + "summary": "Get Hetzner SSH Keys", + "description": "Get all SSH keys stored in the Hetzner account.", + "operationId": "get-hetzner-ssh-keys", "parameters": [ { - "name": "uuid", - "in": "path", - "description": "Destination UUID", - "required": true, + "name": "cloud_provider_token_uuid", + "in": "query", + "description": "Cloud provider token UUID. Required if cloud_provider_token_id is not provided.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "cloud_provider_token_id", + "in": "query", + "description": "Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.", + "required": false, + "deprecated": true, "schema": { "type": "string" } @@ -11195,11 +14298,28 @@ ], "responses": { "200": { - "description": "Destination details.", + "description": "List of Hetzner SSH keys.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Destination" + "type": "array", + "items": { + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "fingerprint": { + "type": "string" + }, + "public_key": { + "type": "string" + } + }, + "type": "object" + } } } } @@ -11209,6 +14329,9 @@ }, "404": { "$ref": "#/components/responses/404" + }, + "502": { + "$ref": "#/components/responses/502" } }, "security": [ @@ -11216,20 +14339,32 @@ "bearerAuth": [] } ] - }, - "delete": { + } + }, + "/hetzner/firewalls": { + "get": { "tags": [ - "Destinations" + "Hetzner" ], - "summary": "Delete destination", - "description": "Delete an unused Docker network destination.", - "operationId": "delete-destination-by-uuid", + "summary": "Get Hetzner Firewalls", + "description": "Get all existing Hetzner firewalls for the current project.", + "operationId": "get-hetzner-firewalls", "parameters": [ { - "name": "uuid", - "in": "path", - "description": "Destination UUID", - "required": true, + "name": "cloud_provider_token_uuid", + "in": "query", + "description": "Cloud provider token UUID. Required if cloud_provider_token_id is not provided.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "cloud_provider_token_id", + "in": "query", + "description": "Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.", + "required": false, + "deprecated": true, "schema": { "type": "string" } @@ -11237,17 +14372,22 @@ ], "responses": { "200": { - "description": "Destination deleted.", + "description": "List of Hetzner firewalls.", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string", - "example": "Deleted." - } - }, - "type": "object" + "type": "array", + "items": { + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + } + }, + "type": "object" + } } } } @@ -11258,8 +14398,8 @@ "404": { "$ref": "#/components/responses/404" }, - "409": { - "description": "Destination has attached resources." + "502": { + "$ref": "#/components/responses/502" } }, "security": [ @@ -11267,48 +14407,58 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/hetzner/networks": { + "get": { "tags": [ - "Destinations" + "Hetzner" ], - "summary": "Update destination", - "description": "Update a Docker network destination name. Network cannot be changed via the API.", - "operationId": "update-destination-by-uuid", + "summary": "Get Hetzner Networks", + "description": "Get all existing Hetzner private networks for the current project.", + "operationId": "get-hetzner-networks", "parameters": [ { - "name": "uuid", - "in": "path", - "description": "Destination UUID", - "required": true, + "name": "cloud_provider_token_uuid", + "in": "query", + "description": "Cloud provider token UUID. Required if cloud_provider_token_id is not provided.", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "name": { - "type": "string", - "maxLength": 255 - } - }, - "type": "object" - } + }, + { + "name": "cloud_provider_token_id", + "in": "query", + "description": "Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.", + "required": false, + "deprecated": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { - "description": "Destination updated.", + "description": "List of Hetzner networks.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Destination" + "type": "array", + "items": { + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "ip_range": { + "type": "string" + } + }, + "type": "object" + } } } } @@ -11319,8 +14469,8 @@ "404": { "$ref": "#/components/responses/404" }, - "422": { - "$ref": "#/components/responses/422" + "502": { + "$ref": "#/components/responses/502" } }, "security": [ @@ -11330,85 +14480,160 @@ ] } }, - "/digitalocean/regions": { - "get": { + "/servers/hetzner": { + "post": { "tags": [ - "DigitalOcean" + "Hetzner" ], - "summary": "Get DigitalOcean regions", - "operationId": "get-digitalocean-regions", - "parameters": [ - { - "name": "cloud_provider_token_uuid", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "cloud_provider_token_id", - "in": "query", - "required": false, - "deprecated": true, - "schema": { - "type": "string" + "summary": "Create Hetzner Server", + "description": "Create a new server on Hetzner and register it in Coolify. A cloud-init script or extra SSH key IDs need a token with the deploy permission.", + "operationId": "create-hetzner-server", + "requestBody": { + "description": "Hetzner server creation parameters", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "location", + "server_type", + "image", + "private_key_uuid" + ], + "properties": { + "cloud_provider_token_uuid": { + "type": "string", + "example": "abc123", + "description": "Cloud provider token UUID. Required if cloud_provider_token_id is not provided." + }, + "cloud_provider_token_id": { + "type": "string", + "example": "abc123", + "description": "Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.", + "deprecated": true + }, + "location": { + "type": "string", + "example": "nbg1", + "description": "Hetzner location name" + }, + "server_type": { + "type": "string", + "example": "cx11", + "description": "Hetzner server type name" + }, + "image": { + "type": "integer", + "example": 15512617, + "description": "Hetzner image ID" + }, + "name": { + "type": "string", + "example": "my-server", + "description": "Server name (auto-generated if not provided)" + }, + "private_key_uuid": { + "type": "string", + "example": "xyz789", + "description": "Private key UUID" + }, + "enable_ipv4": { + "type": "boolean", + "example": true, + "description": "Enable IPv4 (default: true)" + }, + "enable_ipv6": { + "type": "boolean", + "example": true, + "description": "Enable IPv6 (default: true)" + }, + "enable_backups": { + "type": "boolean", + "example": false, + "description": "Enable Hetzner server backups after creation (adds 20% to the monthly server fee)" + }, + "hetzner_ssh_key_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Additional Hetzner SSH key IDs. Needs a token with the deploy permission." + }, + "hetzner_firewall_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Existing Hetzner firewall IDs to apply during server creation" + }, + "hetzner_network_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Existing Hetzner network IDs to attach during server creation" + }, + "cloud_init_script": { + "type": "string", + "description": "Cloud-init YAML script (optional). Needs a token with the deploy permission." + }, + "instant_validate": { + "type": "boolean", + "example": false, + "description": "Validate the server and install Docker when it is running. Defaults to true for tokens with the deploy permission, and needs that permission." + } + }, + "type": "object" + } } } - ], - "responses": { - "200": { - "description": "List of DigitalOcean regions." - }, - "401": { - "$ref": "#/components/responses/401" - }, - "422": { - "description": "Validation failed." - } }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/digitalocean/sizes": { - "get": { - "tags": [ - "DigitalOcean" - ], - "summary": "Get DigitalOcean sizes", - "operationId": "get-digitalocean-sizes", - "parameters": [ - { - "name": "cloud_provider_token_uuid", - "in": "query", - "required": false, - "schema": { - "type": "string" + "responses": { + "201": { + "description": "Hetzner server created.", + "content": { + "application/json": { + "schema": { + "properties": { + "uuid": { + "type": "string", + "example": "og888os", + "description": "The UUID of the server." + }, + "hetzner_server_id": { + "type": "integer", + "description": "The Hetzner server ID." + }, + "ip": { + "type": "string", + "description": "The server IP address." + } + }, + "type": "object" + } + } } }, - { - "name": "cloud_provider_token_id", - "in": "query", - "required": false, - "deprecated": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "List of DigitalOcean sizes." + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the deploy permission for a cloud-init script or extra SSH keys." + }, + "404": { + "$ref": "#/components/responses/404" + }, "422": { - "description": "Validation failed." + "$ref": "#/components/responses/422" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "502": { + "$ref": "#/components/responses/502" } }, "security": [ @@ -11418,41 +14643,28 @@ ] } }, - "/digitalocean/images": { + "/hostinger/data-centers": { "get": { "tags": [ - "DigitalOcean" - ], - "summary": "Get DigitalOcean images", - "operationId": "get-digitalocean-images", - "parameters": [ - { - "name": "cloud_provider_token_uuid", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "cloud_provider_token_id", - "in": "query", - "required": false, - "deprecated": true, - "schema": { - "type": "string" - } - } + "Hostinger" ], + "summary": "Get Hostinger VPS data centers", + "operationId": "get-hostinger-data-centers", "responses": { "200": { - "description": "List of DigitalOcean images." + "description": "List of Hostinger VPS data centers." }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "Hostinger denied access to this resource for the cloud provider token." + }, "422": { "description": "Validation failed." + }, + "429": { + "description": "Hostinger rate limit exceeded." } }, "security": [ @@ -11462,41 +14674,28 @@ ] } }, - "/digitalocean/ssh-keys": { + "/hostinger/catalog": { "get": { "tags": [ - "DigitalOcean" - ], - "summary": "Get DigitalOcean SSH keys", - "operationId": "get-digitalocean-ssh-keys", - "parameters": [ - { - "name": "cloud_provider_token_uuid", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "cloud_provider_token_id", - "in": "query", - "required": false, - "deprecated": true, - "schema": { - "type": "string" - } - } + "Hostinger" ], + "summary": "Get Hostinger VPS plans and prices", + "operationId": "get-hostinger-catalog", "responses": { "200": { - "description": "List of DigitalOcean SSH keys." + "description": "List of Hostinger VPS plans and prices." }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "Hostinger denied access to this resource for the cloud provider token." + }, "422": { "description": "Validation failed." + }, + "429": { + "description": "Hostinger rate limit exceeded." } }, "security": [ @@ -11506,32 +14705,28 @@ ] } }, - "/servers/digitalocean": { - "post": { + "/hostinger/templates": { + "get": { "tags": [ - "DigitalOcean" + "Hostinger" ], - "summary": "Create a server on DigitalOcean", - "description": "Create a DigitalOcean droplet and link it as a Coolify server. A cloud-init script or extra SSH key IDs need a token with the deploy permission.", - "operationId": "create-digitalocean-server", + "summary": "Get Hostinger VPS operating system templates", + "operationId": "get-hostinger-templates", "responses": { - "201": { - "description": "DigitalOcean droplet created and linked to a Coolify server." + "200": { + "description": "List of Hostinger VPS templates." }, "401": { "$ref": "#/components/responses/401" }, "403": { - "description": "The token needs the deploy permission for a cloud-init script or extra SSH keys." + "description": "Hostinger denied access to this resource for the cloud provider token." }, "422": { "description": "Validation failed." }, "429": { - "description": "DigitalOcean rate limit exceeded." - }, - "502": { - "$ref": "#/components/responses/502" + "description": "Hostinger rate limit exceeded." } }, "security": [ @@ -11540,85 +14735,29 @@ } ] } - }, - "/github-apps": { - "get": { - "tags": [ - "GitHub Apps" - ], - "summary": "List", - "description": "List all GitHub apps.", - "operationId": "list-github-apps", - "responses": { - "200": { - "description": "List of GitHub apps.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "properties": { - "id": { - "type": "integer" - }, - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "organization": { - "type": "string", - "nullable": true - }, - "api_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "custom_user": { - "type": "string" - }, - "custom_port": { - "type": "integer" - }, - "app_id": { - "type": "integer" - }, - "installation_id": { - "type": "integer" - }, - "client_id": { - "type": "string" - }, - "private_key_id": { - "type": "integer" - }, - "is_system_wide": { - "type": "boolean" - }, - "is_public": { - "type": "boolean" - }, - "team_id": { - "type": "integer" - }, - "type": { - "type": "string" - } - }, - "type": "object" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + }, + "/hostinger/ssh-keys": { + "get": { + "tags": [ + "Hostinger" + ], + "summary": "Get Hostinger account SSH keys", + "operationId": "get-hostinger-ssh-keys", + "responses": { + "200": { + "description": "List of Hostinger account SSH keys." }, "401": { "$ref": "#/components/responses/401" + }, + "403": { + "description": "Hostinger denied access to this resource for the cloud provider token." + }, + "422": { + "description": "Validation failed." + }, + "429": { + "description": "Hostinger rate limit exceeded." } }, "security": [ @@ -11626,153 +14765,61 @@ "bearerAuth": [] } ] - }, - "post": { + } + }, + "/hostinger/post-install-scripts": { + "get": { "tags": [ - "GitHub Apps" + "Hostinger" ], - "summary": "Create GitHub App", - "description": "Create a new GitHub app.", - "operationId": "create-github-app", - "requestBody": { - "description": "GitHub app creation payload.", - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "name", - "html_url", - "app_id", - "installation_id", - "client_id", - "client_secret", - "private_key_uuid" - ], - "properties": { - "name": { - "type": "string", - "description": "Name of the GitHub app." - }, - "organization": { - "type": "string", - "nullable": true, - "description": "Organization to associate the app with." - }, - "api_url": { - "type": "string", - "description": "API URL for the GitHub app (e.g., https://api.github.com)." - }, - "html_url": { - "type": "string", - "description": "HTML URL for the GitHub app (e.g., https://github.com)." - }, - "custom_user": { - "type": "string", - "description": "Custom user for SSH access (default: git)." - }, - "custom_port": { - "type": "integer", - "description": "Custom port for SSH access (default: 22)." - }, - "app_id": { - "type": "integer", - "description": "GitHub App ID from GitHub." - }, - "installation_id": { - "type": "integer", - "description": "GitHub Installation ID." - }, - "client_id": { - "type": "string", - "description": "GitHub OAuth App Client ID." - }, - "client_secret": { - "type": "string", - "description": "GitHub OAuth App Client Secret." - }, - "webhook_secret": { - "type": "string", - "description": "Webhook secret for GitHub webhooks." - }, - "private_key_uuid": { - "type": "string", - "description": "UUID of an existing private key for GitHub App authentication." - }, - "is_system_wide": { - "type": "boolean", - "description": "Is this app system-wide (cloud only)." - } - }, - "type": "object" - } - } + "summary": "Get Hostinger post-install scripts", + "operationId": "get-hostinger-post-install-scripts", + "responses": { + "200": { + "description": "List of Hostinger post-install scripts." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "Hostinger denied access to this resource for the cloud provider token." + }, + "422": { + "description": "Validation failed." + }, + "429": { + "description": "Hostinger rate limit exceeded." } }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/servers/hostinger": { + "post": { + "tags": [ + "Hostinger" + ], + "summary": "Purchase a Hostinger VPS and create a linked server", + "operationId": "create-hostinger-server", "responses": { "201": { - "description": "GitHub app created successfully.", - "content": { - "application/json": { - "schema": { - "properties": { - "id": { - "type": "integer" - }, - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "organization": { - "type": "string", - "nullable": true - }, - "api_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "custom_user": { - "type": "string" - }, - "custom_port": { - "type": "integer" - }, - "app_id": { - "type": "integer" - }, - "installation_id": { - "type": "integer" - }, - "client_id": { - "type": "string" - }, - "private_key_id": { - "type": "integer" - }, - "is_system_wide": { - "type": "boolean" - }, - "team_id": { - "type": "integer" - } - }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "description": "Hostinger VPS purchased and linked to a Coolify server." }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the deploy permission for a post-install script or extra SSH keys." + }, "422": { - "$ref": "#/components/responses/422" + "description": "Validation failed." + }, + "429": { + "description": "Hostinger rate limit exceeded." } }, "security": [ @@ -11782,52 +14829,50 @@ ] } }, - "/github-apps/{github_app_id}/repositories": { + "/settings/email": { "get": { "tags": [ - "GitHub Apps" - ], - "summary": "Load Repositories for a GitHub App", - "description": "Fetch repositories from GitHub for a given GitHub app.", - "operationId": "load-repositories", - "parameters": [ - { - "name": "github_app_id", - "in": "path", - "description": "GitHub App ID", - "required": true, - "schema": { - "type": "integer" - } - } + "Settings" ], + "summary": "Get instance email settings", + "description": "Get instance-wide SMTP and Resend settings. Requires a root-team token belonging to a root-team admin or owner. Sensitive fields require the `read:sensitive` or `root` token ability.", + "operationId": "get-instance-email-settings", "responses": { "200": { - "description": "Repositories loaded successfully.", - "content": { - "application/json": { - "schema": { - "properties": { - "repositories": { - "type": "array", - "items": { - "type": "object" - } - } - }, - "type": "object" - } - } - } + "description": "Instance email settings." }, - "400": { - "$ref": "#/components/responses/400" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "Forbidden." + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "patch": { + "tags": [ + "Settings" + ], + "summary": "Update instance email settings", + "description": "Update instance-wide SMTP and Resend settings. Requires `write:sensitive` and a root-team token belonging to a root-team admin or owner.", + "operationId": "update-instance-email-settings", + "responses": { + "200": { + "description": "Updated instance email settings." }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" + "403": { + "description": "Forbidden." + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -11837,70 +14882,33 @@ ] } }, - "/github-apps/{github_app_id}/repositories/{owner}/{repo}/branches": { + "/security/integration-tokens": { "get": { "tags": [ - "GitHub Apps" - ], - "summary": "Load Branches for a GitHub Repository", - "description": "Fetch branches from GitHub for a given repository.", - "operationId": "load-branches", - "parameters": [ - { - "name": "github_app_id", - "in": "path", - "description": "GitHub App ID", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "owner", - "in": "path", - "description": "Repository owner", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "repo", - "in": "path", - "description": "Repository name", - "required": true, - "schema": { - "type": "string" - } - } + "Integration Tokens" ], + "summary": "List Integration Tokens", + "description": "List the integration tokens (Cloudflare, Doppler, Infisical, Vault) of the team. Requires admin or owner.", + "operationId": "list-integration-tokens", "responses": { "200": { - "description": "Branches loaded successfully.", + "description": "Integration tokens.", "content": { "application/json": { "schema": { - "properties": { - "branches": { - "type": "array", - "items": { - "type": "object" - } - } - }, - "type": "object" + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationToken" + } } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" + "403": { + "description": "Not an admin or owner of the team." } }, "security": [ @@ -11908,37 +14916,79 @@ "bearerAuth": [] } ] - } - }, - "/github-apps/{github_app_id}": { - "delete": { + }, + "post": { "tags": [ - "GitHub Apps" + "Integration Tokens" ], - "summary": "Delete GitHub App", - "description": "Delete a GitHub app if it's not being used by any applications.", - "operationId": "deleteGithubApp", - "parameters": [ - { - "name": "github_app_id", - "in": "path", - "description": "GitHub App ID", - "required": true, - "schema": { - "type": "integer" + "summary": "Create Integration Token", + "description": "Create and validate a Cloudflare, Doppler, Infisical, or Vault integration token. A Cloudflare token also gets its DNS zones; it is not stored when the zones cannot be read. Requires admin or owner.", + "operationId": "create-secret-manager-integration-token", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "provider", + "name", + "token" + ], + "properties": { + "provider": { + "type": "string", + "enum": [ + "cloudflare", + "doppler", + "infisical", + "vault" + ] + }, + "name": { + "type": "string" + }, + "token": { + "type": "string" + }, + "capabilities": { + "description": "Cloudflare: dns, tunnel (tunnel needs dns). Default: dns. Secret managers: secrets.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "dns", + "tunnel", + "secrets" + ] + } + }, + "automatic_dns": { + "description": "Cloudflare only. Create DNS records when a domain is added. Default: true.", + "type": "boolean" + }, + "proxied_dns": { + "description": "Cloudflare only. Create new records proxied (orange cloud). Default: false.", + "type": "boolean" + }, + "metadata": { + "description": "Secret managers only: base_url, client_id (Infisical), namespace (Vault), timeout.", + "type": "object" + } + }, + "type": "object" + } } } - ], + }, "responses": { - "200": { - "description": "GitHub app deleted successfully", + "201": { + "description": "Integration token created.", "content": { "application/json": { "schema": { "properties": { - "message": { - "type": "string", - "example": "GitHub app deleted successfully" + "uuid": { + "type": "string" } }, "type": "object" @@ -11946,27 +14996,20 @@ } } }, + "400": { + "description": "The provider rejected the token, or the Cloudflare zones could not be read." + }, "401": { - "description": "Unauthorized" + "$ref": "#/components/responses/401" }, - "404": { - "description": "GitHub app not found" + "403": { + "description": "Not an admin or owner of the team." }, - "409": { - "description": "Conflict - GitHub app is in use", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "This GitHub app is being used by 5 application(s). Please delete all applications first." - } - }, - "type": "object" - } - } - } + "422": { + "$ref": "#/components/responses/422" + }, + "502": { + "description": "Coolify could not connect to the provider API." } }, "security": [ @@ -11974,119 +15017,46 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/security/integration-tokens/{uuid}": { + "get": { "tags": [ - "GitHub Apps" + "Integration Tokens" ], - "summary": "Update GitHub App", - "description": "Update an existing GitHub app.", - "operationId": "updateGithubApp", + "summary": "Get Integration Token", + "description": "Get an integration token of the team by UUID. Requires admin or owner.", + "operationId": "get-integration-token-by-uuid", "parameters": [ { - "name": "github_app_id", + "name": "uuid", "in": "path", - "description": "GitHub App ID", + "description": "Integration token UUID.", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "name": { - "type": "string", - "description": "GitHub App name" - }, - "organization": { - "type": "string", - "nullable": true, - "description": "GitHub organization" - }, - "api_url": { - "type": "string", - "description": "GitHub API URL" - }, - "html_url": { - "type": "string", - "description": "GitHub HTML URL" - }, - "custom_user": { - "type": "string", - "description": "Custom user for SSH" - }, - "custom_port": { - "type": "integer", - "description": "Custom port for SSH" - }, - "app_id": { - "type": "integer", - "description": "GitHub App ID" - }, - "installation_id": { - "type": "integer", - "description": "GitHub Installation ID" - }, - "client_id": { - "type": "string", - "description": "GitHub Client ID" - }, - "client_secret": { - "type": "string", - "description": "GitHub Client Secret" - }, - "webhook_secret": { - "type": "string", - "description": "GitHub Webhook Secret" - }, - "private_key_uuid": { - "type": "string", - "description": "Private key UUID" - }, - "is_system_wide": { - "type": "boolean", - "description": "Is system wide (non-cloud instances only)" - } - }, - "type": "object" - } - } - } - }, "responses": { "200": { - "description": "GitHub app updated successfully", + "description": "Integration token.", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string", - "example": "GitHub app updated successfully" - }, - "data": { - "type": "object", - "description": "Updated GitHub app data" - } - }, - "type": "object" + "$ref": "#/components/schemas/IntegrationToken" } } } }, "401": { - "description": "Unauthorized" + "$ref": "#/components/responses/401" }, - "404": { - "description": "GitHub app not found" + "403": { + "description": "Not an admin or owner of the team." }, - "422": { - "$ref": "#/components/responses/422" + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -12094,79 +15064,52 @@ "bearerAuth": [] } ] - } - }, - "/gitlab-apps": { - "get": { + }, + "delete": { "tags": [ - "GitLab Apps" + "Integration Tokens" + ], + "summary": "Delete Integration Token", + "description": "Delete an integration token. A token that a resource uses as secret manager source, or that manages DNS records, cannot be deleted. Requires admin or owner.", + "operationId": "delete-integration-token-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Integration token UUID.", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "List", - "description": "List all GitLab apps for the current team (and system-wide sources).", - "operationId": "list-gitlab-apps", "responses": { "200": { - "description": "List of GitLab apps.", + "description": "Integration token deleted.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "properties": { - "id": { - "type": "integer" - }, - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "api_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "custom_user": { - "type": "string" - }, - "custom_port": { - "type": "integer" - }, - "client_id": { - "type": "string", - "nullable": true - }, - "group_name": { - "type": "string", - "nullable": true - }, - "redirect_uri": { - "type": "string", - "nullable": true - }, - "is_system_wide": { - "type": "boolean" - }, - "is_public": { - "type": "boolean" - }, - "team_id": { - "type": "integer" - } - }, - "type": "object" - } + "properties": { + "message": { + "type": "string" + } + }, + "type": "object" } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" + }, + "403": { + "description": "Not an admin or owner of the team." + }, + "404": { + "$ref": "#/components/responses/404" + }, + "409": { + "description": "The token is still in use." } }, "security": [ @@ -12175,72 +15118,59 @@ } ] }, - "post": { + "patch": { "tags": [ - "GitLab Apps" + "Integration Tokens" + ], + "summary": "Update Integration Token", + "description": "Rename an integration token, rotate its secret, or change its capabilities and settings. Omitted fields keep their value. The provider checks the token again when the secret, the capabilities, or the settings change. Requires admin or owner.", + "operationId": "update-integration-token-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Integration token UUID.", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Create GitLab App", - "description": "Create a new GitLab app (OAuth source). Credentials may be supplied later via the UI or update endpoint.", - "operationId": "create-gitlab-app", "requestBody": { - "description": "GitLab app creation payload.", "required": true, "content": { "application/json": { "schema": { - "required": [ - "name", - "html_url" - ], "properties": { "name": { - "type": "string", - "description": "Name of the GitLab app." - }, - "html_url": { - "type": "string", - "description": "GitLab instance URL (e.g., https://gitlab.com)." - }, - "api_url": { - "type": "string", - "description": "GitLab API URL (defaults to {html_url}/api/v4)." - }, - "custom_user": { - "type": "string", - "description": "Custom user for SSH access (default: git)." - }, - "custom_port": { - "type": "integer", - "description": "Custom port for SSH access (default: 22)." - }, - "group_name": { - "type": "string", - "nullable": true, - "description": "Optional comma-separated group names to filter repositories." + "type": "string" }, - "client_id": { - "type": "string", - "nullable": true, - "description": "GitLab OAuth Application ID." + "token": { + "description": "New secret. Required when base_url, client_id (Infisical), or namespace (Vault) changes.", + "type": "string" }, - "client_secret": { - "type": "string", - "nullable": true, - "description": "GitLab OAuth Application Secret." + "capabilities": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "dns", + "tunnel", + "secrets" + ] + } }, - "webhook_token": { - "type": "string", - "nullable": true, - "description": "Webhook secret token (auto-generated when omitted)." + "automatic_dns": { + "description": "Cloudflare only.", + "type": "boolean" }, - "redirect_uri": { - "type": "string", - "nullable": true, - "description": "OAuth redirect URI registered in GitLab." + "proxied_dns": { + "description": "Cloudflare only.", + "type": "boolean" }, - "is_system_wide": { - "type": "boolean", - "description": "Is this app system-wide (non-cloud instances only)." + "metadata": { + "description": "Secret managers only. Fields to change: base_url, client_id, namespace, timeout. An empty value removes a field.", + "type": "object" } }, "type": "object" @@ -12249,49 +15179,69 @@ } }, "responses": { - "201": { - "description": "GitLab app created successfully.", + "200": { + "description": "Integration token updated.", "content": { "application/json": { "schema": { - "properties": { - "id": { - "type": "integer" - }, - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "api_url": { - "type": "string" - }, - "html_url": { - "type": "string" - }, - "custom_user": { - "type": "string" - }, - "custom_port": { - "type": "integer" - }, - "client_id": { - "type": "string", - "nullable": true - }, - "group_name": { - "type": "string", - "nullable": true - }, - "redirect_uri": { - "type": "string", - "nullable": true - }, - "is_system_wide": { - "type": "boolean" - }, - "team_id": { + "$ref": "#/components/schemas/IntegrationToken" + } + } + } + }, + "400": { + "description": "The provider rejected the token, or the Cloudflare zones could not be read." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "Not an admin or owner of the team." + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" + }, + "502": { + "description": "Coolify could not connect to the provider API." + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/security/integration-tokens/{uuid}/sync-zones": { + "post": { + "tags": [ + "Integration Tokens" + ], + "summary": "Sync Cloudflare Zones", + "description": "Read the DNS zones that a Cloudflare token can access again. Requires admin or owner.", + "operationId": "sync-integration-token-zones", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Integration token UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Zones synchronized.", + "content": { + "application/json": { + "schema": { + "properties": { + "zones_count": { "type": "integer" } }, @@ -12301,13 +15251,22 @@ } }, "400": { - "$ref": "#/components/responses/400" + "description": "Cloudflare did not return the zones." }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "Not an admin or owner of the team." + }, + "404": { + "$ref": "#/components/responses/404" + }, "422": { - "$ref": "#/components/responses/422" + "description": "The token is not a Cloudflare token." + }, + "502": { + "description": "Coolify could not connect to the Cloudflare API." } }, "security": [ @@ -12317,63 +15276,53 @@ ] } }, - "/gitlab-apps/{gitlab_app_id}": { - "delete": { + "/notifications/email": { + "get": { "tags": [ - "GitLab Apps" + "Notifications" ], - "summary": "Delete GitLab App", - "description": "Delete a GitLab app if it is not being used by any applications.", - "operationId": "deleteGitlabApp", - "parameters": [ + "summary": "Get email notification settings", + "description": "Get the current team email notification settings, including `smtp_ehlo_domain`, the hostname sent with SMTP EHLO. Encrypted secrets are only returned when the token has `read:sensitive` (or `root`) and the user is a team admin/owner.", + "operationId": "get-current-team-email-notifications", + "responses": { + "200": { + "description": "Email notification settings." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "security": [ { - "name": "gitlab_app_id", - "in": "path", - "description": "GitLab App ID", - "required": true, - "schema": { - "type": "integer" - } + "bearerAuth": [] } + ] + }, + "patch": { + "tags": [ + "Notifications" ], + "summary": "Update email notification settings", + "description": "Update the current team email notification settings. Set `smtp_ehlo_domain` to a valid hostname to control the SMTP EHLO domain, or `null` to use the system default.", + "operationId": "update-current-team-email-notifications", "responses": { "200": { - "description": "GitLab app deleted successfully", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "GitLab app deleted successfully" - } - }, - "type": "object" - } - } - } + "description": "Updated email notification settings." + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { - "description": "Unauthorized" + "$ref": "#/components/responses/401" }, - "404": { - "description": "GitLab app not found" + "403": { + "description": "Forbidden." }, - "409": { - "description": "Conflict - GitLab app is in use", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "This GitLab app is being used by 5 application(s). Please delete all applications first." - } - }, - "type": "object" - } - } - } + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -12381,112 +15330,108 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/notifications/discord": { + "get": { "tags": [ - "GitLab Apps" + "Notifications" ], - "summary": "Update GitLab App", - "description": "Update an existing GitLab app.", - "operationId": "updateGitlabApp", - "parameters": [ + "summary": "Get Discord notification settings", + "description": "Get the current team Discord notification settings. Encrypted secrets are only returned when the token has `read:sensitive` (or `root`) and the user is a team admin/owner.", + "operationId": "get-current-team-discord-notifications", + "responses": { + "200": { + "description": "Discord notification settings." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "security": [ { - "name": "gitlab_app_id", - "in": "path", - "description": "GitLab App ID", - "required": true, - "schema": { - "type": "integer" - } + "bearerAuth": [] } + ] + }, + "patch": { + "tags": [ + "Notifications" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "name": { - "type": "string", - "description": "GitLab App name" - }, - "html_url": { - "type": "string", - "description": "GitLab HTML URL" - }, - "api_url": { - "type": "string", - "description": "GitLab API URL" - }, - "custom_user": { - "type": "string", - "description": "Custom user for SSH" - }, - "custom_port": { - "type": "integer", - "description": "Custom port for SSH" - }, - "group_name": { - "type": "string", - "nullable": true, - "description": "Optional group filter" - }, - "client_id": { - "type": "string", - "nullable": true, - "description": "OAuth Application ID" - }, - "client_secret": { - "type": "string", - "nullable": true, - "description": "OAuth Application Secret" - }, - "webhook_token": { - "type": "string", - "nullable": true, - "description": "Webhook secret token" - }, - "redirect_uri": { - "type": "string", - "nullable": true, - "description": "OAuth redirect URI" - }, - "is_system_wide": { - "type": "boolean", - "description": "Is system wide (non-cloud instances only)" - } - }, - "type": "object" - } - } + "summary": "Update Discord notification settings", + "description": "Update the current team Discord notification settings.", + "operationId": "update-current-team-discord-notifications", + "responses": { + "200": { + "description": "Updated Discord notification settings." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "Forbidden." + }, + "422": { + "$ref": "#/components/responses/422" } }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notifications/slack": { + "get": { + "tags": [ + "Notifications" + ], + "summary": "Get Slack notification settings", + "description": "Get the current team Slack notification settings. Encrypted secrets are only returned when the token has `read:sensitive` (or `root`) and the user is a team admin/owner.", + "operationId": "get-current-team-slack-notifications", "responses": { "200": { - "description": "GitLab app updated successfully", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "GitLab app updated successfully" - }, - "data": { - "type": "object", - "description": "Updated GitLab app data" - } - }, - "type": "object" - } - } - } + "description": "Slack notification settings." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "patch": { + "tags": [ + "Notifications" + ], + "summary": "Update Slack notification settings", + "description": "Update the current team Slack notification settings.", + "operationId": "update-current-team-slack-notifications", + "responses": { + "200": { + "description": "Updated Slack notification settings." + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { - "description": "Unauthorized" + "$ref": "#/components/responses/401" }, - "404": { - "description": "GitLab app not found" + "403": { + "description": "Forbidden." }, "422": { "$ref": "#/components/responses/422" @@ -12499,80 +15444,53 @@ ] } }, - "/hetzner/locations": { + "/notifications/telegram": { "get": { "tags": [ - "Hetzner" + "Notifications" ], - "summary": "Get Hetzner Locations", - "description": "Get all available Hetzner datacenter locations.", - "operationId": "get-hetzner-locations", - "parameters": [ - { - "name": "cloud_provider_token_uuid", - "in": "query", - "description": "Cloud provider token UUID. Required if cloud_provider_token_id is not provided.", - "required": false, - "schema": { - "type": "string" - } + "summary": "Get Telegram notification settings", + "description": "Get the current team Telegram notification settings. Encrypted secrets are only returned when the token has `read:sensitive` (or `root`) and the user is a team admin/owner.", + "operationId": "get-current-team-telegram-notifications", + "responses": { + "200": { + "description": "Telegram notification settings." + }, + "400": { + "$ref": "#/components/responses/400" }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "security": [ { - "name": "cloud_provider_token_id", - "in": "query", - "description": "Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.", - "required": false, - "deprecated": true, - "schema": { - "type": "string" - } + "bearerAuth": [] } + ] + }, + "patch": { + "tags": [ + "Notifications" ], + "summary": "Update Telegram notification settings", + "description": "Update the current team Telegram notification settings.", + "operationId": "update-current-team-telegram-notifications", "responses": { "200": { - "description": "List of Hetzner locations.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "country": { - "type": "string" - }, - "city": { - "type": "string" - }, - "latitude": { - "type": "number" - }, - "longitude": { - "type": "number" - } - }, - "type": "object" - } - } - } - } + "description": "Updated Telegram notification settings." + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" + "403": { + "description": "Forbidden." }, - "502": { - "$ref": "#/components/responses/502" + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -12582,120 +15500,109 @@ ] } }, - "/hetzner/server-types": { + "/notifications/pushover": { "get": { "tags": [ - "Hetzner" + "Notifications" ], - "summary": "Get Hetzner Server Types", - "description": "Get the Hetzner server types (instance sizes) that can be ordered now. Each type lists only the locations where it is in stock and not deprecated.", - "operationId": "get-hetzner-server-types", - "parameters": [ - { - "name": "location", - "in": "query", - "description": "Return only the server types that can be ordered in this location, for example nbg1.", - "required": false, - "schema": { - "type": "string" - } + "summary": "Get Pushover notification settings", + "description": "Get the current team Pushover notification settings. Encrypted secrets are only returned when the token has `read:sensitive` (or `root`) and the user is a team admin/owner.", + "operationId": "get-current-team-pushover-notifications", + "responses": { + "200": { + "description": "Pushover notification settings." }, - { - "name": "cloud_provider_token_uuid", - "in": "query", - "description": "Cloud provider token UUID. Required if cloud_provider_token_id is not provided.", - "required": false, - "schema": { - "type": "string" - } + "400": { + "$ref": "#/components/responses/400" }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "security": [ { - "name": "cloud_provider_token_id", - "in": "query", - "description": "Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.", - "required": false, - "deprecated": true, - "schema": { - "type": "string" - } + "bearerAuth": [] } + ] + }, + "patch": { + "tags": [ + "Notifications" ], + "summary": "Update Pushover notification settings", + "description": "Update the current team Pushover notification settings.", + "operationId": "update-current-team-pushover-notifications", "responses": { "200": { - "description": "List of Hetzner server types.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "cores": { - "type": "integer" - }, - "memory": { - "type": "number" - }, - "disk": { - "type": "integer" - }, - "prices": { - "type": "array", - "items": { - "type": "object", - "properties": { - "location": { - "type": "string", - "description": "Datacenter location name" - }, - "price_hourly": { - "type": "object", - "properties": { - "net": { - "type": "string" - }, - "gross": { - "type": "string" - } - } - }, - "price_monthly": { - "type": "object", - "properties": { - "net": { - "type": "string" - }, - "gross": { - "type": "string" - } - } - } - } - } - } - }, - "type": "object" - } - } - } - } + "description": "Updated Pushover notification settings." + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "Forbidden." + }, + "422": { + "$ref": "#/components/responses/422" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/notifications/webhook": { + "get": { + "tags": [ + "Notifications" + ], + "summary": "Get webhook notification settings", + "description": "Get the current team webhook notification settings. Encrypted secrets are only returned when the token has `read:sensitive` (or `root`) and the user is a team admin/owner.", + "operationId": "get-current-team-webhook-notifications", + "responses": { + "200": { + "description": "Webhook notification settings." + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "patch": { + "tags": [ + "Notifications" + ], + "summary": "Update webhook notification settings", + "description": "Update the current team webhook notification settings.", + "operationId": "update-current-team-webhook-notifications", + "responses": { + "200": { + "description": "Updated webhook notification settings." }, - "404": { - "$ref": "#/components/responses/404" + "400": { + "$ref": "#/components/responses/400" }, - "502": { - "$ref": "#/components/responses/502" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "Forbidden." + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -12705,80 +15612,80 @@ ] } }, - "/hetzner/images": { + "/version": { "get": { - "tags": [ - "Hetzner" - ], - "summary": "Get Hetzner Images", - "description": "Get all available Hetzner system images (operating systems).", - "operationId": "get-hetzner-images", - "parameters": [ - { - "name": "cloud_provider_token_uuid", - "in": "query", - "description": "Cloud provider token UUID. Required if cloud_provider_token_id is not provided.", - "required": false, - "schema": { - "type": "string" + "summary": "Version", + "description": "Get Coolify version.", + "operationId": "version", + "responses": { + "200": { + "description": "Returns the version of the application", + "content": { + "text/html": { + "schema": { + "type": "string" + }, + "example": "v4.0.0" + } } }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "security": [ { - "name": "cloud_provider_token_id", - "in": "query", - "description": "Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.", - "required": false, - "deprecated": true, - "schema": { - "type": "string" - } + "bearerAuth": [] } - ], + ] + } + }, + "/disable": { + "post": { + "summary": "Disable API", + "description": "Disable API (only with root permissions).", + "operationId": "disable-api", "responses": { "200": { - "description": "List of Hetzner images.", + "description": "Disable API.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - }, - "os_flavor": { - "type": "string" - }, - "os_version": { - "type": "string" - }, - "architecture": { - "type": "string" - } - }, - "type": "object" - } + "properties": { + "message": { + "type": "string", + "example": "API disabled." + } + }, + "type": "object" } } } }, + "400": { + "$ref": "#/components/responses/400" + }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" - }, - "502": { - "$ref": "#/components/responses/502" + "403": { + "description": "You are not allowed to disable the API.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "You are not allowed to disable the API." + } + }, + "type": "object" + } + } + } } }, "security": [ @@ -12788,71 +15695,101 @@ ] } }, - "/hetzner/ssh-keys": { - "get": { - "tags": [ - "Hetzner" - ], - "summary": "Get Hetzner SSH Keys", - "description": "Get all SSH keys stored in the Hetzner account.", - "operationId": "get-hetzner-ssh-keys", - "parameters": [ - { - "name": "cloud_provider_token_uuid", - "in": "query", - "description": "Cloud provider token UUID. Required if cloud_provider_token_id is not provided.", - "required": false, - "schema": { - "type": "string" + "/mcp/enable": { + "post": { + "summary": "Enable MCP Server", + "description": "Enable the MCP server endpoint at /mcp (only with root permissions).", + "operationId": "enable-mcp", + "responses": { + "200": { + "description": "MCP server enabled.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "MCP server enabled." + } + }, + "type": "object" + } + } } }, - { - "name": "cloud_provider_token_id", - "in": "query", - "description": "Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.", - "required": false, - "deprecated": true, - "schema": { - "type": "string" + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "You are not allowed to enable the MCP server.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "You are not allowed to enable the MCP server." + } + }, + "type": "object" + } + } } } - ], + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/mcp/disable": { + "post": { + "summary": "Disable MCP Server", + "description": "Disable the MCP server endpoint at /mcp (only with root permissions).", + "operationId": "disable-mcp", "responses": { "200": { - "description": "List of Hetzner SSH keys.", + "description": "MCP server disabled.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "fingerprint": { - "type": "string" - }, - "public_key": { - "type": "string" - } - }, - "type": "object" - } + "properties": { + "message": { + "type": "string", + "example": "MCP server disabled." + } + }, + "type": "object" } } } }, + "400": { + "$ref": "#/components/responses/400" + }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" - }, - "502": { - "$ref": "#/components/responses/502" + "403": { + "description": "You are not allowed to disable the MCP server.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "You are not allowed to disable the MCP server." + } + }, + "type": "object" + } + } + } } }, "security": [ @@ -12862,246 +15799,88 @@ ] } }, - "/hetzner/firewalls": { + "/health": { "get": { - "tags": [ - "Hetzner" - ], - "summary": "Get Hetzner Firewalls", - "description": "Get all existing Hetzner firewalls for the current project.", - "operationId": "get-hetzner-firewalls", - "parameters": [ - { - "name": "cloud_provider_token_uuid", - "in": "query", - "description": "Cloud provider token UUID. Required if cloud_provider_token_id is not provided.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "cloud_provider_token_id", - "in": "query", - "description": "Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.", - "required": false, - "deprecated": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Healthcheck", + "description": "Healthcheck endpoint.", + "operationId": "healthcheck", "responses": { "200": { - "description": "List of Hetzner firewalls.", + "description": "Healthcheck endpoint.", "content": { - "application/json": { + "text/html": { "schema": { - "type": "array", - "items": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - } - }, - "type": "object" - } - } + "type": "string" + }, + "example": "OK" } } }, + "400": { + "$ref": "#/components/responses/400" + }, "401": { "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "502": { - "$ref": "#/components/responses/502" - } - }, - "security": [ - { - "bearerAuth": [] } - ] + } } }, - "/hetzner/networks": { + "/projects": { "get": { "tags": [ - "Hetzner" - ], - "summary": "Get Hetzner Networks", - "description": "Get all existing Hetzner private networks for the current project.", - "operationId": "get-hetzner-networks", - "parameters": [ - { - "name": "cloud_provider_token_uuid", - "in": "query", - "description": "Cloud provider token UUID. Required if cloud_provider_token_id is not provided.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "cloud_provider_token_id", - "in": "query", - "description": "Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.", - "required": false, - "deprecated": true, - "schema": { - "type": "string" - } - } + "Projects" ], + "summary": "List", + "description": "List projects.", + "operationId": "list-projects", "responses": { "200": { - "description": "List of Hetzner networks.", + "description": "Get all projects.", "content": { "application/json": { "schema": { "type": "array", "items": { - "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "ip_range": { - "type": "string" - } - }, - "type": "object" + "$ref": "#/components/schemas/Project" } } } } }, - "401": { - "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" + "400": { + "$ref": "#/components/responses/400" }, - "502": { - "$ref": "#/components/responses/502" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/servers/hetzner": { - "post": { - "tags": [ - "Hetzner" - ], - "summary": "Create Hetzner Server", - "description": "Create a new server on Hetzner and register it in Coolify. A cloud-init script or extra SSH key IDs need a token with the deploy permission.", - "operationId": "create-hetzner-server", - "requestBody": { - "description": "Hetzner server creation parameters", - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "location", - "server_type", - "image", - "private_key_uuid" - ], - "properties": { - "cloud_provider_token_uuid": { - "type": "string", - "example": "abc123", - "description": "Cloud provider token UUID. Required if cloud_provider_token_id is not provided." - }, - "cloud_provider_token_id": { - "type": "string", - "example": "abc123", - "description": "Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.", - "deprecated": true - }, - "location": { - "type": "string", - "example": "nbg1", - "description": "Hetzner location name" - }, - "server_type": { - "type": "string", - "example": "cx11", - "description": "Hetzner server type name" - }, - "image": { - "type": "integer", - "example": 15512617, - "description": "Hetzner image ID" - }, - "name": { - "type": "string", - "example": "my-server", - "description": "Server name (auto-generated if not provided)" - }, - "private_key_uuid": { - "type": "string", - "example": "xyz789", - "description": "Private key UUID" - }, - "enable_ipv4": { - "type": "boolean", - "example": true, - "description": "Enable IPv4 (default: true)" - }, - "enable_ipv6": { - "type": "boolean", - "example": true, - "description": "Enable IPv6 (default: true)" - }, - "enable_backups": { - "type": "boolean", - "example": false, - "description": "Enable Hetzner server backups after creation (adds 20% to the monthly server fee)" - }, - "hetzner_ssh_key_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Additional Hetzner SSH key IDs. Needs a token with the deploy permission." - }, - "hetzner_firewall_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Existing Hetzner firewall IDs to apply during server creation" - }, - "hetzner_network_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Existing Hetzner network IDs to attach during server creation" - }, - "cloud_init_script": { + "401": { + "$ref": "#/components/responses/401" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Projects" + ], + "summary": "Create", + "description": "Create Project.", + "operationId": "create-project", + "requestBody": { + "description": "Project created.", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "name": { "type": "string", - "description": "Cloud-init YAML script (optional). Needs a token with the deploy permission." + "description": "The name of the project." }, - "instant_validate": { - "type": "boolean", - "example": false, - "description": "Validate the server and install Docker when it is running. Defaults to true for tokens with the deploy permission, and needs that permission." + "description": { + "type": "string", + "description": "The description of the project." } }, "type": "object" @@ -13111,7 +15890,7 @@ }, "responses": { "201": { - "description": "Hetzner server created.", + "description": "Project created.", "content": { "application/json": { "schema": { @@ -13119,15 +15898,7 @@ "uuid": { "type": "string", "example": "og888os", - "description": "The UUID of the server." - }, - "hetzner_server_id": { - "type": "integer", - "description": "The Hetzner server ID." - }, - "ip": { - "type": "string", - "description": "The server IP address." + "description": "The UUID of the project." } }, "type": "object" @@ -13141,20 +15912,11 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the deploy permission for a cloud-init script or extra SSH keys." - }, "404": { "$ref": "#/components/responses/404" }, "422": { "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "502": { - "$ref": "#/components/responses/502" } }, "security": [ @@ -13164,59 +15926,44 @@ ] } }, - "/hostinger/data-centers": { + "/projects/{uuid}": { "get": { "tags": [ - "Hostinger" + "Projects" ], - "summary": "Get Hostinger VPS data centers", - "operationId": "get-hostinger-data-centers", - "responses": { - "200": { - "description": "List of Hostinger VPS data centers." - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "description": "Hostinger denied access to this resource for the cloud provider token." - }, - "422": { - "description": "Validation failed." - }, - "429": { - "description": "Hostinger rate limit exceeded." - } - }, - "security": [ + "summary": "Get", + "description": "Get project by UUID.", + "operationId": "get-project-by-uuid", + "parameters": [ { - "bearerAuth": [] + "name": "uuid", + "in": "path", + "description": "Project UUID", + "required": true, + "schema": { + "type": "string" + } } - ] - } - }, - "/hostinger/catalog": { - "get": { - "tags": [ - "Hostinger" ], - "summary": "Get Hostinger VPS plans and prices", - "operationId": "get-hostinger-catalog", "responses": { "200": { - "description": "List of Hostinger VPS plans and prices." + "description": "Project details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "Hostinger denied access to this resource for the cloud provider token." - }, - "422": { - "description": "Validation failed." - }, - "429": { - "description": "Hostinger rate limit exceeded." + "404": { + "description": "Project not found." } }, "security": [ @@ -13224,61 +15971,53 @@ "bearerAuth": [] } ] - } - }, - "/hostinger/templates": { - "get": { + }, + "delete": { "tags": [ - "Hostinger" + "Projects" ], - "summary": "Get Hostinger VPS operating system templates", - "operationId": "get-hostinger-templates", - "responses": { - "200": { - "description": "List of Hostinger VPS templates." - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "description": "Hostinger denied access to this resource for the cloud provider token." - }, - "422": { - "description": "Validation failed." - }, - "429": { - "description": "Hostinger rate limit exceeded." - } - }, - "security": [ + "summary": "Delete", + "description": "Delete project by UUID.", + "operationId": "delete-project-by-uuid", + "parameters": [ { - "bearerAuth": [] + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } } - ] - } - }, - "/hostinger/ssh-keys": { - "get": { - "tags": [ - "Hostinger" ], - "summary": "Get Hostinger account SSH keys", - "operationId": "get-hostinger-ssh-keys", "responses": { "200": { - "description": "List of Hostinger account SSH keys." + "description": "Project deleted.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Project deleted." + } + }, + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "Hostinger denied access to this resource for the cloud provider token." + "404": { + "$ref": "#/components/responses/404" }, "422": { - "description": "Validation failed." - }, - "429": { - "description": "Hostinger rate limit exceeded." + "$ref": "#/components/responses/422" } }, "security": [ @@ -13286,30 +16025,82 @@ "bearerAuth": [] } ] - } - }, - "/hostinger/post-install-scripts": { - "get": { + }, + "patch": { "tags": [ - "Hostinger" + "Projects" ], - "summary": "Get Hostinger post-install scripts", - "operationId": "get-hostinger-post-install-scripts", + "summary": "Update", + "description": "Update Project.", + "operationId": "update-project-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the project.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Project updated.", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "type": "string", + "description": "The name of the project." + }, + "description": { + "type": "string", + "description": "The description of the project." + } + }, + "type": "object" + } + } + } + }, "responses": { - "200": { - "description": "List of Hostinger post-install scripts." + "201": { + "description": "Project updated.", + "content": { + "application/json": { + "schema": { + "properties": { + "uuid": { + "type": "string", + "example": "og888os" + }, + "name": { + "type": "string", + "example": "Project Name" + }, + "description": { + "type": "string", + "example": "Project Description" + } + }, + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "Hostinger denied access to this resource for the cloud provider token." + "404": { + "$ref": "#/components/responses/404" }, "422": { - "description": "Validation failed." - }, - "429": { - "description": "Hostinger rate limit exceeded." + "$ref": "#/components/responses/422" } }, "security": [ @@ -13319,28 +16110,56 @@ ] } }, - "/servers/hostinger": { - "post": { + "/projects/{uuid}/{environment_name_or_uuid}": { + "get": { "tags": [ - "Hostinger" + "Projects" + ], + "summary": "Environment", + "description": "Get environment by name or UUID.", + "operationId": "get-environment-by-name-or-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Project UUID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "environment_name_or_uuid", + "in": "path", + "description": "Environment name or UUID", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Purchase a Hostinger VPS and create a linked server", - "operationId": "create-hostinger-server", "responses": { - "201": { - "description": "Hostinger VPS purchased and linked to a Coolify server." + "200": { + "description": "Environment details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Environment" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the deploy permission for a post-install script or extra SSH keys." + "404": { + "$ref": "#/components/responses/404" }, "422": { - "description": "Validation failed." - }, - "429": { - "description": "Hostinger rate limit exceeded." + "$ref": "#/components/responses/422" } }, "security": [ @@ -13350,47 +16169,47 @@ ] } }, - "/settings/email": { + "/projects/{uuid}/environments": { "get": { "tags": [ - "Settings" + "Projects" ], - "summary": "Get instance email settings", - "description": "Get instance-wide SMTP and Resend settings. Requires a root-team token belonging to a root-team admin or owner. Sensitive fields require the `read:sensitive` or `root` token ability.", - "operationId": "get-instance-email-settings", - "responses": { - "200": { - "description": "Instance email settings." - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "description": "Forbidden." - } - }, - "security": [ + "summary": "List Environments", + "description": "List all environments in a project.", + "operationId": "get-environments", + "parameters": [ { - "bearerAuth": [] + "name": "uuid", + "in": "path", + "description": "Project UUID", + "required": true, + "schema": { + "type": "string" + } } - ] - }, - "patch": { - "tags": [ - "Settings" ], - "summary": "Update instance email settings", - "description": "Update instance-wide SMTP and Resend settings. Requires `write:sensitive` and a root-team token belonging to a root-team admin or owner.", - "operationId": "update-instance-email-settings", "responses": { "200": { - "description": "Updated instance email settings." + "description": "List of environments", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Environment" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "Forbidden." + "404": { + "description": "Project not found." }, "422": { "$ref": "#/components/responses/422" @@ -13401,43 +16220,35 @@ "bearerAuth": [] } ] - } - }, - "/security/integration-tokens": { + }, "post": { "tags": [ - "Secret Managers" + "Projects" + ], + "summary": "Create Environment", + "description": "Create environment in project.", + "operationId": "create-environment", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Project UUID", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Create Secret Manager Token", - "description": "Create and validate a Doppler, Infisical, or Vault integration token.", - "operationId": "create-secret-manager-integration-token", "requestBody": { + "description": "Environment created.", "required": true, "content": { "application/json": { "schema": { - "required": [ - "provider", - "name", - "token" - ], "properties": { - "provider": { - "type": "string", - "enum": [ - "doppler", - "infisical", - "vault" - ] - }, "name": { - "type": "string" - }, - "token": { - "type": "string" - }, - "metadata": { - "type": "object" + "type": "string", + "description": "The name of the environment." } }, "type": "object" @@ -13447,7 +16258,21 @@ }, "responses": { "201": { - "description": "Integration token created." + "description": "Environment created.", + "content": { + "application/json": { + "schema": { + "properties": { + "uuid": { + "type": "string", + "example": "env123", + "description": "The UUID of the environment." + } + }, + "type": "object" + } + } + } }, "400": { "$ref": "#/components/responses/400" @@ -13455,6 +16280,12 @@ "401": { "$ref": "#/components/responses/401" }, + "404": { + "description": "Project not found." + }, + "409": { + "description": "Environment with this name already exists." + }, "422": { "$ref": "#/components/responses/422" } @@ -13466,50 +16297,59 @@ ] } }, - "/notifications/email": { - "get": { + "/projects/{uuid}/environments/{environment_name_or_uuid}": { + "delete": { "tags": [ - "Notifications" + "Projects" ], - "summary": "Get email notification settings", - "description": "Get the current team email notification settings, including `smtp_ehlo_domain`, the hostname sent with SMTP EHLO. Encrypted secrets are only returned when the token has `read:sensitive` (or `root`) and the user is a team admin/owner.", - "operationId": "get-current-team-email-notifications", - "responses": { - "200": { - "description": "Email notification settings." - }, - "400": { - "$ref": "#/components/responses/400" + "summary": "Delete Environment", + "description": "Delete environment by name or UUID. Environment must be empty.", + "operationId": "delete-environment", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Project UUID", + "required": true, + "schema": { + "type": "string" + } }, - "401": { - "$ref": "#/components/responses/401" - } - }, - "security": [ { - "bearerAuth": [] + "name": "environment_name_or_uuid", + "in": "path", + "description": "Environment name or UUID", + "required": true, + "schema": { + "type": "string" + } } - ] - }, - "patch": { - "tags": [ - "Notifications" ], - "summary": "Update email notification settings", - "description": "Update the current team email notification settings. Set `smtp_ehlo_domain` to a valid hostname to control the SMTP EHLO domain, or `null` to use the system default.", - "operationId": "update-current-team-email-notifications", "responses": { "200": { - "description": "Updated email notification settings." + "description": "Environment deleted.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Environment deleted." + } + }, + "type": "object" + } + } + } }, "400": { - "$ref": "#/components/responses/400" + "description": "Environment has resources, so it cannot be deleted." }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "Forbidden." + "404": { + "description": "Project or environment not found." }, "422": { "$ref": "#/components/responses/422" @@ -13520,43 +16360,79 @@ "bearerAuth": [] } ] - } - }, - "/notifications/discord": { - "get": { + }, + "patch": { "tags": [ - "Notifications" + "Projects" ], - "summary": "Get Discord notification settings", - "description": "Get the current team Discord notification settings. Encrypted secrets are only returned when the token has `read:sensitive` (or `root`) and the user is a team admin/owner.", - "operationId": "get-current-team-discord-notifications", - "responses": { - "200": { - "description": "Discord notification settings." - }, - "400": { - "$ref": "#/components/responses/400" + "summary": "Update Environment", + "description": "Update environment by name or UUID within a project.", + "operationId": "update-environment", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Project UUID", + "required": true, + "schema": { + "type": "string" + } }, - "401": { - "$ref": "#/components/responses/401" - } - }, - "security": [ { - "bearerAuth": [] + "name": "environment_name_or_uuid", + "in": "path", + "description": "Environment name or UUID", + "required": true, + "schema": { + "type": "string" + } } - ] - }, - "patch": { - "tags": [ - "Notifications" ], - "summary": "Update Discord notification settings", - "description": "Update the current team Discord notification settings.", - "operationId": "update-current-team-discord-notifications", + "requestBody": { + "description": "Environment fields to update.", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "type": "string", + "description": "The name of the environment." + }, + "description": { + "type": "string", + "description": "The description of the environment." + } + }, + "type": "object" + } + } + } + }, "responses": { "200": { - "description": "Updated Discord notification settings." + "description": "Environment updated.", + "content": { + "application/json": { + "schema": { + "properties": { + "uuid": { + "type": "string", + "example": "env123" + }, + "name": { + "type": "string", + "example": "staging" + }, + "description": { + "type": "string", + "example": "Staging environment" + } + }, + "type": "object" + } + } + } }, "400": { "$ref": "#/components/responses/400" @@ -13564,8 +16440,11 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "Forbidden." + "404": { + "description": "Project or environment not found." + }, + "409": { + "description": "Environment with this name already exists." }, "422": { "$ref": "#/components/responses/422" @@ -13578,53 +16457,67 @@ ] } }, - "/notifications/slack": { + "/resources": { "get": { "tags": [ - "Notifications" - ], - "summary": "Get Slack notification settings", - "description": "Get the current team Slack notification settings. Encrypted secrets are only returned when the token has `read:sensitive` (or `root`) and the user is a team admin/owner.", - "operationId": "get-current-team-slack-notifications", - "responses": { - "200": { - "description": "Slack notification settings." - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - }, - "patch": { - "tags": [ - "Notifications" + "Resources" ], - "summary": "Update Slack notification settings", - "description": "Update the current team Slack notification settings.", - "operationId": "update-current-team-slack-notifications", + "summary": "List", + "description": "Get all resources.", + "operationId": "list-resources", "responses": { "200": { - "description": "Updated Slack notification settings." + "description": "Get all applications, services and standalone databases. The other fields of each resource are the fields of the Application, Service or Database schema.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "type": { + "description": "application, service, or standalone- for databases (for example standalone-postgresql).", + "type": "string" + }, + "status": { + "description": "For example running:healthy or exited:unhealthy.", + "type": "string" + }, + "environment_id": { + "type": "integer" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "type": "object", + "additionalProperties": true + } + } + } + } }, "400": { "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" - }, - "403": { - "description": "Forbidden." - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -13634,17 +16527,88 @@ ] } }, - "/notifications/telegram": { + "/s3-storages": { "get": { "tags": [ - "Notifications" + "S3 Storages" ], - "summary": "Get Telegram notification settings", - "description": "Get the current team Telegram notification settings. Encrypted secrets are only returned when the token has `read:sensitive` (or `root`) and the user is a team admin/owner.", - "operationId": "get-current-team-telegram-notifications", + "summary": "List S3 Storages", + "description": "List all backup storages (S3, SFTP, FTPS, and WebDAV) for the authenticated team.", + "operationId": "list-s3-storages", "responses": { "200": { - "description": "Telegram notification settings." + "description": "Get all S3 storages.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "uuid": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "s3", + "sftp", + "ftps", + "webdav" + ] + }, + "name": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "endpoint": { + "type": "string" + }, + "bucket": { + "type": "string", + "nullable": true, + "description": "S3 only. Null for the other types." + }, + "region": { + "type": "string", + "description": "S3 only. The other types have a placeholder value." + }, + "use_path_style_endpoint": { + "type": "boolean" + }, + "skip_tls_verification": { + "type": "boolean" + }, + "private_key_uuid": { + "type": "string", + "nullable": true, + "description": "SFTP only: the UUID of the private key used to log in. Null with a password login." + }, + "sftp_host_key": { + "type": "string", + "nullable": true, + "description": "SFTP only: the pinned host key of the server, as \" \". Saved by the first successful connection test." + }, + "is_usable": { + "type": "boolean" + }, + "team_id": { + "type": "integer" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "type": "object" + } + } + } + } }, "400": { "$ref": "#/components/responses/400" @@ -13659,16 +16623,109 @@ } ] }, - "patch": { + "post": { "tags": [ - "Notifications" + "S3 Storages" ], - "summary": "Update Telegram notification settings", - "description": "Update the current team Telegram notification settings.", - "operationId": "update-current-team-telegram-notifications", + "summary": "Create S3 Storage", + "description": "Create a new S3 storage configuration for the authenticated team.", + "operationId": "create-s3-storage", + "requestBody": { + "description": "S3 storage details", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "name", + "endpoint", + "key" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "s3", + "sftp", + "ftps", + "webdav" + ], + "default": "s3", + "description": "The storage protocol. It cannot change later." + }, + "name": { + "type": "string", + "example": "My S3 Storage", + "description": "A friendly name for the storage." + }, + "description": { + "type": "string", + "nullable": true, + "description": "Optional description." + }, + "endpoint": { + "type": "string", + "example": "https://s3.us-east-1.amazonaws.com", + "description": "S3: the S3-compatible endpoint URL. SFTP and FTPS: sftp://host:port/directory or ftps://host:port/directory (explicit TLS); the directory is an absolute path, and without one the login directory is used. WebDAV: the https URL of the backup directory." + }, + "bucket": { + "type": "string", + "example": "my-bucket", + "description": "S3 bucket name. Required for S3, not allowed for the other types." + }, + "region": { + "type": "string", + "example": "us-east-1", + "description": "S3 region. Required for S3, not allowed for the other types." + }, + "use_path_style_endpoint": { + "type": "boolean", + "description": "Use path-style URLs (endpoint/bucket). Set to false for providers that only accept virtual-hosted-style URLs (bucket.endpoint). Default: false for Alibaba Cloud OSS, Tencent Cloud COS, and Volcengine TOS endpoints, true for all other endpoints." + }, + "skip_tls_verification": { + "type": "boolean", + "description": "S3 only. Do not check the TLS certificate of the endpoint. Use only for endpoints with a self-signed or private CA certificate. Default: false." + }, + "key": { + "type": "string", + "description": "S3: the access key. Other types: the username." + }, + "secret": { + "type": "string", + "description": "S3: the secret key. Other types: the password. SFTP: not needed with private_key_uuid." + }, + "private_key_uuid": { + "type": "string", + "nullable": true, + "description": "SFTP only: the UUID of a private key of your team to log in with instead of a password." + }, + "is_usable": { + "type": "boolean", + "description": "Whether the storage is marked usable." + } + }, + "type": "object" + } + } + } + }, "responses": { - "200": { - "description": "Updated Telegram notification settings." + "201": { + "description": "S3 storage created.", + "content": { + "application/json": { + "schema": { + "properties": { + "uuid": { + "type": "string", + "example": "og888os", + "description": "The UUID of the S3 storage." + } + }, + "type": "object" + } + } + } }, "400": { "$ref": "#/components/responses/400" @@ -13676,9 +16733,6 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "Forbidden." - }, "422": { "$ref": "#/components/responses/422" } @@ -13690,53 +16744,102 @@ ] } }, - "/notifications/pushover": { + "/s3-storages/{uuid}": { "get": { "tags": [ - "Notifications" + "S3 Storages" ], - "summary": "Get Pushover notification settings", - "description": "Get the current team Pushover notification settings. Encrypted secrets are only returned when the token has `read:sensitive` (or `root`) and the user is a team admin/owner.", - "operationId": "get-current-team-pushover-notifications", - "responses": { - "200": { - "description": "Pushover notification settings." - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - } - }, - "security": [ + "summary": "Get S3 Storage", + "description": "Get S3 storage by UUID.", + "operationId": "get-s3-storage-by-uuid", + "parameters": [ { - "bearerAuth": [] + "name": "uuid", + "in": "path", + "description": "S3 Storage UUID", + "required": true, + "schema": { + "type": "string" + } } - ] - }, - "patch": { - "tags": [ - "Notifications" ], - "summary": "Update Pushover notification settings", - "description": "Update the current team Pushover notification settings.", - "operationId": "update-current-team-pushover-notifications", "responses": { "200": { - "description": "Updated Pushover notification settings." - }, - "400": { - "$ref": "#/components/responses/400" + "description": "Get S3 storage by UUID", + "content": { + "application/json": { + "schema": { + "properties": { + "uuid": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "s3", + "sftp", + "ftps", + "webdav" + ] + }, + "name": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "endpoint": { + "type": "string" + }, + "bucket": { + "type": "string", + "nullable": true, + "description": "S3 only. Null for the other types." + }, + "region": { + "type": "string", + "description": "S3 only. The other types have a placeholder value." + }, + "use_path_style_endpoint": { + "type": "boolean" + }, + "skip_tls_verification": { + "type": "boolean" + }, + "private_key_uuid": { + "type": "string", + "nullable": true, + "description": "SFTP only: the UUID of the private key used to log in. Null with a password login." + }, + "sftp_host_key": { + "type": "string", + "nullable": true, + "description": "SFTP only: the pinned host key of the server, as \" \". Saved by the first successful connection test." + }, + "is_usable": { + "type": "boolean" + }, + "team_id": { + "type": "integer" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "type": "object" + } + } + } }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "Forbidden." - }, - "422": { - "$ref": "#/components/responses/422" + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -13744,25 +16847,47 @@ "bearerAuth": [] } ] - } - }, - "/notifications/webhook": { - "get": { + }, + "delete": { "tags": [ - "Notifications" + "S3 Storages" + ], + "summary": "Delete S3 Storage", + "description": "Delete S3 storage by UUID.", + "operationId": "delete-s3-storage-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the S3 storage.", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Get webhook notification settings", - "description": "Get the current team webhook notification settings. Encrypted secrets are only returned when the token has `read:sensitive` (or `root`) and the user is a team admin/owner.", - "operationId": "get-current-team-webhook-notifications", "responses": { "200": { - "description": "Webhook notification settings." - }, - "400": { - "$ref": "#/components/responses/400" + "description": "S3 storage deleted.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "S3 storage deleted." + } + }, + "type": "object" + } + } + } }, "401": { "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -13773,23 +16898,102 @@ }, "patch": { "tags": [ - "Notifications" + "S3 Storages" ], - "summary": "Update webhook notification settings", - "description": "Update the current team webhook notification settings.", - "operationId": "update-current-team-webhook-notifications", + "summary": "Update S3 Storage", + "description": "Update S3 storage by UUID. The type cannot change, and only the fields of the storage type are accepted.", + "operationId": "update-s3-storage-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "S3 Storage UUID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "S3 storage fields to update.", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "type": "string", + "description": "A friendly name for the storage." + }, + "description": { + "type": "string", + "nullable": true, + "description": "Optional description." + }, + "endpoint": { + "type": "string", + "description": "The endpoint URL, in the format of the storage type (see Create S3 Storage)." + }, + "bucket": { + "type": "string", + "description": "S3 bucket name. Only for S3 storages." + }, + "region": { + "type": "string", + "description": "S3 region. Only for S3 storages." + }, + "use_path_style_endpoint": { + "type": "boolean", + "description": "Use path-style URLs (endpoint/bucket). Set to false for providers that only accept virtual-hosted-style URLs (bucket.endpoint), such as Alibaba Cloud OSS." + }, + "skip_tls_verification": { + "type": "boolean", + "description": "S3 only. Do not check the TLS certificate of the endpoint. Use only for endpoints with a self-signed or private CA certificate. Default: false." + }, + "key": { + "type": "string", + "description": "S3: the access key. Other types: the username." + }, + "secret": { + "type": "string", + "description": "S3: the secret key. Other types: the password. SFTP: sending a password switches the login to the password." + }, + "private_key_uuid": { + "type": "string", + "nullable": true, + "description": "SFTP only: the UUID of a private key of your team to log in with. Null switches the login to the saved password." + }, + "is_usable": { + "type": "boolean", + "description": "Whether the storage is marked usable." + } + }, + "type": "object" + } + } + } + }, "responses": { "200": { - "description": "Updated webhook notification settings." - }, - "400": { - "$ref": "#/components/responses/400" + "description": "S3 storage updated.", + "content": { + "application/json": { + "schema": { + "properties": { + "uuid": { + "type": "string" + } + }, + "type": "object" + } + } + } }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "Forbidden." + "404": { + "$ref": "#/components/responses/404" }, "422": { "$ref": "#/components/responses/422" @@ -13802,28 +17006,51 @@ ] } }, - "/version": { - "get": { - "summary": "Version", - "description": "Get Coolify version.", - "operationId": "version", + "/s3-storages/{uuid}/validate": { + "post": { + "tags": [ + "S3 Storages" + ], + "summary": "Validate S3 Storage", + "description": "Validate a storage connection. S3: lists the bucket (ListObjectsV2). SFTP, FTPS, and WebDAV: lists the backup directory; for SFTP, the first successful validation pins the host key of the server.", + "operationId": "validate-s3-storage-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "S3 Storage UUID", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "Returns the version of the application", + "description": "S3 storage validation result.", "content": { - "text/html": { + "application/json": { "schema": { - "type": "string" - }, - "example": "v4.0.0" + "properties": { + "valid": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "S3 storage connection is valid." + } + }, + "type": "object" + } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -13833,101 +17060,143 @@ ] } }, - "/disable": { - "post": { - "summary": "Disable API", - "description": "Disable API (only with root permissions).", - "operationId": "disable-api", + "/applications/{uuid}/scheduled-tasks": { + "get": { + "tags": [ + "Scheduled Tasks" + ], + "summary": "List Tasks", + "description": "List all scheduled tasks for an application.", + "operationId": "list-scheduled-tasks-by-application-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "Disable API.", + "description": "Get all scheduled tasks for an application.", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string", - "example": "API disabled." - } - }, - "type": "object" + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduledTask" + } } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "You are not allowed to disable the API.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "You are not allowed to disable the API." - } + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Scheduled Tasks" + ], + "summary": "Create Task", + "description": "Create a new scheduled task for an application.", + "operationId": "create-scheduled-task-by-application-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Scheduled task data", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "name", + "command", + "frequency" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the scheduled task." + }, + "command": { + "type": "string", + "description": "The command to execute." + }, + "frequency": { + "type": "string", + "description": "The frequency of the scheduled task." + }, + "container": { + "type": "string", + "nullable": true, + "description": "The container where the command should be executed." + }, + "timeout": { + "type": "integer", + "description": "The timeout of the scheduled task in seconds.", + "default": 300, + "maximum": 36000 + }, + "use_shell": { + "type": "boolean", + "description": "Run the command with `sh -c` in the container. Set it to false for containers without a shell: the command is then split into arguments and run directly, without shell features such as variables, pipes, or redirects.", + "default": true }, - "type": "object" - } + "enabled": { + "type": "boolean", + "description": "The flag to indicate if the scheduled task is enabled. An enabled task requires the deploy ability.", + "default": true + } + }, + "type": "object" } } } }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/mcp/enable": { - "post": { - "summary": "Enable MCP Server", - "description": "Enable the MCP server endpoint at /mcp (only with root permissions).", - "operationId": "enable-mcp", "responses": { - "200": { - "description": "MCP server enabled.", + "201": { + "description": "Scheduled task created.", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string", - "example": "MCP server enabled." - } - }, - "type": "object" + "$ref": "#/components/schemas/ScheduledTask" } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, "403": { - "description": "You are not allowed to enable the MCP server.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "You are not allowed to enable the MCP server." - } - }, - "type": "object" - } - } - } + "description": "The token needs the deploy ability for an enabled task." + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -13937,21 +17206,44 @@ ] } }, - "/mcp/disable": { - "post": { - "summary": "Disable MCP Server", - "description": "Disable the MCP server endpoint at /mcp (only with root permissions).", - "operationId": "disable-mcp", + "/applications/{uuid}/scheduled-tasks/{task_uuid}": { + "delete": { + "tags": [ + "Scheduled Tasks" + ], + "summary": "Delete Task", + "description": "Delete a scheduled task for an application.", + "operationId": "delete-scheduled-task-by-application-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "task_uuid", + "in": "path", + "description": "UUID of the scheduled task.", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "MCP server disabled.", + "description": "Scheduled task deleted.", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", - "example": "MCP server disabled." + "example": "Scheduled task deleted." } }, "type": "object" @@ -13959,27 +17251,11 @@ } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "You are not allowed to disable the MCP server.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "You are not allowed to disable the MCP server." - } - }, - "type": "object" - } - } - } + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -13987,78 +17263,36 @@ "bearerAuth": [] } ] - } - }, - "/health": { - "get": { - "summary": "Healthcheck", - "description": "Healthcheck endpoint.", - "operationId": "healthcheck", - "responses": { - "200": { - "description": "Healthcheck endpoint.", - "content": { - "text/html": { - "schema": { - "type": "string" - }, - "example": "OK" - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - } - } - } - }, - "/projects": { - "get": { + }, + "patch": { "tags": [ - "Projects" + "Scheduled Tasks" ], - "summary": "List", - "description": "List projects.", - "operationId": "list-projects", - "responses": { - "200": { - "description": "Get all projects.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Project" - } - } - } + "summary": "Update Task", + "description": "Update a scheduled task for an application.", + "operationId": "update-scheduled-task-by-application-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" } }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - } - }, - "security": [ { - "bearerAuth": [] + "name": "task_uuid", + "in": "path", + "description": "UUID of the scheduled task.", + "required": true, + "schema": { + "type": "string" + } } - ] - }, - "post": { - "tags": [ - "Projects" ], - "summary": "Create", - "description": "Create Project.", - "operationId": "create-project", "requestBody": { - "description": "Project created.", + "description": "Scheduled task data", "required": true, "content": { "application/json": { @@ -14066,11 +17300,36 @@ "properties": { "name": { "type": "string", - "description": "The name of the project." + "description": "The name of the scheduled task." }, - "description": { + "command": { "type": "string", - "description": "The description of the project." + "description": "The command to execute." + }, + "frequency": { + "type": "string", + "description": "The frequency of the scheduled task." + }, + "container": { + "type": "string", + "nullable": true, + "description": "The container where the command should be executed." + }, + "timeout": { + "type": "integer", + "description": "The timeout of the scheduled task in seconds.", + "default": 300, + "maximum": 36000 + }, + "use_shell": { + "type": "boolean", + "description": "Run the command with `sh -c` in the container. Set it to false for containers without a shell: the command is then split into arguments and run directly, without shell features such as variables, pipes, or redirects.", + "default": true + }, + "enabled": { + "type": "boolean", + "description": "The flag to indicate if the scheduled task is enabled. An enabled task requires the deploy ability.", + "default": true } }, "type": "object" @@ -14079,29 +17338,22 @@ } }, "responses": { - "201": { - "description": "Project created.", + "200": { + "description": "Scheduled task updated.", "content": { "application/json": { "schema": { - "properties": { - "uuid": { - "type": "string", - "example": "og888os", - "description": "The UUID of the project." - } - }, - "type": "object" + "$ref": "#/components/schemas/ScheduledTask" } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the deploy ability for an enabled task." + }, "404": { "$ref": "#/components/responses/404" }, @@ -14116,19 +17368,28 @@ ] } }, - "/projects/{uuid}": { + "/applications/{uuid}/scheduled-tasks/{task_uuid}/executions": { "get": { "tags": [ - "Projects" + "Scheduled Tasks" ], - "summary": "Get", - "description": "Get project by UUID.", - "operationId": "get-project-by-uuid", + "summary": "List Executions", + "description": "List all executions for a scheduled task on an application.", + "operationId": "list-scheduled-task-executions-by-application-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "Project UUID", + "description": "UUID of the application.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "task_uuid", + "in": "path", + "description": "UUID of the scheduled task.", "required": true, "schema": { "type": "string" @@ -14137,23 +17398,23 @@ ], "responses": { "200": { - "description": "Project details", + "description": "Get all executions for a scheduled task.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Project" + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduledTaskExecution" + } } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, "404": { - "description": "Project not found." + "$ref": "#/components/responses/404" } }, "security": [ @@ -14161,19 +17422,21 @@ "bearerAuth": [] } ] - }, - "delete": { + } + }, + "/services/{uuid}/scheduled-tasks": { + "get": { "tags": [ - "Projects" + "Scheduled Tasks" ], - "summary": "Delete", - "description": "Delete project by UUID.", - "operationId": "delete-project-by-uuid", + "summary": "List Tasks", + "description": "List all scheduled tasks for a service.", + "operationId": "list-scheduled-tasks-by-service-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the application.", + "description": "UUID of the service.", "required": true, "schema": { "type": "string" @@ -14182,32 +17445,23 @@ ], "responses": { "200": { - "description": "Project deleted.", + "description": "Get all scheduled tasks for a service.", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string", - "example": "Project deleted." - } - }, - "type": "object" + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduledTask" + } } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -14216,18 +17470,18 @@ } ] }, - "patch": { + "post": { "tags": [ - "Projects" + "Scheduled Tasks" ], - "summary": "Update", - "description": "Update Project.", - "operationId": "update-project-by-uuid", + "summary": "Create Task", + "description": "Create a new scheduled task for a service.", + "operationId": "create-scheduled-task-by-service-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the project.", + "description": "UUID of the service.", "required": true, "schema": { "type": "string" @@ -14235,19 +17489,49 @@ } ], "requestBody": { - "description": "Project updated.", + "description": "Scheduled task data", "required": true, "content": { "application/json": { "schema": { + "required": [ + "name", + "command", + "frequency" + ], "properties": { "name": { "type": "string", - "description": "The name of the project." + "description": "The name of the scheduled task." }, - "description": { + "command": { "type": "string", - "description": "The description of the project." + "description": "The command to execute." + }, + "frequency": { + "type": "string", + "description": "The frequency of the scheduled task." + }, + "container": { + "type": "string", + "nullable": true, + "description": "The container where the command should be executed." + }, + "timeout": { + "type": "integer", + "description": "The timeout of the scheduled task in seconds.", + "default": 300, + "maximum": 36000 + }, + "use_shell": { + "type": "boolean", + "description": "Run the command with `sh -c` in the container. Set it to false for containers without a shell: the command is then split into arguments and run directly, without shell features such as variables, pipes, or redirects.", + "default": true + }, + "enabled": { + "type": "boolean", + "description": "The flag to indicate if the scheduled task is enabled. An enabled task requires the deploy ability.", + "default": true } }, "type": "object" @@ -14257,35 +17541,21 @@ }, "responses": { "201": { - "description": "Project updated.", + "description": "Scheduled task created.", "content": { "application/json": { "schema": { - "properties": { - "uuid": { - "type": "string", - "example": "og888os" - }, - "name": { - "type": "string", - "example": "Project Name" - }, - "description": { - "type": "string", - "example": "Project Description" - } - }, - "type": "object" + "$ref": "#/components/schemas/ScheduledTask" } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the deploy ability for an enabled task." + }, "404": { "$ref": "#/components/responses/404" }, @@ -14300,28 +17570,28 @@ ] } }, - "/projects/{uuid}/{environment_name_or_uuid}": { - "get": { + "/services/{uuid}/scheduled-tasks/{task_uuid}": { + "delete": { "tags": [ - "Projects" + "Scheduled Tasks" ], - "summary": "Environment", - "description": "Get environment by name or UUID.", - "operationId": "get-environment-by-name-or-uuid", + "summary": "Delete Task", + "description": "Delete a scheduled task for a service.", + "operationId": "delete-scheduled-task-by-service-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "Project UUID", + "description": "UUID of the service.", "required": true, "schema": { "type": "string" } }, { - "name": "environment_name_or_uuid", + "name": "task_uuid", "in": "path", - "description": "Environment name or UUID", + "description": "UUID of the scheduled task.", "required": true, "schema": { "type": "string" @@ -14330,26 +17600,26 @@ ], "responses": { "200": { - "description": "Environment details", + "description": "Scheduled task deleted.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Environment" + "properties": { + "message": { + "type": "string", + "example": "Scheduled task deleted." + } + }, + "type": "object" } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -14357,72 +17627,28 @@ "bearerAuth": [] } ] - } - }, - "/projects/{uuid}/environments": { - "get": { + }, + "patch": { "tags": [ - "Projects" + "Scheduled Tasks" ], - "summary": "List Environments", - "description": "List all environments in a project.", - "operationId": "get-environments", + "summary": "Update Task", + "description": "Update a scheduled task for a service.", + "operationId": "update-scheduled-task-by-service-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "Project UUID", + "description": "UUID of the service.", "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "List of environments", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Environment" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" }, - "401": { - "$ref": "#/components/responses/401" - }, - "404": { - "description": "Project not found." - }, - "422": { - "$ref": "#/components/responses/422" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - }, - "post": { - "tags": [ - "Projects" - ], - "summary": "Create Environment", - "description": "Create environment in project.", - "operationId": "create-environment", - "parameters": [ { - "name": "uuid", + "name": "task_uuid", "in": "path", - "description": "Project UUID", + "description": "UUID of the scheduled task.", "required": true, "schema": { "type": "string" @@ -14430,7 +17656,7 @@ } ], "requestBody": { - "description": "Environment created.", + "description": "Scheduled task data", "required": true, "content": { "application/json": { @@ -14438,7 +17664,36 @@ "properties": { "name": { "type": "string", - "description": "The name of the environment." + "description": "The name of the scheduled task." + }, + "command": { + "type": "string", + "description": "The command to execute." + }, + "frequency": { + "type": "string", + "description": "The frequency of the scheduled task." + }, + "container": { + "type": "string", + "nullable": true, + "description": "The container where the command should be executed." + }, + "timeout": { + "type": "integer", + "description": "The timeout of the scheduled task in seconds.", + "default": 300, + "maximum": 36000 + }, + "use_shell": { + "type": "boolean", + "description": "Run the command with `sh -c` in the container. Set it to false for containers without a shell: the command is then split into arguments and run directly, without shell features such as variables, pipes, or redirects.", + "default": true + }, + "enabled": { + "type": "boolean", + "description": "The flag to indicate if the scheduled task is enabled. An enabled task requires the deploy ability.", + "default": true } }, "type": "object" @@ -14447,34 +17702,24 @@ } }, "responses": { - "201": { - "description": "Environment created.", + "200": { + "description": "Scheduled task updated.", "content": { "application/json": { "schema": { - "properties": { - "uuid": { - "type": "string", - "example": "env123", - "description": "The UUID of the environment." - } - }, - "type": "object" + "$ref": "#/components/schemas/ScheduledTask" } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "description": "Project not found." + "403": { + "description": "The token needs the deploy ability for an enabled task." }, - "409": { - "description": "Environment with this name already exists." + "404": { + "$ref": "#/components/responses/404" }, "422": { "$ref": "#/components/responses/422" @@ -14487,28 +17732,28 @@ ] } }, - "/projects/{uuid}/environments/{environment_name_or_uuid}": { - "delete": { + "/services/{uuid}/scheduled-tasks/{task_uuid}/executions": { + "get": { "tags": [ - "Projects" + "Scheduled Tasks" ], - "summary": "Delete Environment", - "description": "Delete environment by name or UUID. Environment must be empty.", - "operationId": "delete-environment", + "summary": "List Executions", + "description": "List all executions for a scheduled task on a service.", + "operationId": "list-scheduled-task-executions-by-service-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "Project UUID", + "description": "UUID of the service.", "required": true, "schema": { "type": "string" } }, { - "name": "environment_name_or_uuid", + "name": "task_uuid", "in": "path", - "description": "Environment name or UUID", + "description": "UUID of the scheduled task.", "required": true, "schema": { "type": "string" @@ -14517,32 +17762,23 @@ ], "responses": { "200": { - "description": "Environment deleted.", + "description": "Get all executions for a scheduled task.", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string", - "example": "Environment deleted." - } - }, - "type": "object" + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduledTaskExecution" + } } } } }, - "400": { - "description": "Environment has resources, so it cannot be deleted." - }, "401": { "$ref": "#/components/responses/401" }, "404": { - "description": "Project or environment not found." - }, - "422": { - "$ref": "#/components/responses/422" + "$ref": "#/components/responses/404" } }, "security": [ @@ -14550,94 +17786,97 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/applications/{uuid}/scheduled-tasks/{task_uuid}/execute": { + "post": { "tags": [ - "Projects" + "Scheduled Tasks" ], - "summary": "Update Environment", - "description": "Update environment by name or UUID within a project.", - "operationId": "update-environment", + "summary": "Execute Task", + "description": "Queue immediate execution of a scheduled task for an application. Requires the deploy ability.", + "operationId": "execute-scheduled-task-by-application-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "Project UUID", + "description": "UUID of the application.", "required": true, "schema": { "type": "string" } }, { - "name": "environment_name_or_uuid", + "name": "task_uuid", "in": "path", - "description": "Environment name or UUID", + "description": "UUID of the scheduled task.", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "description": "Environment fields to update.", - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "name": { - "type": "string", - "description": "The name of the environment." - }, - "description": { - "type": "string", - "description": "The description of the environment." - } - }, - "type": "object" - } - } - } - }, "responses": { "200": { - "description": "Environment updated.", - "content": { - "application/json": { - "schema": { - "properties": { - "uuid": { - "type": "string", - "example": "env123" - }, - "name": { - "type": "string", - "example": "staging" - }, - "description": { - "type": "string", - "example": "Staging environment" - } - }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "description": "Scheduled task execution queued." }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the deploy ability." + }, "404": { - "description": "Project or environment not found." + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/services/{uuid}/scheduled-tasks/{task_uuid}/execute": { + "post": { + "tags": [ + "Scheduled Tasks" + ], + "summary": "Execute Task", + "description": "Queue immediate execution of a scheduled task for a service. Requires the deploy ability.", + "operationId": "execute-scheduled-task-by-service-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the service.", + "required": true, + "schema": { + "type": "string" + } }, - "409": { - "description": "Environment with this name already exists." + { + "name": "task_uuid", + "in": "path", + "description": "UUID of the scheduled task.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Scheduled task execution queued." }, - "422": { - "$ref": "#/components/responses/422" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "The token needs the deploy ability." + }, + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -14647,67 +17886,58 @@ ] } }, - "/resources": { + "/{resource_type}/{uuid}/secret-manager": { "get": { "tags": [ - "Resources" + "Secret Managers" ], - "summary": "List", - "description": "Get all resources.", - "operationId": "list-resources", - "responses": { - "200": { - "description": "Get all applications, services and standalone databases. The other fields of each resource are the fields of the Application, Service or Database schema.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "properties": { - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": [ - "string", - "null" - ] - }, - "type": { - "description": "application, service, or standalone- for databases (for example standalone-postgresql).", - "type": "string" - }, - "status": { - "description": "For example running:healthy or exited:unhealthy.", - "type": "string" - }, - "environment_id": { - "type": "integer" - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - } - }, - "type": "object", - "additionalProperties": true - } + "summary": "Get Secret Manager Source", + "description": "The secret manager source of an application, service, or database, and the secret manager tokens of its team that can be linked.", + "operationId": "get-secret-manager-source", + "parameters": [ + { + "name": "resource_type", + "in": "path", + "description": "Resource type.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "applications", + "services", + "databases" + ] + } + }, + { + "name": "uuid", + "in": "path", + "description": "Resource UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Secret manager source.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SecretManagerSource" } } } }, - "400": { - "$ref": "#/components/responses/400" - }, "401": { "$ref": "#/components/responses/401" + }, + "403": { + "description": "No access to the resource." + }, + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -14715,71 +17945,51 @@ "bearerAuth": [] } ] - } - }, - "/s3-storages": { - "get": { + }, + "delete": { "tags": [ - "S3 Storages" + "Secret Managers" ], - "summary": "List S3 Storages", - "description": "List all S3 storages for the authenticated team.", - "operationId": "list-s3-storages", - "responses": { - "200": { - "description": "Get all S3 storages.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "properties": { - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string", - "nullable": true - }, - "endpoint": { - "type": "string" - }, - "bucket": { - "type": "string" - }, - "region": { - "type": "string" - }, - "use_path_style_endpoint": { - "type": "boolean" - }, - "is_usable": { - "type": "boolean" - }, - "team_id": { - "type": "integer" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } - }, - "type": "object" - } - } - } + "summary": "Remove Secret Manager Source", + "description": "Remove the secret manager source. Existing {{vault.*}} variables stay and fail the next deployment until they are removed.", + "operationId": "remove-secret-manager-source", + "parameters": [ + { + "name": "resource_type", + "in": "path", + "description": "Resource type.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "applications", + "services", + "databases" + ] } }, - "400": { - "$ref": "#/components/responses/400" + { + "name": "uuid", + "in": "path", + "description": "Resource UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Source removed." }, "401": { "$ref": "#/components/responses/401" + }, + "403": { + "description": "No write access to the resource." + }, + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -14788,68 +17998,53 @@ } ] }, - "post": { + "patch": { "tags": [ - "S3 Storages" + "Secret Managers" + ], + "summary": "Set Secret Manager Source", + "description": "Link a secret manager token of the team to an application, service, or database, or change the token or settings of the link. References resolve at the next deployment.", + "operationId": "set-secret-manager-source", + "parameters": [ + { + "name": "resource_type", + "in": "path", + "description": "Resource type.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "applications", + "services", + "databases" + ] + } + }, + { + "name": "uuid", + "in": "path", + "description": "Resource UUID.", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Create S3 Storage", - "description": "Create a new S3 storage configuration for the authenticated team.", - "operationId": "create-s3-storage", "requestBody": { - "description": "S3 storage details", "required": true, "content": { "application/json": { "schema": { "required": [ - "name", - "endpoint", - "bucket", - "region", - "key", - "secret" + "integration_token_uuid" ], "properties": { - "name": { - "type": "string", - "example": "My S3 Storage", - "description": "A friendly name for the storage." - }, - "description": { - "type": "string", - "nullable": true, - "description": "Optional description." - }, - "endpoint": { - "type": "string", - "example": "https://s3.us-east-1.amazonaws.com", - "description": "S3-compatible endpoint URL." - }, - "bucket": { - "type": "string", - "example": "my-bucket", - "description": "S3 bucket name." - }, - "region": { - "type": "string", - "example": "us-east-1", - "description": "S3 region." - }, - "use_path_style_endpoint": { - "type": "boolean", - "description": "Use path-style URLs (endpoint/bucket). Set to false for providers that only accept virtual-hosted-style URLs (bucket.endpoint). Default: false for Alibaba Cloud OSS, Tencent Cloud COS, and Volcengine TOS endpoints, true for all other endpoints." - }, - "key": { - "type": "string", - "description": "Access key." - }, - "secret": { - "type": "string", - "description": "Secret key." + "integration_token_uuid": { + "type": "string" }, - "is_usable": { - "type": "boolean", - "description": "Whether the storage is marked usable." + "settings": { + "description": "Doppler service account: project, config. Infisical: project_id, environment, secret_path. Vault: mount, path.", + "type": "object" } }, "type": "object" @@ -14858,29 +18053,18 @@ } }, "responses": { - "201": { - "description": "S3 storage created.", - "content": { - "application/json": { - "schema": { - "properties": { - "uuid": { - "type": "string", - "example": "og888os", - "description": "The UUID of the S3 storage." - } - }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "200": { + "description": "Secret manager configured." }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "No write access to the resource." + }, + "404": { + "$ref": "#/components/responses/404" + }, "422": { "$ref": "#/components/responses/422" } @@ -14892,77 +18076,60 @@ ] } }, - "/s3-storages/{uuid}": { - "get": { + "/applications/{uuid}/secret-manager": { + "patch": { "tags": [ - "S3 Storages" - ], - "summary": "Get S3 Storage", - "description": "Get S3 storage by UUID.", - "operationId": "get-s3-storage-by-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "S3 Storage UUID", - "required": true, - "schema": { - "type": "string" - } - } + "Secret Managers" ], - "responses": { - "200": { - "description": "Get S3 storage by UUID", - "content": { - "application/json": { - "schema": { - "properties": { - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string", - "nullable": true - }, - "endpoint": { - "type": "string" - }, - "bucket": { - "type": "string" - }, - "region": { - "type": "string" - }, - "use_path_style_endpoint": { - "type": "boolean" - }, - "is_usable": { - "type": "boolean" - }, - "team_id": { - "type": "integer" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } + "summary": "Configure Application Secret Manager", + "description": "Configure the secret manager source used by an application. Same as Set Secret Manager Source with resource_type applications.", + "operationId": "configure-application-secret-manager", + "parameters": [ + { + "name": "uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "integration_token_uuid" + ], + "properties": { + "integration_token_uuid": { + "type": "string" }, - "type": "object" - } + "settings": { + "type": "object" + } + }, + "type": "object" } } + } + }, + "responses": { + "200": { + "description": "Secret manager configured." }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "No write access to the resource." + }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -14970,19 +18137,35 @@ "bearerAuth": [] } ] - }, - "delete": { + } + }, + "/{resource_type}/{uuid}/secret-manager/keys": { + "get": { "tags": [ - "S3 Storages" + "Secret Managers" ], - "summary": "Delete S3 Storage", - "description": "Delete S3 storage by UUID.", - "operationId": "delete-s3-storage-by-uuid", + "summary": "List Secret Manager Keys", + "description": "Key names of the secrets in the linked source. Values are never returned. Requires write access, like the resource page, because the stored secret is sent to the secret manager.", + "operationId": "list-secret-manager-keys", "parameters": [ + { + "name": "resource_type", + "in": "path", + "description": "Resource type.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "applications", + "services", + "databases" + ] + } + }, { "name": "uuid", "in": "path", - "description": "UUID of the S3 storage.", + "description": "Resource UUID.", "required": true, "schema": { "type": "string" @@ -14991,14 +18174,16 @@ ], "responses": { "200": { - "description": "S3 storage deleted.", + "description": "Key names.", "content": { "application/json": { "schema": { "properties": { - "message": { - "type": "string", - "example": "S3 storage deleted." + "keys": { + "type": "array", + "items": { + "type": "string" + } } }, "type": "object" @@ -15006,9 +18191,15 @@ } } }, + "400": { + "description": "The secret manager did not return the keys." + }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "No write access to the resource." + }, "404": { "$ref": "#/components/responses/404" } @@ -15018,19 +18209,35 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/{resource_type}/{uuid}/secret-manager/references": { + "post": { "tags": [ - "S3 Storages" + "Secret Managers" ], - "summary": "Update S3 Storage", - "description": "Update S3 storage by UUID.", - "operationId": "update-s3-storage-by-uuid", + "summary": "Add Secret Manager Reference", + "description": "Add a {{vault.KEY}} environment variable for one key of the linked source.", + "operationId": "add-secret-manager-reference", "parameters": [ + { + "name": "resource_type", + "in": "path", + "description": "Resource type.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "applications", + "services", + "databases" + ] + } + }, { "name": "uuid", "in": "path", - "description": "S3 Storage UUID", + "description": "Resource UUID.", "required": true, "schema": { "type": "string" @@ -15038,48 +18245,16 @@ } ], "requestBody": { - "description": "S3 storage fields to update.", "required": true, "content": { "application/json": { "schema": { + "required": [ + "key" + ], "properties": { - "name": { - "type": "string", - "description": "A friendly name for the storage." - }, - "description": { - "type": "string", - "nullable": true, - "description": "Optional description." - }, - "endpoint": { - "type": "string", - "description": "S3-compatible endpoint URL." - }, - "bucket": { - "type": "string", - "description": "S3 bucket name." - }, - "region": { - "type": "string", - "description": "S3 region." - }, - "use_path_style_endpoint": { - "type": "boolean", - "description": "Use path-style URLs (endpoint/bucket). Set to false for providers that only accept virtual-hosted-style URLs (bucket.endpoint), such as Alibaba Cloud OSS." - }, "key": { - "type": "string", - "description": "Access key." - }, - "secret": { - "type": "string", - "description": "Secret key." - }, - "is_usable": { - "type": "boolean", - "description": "Whether the storage is marked usable." + "type": "string" } }, "type": "object" @@ -15088,29 +18263,23 @@ } }, "responses": { - "200": { - "description": "S3 storage updated.", - "content": { - "application/json": { - "schema": { - "properties": { - "uuid": { - "type": "string" - } - }, - "type": "object" - } - } - } + "201": { + "description": "Variable added." + }, + "400": { + "description": "The secret manager did not return the keys." }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "No write access to the resource." + }, "404": { "$ref": "#/components/responses/404" }, "422": { - "$ref": "#/components/responses/422" + "description": "Not a key of the source, not a valid variable name, or the variable exists." } }, "security": [ @@ -15120,19 +18289,33 @@ ] } }, - "/s3-storages/{uuid}/validate": { + "/{resource_type}/{uuid}/secret-manager/import": { "post": { "tags": [ - "S3 Storages" + "Secret Managers" ], - "summary": "Validate S3 Storage", - "description": "Validate an S3 storage connection using ListObjectsV2.", - "operationId": "validate-s3-storage-by-uuid", + "summary": "Import Secret Manager References", + "description": "Add a {{vault.KEY}} environment variable for every key of the linked source that has no variable yet. Keys that are not valid variable names are skipped.", + "operationId": "import-secret-manager-references", "parameters": [ + { + "name": "resource_type", + "in": "path", + "description": "Resource type.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "applications", + "services", + "databases" + ] + } + }, { "name": "uuid", "in": "path", - "description": "S3 Storage UUID", + "description": "Resource UUID.", "required": true, "schema": { "type": "string" @@ -15141,18 +18324,22 @@ ], "responses": { "200": { - "description": "S3 storage validation result.", + "description": "Import result.", "content": { "application/json": { "schema": { "properties": { - "valid": { - "type": "boolean", - "example": true + "imported": { + "type": "array", + "items": { + "type": "string" + } }, - "message": { - "type": "string", - "example": "S3 storage connection is valid." + "skipped": { + "type": "array", + "items": { + "type": "string" + } } }, "type": "object" @@ -15160,9 +18347,15 @@ } } }, + "400": { + "description": "The secret manager did not return the keys." + }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "No write access to the resource." + }, "404": { "$ref": "#/components/responses/404" } @@ -15174,44 +18367,33 @@ ] } }, - "/applications/{uuid}/scheduled-tasks": { + "/security/keys": { "get": { "tags": [ - "Scheduled Tasks" - ], - "summary": "List Tasks", - "description": "List all scheduled tasks for an application.", - "operationId": "list-scheduled-tasks-by-application-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the application.", - "required": true, - "schema": { - "type": "string" - } - } + "Private Keys" ], + "summary": "List", + "description": "List all private keys.", + "operationId": "list-private-keys", "responses": { "200": { - "description": "Get all scheduled tasks for an application.", + "description": "Get all private keys.", "content": { "application/json": { "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/ScheduledTask" + "$ref": "#/components/schemas/PrivateKey" } } } } }, + "400": { + "$ref": "#/components/responses/400" + }, "401": { "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" } }, "security": [ @@ -15222,88 +18404,58 @@ }, "post": { "tags": [ - "Scheduled Tasks" - ], - "summary": "Create Task", - "description": "Create a new scheduled task for an application.", - "operationId": "create-scheduled-task-by-application-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the application.", - "required": true, - "schema": { - "type": "string" - } - } + "Private Keys" ], + "summary": "Create", + "description": "Create a new private key.", + "operationId": "create-private-key", "requestBody": { - "description": "Scheduled task data", "required": true, "content": { "application/json": { "schema": { "required": [ - "name", - "command", - "frequency" + "private_key" ], "properties": { "name": { - "type": "string", - "description": "The name of the scheduled task." - }, - "command": { - "type": "string", - "description": "The command to execute." - }, - "frequency": { - "type": "string", - "description": "The frequency of the scheduled task." - }, - "container": { - "type": "string", - "nullable": true, - "description": "The container where the command should be executed." - }, - "timeout": { - "type": "integer", - "description": "The timeout of the scheduled task in seconds.", - "default": 300, - "maximum": 36000 + "type": "string" }, - "enabled": { - "type": "boolean", - "description": "The flag to indicate if the scheduled task is enabled. An enabled task requires the deploy ability.", - "default": true + "description": { + "type": "string" + }, + "private_key": { + "type": "string" } }, - "type": "object" + "type": "object", + "additionalProperties": false } } } }, "responses": { "201": { - "description": "Scheduled task created.", + "description": "The created private key's UUID.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ScheduledTask" + "properties": { + "uuid": { + "type": "string" + } + }, + "type": "object" } } } }, + "400": { + "$ref": "#/components/responses/400" + }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the deploy ability for an enabled task." - }, - "404": { - "$ref": "#/components/responses/404" - }, "422": { "$ref": "#/components/responses/422" } @@ -15315,28 +18467,64 @@ ] } }, - "/applications/{uuid}/scheduled-tasks/{task_uuid}": { - "delete": { + "/security/keys/{uuid}": { + "get": { "tags": [ - "Scheduled Tasks" + "Private Keys" ], - "summary": "Delete Task", - "description": "Delete a scheduled task for an application.", - "operationId": "delete-scheduled-task-by-application-uuid", + "summary": "Get", + "description": "Get key by UUID.", + "operationId": "get-private-key-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the application.", + "description": "Private Key UUID", "required": true, "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Get all private keys.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrivateKey" + } + } + } }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "description": "Private Key not found." + } + }, + "security": [ { - "name": "task_uuid", + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": [ + "Private Keys" + ], + "summary": "Delete", + "description": "Delete a private key.", + "operationId": "delete-private-key-by-uuid", + "parameters": [ + { + "name": "uuid", "in": "path", - "description": "UUID of the scheduled task.", + "description": "Private Key UUID", "required": true, "schema": { "type": "string" @@ -15345,14 +18533,14 @@ ], "responses": { "200": { - "description": "Scheduled task deleted.", + "description": "Private Key deleted.", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", - "example": "Scheduled task deleted." + "example": "Private Key deleted." } }, "type": "object" @@ -15360,11 +18548,30 @@ } } }, + "400": { + "$ref": "#/components/responses/400" + }, "401": { "$ref": "#/components/responses/401" }, "404": { - "$ref": "#/components/responses/404" + "description": "Private Key not found." + }, + "422": { + "description": "Private Key is in use and cannot be deleted.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Private Key is in use and cannot be deleted." + } + }, + "type": "object" + } + } + } } }, "security": [ @@ -15375,25 +18582,16 @@ }, "patch": { "tags": [ - "Scheduled Tasks" + "Private Keys" ], - "summary": "Update Task", - "description": "Update a scheduled task for an application.", - "operationId": "update-scheduled-task-by-application-uuid", + "summary": "Update", + "description": "Update a private key.", + "operationId": "update-private-key", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the application.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "task_uuid", - "in": "path", - "description": "UUID of the scheduled task.", + "description": "Private Key UUID", "required": true, "schema": { "type": "string" @@ -15401,65 +18599,51 @@ } ], "requestBody": { - "description": "Scheduled task data", "required": true, "content": { "application/json": { "schema": { "properties": { "name": { - "type": "string", - "description": "The name of the scheduled task." - }, - "command": { - "type": "string", - "description": "The command to execute." - }, - "frequency": { - "type": "string", - "description": "The frequency of the scheduled task." - }, - "container": { - "type": "string", - "nullable": true, - "description": "The container where the command should be executed." + "type": "string" }, - "timeout": { - "type": "integer", - "description": "The timeout of the scheduled task in seconds.", - "default": 300, - "maximum": 36000 + "description": { + "type": "string" }, - "enabled": { - "type": "boolean", - "description": "The flag to indicate if the scheduled task is enabled. An enabled task requires the deploy ability.", - "default": true + "private_key": { + "type": "string" } }, - "type": "object" + "type": "object", + "additionalProperties": false } } } }, "responses": { - "200": { - "description": "Scheduled task updated.", + "201": { + "description": "The updated private key's UUID.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ScheduledTask" + "properties": { + "uuid": { + "type": "string" + } + }, + "type": "object" } } } }, + "400": { + "$ref": "#/components/responses/400" + }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the deploy ability for an enabled task." - }, "404": { - "$ref": "#/components/responses/404" + "description": "Private Key not found." }, "422": { "$ref": "#/components/responses/422" @@ -15472,53 +18656,114 @@ ] } }, - "/applications/{uuid}/scheduled-tasks/{task_uuid}/executions": { + "/servers/{uuid}/cloudflare-tunnel": { "get": { "tags": [ - "Scheduled Tasks" + "Servers" ], - "summary": "List Executions", - "description": "List all executions for a scheduled task on an application.", - "operationId": "list-scheduled-task-executions-by-application-uuid", + "summary": "Get Cloudflare Tunnel settings", + "description": "Get Cloudflare Tunnel settings for a server owned by the authenticated team.", + "operationId": "get-server-cloudflare-tunnel", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the application.", + "description": "Server UUID", "required": true, "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Cloudflare Tunnel settings.", + "content": { + "application/json": { + "schema": { + "properties": { + "is_cloudflare_tunnel": { + "type": "boolean" + }, + "ip": { + "type": "string" + }, + "ip_previous": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ { - "name": "task_uuid", + "bearerAuth": [] + } + ] + }, + "patch": { + "tags": [ + "Servers" + ], + "summary": "Update Cloudflare Tunnel settings", + "description": "Update stored Cloudflare Tunnel settings for a server. Does not run remote cloudflared configuration; use enable/disable for the manual UI actions.", + "operationId": "update-server-cloudflare-tunnel", + "parameters": [ + { + "name": "uuid", "in": "path", - "description": "UUID of the scheduled task.", + "description": "Server UUID", "required": true, "schema": { "type": "string" } } - ], + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "is_cloudflare_tunnel": { + "type": "boolean" + } + }, + "type": "object" + } + } + } + }, "responses": { "200": { - "description": "Get all executions for a scheduled task.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScheduledTaskExecution" - } - } - } - } + "description": "Updated Cloudflare Tunnel settings." + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -15528,19 +18773,19 @@ ] } }, - "/services/{uuid}/scheduled-tasks": { - "get": { + "/servers/{uuid}/cloudflare-tunnel/enable": { + "post": { "tags": [ - "Scheduled Tasks" + "Servers" ], - "summary": "List Tasks", - "description": "List all scheduled tasks for a service.", - "operationId": "list-scheduled-tasks-by-service-uuid", + "summary": "Enable Cloudflare Tunnel (manual)", + "description": "Manually mark Cloudflare Tunnel as enabled for a server (matches UI manual enable). Does not deploy cloudflared remotely.", + "operationId": "enable-server-cloudflare-tunnel", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the service.", + "description": "Server UUID", "required": true, "schema": { "type": "string" @@ -15549,23 +18794,19 @@ ], "responses": { "200": { - "description": "Get all scheduled tasks for a service.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScheduledTask" - } - } - } - } + "description": "Cloudflare Tunnel enabled." + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -15573,88 +18814,37 @@ "bearerAuth": [] } ] - }, + } + }, + "/servers/{uuid}/cloudflare-tunnel/disable": { "post": { "tags": [ - "Scheduled Tasks" + "Servers" ], - "summary": "Create Task", - "description": "Create a new scheduled task for a service.", - "operationId": "create-scheduled-task-by-service-uuid", + "summary": "Disable Cloudflare Tunnel", + "description": "Mark Cloudflare Tunnel as disabled and restore ip_previous when available. Does not remove the remote cloudflared container.", + "operationId": "disable-server-cloudflare-tunnel", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the service.", + "description": "Server UUID", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "description": "Scheduled task data", - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "name", - "command", - "frequency" - ], - "properties": { - "name": { - "type": "string", - "description": "The name of the scheduled task." - }, - "command": { - "type": "string", - "description": "The command to execute." - }, - "frequency": { - "type": "string", - "description": "The frequency of the scheduled task." - }, - "container": { - "type": "string", - "nullable": true, - "description": "The container where the command should be executed." - }, - "timeout": { - "type": "integer", - "description": "The timeout of the scheduled task in seconds.", - "default": 300, - "maximum": 36000 - }, - "enabled": { - "type": "boolean", - "description": "The flag to indicate if the scheduled task is enabled. An enabled task requires the deploy ability.", - "default": true - } - }, - "type": "object" - } - } - } - }, "responses": { - "201": { - "description": "Scheduled task created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ScheduledTask" - } - } - } + "200": { + "description": "Cloudflare Tunnel disabled." + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the deploy ability for an enabled task." - }, "404": { "$ref": "#/components/responses/404" }, @@ -15669,28 +18859,19 @@ ] } }, - "/services/{uuid}/scheduled-tasks/{task_uuid}": { - "delete": { + "/servers/{uuid}/docker-cleanup": { + "get": { "tags": [ - "Scheduled Tasks" + "Servers" ], - "summary": "Delete Task", - "description": "Delete a scheduled task for a service.", - "operationId": "delete-scheduled-task-by-service-uuid", + "summary": "Get Docker cleanup settings", + "description": "Get Docker cleanup settings for a server owned by the authenticated team.", + "operationId": "get-server-docker-cleanup", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the service.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "task_uuid", - "in": "path", - "description": "UUID of the scheduled task.", + "description": "Server UUID", "required": true, "schema": { "type": "string" @@ -15699,14 +18880,28 @@ ], "responses": { "200": { - "description": "Scheduled task deleted.", + "description": "Docker cleanup settings.", "content": { "application/json": { "schema": { "properties": { - "message": { - "type": "string", - "example": "Scheduled task deleted." + "docker_cleanup_frequency": { + "type": "string" + }, + "docker_cleanup_threshold": { + "type": "integer" + }, + "force_docker_cleanup": { + "type": "boolean" + }, + "delete_unused_volumes": { + "type": "boolean" + }, + "delete_unused_networks": { + "type": "boolean" + }, + "disable_application_image_retention": { + "type": "boolean" } }, "type": "object" @@ -15714,6 +18909,9 @@ } } }, + "400": { + "$ref": "#/components/responses/400" + }, "401": { "$ref": "#/components/responses/401" }, @@ -15729,25 +18927,16 @@ }, "patch": { "tags": [ - "Scheduled Tasks" + "Servers" ], - "summary": "Update Task", - "description": "Update a scheduled task for a service.", - "operationId": "update-scheduled-task-by-service-uuid", + "summary": "Update Docker cleanup settings", + "description": "Update Docker cleanup settings for a server owned by the authenticated team. Turning on `delete_unused_volumes` needs a token with the `deploy` permission.", + "operationId": "update-server-docker-cleanup", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the service.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "task_uuid", - "in": "path", - "description": "UUID of the scheduled task.", + "description": "Server UUID", "required": true, "schema": { "type": "string" @@ -15755,39 +18944,31 @@ } ], "requestBody": { - "description": "Scheduled task data", "required": true, "content": { "application/json": { "schema": { "properties": { - "name": { - "type": "string", - "description": "The name of the scheduled task." + "docker_cleanup_frequency": { + "description": "Cron / human frequency expression.", + "type": "string" }, - "command": { - "type": "string", - "description": "The command to execute." + "docker_cleanup_threshold": { + "type": "integer", + "maximum": 99, + "minimum": 1 }, - "frequency": { - "type": "string", - "description": "The frequency of the scheduled task." + "force_docker_cleanup": { + "type": "boolean" }, - "container": { - "type": "string", - "nullable": true, - "description": "The container where the command should be executed." + "delete_unused_volumes": { + "type": "boolean" }, - "timeout": { - "type": "integer", - "description": "The timeout of the scheduled task in seconds.", - "default": 300, - "maximum": 36000 + "delete_unused_networks": { + "type": "boolean" }, - "enabled": { - "type": "boolean", - "description": "The flag to indicate if the scheduled task is enabled. An enabled task requires the deploy ability.", - "default": true + "disable_application_image_retention": { + "type": "boolean" } }, "type": "object" @@ -15797,20 +18978,43 @@ }, "responses": { "200": { - "description": "Scheduled task updated.", + "description": "Updated Docker cleanup settings.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ScheduledTask" + "properties": { + "docker_cleanup_frequency": { + "type": "string" + }, + "docker_cleanup_threshold": { + "type": "integer" + }, + "force_docker_cleanup": { + "type": "boolean" + }, + "delete_unused_volumes": { + "type": "boolean" + }, + "delete_unused_networks": { + "type": "boolean" + }, + "disable_application_image_retention": { + "type": "boolean" + } + }, + "type": "object" } } } }, + "400": { + "$ref": "#/components/responses/400" + }, "401": { "$ref": "#/components/responses/401" }, "403": { - "description": "The token needs the deploy ability for an enabled task." + "description": "Turning on `delete_unused_volumes` needs the deploy permission." }, "404": { "$ref": "#/components/responses/404" @@ -15826,53 +19030,74 @@ ] } }, - "/services/{uuid}/scheduled-tasks/{task_uuid}/executions": { - "get": { + "/servers/{uuid}/docker-cleanup/run": { + "post": { "tags": [ - "Scheduled Tasks" + "Servers" ], - "summary": "List Executions", - "description": "List all executions for a scheduled task on a service.", - "operationId": "list-scheduled-task-executions-by-service-uuid", + "summary": "Run Docker cleanup", + "description": "Dispatch a manual Docker cleanup job for a server owned by the authenticated team. Needs a token with the write and deploy permissions.", + "operationId": "run-server-docker-cleanup", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the service.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "task_uuid", - "in": "path", - "description": "UUID of the scheduled task.", + "description": "Server UUID", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "properties": { + "delete_unused_volumes": { + "type": "boolean" + }, + "delete_unused_networks": { + "type": "boolean" + } + }, + "type": "object" + } + } + } + }, "responses": { "200": { - "description": "Get all executions for a scheduled task.", + "description": "Docker cleanup job dispatched.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScheduledTaskExecution" - } + "properties": { + "message": { + "type": "string", + "example": "Manual cleanup job started." + } + }, + "type": "object" } } } }, + "400": { + "$ref": "#/components/responses/400" + }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the write and deploy permissions." + }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -15882,28 +19107,19 @@ ] } }, - "/applications/{uuid}/scheduled-tasks/{task_uuid}/execute": { - "post": { + "/servers/{uuid}/docker-cleanup/executions": { + "get": { "tags": [ - "Scheduled Tasks" + "Servers" ], - "summary": "Execute Task", - "description": "Queue immediate execution of a scheduled task for an application. Requires the deploy ability.", - "operationId": "execute-scheduled-task-by-application-uuid", + "summary": "List Docker cleanup executions", + "description": "List recent Docker cleanup execution logs for a server owned by the authenticated team.", + "operationId": "list-server-docker-cleanup-executions", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the application.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "task_uuid", - "in": "path", - "description": "UUID of the scheduled task.", + "description": "Server UUID", "required": true, "schema": { "type": "string" @@ -15912,14 +19128,50 @@ ], "responses": { "200": { - "description": "Scheduled task execution queued." + "description": "Recent Docker cleanup executions.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "uuid": { + "type": "string" + }, + "status": { + "type": "string" + }, + "message": { + "type": [ + "string", + "null" + ] + }, + "finished_at": { + "type": [ + "string", + "null" + ] + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + }, + "type": "object" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the deploy ability." - }, "404": { "$ref": "#/components/responses/404" } @@ -15931,28 +19183,19 @@ ] } }, - "/services/{uuid}/scheduled-tasks/{task_uuid}/execute": { - "post": { + "/servers/{uuid}/registries": { + "get": { "tags": [ - "Scheduled Tasks" + "Servers" ], - "summary": "Execute Task", - "description": "Queue immediate execution of a scheduled task for a service. Requires the deploy ability.", - "operationId": "execute-scheduled-task-by-service-uuid", + "summary": "List server registry logins", + "description": "List the Docker registries a server is logged in to and the registries its resources pull from or push to. Reads the Docker config of the server over SSH. Credentials are never returned, only registry names and usernames. Requires the `read:sensitive` ability.", + "operationId": "list-server-registries", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the service.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "task_uuid", - "in": "path", - "description": "UUID of the scheduled task.", + "description": "Server UUID", "required": true, "schema": { "type": "string" @@ -15961,43 +19204,75 @@ ], "responses": { "200": { - "description": "Scheduled task execution queued." - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "description": "The token needs the deploy ability." - }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/security/keys": { - "get": { - "tags": [ - "Private Keys" - ], - "summary": "List", - "description": "List all private keys.", - "operationId": "list-private-keys", - "responses": { - "200": { - "description": "Get all private keys.", + "description": "Registry logins of the server.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PrivateKey" - } + "properties": { + "registries": { + "type": "array", + "items": { + "properties": { + "registry": { + "type": "string", + "example": "ghcr.io" + }, + "logged_in": { + "type": "boolean", + "example": true + }, + "source": { + "description": "Where the Docker config stores the credentials.", + "type": [ + "string", + "null" + ], + "enum": [ + "auths", + "credHelpers" + ] + }, + "username": { + "type": [ + "string", + "null" + ], + "example": "octocat" + }, + "used_by": { + "type": "array", + "items": { + "properties": { + "type": { + "type": "string", + "example": "Application" + }, + "name": { + "type": "string" + }, + "link": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + } + } + }, + "type": "object" + } + }, + "error": { + "description": "Set when the logins could not be read from the server.", + "type": [ + "string", + "null" + ] + } + }, + "type": "object" } } } @@ -16007,6 +19282,9 @@ }, "401": { "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -16017,45 +19295,62 @@ }, "post": { "tags": [ - "Private Keys" + "Servers" + ], + "summary": "Log in to a registry on a server", + "description": "Run docker login on the server, writing to the Docker config that deployments use. Logging in again to the same registry replaces the saved login. Needs a token with the write and deploy permissions.", + "operationId": "login-server-registry", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Server UUID", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Create", - "description": "Create a new private key.", - "operationId": "create-private-key", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ - "private_key" + "registry", + "username", + "password" ], "properties": { - "name": { - "type": "string" + "registry": { + "description": "Registry host, optionally with a port. Use docker.io for Docker Hub.", + "type": "string", + "example": "ghcr.io" }, - "description": { - "type": "string" + "username": { + "type": "string", + "example": "octocat" }, - "private_key": { + "password": { + "description": "Password or access token. Never returned.", "type": "string" } }, - "type": "object", - "additionalProperties": false + "type": "object" } } } }, "responses": { - "201": { - "description": "The created private key's UUID.", + "200": { + "description": "Logged in.", "content": { "application/json": { "schema": { "properties": { - "uuid": { - "type": "string" + "message": { + "type": "string", + "example": "Logged in to ghcr.io." } }, "type": "object" @@ -16069,6 +19364,12 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the write and deploy permissions." + }, + "404": { + "$ref": "#/components/responses/404" + }, "422": { "$ref": "#/components/responses/422" } @@ -16080,19 +19381,28 @@ ] } }, - "/security/keys/{uuid}": { - "get": { + "/servers/{uuid}/registries/{registry}/check": { + "post": { "tags": [ - "Private Keys" + "Servers" ], - "summary": "Get", - "description": "Get key by UUID.", - "operationId": "get-private-key-by-uuid", + "summary": "Check a registry login on a server", + "description": "Check that the saved login of the server for a registry still works. Runs docker login with the saved credentials on the server. Needs a token with the write and deploy permissions.", + "operationId": "check-server-registry-login", "parameters": [ { "name": "uuid", "in": "path", - "description": "Private Key UUID", + "description": "Server UUID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "registry", + "in": "path", + "description": "Registry host, optionally with a port, for example registry.example.com:5000.", "required": true, "schema": { "type": "string" @@ -16101,11 +19411,17 @@ ], "responses": { "200": { - "description": "Get all private keys.", + "description": "The login works.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PrivateKey" + "properties": { + "message": { + "type": "string", + "example": "The login for ghcr.io works." + } + }, + "type": "object" } } } @@ -16117,7 +19433,10 @@ "$ref": "#/components/responses/401" }, "404": { - "description": "Private Key not found." + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -16125,19 +19444,30 @@ "bearerAuth": [] } ] - }, + } + }, + "/servers/{uuid}/registries/{registry}": { "delete": { "tags": [ - "Private Keys" + "Servers" ], - "summary": "Delete", - "description": "Delete a private key.", - "operationId": "delete-private-key-by-uuid", + "summary": "Log out from a registry on a server", + "description": "Run docker logout on the server for a registry.", + "operationId": "logout-server-registry", "parameters": [ { "name": "uuid", "in": "path", - "description": "Private Key UUID", + "description": "Server UUID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "registry", + "in": "path", + "description": "Registry host, optionally with a port, for example registry.example.com:5000.", "required": true, "schema": { "type": "string" @@ -16146,14 +19476,14 @@ ], "responses": { "200": { - "description": "Private Key deleted.", + "description": "Logged out.", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", - "example": "Private Key deleted." + "example": "Logged out from ghcr.io." } }, "type": "object" @@ -16168,23 +19498,111 @@ "$ref": "#/components/responses/401" }, "404": { - "description": "Private Key not found." + "$ref": "#/components/responses/404" }, "422": { - "description": "Private Key is in use and cannot be deleted.", + "$ref": "#/components/responses/422" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/servers/{uuid}/image-scanning": { + "get": { + "tags": [ + "Servers" + ], + "summary": "Get image scanning settings", + "description": "Get the image vulnerability scanning settings of a server owned by the authenticated team, and the state of the scanner on the server. Needs a team admin or owner.", + "operationId": "get-server-image-scanning", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Server UUID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image scanning settings.", "content": { "application/json": { "schema": { "properties": { - "message": { - "type": "string", - "example": "Private Key is in use and cannot be deleted." + "is_image_scan_enabled": { + "description": "Whether the server scans the images of its resources.", + "type": "boolean" + }, + "image_scan_memory_mb": { + "description": "Memory limit of each scanner step, in MB.", + "type": "integer", + "enum": [ + 1024, + 2048, + 4096, + 8192 + ] + }, + "scanner_state": { + "description": "State of the scanner on the server. Null when unknown.", + "type": [ + "string", + "null" + ], + "enum": [ + "pulling", + "updating_database", + "ready", + "failed" + ] + }, + "scanner_failed_step": { + "description": "The step that failed when scanner_state is failed.", + "type": [ + "string", + "null" + ] + }, + "scanner_built_at": { + "description": "Time of the vulnerability database on the server.", + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "scanner_disk_used_bytes": { + "description": "Disk space that the scanner uses on the server.", + "type": [ + "integer", + "null" + ] } }, "type": "object" } } } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "description": "Needs a team admin or owner." + }, + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -16195,16 +19613,16 @@ }, "patch": { "tags": [ - "Private Keys" + "Servers" ], - "summary": "Update", - "description": "Update a private key.", - "operationId": "update-private-key", + "summary": "Update image scanning settings", + "description": "Turn image vulnerability scanning of a server owned by the authenticated team on or off, or change the memory limit of the scanner. Send at least one field. Turning it on gets the scanner on the server in the background. A new memory limit applies to the next scan.", + "operationId": "update-server-image-scanning", "parameters": [ { "name": "uuid", "in": "path", - "description": "Private Key UUID", + "description": "Server UUID", "required": true, "schema": { "type": "string" @@ -16217,37 +19635,28 @@ "application/json": { "schema": { "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" + "is_image_scan_enabled": { + "type": "boolean" }, - "private_key": { - "type": "string" + "image_scan_memory_mb": { + "description": "Memory limit of each scanner step, in MB.", + "type": "integer", + "enum": [ + 1024, + 2048, + 4096, + 8192 + ] } }, - "type": "object", - "additionalProperties": false + "type": "object" } } } }, "responses": { - "201": { - "description": "The updated private key's UUID.", - "content": { - "application/json": { - "schema": { - "properties": { - "uuid": { - "type": "string" - } - }, - "type": "object" - } - } - } + "200": { + "description": "Updated image scanning settings." }, "400": { "$ref": "#/components/responses/400" @@ -16255,8 +19664,14 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "Needs a team admin or owner." + }, "404": { - "description": "Private Key not found." + "$ref": "#/components/responses/404" + }, + "409": { + "description": "The instance does not allow image scanning, or another Coolify instance manages the server." }, "422": { "$ref": "#/components/responses/422" @@ -16269,14 +19684,14 @@ ] } }, - "/servers/{uuid}/cloudflare-tunnel": { + "/servers/{uuid}/log-drains": { "get": { "tags": [ "Servers" ], - "summary": "Get Cloudflare Tunnel settings", - "description": "Get Cloudflare Tunnel settings for a server owned by the authenticated team.", - "operationId": "get-server-cloudflare-tunnel", + "summary": "Get log drain settings", + "description": "Get log drain settings for a server owned by the authenticated team. Sensitive fields require the read:sensitive or root token ability.", + "operationId": "get-server-log-drains", "parameters": [ { "name": "uuid", @@ -16290,18 +19705,71 @@ ], "responses": { "200": { - "description": "Cloudflare Tunnel settings.", + "description": "Log drain settings.", "content": { "application/json": { "schema": { "properties": { - "is_cloudflare_tunnel": { + "is_logdrain_newrelic_enabled": { + "type": "boolean" + }, + "logdrain_newrelic_license_key": { + "description": "Only present with read:sensitive.", + "type": "string" + }, + "logdrain_newrelic_base_uri": { + "type": [ + "string", + "null" + ] + }, + "is_logdrain_axiom_enabled": { "type": "boolean" }, - "ip": { + "logdrain_axiom_dataset_name": { + "type": [ + "string", + "null" + ] + }, + "logdrain_axiom_domain": { + "type": [ + "string", + "null" + ] + }, + "logdrain_axiom_api_key": { + "description": "Only present with read:sensitive.", "type": "string" }, - "ip_previous": { + "is_logdrain_custom_enabled": { + "type": "boolean" + }, + "logdrain_custom_config": { + "description": "Only present with read:sensitive.", + "type": "string" + }, + "logdrain_custom_config_parser": { + "description": "Only present with read:sensitive.", + "type": "string" + }, + "is_logdrain_cloudwatch_enabled": { + "type": "boolean" + }, + "logdrain_cloudwatch_region": { + "type": [ + "string", + "null" + ] + }, + "logdrain_cloudwatch_group": { + "type": [ + "string", + "null" + ] + }, + "logdrain_cloudwatch_stream_prefix": { + "description": "Prepended to the container name to form the log stream name.", "type": [ "string", "null" @@ -16333,9 +19801,9 @@ "tags": [ "Servers" ], - "summary": "Update Cloudflare Tunnel settings", - "description": "Update stored Cloudflare Tunnel settings for a server. Does not run remote cloudflared configuration; use enable/disable for the manual UI actions.", - "operationId": "update-server-cloudflare-tunnel", + "summary": "Update log drain settings", + "description": "Update New Relic, Axiom, or custom log drain settings for a server owned by the authenticated team. Needs a token with the write and deploy permissions. Custom configs cannot use the lua, wasm, exec, exec_wasi, or file plugins, @INCLUDE, or plugins_file, and the parser file can only contain [PARSER] and [MULTILINE_PARSER] sections.", + "operationId": "update-server-log-drains", "parameters": [ { "name": "uuid", @@ -16353,8 +19821,58 @@ "application/json": { "schema": { "properties": { - "is_cloudflare_tunnel": { + "is_logdrain_newrelic_enabled": { "type": "boolean" + }, + "logdrain_newrelic_license_key": { + "type": "string" + }, + "logdrain_newrelic_base_uri": { + "type": "string" + }, + "is_logdrain_axiom_enabled": { + "type": "boolean" + }, + "logdrain_axiom_dataset_name": { + "type": "string" + }, + "logdrain_axiom_domain": { + "description": "Base domain of the Axiom edge deployment. Default: us-east-1.aws.edge.axiom.co. Use eu-central-1.aws.edge.axiom.co for EU datasets.", + "type": "string" + }, + "logdrain_axiom_api_key": { + "type": "string" + }, + "is_logdrain_custom_enabled": { + "type": "boolean" + }, + "logdrain_custom_config": { + "type": "string" + }, + "logdrain_custom_config_parser": { + "type": "string" + }, + "is_logdrain_cloudwatch_enabled": { + "type": "boolean" + }, + "logdrain_cloudwatch_region": { + "type": [ + "string", + "null" + ] + }, + "logdrain_cloudwatch_group": { + "type": [ + "string", + "null" + ] + }, + "logdrain_cloudwatch_stream_prefix": { + "description": "Prepended to the container name to form the log stream name.", + "type": [ + "string", + "null" + ] } }, "type": "object" @@ -16364,7 +19882,7 @@ }, "responses": { "200": { - "description": "Updated Cloudflare Tunnel settings." + "description": "Updated log drain settings." }, "400": { "$ref": "#/components/responses/400" @@ -16372,6 +19890,9 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the write and deploy permissions." + }, "404": { "$ref": "#/components/responses/404" }, @@ -16386,14 +19907,14 @@ ] } }, - "/servers/{uuid}/cloudflare-tunnel/enable": { - "post": { + "/servers/{uuid}/proxy": { + "get": { "tags": [ "Servers" ], - "summary": "Enable Cloudflare Tunnel (manual)", - "description": "Manually mark Cloudflare Tunnel as enabled for a server (matches UI manual enable). Does not deploy cloudflared remotely.", - "operationId": "enable-server-cloudflare-tunnel", + "summary": "Get server proxy", + "description": "Get proxy settings for a server owned by the authenticated team. The raw proxy configuration is only returned when the token has `read:sensitive` (or `root`) and the user is a team admin/owner, and only when already stored in the database (no remote fetch).", + "operationId": "get-server-proxy", "parameters": [ { "name": "uuid", @@ -16407,7 +19928,66 @@ ], "responses": { "200": { - "description": "Cloudflare Tunnel enabled." + "description": "Server proxy settings.", + "content": { + "application/json": { + "schema": { + "properties": { + "proxy_type": { + "type": [ + "string", + "null" + ], + "example": "TRAEFIK" + }, + "status": { + "type": [ + "string", + "null" + ], + "example": "running" + }, + "redirect_enabled": { + "type": "boolean", + "example": true + }, + "redirect_url": { + "type": [ + "string", + "null" + ], + "example": "https://example.com" + }, + "proxy_error_page": { + "type": [ + "string", + "null" + ] + }, + "generate_exact_labels": { + "type": "boolean", + "example": false + }, + "traefik_certificate_resolver": { + "description": "Traefik certificate resolver for generated HTTPS routers. Null when the proxy uses its own certificates.", + "type": [ + "string", + "null" + ], + "example": "letsencrypt" + }, + "configuration": { + "description": "Docker Compose proxy configuration when stored in the database. Only present with read:sensitive.", + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + } + } + } }, "400": { "$ref": "#/components/responses/400" @@ -16417,9 +19997,6 @@ }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -16427,16 +20004,14 @@ "bearerAuth": [] } ] - } - }, - "/servers/{uuid}/cloudflare-tunnel/disable": { - "post": { + }, + "patch": { "tags": [ "Servers" ], - "summary": "Disable Cloudflare Tunnel", - "description": "Mark Cloudflare Tunnel as disabled and restore ip_previous when available. Does not remove the remote cloudflared container.", - "operationId": "disable-server-cloudflare-tunnel", + "summary": "Update server proxy", + "description": "Update proxy redirect settings, exact labels generation, the Traefik certificate resolver, and optionally the proxy type for a team-owned server. Changing proxy_type needs a token with the `write` and `deploy` permissions.", + "operationId": "update-server-proxy", "parameters": [ { "name": "uuid", @@ -16448,73 +20023,103 @@ } } ], - "responses": { - "200": { - "description": "Cloudflare Tunnel disabled." - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/servers/{uuid}/docker-cleanup": { - "get": { - "tags": [ - "Servers" - ], - "summary": "Get Docker cleanup settings", - "description": "Get Docker cleanup settings for a server owned by the authenticated team.", - "operationId": "get-server-docker-cleanup", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "Server UUID", - "required": true, - "schema": { - "type": "string" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "redirect_enabled": { + "type": "boolean" + }, + "redirect_url": { + "description": "Public http(s) redirect URL, or null to clear.", + "type": [ + "string", + "null" + ] + }, + "proxy_error_page": { + "description": "Custom HTML error page that the proxy shows for unknown hosts (when redirect_url is empty) and for resources in maintenance mode. Null restores the default page.", + "type": [ + "string", + "null" + ] + }, + "generate_exact_labels": { + "type": "boolean" + }, + "traefik_certificate_resolver": { + "description": "Traefik certificate resolver for generated HTTPS routers (letters, digits, _ and -). Null or empty to use your own certificates. Redeploy resources to apply.", + "type": [ + "string", + "null" + ] + }, + "proxy_type": { + "description": "Proxy type (case-insensitive). Changing it starts the new proxy on the server and needs the deploy permission.", + "type": "string", + "enum": [ + "traefik", + "caddy", + "nginx", + "none" + ] + } + }, + "type": "object" + } } } - ], + }, "responses": { "200": { - "description": "Docker cleanup settings.", + "description": "Proxy settings updated.", "content": { "application/json": { "schema": { "properties": { - "docker_cleanup_frequency": { - "type": "string" + "proxy_type": { + "type": [ + "string", + "null" + ] }, - "docker_cleanup_threshold": { - "type": "integer" + "status": { + "type": [ + "string", + "null" + ] }, - "force_docker_cleanup": { + "redirect_enabled": { "type": "boolean" }, - "delete_unused_volumes": { - "type": "boolean" + "redirect_url": { + "type": [ + "string", + "null" + ] }, - "delete_unused_networks": { - "type": "boolean" + "proxy_error_page": { + "type": [ + "string", + "null" + ] }, - "disable_application_image_retention": { + "generate_exact_labels": { "type": "boolean" + }, + "traefik_certificate_resolver": { + "type": [ + "string", + "null" + ] + }, + "configuration": { + "type": [ + "string", + "null" + ] } }, "type": "object" @@ -16528,8 +20133,14 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the deploy permission to change the proxy type." + }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -16537,14 +20148,16 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/servers/{uuid}/proxy/configuration": { + "put": { "tags": [ "Servers" ], - "summary": "Update Docker cleanup settings", - "description": "Update Docker cleanup settings for a server owned by the authenticated team. Turning on `delete_unused_volumes` needs a token with the `deploy` permission.", - "operationId": "update-server-docker-cleanup", + "summary": "Save server proxy configuration", + "description": "Save the raw proxy Docker Compose configuration for a team-owned server. Needs a token with the `write` and `deploy` permissions. Multi-line configuration must be base64 encoded (same pattern as other compose payloads).", + "operationId": "save-server-proxy-configuration", "parameters": [ { "name": "uuid", @@ -16561,27 +20174,13 @@ "content": { "application/json": { "schema": { + "required": [ + "configuration" + ], "properties": { - "docker_cleanup_frequency": { - "description": "Cron / human frequency expression.", + "configuration": { + "description": "Proxy docker-compose YAML. Prefer base64 encoding for multi-line content.", "type": "string" - }, - "docker_cleanup_threshold": { - "type": "integer", - "maximum": 99, - "minimum": 1 - }, - "force_docker_cleanup": { - "type": "boolean" - }, - "delete_unused_volumes": { - "type": "boolean" - }, - "delete_unused_networks": { - "type": "boolean" - }, - "disable_application_image_retention": { - "type": "boolean" } }, "type": "object" @@ -16591,28 +20190,50 @@ }, "responses": { "200": { - "description": "Updated Docker cleanup settings.", + "description": "Proxy configuration saved.", "content": { "application/json": { "schema": { "properties": { - "docker_cleanup_frequency": { - "type": "string" + "message": { + "type": "string", + "example": "Proxy configuration saved." }, - "docker_cleanup_threshold": { - "type": "integer" + "proxy_type": { + "type": [ + "string", + "null" + ] }, - "force_docker_cleanup": { - "type": "boolean" + "status": { + "type": [ + "string", + "null" + ] }, - "delete_unused_volumes": { + "redirect_enabled": { "type": "boolean" }, - "delete_unused_networks": { - "type": "boolean" + "redirect_url": { + "type": [ + "string", + "null" + ] }, - "disable_application_image_retention": { + "proxy_error_page": { + "type": [ + "string", + "null" + ] + }, + "generate_exact_labels": { "type": "boolean" + }, + "configuration": { + "type": [ + "string", + "null" + ] } }, "type": "object" @@ -16626,9 +20247,6 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "Turning on `delete_unused_volumes` needs the deploy permission." - }, "404": { "$ref": "#/components/responses/404" }, @@ -16643,14 +20261,14 @@ ] } }, - "/servers/{uuid}/docker-cleanup/run": { + "/servers/{uuid}/proxy/restart": { "post": { "tags": [ "Servers" ], - "summary": "Run Docker cleanup", - "description": "Dispatch a manual Docker cleanup job for a server owned by the authenticated team. Needs a token with the write and deploy permissions.", - "operationId": "run-server-docker-cleanup", + "summary": "Restart server proxy", + "description": "Queue a proxy restart for a team-owned server. Needs a token with the `deploy` permission.", + "operationId": "restart-server-proxy", "parameters": [ { "name": "uuid", @@ -16662,34 +20280,16 @@ } } ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "properties": { - "delete_unused_volumes": { - "type": "boolean" - }, - "delete_unused_networks": { - "type": "boolean" - } - }, - "type": "object" - } - } - } - }, "responses": { "200": { - "description": "Docker cleanup job dispatched.", + "description": "Proxy restart queued.", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", - "example": "Manual cleanup job started." + "example": "Proxy restart queued." } }, "type": "object" @@ -16703,14 +20303,8 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the write and deploy permissions." - }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -16720,14 +20314,14 @@ ] } }, - "/servers/{uuid}/docker-cleanup/executions": { + "/servers/{uuid}/sentinel": { "get": { "tags": [ "Servers" ], - "summary": "List Docker cleanup executions", - "description": "List recent Docker cleanup execution logs for a server owned by the authenticated team.", - "operationId": "list-server-docker-cleanup-executions", + "summary": "Get Sentinel settings", + "description": "Get Sentinel settings for a server owned by the authenticated team. sentinel_token and sentinel_custom_url require the read:sensitive or root token ability.", + "operationId": "get-server-sentinel", "parameters": [ { "name": "uuid", @@ -16741,40 +20335,78 @@ ], "responses": { "200": { - "description": "Recent Docker cleanup executions.", + "description": "Sentinel settings.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "properties": { - "uuid": { - "type": "string" - }, - "status": { - "type": "string" - }, - "message": { - "type": [ - "string", - "null" - ] - }, - "finished_at": { - "type": [ - "string", - "null" - ] - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - } + "properties": { + "is_sentinel_enabled": { + "description": "Sentinel is mandatory on regular managed servers.", + "type": "boolean", + "readOnly": true + }, + "is_metrics_enabled": { + "type": "boolean" + }, + "is_sentinel_debug_enabled": { + "type": "boolean" }, - "type": "object" - } + "sentinel_token": { + "description": "Only present with read:sensitive.", + "type": "string" + }, + "sentinel_metrics_refresh_rate_seconds": { + "type": "integer" + }, + "sentinel_metrics_history_days": { + "type": "integer" + }, + "sentinel_push_interval_seconds": { + "type": "integer" + }, + "sentinel_custom_url": { + "description": "Only present with read:sensitive.", + "type": "string" + }, + "sentinel_updated_at": { + "type": [ + "string", + "null" + ] + }, + "traffic_topn": { + "type": "integer" + }, + "traffic_sample_threshold": { + "type": "integer" + }, + "traffic_retention_1h_days": { + "type": "integer" + }, + "traffic_retention_1d_days": { + "type": "integer" + }, + "is_geoip_enabled": { + "type": "boolean" + }, + "geoip_refresh_days": { + "type": "integer" + }, + "traffic_ip_mode": { + "description": "How Sentinel stores client IPs for the Top IPs breakdown.", + "type": "string", + "enum": [ + "full", + "anonymized", + "off" + ] + }, + "geoip_maxmind_license_key": { + "description": "Only present with read:sensitive.", + "type": "string" + } + }, + "type": "object" } } } @@ -16794,16 +20426,14 @@ "bearerAuth": [] } ] - } - }, - "/servers/{uuid}/registries": { - "get": { + }, + "patch": { "tags": [ "Servers" ], - "summary": "List server registry logins", - "description": "List the Docker registries a server is logged in to and the registries its resources pull from or push to. Reads the Docker config of the server over SSH. Credentials are never returned, only registry names and usernames. Requires the `read:sensitive` ability.", - "operationId": "list-server-registries", + "summary": "Update Sentinel settings", + "description": "Update Sentinel settings for a server owned by the authenticated team. Changing token/metrics timing fields may restart Sentinel. Needs a token with the write and deploy permissions.", + "operationId": "update-server-sentinel", "parameters": [ { "name": "uuid", @@ -16815,80 +20445,89 @@ } } ], - "responses": { - "200": { - "description": "Registry logins of the server.", - "content": { - "application/json": { - "schema": { - "properties": { - "registries": { - "type": "array", - "items": { - "properties": { - "registry": { - "type": "string", - "example": "ghcr.io" - }, - "logged_in": { - "type": "boolean", - "example": true - }, - "source": { - "description": "Where the Docker config stores the credentials.", - "type": [ - "string", - "null" - ], - "enum": [ - "auths", - "credHelpers" - ] - }, - "username": { - "type": [ - "string", - "null" - ], - "example": "octocat" - }, - "used_by": { - "type": "array", - "items": { - "properties": { - "type": { - "type": "string", - "example": "Application" - }, - "name": { - "type": "string" - }, - "link": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - } - } - }, - "type": "object" - } - }, - "error": { - "description": "Set when the logins could not be read from the server.", - "type": [ - "string", - "null" - ] - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "is_metrics_enabled": { + "type": "boolean" }, - "type": "object" - } + "is_sentinel_debug_enabled": { + "type": "boolean" + }, + "sentinel_token": { + "type": "string" + }, + "sentinel_metrics_refresh_rate_seconds": { + "type": "integer", + "minimum": 1 + }, + "sentinel_metrics_history_days": { + "type": "integer", + "minimum": 1 + }, + "sentinel_push_interval_seconds": { + "type": "integer", + "minimum": 10 + }, + "sentinel_custom_url": { + "type": [ + "string", + "null" + ] + }, + "traffic_topn": { + "type": "integer", + "maximum": 1000, + "minimum": 1 + }, + "traffic_sample_threshold": { + "type": "integer", + "minimum": 0 + }, + "traffic_retention_1h_days": { + "type": "integer", + "maximum": 365, + "minimum": 1 + }, + "traffic_retention_1d_days": { + "type": "integer", + "maximum": 3650, + "minimum": 1 + }, + "is_geoip_enabled": { + "type": "boolean" + }, + "geoip_refresh_days": { + "type": "integer", + "minimum": 1 + }, + "geoip_maxmind_license_key": { + "type": [ + "string", + "null" + ] + }, + "traffic_ip_mode": { + "description": "How Sentinel stores client IPs: full, anonymized (IPv4 /24, IPv6 /48), or off.", + "type": "string", + "enum": [ + "full", + "anonymized", + "off" + ] + } + }, + "type": "object" } } + } + }, + "responses": { + "200": { + "description": "Updated Sentinel settings." }, "400": { "$ref": "#/components/responses/400" @@ -16896,8 +20535,14 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the write and deploy permissions." + }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -16905,19 +20550,20 @@ "bearerAuth": [] } ] - }, + } + }, + "/servers/{uuid}/migrate": { "post": { "tags": [ "Servers" ], - "summary": "Log in to a registry on a server", - "description": "Run docker login on the server, writing to the Docker config that deployments use. Logging in again to the same registry replaces the saved login. Needs a token with the write and deploy permissions.", - "operationId": "login-server-registry", + "summary": "Migrate server to another Coolify instance", + "description": "Start a transfer in the background: export this server, import and claim it on the target instance (with the given token), then disable automations here. All secrets of the server, also locked environment variables, are sent to the target. Follow the progress with GET /servers/{uuid}/transfer. The target URL must use https. Requires read:sensitive and write, and the owner role of the server team.", + "operationId": "migrate-server-between-instances", "parameters": [ { "name": "uuid", "in": "path", - "description": "Server UUID", "required": true, "schema": { "type": "string" @@ -16930,22 +20576,16 @@ "application/json": { "schema": { "required": [ - "registry", - "username", - "password" + "target_url", + "target_token" ], "properties": { - "registry": { - "description": "Registry host, optionally with a port. Use docker.io for Docker Hub.", - "type": "string", - "example": "ghcr.io" - }, - "username": { + "target_url": { "type": "string", - "example": "octocat" + "example": "https://coolify-b.example.com" }, - "password": { - "description": "Password or access token. Never returned.", + "target_token": { + "description": "API token on the target instance (root or write)", "type": "string" } }, @@ -16955,36 +20595,17 @@ } }, "responses": { - "200": { - "description": "Logged in.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "Logged in to ghcr.io." - } - }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" + "202": { + "description": "Transfer started" }, "403": { - "description": "The token needs the write and deploy permissions." + "description": "Missing sensitive permission or not an owner of the server team" }, "404": { "$ref": "#/components/responses/404" }, "422": { - "$ref": "#/components/responses/422" + "description": "Validation or remote import failed" } }, "security": [ @@ -16994,28 +20615,18 @@ ] } }, - "/servers/{uuid}/registries/{registry}/check": { - "post": { + "/servers/{uuid}/transfer": { + "get": { "tags": [ "Servers" ], - "summary": "Check a registry login on a server", - "description": "Check that the saved login of the server for a registry still works. Runs docker login with the saved credentials on the server.", - "operationId": "check-server-registry-login", + "summary": "Get server transfer status", + "description": "Show the transfer state of a server on this instance: the import/claim state (transfer) and the state of a running or finished transfer to another instance (migration).", + "operationId": "get-server-transfer-status", "parameters": [ { "name": "uuid", "in": "path", - "description": "Server UUID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "registry", - "in": "path", - "description": "Registry host, optionally with a port, for example registry.example.com:5000.", "required": true, "schema": { "type": "string" @@ -17024,32 +20635,13 @@ ], "responses": { "200": { - "description": "The login works.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "The login for ghcr.io works." - } - }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "description": "Transfer status" }, "401": { "$ref": "#/components/responses/401" }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -17059,62 +20651,143 @@ ] } }, - "/servers/{uuid}/registries/{registry}": { - "delete": { + "/servers/import/check": { + "get": { "tags": [ "Servers" ], - "summary": "Log out from a registry on a server", - "description": "Run docker logout on the server for a registry.", - "operationId": "logout-server-registry", + "summary": "Check server import", + "description": "Check that this instance can import a server, before the source instance starts the transfer. It checks the token, the bundle version, the server limit, servers with the same UUID or IP, and that this instance can reach the SSH port of the server.", + "operationId": "check-server-import", "parameters": [ { - "name": "uuid", - "in": "path", - "description": "Server UUID", + "name": "server_uuid", + "in": "query", "required": true, "schema": { "type": "string" } }, { - "name": "registry", - "in": "path", - "description": "Registry host, optionally with a port, for example registry.example.com:5000.", + "name": "ip", + "in": "query", "required": true, "schema": { "type": "string" } + }, + { + "name": "port", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 22 + } + }, + { + "name": "schema_version", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "system_github_apps[]", + "in": "query", + "description": "UUIDs of system-wide GitHub Apps that the server uses. The response lists the ones this instance does not have.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "system_gitlab_apps[]", + "in": "query", + "description": "UUIDs of system-wide GitLab Apps that the server uses. The response lists the ones this instance does not have.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } } ], "responses": { "200": { - "description": "Logged out.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "Logged out from ghcr.io." - } + "description": "The server can be imported. Lists every check with its result." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "422": { + "description": "One or more checks failed. Lists every check with its result." + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/servers/import": { + "post": { + "tags": [ + "Servers" + ], + "summary": "Import server transfer bundle", + "description": "Import a server transfer bundle into this Coolify instance (adopt mode by default). This instance then manages the server, and Sentinel reports to it. Needs a token with the write and deploy permissions.", + "operationId": "import-server-transfer-bundle", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "bundle": { + "description": "Transfer bundle", + "type": "object" }, - "type": "object" - } + "dry_run": { + "type": "boolean", + "default": false + }, + "preserve_uuids": { + "type": "boolean", + "default": true + }, + "adopt_mode": { + "description": "Import without forcing redeploy; keep statuses for adoption", + "type": "boolean", + "default": true + } + }, + "type": "object" } } + } + }, + "responses": { + "200": { + "description": "Dry-run result" }, - "400": { - "$ref": "#/components/responses/400" + "201": { + "description": "Imported" }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" + "403": { + "description": "The token needs the write and deploy permissions." }, "422": { - "$ref": "#/components/responses/422" + "description": "Validation failed" } }, "security": [ @@ -17124,99 +20797,80 @@ ] } }, - "/servers/{uuid}/log-drains": { - "get": { + "/servers/{uuid}/transfer/complete": { + "post": { "tags": [ "Servers" ], - "summary": "Get log drain settings", - "description": "Get log drain settings for a server owned by the authenticated team. Sensitive fields require the read:sensitive or root token ability.", - "operationId": "get-server-log-drains", + "summary": "Mark server transferred", + "description": "Source-instance recovery step: disable automations here when the target already manages the server but the transfer could not finish on this instance.", + "operationId": "complete-server-transfer", "parameters": [ { "name": "uuid", "in": "path", - "description": "Server UUID", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "export_id": { + "type": [ + "string", + "null" + ] + }, + "target_instance_url": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Marked transferred" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/servers": { + "get": { + "tags": [ + "Servers" + ], + "summary": "List", + "description": "List all servers.", + "operationId": "list-servers", "responses": { "200": { - "description": "Log drain settings.", + "description": "Get all servers.", "content": { "application/json": { "schema": { - "properties": { - "is_logdrain_newrelic_enabled": { - "type": "boolean" - }, - "logdrain_newrelic_license_key": { - "description": "Only present with read:sensitive.", - "type": "string" - }, - "logdrain_newrelic_base_uri": { - "type": [ - "string", - "null" - ] - }, - "is_logdrain_axiom_enabled": { - "type": "boolean" - }, - "logdrain_axiom_dataset_name": { - "type": [ - "string", - "null" - ] - }, - "logdrain_axiom_domain": { - "type": [ - "string", - "null" - ] - }, - "logdrain_axiom_api_key": { - "description": "Only present with read:sensitive.", - "type": "string" - }, - "is_logdrain_custom_enabled": { - "type": "boolean" - }, - "logdrain_custom_config": { - "description": "Only present with read:sensitive.", - "type": "string" - }, - "logdrain_custom_config_parser": { - "description": "Only present with read:sensitive.", - "type": "string" - }, - "is_logdrain_cloudwatch_enabled": { - "type": "boolean" - }, - "logdrain_cloudwatch_region": { - "type": [ - "string", - "null" - ] - }, - "logdrain_cloudwatch_group": { - "type": [ - "string", - "null" - ] - }, - "logdrain_cloudwatch_stream_prefix": { - "description": "Prepended to the container name to form the log stream name.", - "type": [ - "string", - "null" - ] - } - }, - "type": "object" + "type": "array", + "items": { + "$ref": "#/components/schemas/Server" + } } } } @@ -17226,9 +20880,6 @@ }, "401": { "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" } }, "security": [ @@ -17237,82 +20888,84 @@ } ] }, - "patch": { + "post": { "tags": [ "Servers" ], - "summary": "Update log drain settings", - "description": "Update New Relic, Axiom, or custom log drain settings for a server owned by the authenticated team. Needs a token with the write and deploy permissions. Custom configs cannot use the lua, wasm, exec, exec_wasi, or file plugins, @INCLUDE, or plugins_file, and the parser file can only contain [PARSER] and [MULTILINE_PARSER] sections.", - "operationId": "update-server-log-drains", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "Server UUID", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Create", + "description": "Create Server.", + "operationId": "create-server", "requestBody": { + "description": "Server created.", "required": true, "content": { "application/json": { "schema": { "properties": { - "is_logdrain_newrelic_enabled": { - "type": "boolean" - }, - "logdrain_newrelic_license_key": { - "type": "string" - }, - "logdrain_newrelic_base_uri": { - "type": "string" - }, - "is_logdrain_axiom_enabled": { - "type": "boolean" + "name": { + "type": "string", + "example": "My Server", + "description": "The name of the server. Must not contain control characters such as new lines." }, - "logdrain_axiom_dataset_name": { - "type": "string" + "description": { + "type": "string", + "example": "My Server Description", + "description": "The description of the server." }, - "logdrain_axiom_domain": { - "description": "Base domain of the Axiom edge deployment. Default: us-east-1.aws.edge.axiom.co. Use eu-central-1.aws.edge.axiom.co for EU datasets.", - "type": "string" + "ip": { + "type": "string", + "example": "127.0.0.1", + "description": "The IP of the server." }, - "logdrain_axiom_api_key": { - "type": "string" + "port": { + "type": "integer", + "example": 22, + "description": "The port of the server." }, - "is_logdrain_custom_enabled": { - "type": "boolean" + "user": { + "type": "string", + "example": "root", + "description": "The user of the server." }, - "logdrain_custom_config": { - "type": "string" + "private_key_uuid": { + "type": "string", + "example": "og888os", + "description": "The UUID of the private key." }, - "logdrain_custom_config_parser": { - "type": "string" + "server_role": { + "type": "string", + "enum": [ + "deployment", + "build", + "both" + ], + "example": "both", + "description": "Server role." }, - "is_logdrain_cloudwatch_enabled": { - "type": "boolean" + "is_build_server": { + "type": "boolean", + "deprecated": true, + "description": "Deprecated: use server_role instead. true sets server_role to build, false sets it to both. Must not conflict with server_role." }, - "logdrain_cloudwatch_region": { - "type": [ - "string", - "null" - ] + "instant_validate": { + "type": "boolean", + "example": false, + "description": "Instant validate." }, - "logdrain_cloudwatch_group": { - "type": [ - "string", - "null" - ] + "proxy_type": { + "type": "string", + "enum": [ + "traefik", + "caddy", + "none" + ], + "example": "traefik", + "description": "The proxy type." }, - "logdrain_cloudwatch_stream_prefix": { - "description": "Prepended to the container name to form the log stream name.", - "type": [ - "string", - "null" - ] + "ssh_host_key": { + "type": "string", + "example": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA...", + "description": "The SSH host key(s) of the server, as public key lines (for example the content of /etc/ssh/ssh_host_ed25519_key.pub) or known_hosts lines. Without it, Coolify trusts the key that the server sends on the first connection." } }, "type": "object" @@ -17321,8 +20974,22 @@ } }, "responses": { - "200": { - "description": "Updated log drain settings." + "201": { + "description": "Server created.", + "content": { + "application/json": { + "schema": { + "properties": { + "uuid": { + "type": "string", + "example": "og888os", + "description": "The UUID of the server." + } + }, + "type": "object" + } + } + } }, "400": { "$ref": "#/components/responses/400" @@ -17330,9 +20997,6 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the write and deploy permissions." - }, "404": { "$ref": "#/components/responses/404" }, @@ -17347,81 +21011,110 @@ ] } }, - "/servers/{uuid}/proxy": { + "/servers/{uuid}": { "get": { "tags": [ "Servers" ], - "summary": "Get server proxy", - "description": "Get proxy settings for a server owned by the authenticated team. The raw proxy configuration is only returned when the token has `read:sensitive` (or `root`) and the user is a team admin/owner, and only when already stored in the database (no remote fetch).", - "operationId": "get-server-proxy", + "summary": "Get", + "description": "Get server by UUID.", + "operationId": "get-server-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Server's UUID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Get server by UUID", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Server" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "delete": { + "tags": [ + "Servers" + ], + "summary": "Delete", + "description": "Delete server by UUID. With force or delete_from_provider, needs a token with the write and deploy permissions.", + "operationId": "delete-server-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "Server UUID", + "description": "UUID of the server.", "required": true, "schema": { "type": "string" } + }, + { + "name": "force", + "in": "query", + "description": "Also delete all resources whose main destination is on the server. Applications that use the server only as an additional destination are not deleted. They are removed from the server and keep running on their other servers. Needs the deploy permission.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "delete_from_provider", + "in": "query", + "description": "Also delete the server from its cloud provider (Hetzner, Vultr or DigitalOcean). This cannot be undone. Needs the deploy permission.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "remove_ssh_key", + "in": "query", + "description": "Remove the public key of the server's SSH key from ~/.ssh/authorized_keys on the server before the server is deleted. The server must have no resources. If the key cannot be removed, the server is not deleted.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } } ], "responses": { "200": { - "description": "Server proxy settings.", + "description": "Server deleted.", "content": { "application/json": { "schema": { "properties": { - "proxy_type": { - "type": [ - "string", - "null" - ], - "example": "TRAEFIK" - }, - "status": { - "type": [ - "string", - "null" - ], - "example": "running" - }, - "redirect_enabled": { - "type": "boolean", - "example": true - }, - "redirect_url": { - "type": [ - "string", - "null" - ], - "example": "https://example.com" - }, - "proxy_error_page": { - "type": [ - "string", - "null" - ] - }, - "generate_exact_labels": { - "type": "boolean", - "example": false - }, - "traefik_certificate_resolver": { - "description": "Traefik certificate resolver for generated HTTPS routers. Null when the proxy uses its own certificates.", - "type": [ - "string", - "null" - ], - "example": "letsencrypt" - }, - "configuration": { - "description": "Docker Compose proxy configuration when stored in the database. Only present with read:sensitive.", - "type": [ - "string", - "null" - ] + "message": { + "type": "string", + "example": "Server deleted." } }, "type": "object" @@ -17435,8 +21128,14 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the deploy permission to delete the resources or the cloud server." + }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -17449,9 +21148,9 @@ "tags": [ "Servers" ], - "summary": "Update server proxy", - "description": "Update proxy redirect settings, exact labels generation, the Traefik certificate resolver, and optionally the proxy type for a team-owned server. Changing proxy_type needs a token with the `write` and `deploy` permissions.", - "operationId": "update-server-proxy", + "summary": "Update", + "description": "Update Server. Changing proxy_type needs a token with the write and deploy permissions.", + "operationId": "update-server-by-uuid", "parameters": [ { "name": "uuid", @@ -17464,163 +21163,109 @@ } ], "requestBody": { + "description": "Server updated.", "required": true, "content": { "application/json": { "schema": { "properties": { - "redirect_enabled": { - "type": "boolean" + "name": { + "type": "string", + "description": "The name of the server. Must not contain control characters such as new lines." }, - "redirect_url": { - "description": "Public http(s) redirect URL, or null to clear.", - "type": [ - "string", - "null" - ] + "description": { + "type": "string", + "description": "The description of the server." }, - "proxy_error_page": { - "description": "Custom HTML error page that the proxy shows for unknown hosts (when redirect_url is empty) and for resources in maintenance mode. Null restores the default page.", - "type": [ - "string", - "null" - ] + "ip": { + "type": "string", + "description": "The IP of the server." }, - "generate_exact_labels": { - "type": "boolean" + "port": { + "type": "integer", + "description": "The port of the server." }, - "traefik_certificate_resolver": { - "description": "Traefik certificate resolver for generated HTTPS routers (letters, digits, _ and -). Null or empty to use your own certificates. Redeploy resources to apply.", - "type": [ - "string", - "null" - ] + "user": { + "type": "string", + "description": "The user of the server." + }, + "private_key_uuid": { + "type": "string", + "description": "The UUID of the private key." + }, + "server_role": { + "type": "string", + "enum": [ + "deployment", + "build", + "both" + ], + "description": "Server role." + }, + "is_build_server": { + "type": "boolean", + "deprecated": true, + "description": "Deprecated: use server_role instead. true sets server_role to build, false changes a build server to both and leaves other roles unchanged. Must not conflict with server_role." + }, + "instant_validate": { + "type": "boolean", + "description": "Instant validate." }, "proxy_type": { - "description": "Proxy type (case-insensitive). Changing it starts the new proxy on the server and needs the deploy permission.", "type": "string", "enum": [ "traefik", "caddy", - "nginx", "none" - ] - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "description": "Proxy settings updated.", - "content": { - "application/json": { - "schema": { - "properties": { - "proxy_type": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": [ - "string", - "null" - ] - }, - "redirect_enabled": { - "type": "boolean" - }, - "redirect_url": { - "type": [ - "string", - "null" - ] - }, - "proxy_error_page": { - "type": [ - "string", - "null" - ] - }, - "generate_exact_labels": { - "type": "boolean" - }, - "traefik_certificate_resolver": { - "type": [ - "string", - "null" - ] - }, - "configuration": { - "type": [ - "string", - "null" - ] - } + ], + "description": "The proxy type. Changing it starts the new proxy on the server and needs the deploy permission." + }, + "concurrent_builds": { + "type": "integer", + "description": "Number of concurrent builds." + }, + "dynamic_timeout": { + "type": "integer", + "description": "Deployment timeout in seconds." + }, + "deployment_queue_limit": { + "type": "integer", + "description": "Maximum number of queued deployments." + }, + "server_disk_usage_notification_threshold": { + "type": "integer", + "description": "Server disk usage notification threshold (%)." + }, + "server_disk_usage_check_frequency": { + "type": "string", + "description": "Cron expression for disk usage check frequency." + }, + "server_disk_usage_notification_interval_hours": { + "type": "integer", + "description": "Minimum hours between high disk usage notifications (1-720). Default: 24." + }, + "connection_timeout": { + "type": "integer", + "description": "SSH connection timeout in seconds (1-300). Default: 10." + }, + "wildcard_domain": { + "type": "string", + "nullable": true, + "description": "Wildcard domain (URL) used to generate domains for new resources on this server. Null removes it." }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "description": "The token needs the deploy permission to change the proxy type." - }, - "404": { - "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/servers/{uuid}/proxy/configuration": { - "put": { - "tags": [ - "Servers" - ], - "summary": "Save server proxy configuration", - "description": "Save the raw proxy Docker Compose configuration for a team-owned server. Needs a token with the `write` and `deploy` permissions. Multi-line configuration must be base64 encoded (same pattern as other compose payloads).", - "operationId": "save-server-proxy-configuration", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "Server UUID", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "configuration" - ], - "properties": { - "configuration": { - "description": "Proxy docker-compose YAML. Prefer base64 encoding for multi-line content.", - "type": "string" + "server_timezone": { + "type": "string", + "description": "Timezone of the server, for example Europe/Berlin. Scheduled tasks and backups use it." + }, + "backup_compression_cpu_percentage": { + "type": "integer", + "enum": [ + 25, + 50, + 75, + 100 + ], + "description": "Maximum CPU percentage that backup compression can use. Default: 25." } }, "type": "object" @@ -17629,54 +21274,12 @@ } }, "responses": { - "200": { - "description": "Proxy configuration saved.", + "201": { + "description": "Server updated.", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string", - "example": "Proxy configuration saved." - }, - "proxy_type": { - "type": [ - "string", - "null" - ] - }, - "status": { - "type": [ - "string", - "null" - ] - }, - "redirect_enabled": { - "type": "boolean" - }, - "redirect_url": { - "type": [ - "string", - "null" - ] - }, - "proxy_error_page": { - "type": [ - "string", - "null" - ] - }, - "generate_exact_labels": { - "type": "boolean" - }, - "configuration": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" + "$ref": "#/components/schemas/Server" } } } @@ -17687,6 +21290,9 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the deploy permission to change the proxy type." + }, "404": { "$ref": "#/components/responses/404" }, @@ -17701,19 +21307,19 @@ ] } }, - "/servers/{uuid}/proxy/restart": { - "post": { + "/servers/{uuid}/resources": { + "get": { "tags": [ "Servers" ], - "summary": "Restart server proxy", - "description": "Queue a proxy restart for a team-owned server. Needs a token with the `deploy` permission.", - "operationId": "restart-server-proxy", + "summary": "Resources", + "description": "Get resources by server.", + "operationId": "get-resources-by-server-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "Server UUID", + "description": "Server's UUID", "required": true, "schema": { "type": "string" @@ -17722,17 +21328,37 @@ ], "responses": { "200": { - "description": "Proxy restart queued.", + "description": "Get resources by server", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string", - "example": "Proxy restart queued." - } - }, - "type": "object" + "type": "array", + "items": { + "properties": { + "id": { + "type": "integer" + }, + "uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "type": "object" + } } } } @@ -17742,9 +21368,6 @@ }, "401": { "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" } }, "security": [ @@ -17754,99 +21377,46 @@ ] } }, - "/servers/{uuid}/sentinel": { + "/servers/{uuid}/domains": { "get": { "tags": [ "Servers" ], - "summary": "Get Sentinel settings", - "description": "Get Sentinel settings for a server owned by the authenticated team. sentinel_token and sentinel_custom_url require the read:sensitive or root token ability.", - "operationId": "get-server-sentinel", + "summary": "Domains", + "description": "Get domains by server.", + "operationId": "get-domains-by-server-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "Server UUID", + "description": "Server's UUID", "required": true, "schema": { "type": "string" } } - ], - "responses": { - "200": { - "description": "Sentinel settings.", - "content": { - "application/json": { - "schema": { - "properties": { - "is_sentinel_enabled": { - "description": "Sentinel is mandatory on regular managed servers.", - "type": "boolean", - "readOnly": true - }, - "is_metrics_enabled": { - "type": "boolean" - }, - "is_sentinel_debug_enabled": { - "type": "boolean" - }, - "sentinel_token": { - "description": "Only present with read:sensitive.", - "type": "string" - }, - "sentinel_metrics_refresh_rate_seconds": { - "type": "integer" - }, - "sentinel_metrics_history_days": { - "type": "integer" - }, - "sentinel_push_interval_seconds": { - "type": "integer" - }, - "sentinel_custom_url": { - "description": "Only present with read:sensitive.", - "type": "string" - }, - "sentinel_updated_at": { - "type": [ - "string", - "null" - ] - }, - "traffic_topn": { - "type": "integer" - }, - "traffic_sample_threshold": { - "type": "integer" - }, - "traffic_retention_1h_days": { - "type": "integer" - }, - "traffic_retention_1d_days": { - "type": "integer" - }, - "is_geoip_enabled": { - "type": "boolean" - }, - "geoip_refresh_days": { - "type": "integer" - }, - "traffic_ip_mode": { - "description": "How Sentinel stores client IPs for the Top IPs breakdown.", - "type": "string", - "enum": [ - "full", - "anonymized", - "off" - ] + ], + "responses": { + "200": { + "description": "Get domains by server", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "properties": { + "ip": { + "type": "string" + }, + "domains": { + "type": "array", + "items": { + "type": "string" + } + } }, - "geoip_maxmind_license_key": { - "description": "Only present with read:sensitive.", - "type": "string" - } - }, - "type": "object" + "type": "object" + } } } } @@ -17856,9 +21426,6 @@ }, "401": { "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" } }, "security": [ @@ -17866,14 +21433,16 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/servers/{uuid}/validate": { + "post": { "tags": [ "Servers" ], - "summary": "Update Sentinel settings", - "description": "Update Sentinel settings for a server owned by the authenticated team. Changing token/metrics timing fields may restart Sentinel. Needs a token with the write and deploy permissions.", - "operationId": "update-server-sentinel", + "summary": "Validate", + "description": "Validate server by UUID. With install=true, needs a token with the write and deploy permissions.", + "operationId": "validate-server-by-uuid", "parameters": [ { "name": "uuid", @@ -17886,78 +21455,15 @@ } ], "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { "properties": { - "is_metrics_enabled": { - "type": "boolean" - }, - "is_sentinel_debug_enabled": { - "type": "boolean" - }, - "sentinel_token": { - "type": "string" - }, - "sentinel_metrics_refresh_rate_seconds": { - "type": "integer", - "minimum": 1 - }, - "sentinel_metrics_history_days": { - "type": "integer", - "minimum": 1 - }, - "sentinel_push_interval_seconds": { - "type": "integer", - "minimum": 10 - }, - "sentinel_custom_url": { - "type": [ - "string", - "null" - ] - }, - "traffic_topn": { - "type": "integer", - "maximum": 1000, - "minimum": 1 - }, - "traffic_sample_threshold": { - "type": "integer", - "minimum": 0 - }, - "traffic_retention_1h_days": { - "type": "integer", - "maximum": 365, - "minimum": 1 - }, - "traffic_retention_1d_days": { - "type": "integer", - "maximum": 3650, - "minimum": 1 - }, - "is_geoip_enabled": { - "type": "boolean" - }, - "geoip_refresh_days": { - "type": "integer", - "minimum": 1 - }, - "geoip_maxmind_license_key": { - "type": [ - "string", - "null" - ] - }, - "traffic_ip_mode": { - "description": "How Sentinel stores client IPs: full, anonymized (IPv4 /24, IPv6 /48), or off.", - "type": "string", - "enum": [ - "full", - "anonymized", - "off" - ] + "install": { + "description": "Install missing prerequisites and Docker, then start the proxy. This can restart the Docker daemon. Needs the deploy permission.", + "type": "boolean", + "default": false } }, "type": "object" @@ -17966,8 +21472,21 @@ } }, "responses": { - "200": { - "description": "Updated Sentinel settings." + "201": { + "description": "Server validation started.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Validation started." + } + }, + "type": "object" + } + } + } }, "400": { "$ref": "#/components/responses/400" @@ -17976,7 +21495,7 @@ "$ref": "#/components/responses/401" }, "403": { - "description": "The token needs the write and deploy permissions." + "description": "The token needs the deploy permission to install the server." }, "404": { "$ref": "#/components/responses/404" @@ -17992,18 +21511,19 @@ ] } }, - "/servers/{uuid}/migrate": { + "/servers/{uuid}/host-key/reset": { "post": { "tags": [ "Servers" ], - "summary": "Migrate server to another Coolify instance", - "description": "Start a transfer in the background: export this server, import and claim it on the target instance (with the given token), then disable automations here. All secrets of the server, also locked environment variables, are sent to the target. Follow the progress with GET /servers/{uuid}/transfer. The target URL must use https. Requires read:sensitive and write, and the owner role of the server team.", - "operationId": "migrate-server-between-instances", + "summary": "Reset host key", + "description": "Remove the trusted SSH host key of the server, or trust the given key. Without ssh_host_key, Coolify trusts the key that the server sends on the next connection.", + "operationId": "reset-server-host-key-by-uuid", "parameters": [ { "name": "uuid", "in": "path", + "description": "Server UUID", "required": true, "schema": { "type": "string" @@ -18011,21 +21531,13 @@ } ], "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { - "required": [ - "target_url", - "target_token" - ], "properties": { - "target_url": { - "type": "string", - "example": "https://coolify-b.example.com" - }, - "target_token": { - "description": "API token on the target instance (root or write)", + "ssh_host_key": { + "description": "The SSH host key(s) to trust, as public key lines or known_hosts lines.", "type": "string" } }, @@ -18035,17 +21547,42 @@ } }, "responses": { - "202": { - "description": "Transfer started" + "200": { + "description": "Host key reset.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Host key reset." + }, + "ssh_host_key_fingerprints": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" }, "403": { - "description": "Missing sensitive permission or not an owner of the server team" + "description": "Only team admins and owners can reset the host key." }, "404": { "$ref": "#/components/responses/404" }, "422": { - "description": "Validation or remote import failed" + "$ref": "#/components/responses/422" } }, "security": [ @@ -18055,18 +21592,19 @@ ] } }, - "/servers/{uuid}/transfer": { + "/services/{uuid}/applications": { "get": { "tags": [ - "Servers" + "Service applications" ], - "summary": "Get server transfer status", - "description": "Show the transfer state of a server on this instance: the import/claim state (transfer) and the state of a running or finished transfer to another instance (migration).", - "operationId": "get-server-transfer-status", + "summary": "List service applications", + "description": "List compose service applications (containers) for a single service.", + "operationId": "list-service-applications-by-service-uuid", "parameters": [ { "name": "uuid", "in": "path", + "description": "Service UUID.", "required": true, "schema": { "type": "string" @@ -18075,7 +21613,17 @@ ], "responses": { "200": { - "description": "Transfer status" + "description": "Service applications for this service.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + } + } }, "401": { "$ref": "#/components/responses/401" @@ -18091,82 +21639,50 @@ ] } }, - "/servers/import/check": { + "/services/{uuid}/applications/{app_uuid}": { "get": { "tags": [ - "Servers" + "Service applications" ], - "summary": "Check server import", - "description": "Check that this instance can import a server, before the source instance starts the transfer. It checks the token, the bundle version, the server limit, servers with the same UUID or IP, and that this instance can reach the SSH port of the server.", - "operationId": "check-server-import", + "summary": "Get service application", + "description": "Get a single compose service application by service UUID and application UUID.", + "operationId": "get-service-application-by-service-and-app-uuid", "parameters": [ { - "name": "server_uuid", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ip", - "in": "query", + "name": "uuid", + "in": "path", + "description": "Service UUID.", "required": true, "schema": { - "type": "string" - } - }, - { - "name": "port", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "default": 22 - } - }, - { - "name": "schema_version", - "in": "query", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "system_github_apps[]", - "in": "query", - "description": "UUIDs of system-wide GitHub Apps that the server uses. The response lists the ones this instance does not have.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } }, { - "name": "system_gitlab_apps[]", - "in": "query", - "description": "UUIDs of system-wide GitLab Apps that the server uses. The response lists the ones this instance does not have.", - "required": false, + "name": "app_uuid", + "in": "path", + "description": "Service application UUID.", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], "responses": { "200": { - "description": "The server can be imported. Lists every check with its result." + "description": "Service application.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } }, "401": { "$ref": "#/components/responses/401" }, - "422": { - "description": "One or more checks failed. Lists every check with its result." + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -18174,38 +21690,144 @@ "bearerAuth": [] } ] - } - }, - "/servers/import": { - "post": { + }, + "patch": { "tags": [ - "Servers" + "Service applications" + ], + "summary": "Update service application", + "description": "Update fields for a compose service application. Use `url` for comma-separated public URLs (same rules as `urls[].url` on PATCH /services/{uuid}).", + "operationId": "patch-service-application-by-service-and-app-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Service UUID.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "app_uuid", + "in": "path", + "description": "Service application UUID.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "force_domain_override", + "in": "query", + "description": "When true, allow duplicate URLs in the request and proceed despite domain conflicts (same as service PATCH).", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } ], - "summary": "Import server transfer bundle", - "description": "Import a server transfer bundle into this Coolify instance (adopt mode by default). This instance then manages the server, and Sentinel reports to it. Needs a token with the write and deploy permissions.", - "operationId": "import-server-transfer-bundle", "requestBody": { - "required": true, "content": { "application/json": { "schema": { "properties": { - "bundle": { - "description": "Transfer bundle", - "type": "object" + "url": { + "description": "Comma-separated list of URLs (e.g. \"http://app.example.com:8080,https://app2.example.com\"). Stored as fqdn.", + "type": [ + "string", + "null" + ] }, - "dry_run": { - "type": "boolean", - "default": false + "noindex_domains": { + "description": "The subset of the service application domains served with an X-Robots-Tag: noindex, nofollow response header, keeping them out of search engines. Entries that are not among the domains are ignored.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } }, - "preserve_uuids": { - "type": "boolean", - "default": true + "human_name": { + "type": [ + "string", + "null" + ] }, - "adopt_mode": { - "description": "Import without forcing redeploy; keep statuses for adoption", - "type": "boolean", - "default": true + "description": { + "type": [ + "string", + "null" + ] + }, + "image": { + "type": [ + "string", + "null" + ] + }, + "exclude_from_status": { + "type": [ + "boolean", + "null" + ] + }, + "is_log_drain_enabled": { + "type": [ + "boolean", + "null" + ] + }, + "is_gzip_enabled": { + "type": [ + "boolean", + "null" + ] + }, + "traefik_certificate_resolver": { + "description": "Traefik certificate resolver for this service application. Null uses the server setting, \"none\" uses no resolver.", + "type": [ + "string", + "null" + ] + }, + "is_stripprefix_enabled": { + "type": [ + "boolean", + "null" + ] + }, + "is_force_https_enabled": { + "type": [ + "boolean", + "null" + ] + }, + "is_permanent_redirect_enabled": { + "description": "Use permanent redirects (301/308) instead of temporary (302/307) for the HTTP to HTTPS and www redirects. Defaults to false.", + "type": [ + "boolean", + "null" + ] + }, + "redirect": { + "description": "How to handle www and non-www domains. \"www\" redirects non-www to www, \"non-www\" redirects www to non-www. Both need a www and a non-www domain in url.", + "type": "string", + "enum": [ + "both", + "www", + "non-www" + ] + }, + "max_restart_count": { + "description": "Maximum Docker restart count before Coolify stops the container. Set to 0 to disable the limit.", + "type": [ + "integer", + "null" + ], + "minimum": 0 } }, "type": "object" @@ -18215,19 +21837,26 @@ }, "responses": { "200": { - "description": "Dry-run result" - }, - "201": { - "description": "Imported" + "description": "Updated service application.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the write and deploy permissions." + "404": { + "$ref": "#/components/responses/404" + }, + "409": { + "description": "Domain conflicts (unless force_domain_override)." }, "422": { - "description": "Validation failed" + "$ref": "#/components/responses/422" } }, "security": [ @@ -18237,80 +21866,69 @@ ] } }, - "/servers/{uuid}/transfer/complete": { - "post": { + "/services/{uuid}/applications/{app_uuid}/logs": { + "get": { "tags": [ - "Servers" + "Service applications" ], - "summary": "Mark server transferred", - "description": "Source-instance recovery step: disable automations here when the target already manages the server but the transfer could not finish on this instance.", - "operationId": "complete-server-transfer", + "summary": "Get service application logs", + "description": "Get Docker logs for a single compose service container. Requires the `read:sensitive` or `root` token ability.", + "operationId": "get-service-application-logs-by-service-and-app-uuid", "parameters": [ { "name": "uuid", "in": "path", + "description": "Service UUID.", "required": true, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "export_id": { - "type": [ - "string", - "null" - ] - }, - "target_instance_url": { - "type": [ - "string", - "null" - ] - } - }, - "type": "object" - } + }, + { + "name": "app_uuid", + "in": "path", + "description": "Service application UUID.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "lines", + "in": "query", + "description": "Number of lines to show from the end of the logs. Use `all` to return all logs. `-1` remains available as a compatibility alias.", + "required": false, + "schema": { + "oneOf": [ + { + "type": "integer", + "format": "int32", + "default": 100, + "maximum": 10000, + "minimum": -1 + }, + { + "type": "string", + "enum": [ + "all" + ] + } + ] } } - }, - "responses": { - "200": { - "description": "Marked transferred" - }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/servers": { - "get": { - "tags": [ - "Servers" ], - "summary": "List", - "description": "List all servers.", - "operationId": "list-servers", "responses": { "200": { - "description": "Get all servers.", + "description": "Logs.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Server" - } + "properties": { + "logs": { + "type": "string" + } + }, + "type": "object" } } } @@ -18320,6 +21938,12 @@ }, "401": { "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "501": { + "description": "Swarm not supported." } }, "security": [ @@ -18330,95 +21954,61 @@ }, "post": { "tags": [ - "Servers" + "Service applications" ], - "summary": "Create", - "description": "Create Server.", - "operationId": "create-server", - "requestBody": { - "description": "Server created.", - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "name": { - "type": "string", - "example": "My Server", - "description": "The name of the server. Must not contain control characters such as new lines." - }, - "description": { - "type": "string", - "example": "My Server Description", - "description": "The description of the server." - }, - "ip": { - "type": "string", - "example": "127.0.0.1", - "description": "The IP of the server." - }, - "port": { - "type": "integer", - "example": 22, - "description": "The port of the server." - }, - "user": { - "type": "string", - "example": "root", - "description": "The user of the server." - }, - "private_key_uuid": { - "type": "string", - "example": "og888os", - "description": "The UUID of the private key." - }, - "server_role": { - "type": "string", - "enum": [ - "deployment", - "build", - "both" - ], - "example": "both", - "description": "Server role." - }, - "is_build_server": { - "type": "boolean", - "deprecated": true, - "description": "Deprecated: use server_role instead. true sets server_role to build, false sets it to both. Must not conflict with server_role." - }, - "instant_validate": { - "type": "boolean", - "example": false, - "description": "Instant validate." - }, - "proxy_type": { - "type": "string", - "enum": [ - "traefik", - "caddy", - "none" - ], - "example": "traefik", - "description": "The proxy type." - } + "summary": "Get service application logs", + "description": "Get Docker logs for a single compose service container. Requires the `read:sensitive` or `root` token ability.", + "operationId": "post-service-application-logs-by-service-and-app-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "app_uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "lines", + "in": "query", + "description": "Number of lines to show from the end of the logs. Use `all` to return all logs. `-1` remains available as a compatibility alias.", + "required": false, + "schema": { + "oneOf": [ + { + "type": "integer", + "format": "int32", + "default": 100, + "maximum": 10000, + "minimum": -1 }, - "type": "object" - } + { + "type": "string", + "enum": [ + "all" + ] + } + ] } } - }, + ], "responses": { - "201": { - "description": "Server created.", + "200": { + "description": "Logs.", "content": { "application/json": { "schema": { "properties": { - "uuid": { - "type": "string", - "example": "og888os", - "description": "The UUID of the server." + "logs": { + "type": "string" } }, "type": "object" @@ -18435,8 +22025,8 @@ "404": { "$ref": "#/components/responses/404" }, - "422": { - "$ref": "#/components/responses/422" + "501": { + "description": "Swarm not supported." } }, "security": [ @@ -18446,32 +22036,62 @@ ] } }, - "/servers/{uuid}": { - "get": { + "/services/{uuid}/applications/{app_uuid}/start": { + "post": { "tags": [ - "Servers" + "Service applications" ], - "summary": "Get", - "description": "Get server by UUID.", - "operationId": "get-server-by-uuid", + "summary": "Start or redeploy service application container", + "description": "Runs docker compose up for a single compose service (no-deps), optionally pulling the image and rebuilding.", + "operationId": "post-start-service-application-by-service-and-app-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "Server's UUID", "required": true, "schema": { "type": "string" } + }, + { + "name": "app_uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "force", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "latest", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } } ], "responses": { "200": { - "description": "Get server by UUID", + "description": "Deploy request queued.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Server" + "properties": { + "message": { + "type": "string" + } + }, + "type": "object" } } } @@ -18484,6 +22104,9 @@ }, "404": { "$ref": "#/components/responses/404" + }, + "501": { + "description": "Swarm not supported." } }, "security": [ @@ -18491,55 +22114,43 @@ "bearerAuth": [] } ] - }, - "delete": { + } + }, + "/services/{uuid}/applications/{app_uuid}/restart": { + "post": { "tags": [ - "Servers" + "Service applications" ], - "summary": "Delete", - "description": "Delete server by UUID. With force or delete_from_provider, needs a token with the write and deploy permissions.", - "operationId": "delete-server-by-uuid", + "summary": "Restart service application container", + "description": "Restarts a single compose service container.", + "operationId": "post-restart-service-application-by-service-and-app-uuid", "parameters": [ { - "name": "uuid", - "in": "path", - "description": "UUID of the server.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "force", - "in": "query", - "description": "Also delete all resources on the server. Needs the deploy permission.", - "required": false, + "name": "uuid", + "in": "path", + "required": true, "schema": { - "type": "boolean", - "default": false + "type": "string" } }, { - "name": "delete_from_provider", - "in": "query", - "description": "Also delete the server from its cloud provider (Hetzner, Vultr or DigitalOcean). This cannot be undone. Needs the deploy permission.", - "required": false, + "name": "app_uuid", + "in": "path", + "required": true, "schema": { - "type": "boolean", - "default": false + "type": "string" } } ], "responses": { "200": { - "description": "Server deleted.", + "description": "Restart queued.", "content": { "application/json": { "schema": { "properties": { "message": { - "type": "string", - "example": "Server deleted." + "type": "string" } }, "type": "object" @@ -18553,14 +22164,11 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the deploy permission to delete the resources or the cloud server." - }, "404": { "$ref": "#/components/responses/404" }, - "422": { - "$ref": "#/components/responses/422" + "501": { + "description": "Swarm not supported." } }, "security": [ @@ -18568,143 +22176,46 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/services/{uuid}/applications/{app_uuid}/stop": { + "post": { "tags": [ - "Servers" + "Service applications" ], - "summary": "Update", - "description": "Update Server. Changing proxy_type needs a token with the write and deploy permissions.", - "operationId": "update-server-by-uuid", + "summary": "Stop service application container", + "description": "Stops a single compose service container.", + "operationId": "post-stop-service-application-by-service-and-app-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "Server UUID", "required": true, "schema": { "type": "string" } - } - ], - "requestBody": { - "description": "Server updated.", - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "name": { - "type": "string", - "description": "The name of the server. Must not contain control characters such as new lines." - }, - "description": { - "type": "string", - "description": "The description of the server." - }, - "ip": { - "type": "string", - "description": "The IP of the server." - }, - "port": { - "type": "integer", - "description": "The port of the server." - }, - "user": { - "type": "string", - "description": "The user of the server." - }, - "private_key_uuid": { - "type": "string", - "description": "The UUID of the private key." - }, - "server_role": { - "type": "string", - "enum": [ - "deployment", - "build", - "both" - ], - "description": "Server role." - }, - "is_build_server": { - "type": "boolean", - "deprecated": true, - "description": "Deprecated: use server_role instead. true sets server_role to build, false changes a build server to both and leaves other roles unchanged. Must not conflict with server_role." - }, - "instant_validate": { - "type": "boolean", - "description": "Instant validate." - }, - "proxy_type": { - "type": "string", - "enum": [ - "traefik", - "caddy", - "none" - ], - "description": "The proxy type. Changing it starts the new proxy on the server and needs the deploy permission." - }, - "concurrent_builds": { - "type": "integer", - "description": "Number of concurrent builds." - }, - "dynamic_timeout": { - "type": "integer", - "description": "Deployment timeout in seconds." - }, - "deployment_queue_limit": { - "type": "integer", - "description": "Maximum number of queued deployments." - }, - "server_disk_usage_notification_threshold": { - "type": "integer", - "description": "Server disk usage notification threshold (%)." - }, - "server_disk_usage_check_frequency": { - "type": "string", - "description": "Cron expression for disk usage check frequency." - }, - "server_disk_usage_notification_interval_hours": { - "type": "integer", - "description": "Minimum hours between high disk usage notifications (1-720). Default: 24." - }, - "connection_timeout": { - "type": "integer", - "description": "SSH connection timeout in seconds (1-300). Default: 10." - }, - "wildcard_domain": { - "type": "string", - "nullable": true, - "description": "Wildcard domain (URL) used to generate domains for new resources on this server. Null removes it." - }, - "server_timezone": { - "type": "string", - "description": "Timezone of the server, for example Europe/Berlin. Scheduled tasks and backups use it." - }, - "backup_compression_cpu_percentage": { - "type": "integer", - "enum": [ - 25, - 50, - 75, - 100 - ], - "description": "Maximum CPU percentage that backup compression can use. Default: 25." - } - }, - "type": "object" - } + }, + { + "name": "app_uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { - "201": { - "description": "Server updated.", + "200": { + "description": "Stop queued.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Server" + "properties": { + "message": { + "type": "string" + } + }, + "type": "object" } } } @@ -18715,14 +22226,11 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the deploy permission to change the proxy type." - }, "404": { "$ref": "#/components/responses/404" }, - "422": { - "$ref": "#/components/responses/422" + "501": { + "description": "Swarm not supported." } }, "security": [ @@ -18732,19 +22240,27 @@ ] } }, - "/servers/{uuid}/resources": { - "get": { + "/services/{uuid}/databases/{database_uuid}/imports/uploads": { + "post": { "tags": [ - "Servers" + "Service databases" ], - "summary": "Resources", - "description": "Get resources by server.", - "operationId": "get-resources-by-server-uuid", + "summary": "Upload service database import", + "operationId": "upload-service-database-import", "parameters": [ { "name": "uuid", "in": "path", - "description": "Server's UUID", + "description": "Service UUID.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "database_uuid", + "in": "path", + "description": "Service database UUID.", "required": true, "schema": { "type": "string" @@ -18752,47 +22268,11 @@ } ], "responses": { - "200": { - "description": "Get resources by server", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "properties": { - "id": { - "type": "integer" - }, - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "status": { - "type": "string" - } - }, - "type": "object" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "201": { + "description": "Upload completed" }, - "401": { - "$ref": "#/components/responses/401" + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -18802,55 +22282,56 @@ ] } }, - "/servers/{uuid}/domains": { - "get": { + "/services/{uuid}/databases/{database_uuid}/imports": { + "post": { "tags": [ - "Servers" + "Service databases" ], - "summary": "Domains", - "description": "Get domains by server.", - "operationId": "get-domains-by-server-uuid", + "summary": "Import service database backup", + "description": "Restore a backup into the service database. Every import source requires the deploy ability.", + "operationId": "create-service-database-import", "parameters": [ { "name": "uuid", "in": "path", - "description": "Server's UUID", + "description": "Service UUID.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "database_uuid", + "in": "path", + "description": "Service database UUID.", "required": true, "schema": { "type": "string" } } ], - "responses": { - "200": { - "description": "Get domains by server", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "properties": { - "ip": { - "type": "string" - }, - "domains": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "type": "object" - } - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatabaseImportRequest" } } + } + }, + "responses": { + "202": { + "description": "Import queued" }, - "400": { - "$ref": "#/components/responses/400" + "403": { + "description": "The token needs the deploy ability." }, - "401": { - "$ref": "#/components/responses/401" + "409": { + "description": "Another start, restart or import of this database is already in progress." + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -18860,73 +22341,55 @@ ] } }, - "/servers/{uuid}/validate": { - "post": { + "/services/{uuid}/databases/{database_uuid}/imports/{activity_id}": { + "get": { "tags": [ - "Servers" + "Service databases" ], - "summary": "Validate", - "description": "Validate server by UUID. With install=true, needs a token with the write and deploy permissions.", - "operationId": "validate-server-by-uuid", + "summary": "Get service database import status", + "operationId": "get-service-database-import", "parameters": [ { "name": "uuid", "in": "path", - "description": "Server UUID", + "description": "Service UUID.", "required": true, "schema": { "type": "string" } - } - ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "properties": { - "install": { - "description": "Install missing prerequisites and Docker, then start the proxy. This can restart the Docker daemon. Needs the deploy permission.", - "type": "boolean", - "default": false - } - }, - "type": "object" - } + }, + { + "name": "database_uuid", + "in": "path", + "description": "Service database UUID.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "activity_id", + "in": "path", + "description": "Import activity ID.", + "required": true, + "schema": { + "type": "integer" } } - }, + ], "responses": { - "201": { - "description": "Server validation started.", + "200": { + "description": "Import status", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string", - "example": "Validation started." - } - }, - "type": "object" + "$ref": "#/components/schemas/DatabaseImportStatus" } } } }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "description": "The token needs the deploy permission to install the server." - }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -18936,14 +22399,14 @@ ] } }, - "/services/{uuid}/applications": { + "/services/{uuid}/databases": { "get": { "tags": [ - "Service applications" + "Service databases" ], - "summary": "List service applications", - "description": "List compose service applications (containers) for a single service.", - "operationId": "list-service-applications-by-service-uuid", + "summary": "List service databases", + "description": "List compose databases for a single service.", + "operationId": "list-service-databases-by-service-uuid", "parameters": [ { "name": "uuid", @@ -18957,7 +22420,7 @@ ], "responses": { "200": { - "description": "Service applications for this service.", + "description": "Service databases.", "content": { "application/json": { "schema": { @@ -18983,14 +22446,14 @@ ] } }, - "/services/{uuid}/applications/{app_uuid}": { + "/services/{uuid}/databases/{database_uuid}": { "get": { "tags": [ - "Service applications" + "Service databases" ], - "summary": "Get service application", - "description": "Get a single compose service application by service UUID and application UUID.", - "operationId": "get-service-application-by-service-and-app-uuid", + "summary": "Get service database", + "description": "Get a compose database by service UUID and database UUID.", + "operationId": "get-service-database-by-service-and-database-uuid", "parameters": [ { "name": "uuid", @@ -19002,9 +22465,9 @@ } }, { - "name": "app_uuid", + "name": "database_uuid", "in": "path", - "description": "Service application UUID.", + "description": "Service database UUID.", "required": true, "schema": { "type": "string" @@ -19013,7 +22476,7 @@ ], "responses": { "200": { - "description": "Service application.", + "description": "Service database.", "content": { "application/json": { "schema": { @@ -19037,11 +22500,11 @@ }, "patch": { "tags": [ - "Service applications" + "Service databases" ], - "summary": "Update service application", - "description": "Update fields for a compose service application. Use `url` for comma-separated public URLs (same rules as `urls[].url` on PATCH /services/{uuid}).", - "operationId": "patch-service-application-by-service-and-app-uuid", + "summary": "Update service database", + "description": "Update mutable fields for a compose service database.", + "operationId": "patch-service-database-by-service-and-database-uuid", "parameters": [ { "name": "uuid", @@ -19053,23 +22516,13 @@ } }, { - "name": "app_uuid", + "name": "database_uuid", "in": "path", - "description": "Service application UUID.", + "description": "Service database UUID.", "required": true, "schema": { "type": "string" } - }, - { - "name": "force_domain_override", - "in": "query", - "description": "When true, allow duplicate URLs in the request and proceed despite domain conflicts (same as service PATCH).", - "required": false, - "schema": { - "type": "boolean", - "default": false - } } ], "requestBody": { @@ -19077,23 +22530,6 @@ "application/json": { "schema": { "properties": { - "url": { - "description": "Comma-separated list of URLs (e.g. \"http://app.example.com:8080,https://app2.example.com\"). Stored as fqdn.", - "type": [ - "string", - "null" - ] - }, - "noindex_domains": { - "description": "The subset of the service application domains served with an X-Robots-Tag: noindex, nofollow response header, keeping them out of search engines. Entries that are not among the domains are ignored.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } - }, "human_name": { "type": [ "string", @@ -19107,81 +22543,43 @@ ] }, "image": { - "type": [ - "string", - "null" - ] + "type": "string" }, "exclude_from_status": { - "type": [ - "boolean", - "null" - ] + "type": "boolean" }, "is_log_drain_enabled": { - "type": [ - "boolean", - "null" - ] - }, - "is_gzip_enabled": { - "type": [ - "boolean", - "null" - ] - }, - "traefik_certificate_resolver": { - "description": "Traefik certificate resolver for this service application. Null uses the server setting, \"none\" uses no resolver.", - "type": [ - "string", - "null" - ] - }, - "is_stripprefix_enabled": { - "type": [ - "boolean", - "null" - ] + "type": "boolean" }, - "is_force_https_enabled": { - "type": [ - "boolean", - "null" - ] + "is_public": { + "description": "Changing it starts or stops the database proxy, so it needs a token with the deploy permission.", + "type": "boolean" }, - "is_permanent_redirect_enabled": { - "description": "Use permanent redirects (301/308) instead of temporary (302/307) for the HTTP to HTTPS and www redirects. Defaults to false.", + "public_port": { "type": [ - "boolean", + "integer", "null" - ] - }, - "redirect": { - "description": "How to handle www and non-www domains. \"www\" redirects non-www to www, \"non-www\" redirects www to non-www. Both need a www and a non-www domain in url.", - "type": "string", - "enum": [ - "both", - "www", - "non-www" - ] + ], + "maximum": 65535, + "minimum": 1 }, - "max_restart_count": { - "description": "Maximum Docker restart count before Coolify stops the container. Set to 0 to disable the limit.", + "public_port_timeout": { "type": [ "integer", "null" ], - "minimum": 0 + "minimum": 1 } }, - "type": "object" + "type": "object", + "additionalProperties": false } } } }, "responses": { "200": { - "description": "Updated service application.", + "description": "Updated service database.", "content": { "application/json": { "schema": { @@ -19190,15 +22588,18 @@ } } }, + "400": { + "$ref": "#/components/responses/400" + }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the deploy permission to change is_public." + }, "404": { "$ref": "#/components/responses/404" }, - "409": { - "description": "Domain conflicts (unless force_domain_override)." - }, "422": { "$ref": "#/components/responses/422" } @@ -19210,28 +22611,26 @@ ] } }, - "/services/{uuid}/applications/{app_uuid}/logs": { + "/services/{uuid}/databases/{database_uuid}/logs": { "get": { "tags": [ - "Service applications" + "Service databases" ], - "summary": "Get service application logs", - "description": "Get Docker logs for a single compose service container. Requires the `read:sensitive` or `root` token ability.", - "operationId": "get-service-application-logs-by-service-and-app-uuid", + "summary": "Get service database logs", + "description": "Get Docker logs for a compose database container. Requires the `read:sensitive` or `root` token ability.", + "operationId": "get-service-database-logs-by-service-and-database-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "Service UUID.", "required": true, "schema": { "type": "string" } }, { - "name": "app_uuid", + "name": "database_uuid", "in": "path", - "description": "Service application UUID.", "required": true, "schema": { "type": "string" @@ -19295,14 +22694,16 @@ "bearerAuth": [] } ] - }, + } + }, + "/services/{uuid}/databases/{database_uuid}/start": { "post": { "tags": [ - "Service applications" + "Service databases" ], - "summary": "Get service application logs", - "description": "Get Docker logs for a single compose service container. Requires the `read:sensitive` or `root` token ability.", - "operationId": "post-service-application-logs-by-service-and-app-uuid", + "summary": "Start or redeploy service database container", + "description": "Run docker compose up for a single compose database.", + "operationId": "start-service-database-by-service-and-database-uuid", "parameters": [ { "name": "uuid", @@ -19313,7 +22714,7 @@ } }, { - "name": "app_uuid", + "name": "database_uuid", "in": "path", "required": true, "schema": { @@ -19321,37 +22722,32 @@ } }, { - "name": "lines", + "name": "force", "in": "query", - "description": "Number of lines to show from the end of the logs. Use `all` to return all logs. `-1` remains available as a compatibility alias.", "required": false, "schema": { - "oneOf": [ - { - "type": "integer", - "format": "int32", - "default": 100, - "maximum": 10000, - "minimum": -1 - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] + "type": "boolean", + "default": false + } + }, + { + "name": "latest", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false } } ], "responses": { "200": { - "description": "Logs.", + "description": "Deploy request queued.", "content": { "application/json": { "schema": { "properties": { - "logs": { + "message": { "type": "string" } }, @@ -19380,14 +22776,14 @@ ] } }, - "/services/{uuid}/applications/{app_uuid}/start": { + "/services/{uuid}/databases/{database_uuid}/restart": { "post": { "tags": [ - "Service applications" + "Service databases" ], - "summary": "Start or redeploy service application container", - "description": "Runs docker compose up for a single compose service (no-deps), optionally pulling the image and rebuilding.", - "operationId": "post-start-service-application-by-service-and-app-uuid", + "summary": "Restart service database container", + "description": "Restart a compose database container.", + "operationId": "restart-service-database-by-service-and-database-uuid", "parameters": [ { "name": "uuid", @@ -19398,35 +22794,17 @@ } }, { - "name": "app_uuid", + "name": "database_uuid", "in": "path", "required": true, "schema": { "type": "string" } - }, - { - "name": "force", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "latest", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - } } ], "responses": { "200": { - "description": "Deploy request queued.", + "description": "Restart queued.", "content": { "application/json": { "schema": { @@ -19460,14 +22838,14 @@ ] } }, - "/services/{uuid}/applications/{app_uuid}/restart": { + "/services/{uuid}/databases/{database_uuid}/stop": { "post": { "tags": [ - "Service applications" + "Service databases" ], - "summary": "Restart service application container", - "description": "Restarts a single compose service container.", - "operationId": "post-restart-service-application-by-service-and-app-uuid", + "summary": "Stop service database container", + "description": "Stop a compose database container.", + "operationId": "stop-service-database-by-service-and-database-uuid", "parameters": [ { "name": "uuid", @@ -19478,7 +22856,7 @@ } }, { - "name": "app_uuid", + "name": "database_uuid", "in": "path", "required": true, "schema": { @@ -19488,7 +22866,7 @@ ], "responses": { "200": { - "description": "Restart queued.", + "description": "Stop queued.", "content": { "application/json": { "schema": { @@ -19522,41 +22900,168 @@ ] } }, - "/services/{uuid}/applications/{app_uuid}/stop": { - "post": { + "/services": { + "get": { "tags": [ - "Service applications" + "Services" ], - "summary": "Stop service application container", - "description": "Stops a single compose service container.", - "operationId": "post-stop-service-application-by-service-and-app-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "required": true, - "schema": { - "type": "string" + "summary": "List", + "description": "List all services.", + "operationId": "list-services", + "responses": { + "200": { + "description": "Get all services", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Service" + } + } + } } }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "security": [ { - "name": "app_uuid", - "in": "path", - "required": true, - "schema": { - "type": "string" + "bearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Services" + ], + "summary": "Create service", + "description": "Create a one-click / custom service", + "operationId": "create-service", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "server_uuid", + "project_uuid" + ], + "properties": { + "type": { + "description": "The one-click service type (e.g. \"actualbudget\", \"calibre-web\", \"gitea-with-mysql\" ...)", + "type": "string" + }, + "name": { + "type": "string", + "maxLength": 255, + "description": "Name of the service." + }, + "description": { + "type": "string", + "nullable": true, + "description": "Description of the service." + }, + "project_uuid": { + "type": "string", + "description": "Project UUID." + }, + "environment_name": { + "type": "string", + "description": "Environment name. You need to provide at least one of environment_name or environment_uuid." + }, + "environment_uuid": { + "type": "string", + "description": "Environment UUID. You need to provide at least one of environment_name or environment_uuid." + }, + "server_uuid": { + "type": "string", + "description": "Server UUID." + }, + "destination_uuid": { + "type": "string", + "description": "Destination UUID. Required if server has multiple destinations." + }, + "instant_deploy": { + "type": "boolean", + "default": false, + "description": "Start the service immediately after creation." + }, + "docker_compose_raw": { + "type": "string", + "description": "The base64 encoded Docker Compose content." + }, + "connect_to_docker_network": { + "type": "boolean", + "default": false, + "description": "Connect the service to the predefined docker network." + }, + "urls": { + "type": "array", + "description": "Array of URLs to be applied to containers of a service.", + "items": { + "properties": { + "name": { + "type": "string", + "description": "The service name as defined in docker-compose." + }, + "url": { + "type": "string", + "description": "Comma-separated list of URLs (e.g. \"https://app.coolify.io,https://app2.coolify.io\")." + } + }, + "type": "object" + } + }, + "force_domain_override": { + "type": "boolean", + "default": false, + "description": "Force domain override even if conflicts are detected." + }, + "is_container_label_escape_enabled": { + "type": "boolean", + "default": true, + "description": "Escape special characters in labels. By default, $ (and other chars) is escaped. If you want to use env variables inside the labels, turn this off." + }, + "redact_all_env_values_in_logs": { + "type": "boolean", + "default": true, + "description": "Redact all environment variable values in logs. When false, only locked (shown once) values are redacted. Requires team admin permissions." + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags to assign to the service." + } + }, + "type": "object" + } } } - ], + }, "responses": { - "200": { - "description": "Stop queued.", + "201": { + "description": "Service created successfully.", "content": { "application/json": { "schema": { "properties": { - "message": { - "type": "string" + "uuid": { + "type": "string", + "description": "Service UUID." + }, + "domains": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Service domains." } }, "type": "object" @@ -19570,170 +23075,62 @@ "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" - }, - "501": { - "description": "Swarm not supported." - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/services/{uuid}/databases/{database_uuid}/imports/uploads": { - "post": { - "tags": [ - "Service databases" - ], - "summary": "Upload service database import", - "operationId": "upload-service-database-import", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "Service UUID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "database_uuid", - "in": "path", - "description": "Service database UUID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "201": { - "description": "Upload completed" - }, - "422": { - "$ref": "#/components/responses/422" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/services/{uuid}/databases/{database_uuid}/imports": { - "post": { - "tags": [ - "Service databases" - ], - "summary": "Import service database backup", - "description": "Restore a backup into the service database. Every import source requires the deploy ability.", - "operationId": "create-service-database-import", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "Service UUID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "database_uuid", - "in": "path", - "description": "Service database UUID.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DatabaseImportRequest" - } - } - } - }, - "responses": { - "202": { - "description": "Import queued" - }, - "403": { - "description": "The token needs the deploy ability." - }, "409": { - "description": "Another start, restart or import of this database is already in progress." - }, - "422": { - "$ref": "#/components/responses/422" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/services/{uuid}/databases/{database_uuid}/imports/{activity_id}": { - "get": { - "tags": [ - "Service databases" - ], - "summary": "Get service database import status", - "operationId": "get-service-database-import", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "Service UUID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "database_uuid", - "in": "path", - "description": "Service database UUID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "activity_id", - "in": "path", - "description": "Import activity ID.", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "Import status", + "description": "Domain conflicts detected.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DatabaseImportStatus" + "properties": { + "message": { + "type": "string", + "example": "Domain conflicts detected. Use force_domain_override=true to proceed." + }, + "warning": { + "type": "string", + "example": "Using the same domain for multiple resources can cause routing conflicts and unpredictable behavior." + }, + "conflicts": { + "type": "array", + "items": { + "properties": { + "domain": { + "type": "string", + "example": "example.com" + }, + "resource_name": { + "type": "string", + "example": "My Application" + }, + "resource_uuid": { + "type": "string", + "nullable": true, + "example": "abc123-def456" + }, + "resource_type": { + "type": "string", + "enum": [ + "application", + "service", + "instance" + ], + "example": "application" + }, + "message": { + "type": "string", + "example": "Domain example.com is already in use by application 'My Application'" + } + }, + "type": "object" + } + } + }, + "type": "object" } } } }, - "404": { - "$ref": "#/components/responses/404" + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -19743,19 +23140,19 @@ ] } }, - "/services/{uuid}/databases": { + "/services/{uuid}": { "get": { "tags": [ - "Service databases" + "Services" ], - "summary": "List service databases", - "description": "List compose databases for a single service.", - "operationId": "list-service-databases-by-service-uuid", + "summary": "Get", + "description": "Get service by UUID.", + "operationId": "get-service-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "Service UUID.", + "description": "Service UUID", "required": true, "schema": { "type": "string" @@ -19764,18 +23161,18 @@ ], "responses": { "200": { - "description": "Service databases.", + "description": "Get a service by UUID.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "object" - } + "$ref": "#/components/schemas/Service" } } } }, + "400": { + "$ref": "#/components/responses/400" + }, "401": { "$ref": "#/components/responses/401" }, @@ -19788,52 +23185,96 @@ "bearerAuth": [] } ] - } - }, - "/services/{uuid}/databases/{database_uuid}": { - "get": { + }, + "delete": { "tags": [ - "Service databases" + "Services" ], - "summary": "Get service database", - "description": "Get a compose database by service UUID and database UUID.", - "operationId": "get-service-database-by-service-and-database-uuid", + "summary": "Delete", + "description": "Delete service by UUID. Needs a token with the write and deploy permissions.", + "operationId": "delete-service-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "Service UUID.", + "description": "Service UUID", "required": true, "schema": { "type": "string" } }, { - "name": "database_uuid", - "in": "path", - "description": "Service database UUID.", - "required": true, + "name": "delete_configurations", + "in": "query", + "description": "Delete configurations.", + "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": true + } + }, + { + "name": "delete_volumes", + "in": "query", + "description": "Delete volumes.", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "docker_cleanup", + "in": "query", + "description": "Run docker cleanup when the server disk usage is at or above its cleanup threshold. Skipped when a cleanup ran on the server in the last hour.", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "delete_connected_networks", + "in": "query", + "description": "Delete connected networks.", + "required": false, + "schema": { + "type": "boolean", + "default": true } } ], "responses": { "200": { - "description": "Service database.", + "description": "Delete a service by UUID", "content": { "application/json": { "schema": { + "properties": { + "message": { + "type": "string", + "example": "Service deletion request queued." + } + }, "type": "object" } } } }, + "400": { + "$ref": "#/components/responses/400" + }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the write and deploy permissions." + }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -19844,25 +23285,16 @@ }, "patch": { "tags": [ - "Service databases" + "Services" ], - "summary": "Update service database", - "description": "Update mutable fields for a compose service database.", - "operationId": "patch-service-database-by-service-and-database-uuid", + "summary": "Update", + "description": "Update service by UUID.", + "operationId": "update-service-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "Service UUID.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "database_uuid", - "in": "path", - "description": "Service database UUID.", + "description": "UUID of the service.", "required": true, "schema": { "type": "string" @@ -19870,63 +23302,95 @@ } ], "requestBody": { + "description": "Service updated.", + "required": true, "content": { "application/json": { "schema": { "properties": { - "human_name": { - "type": [ - "string", - "null" - ] + "name": { + "type": "string", + "description": "The service name." }, "description": { - "type": [ - "string", - "null" - ] + "type": "string", + "description": "The service description." }, - "image": { - "type": "string" + "instant_deploy": { + "type": "boolean", + "description": "The flag to indicate if the service should be deployed instantly." }, - "exclude_from_status": { - "type": "boolean" + "connect_to_docker_network": { + "type": "boolean", + "default": false, + "description": "Connect the service to the predefined docker network." }, - "is_log_drain_enabled": { - "type": "boolean" + "docker_compose_raw": { + "type": "string", + "description": "The base64 encoded Docker Compose content." }, - "is_public": { - "description": "Changing it starts or stops the database proxy, so it needs a token with the deploy permission.", - "type": "boolean" + "urls": { + "type": "array", + "description": "Array of URLs to be applied to containers of a service.", + "items": { + "properties": { + "name": { + "type": "string", + "description": "The service name as defined in docker-compose." + }, + "url": { + "type": "string", + "description": "Comma-separated list of URLs (e.g. \"https://app.coolify.io,https://app2.coolify.io\")." + } + }, + "type": "object" + } }, - "public_port": { - "type": [ - "integer", - "null" - ], - "maximum": 65535, - "minimum": 1 + "force_domain_override": { + "type": "boolean", + "default": false, + "description": "Force domain override even if conflicts are detected." }, - "public_port_timeout": { - "type": [ - "integer", - "null" - ], - "minimum": 1 + "is_container_label_escape_enabled": { + "type": "boolean", + "default": true, + "description": "Escape special characters in labels. By default, $ (and other chars) is escaped. If you want to use env variables inside the labels, turn this off." + }, + "redact_all_env_values_in_logs": { + "type": "boolean", + "default": true, + "description": "Redact all environment variable values in logs. When false, only locked (shown once) values are redacted. Requires team admin permissions." + }, + "include_coolify_default_variables": { + "type": "boolean", + "default": true, + "description": "Add the predefined COOLIFY_* variables (COOLIFY_URL, COOLIFY_FQDN, ...) to the environment. Requires team admin permissions. Redeploy to apply it." } }, - "type": "object", - "additionalProperties": false + "type": "object" } } } }, "responses": { "200": { - "description": "Updated service database.", + "description": "Service updated.", "content": { "application/json": { "schema": { + "properties": { + "uuid": { + "type": "string", + "description": "Service UUID." + }, + "domains": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Service domains." + } + }, "type": "object" } } @@ -19938,12 +23402,63 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the deploy permission to change is_public." - }, "404": { "$ref": "#/components/responses/404" }, + "409": { + "description": "Domain conflicts detected.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Domain conflicts detected. Use force_domain_override=true to proceed." + }, + "warning": { + "type": "string", + "example": "Using the same domain for multiple resources can cause routing conflicts and unpredictable behavior." + }, + "conflicts": { + "type": "array", + "items": { + "properties": { + "domain": { + "type": "string", + "example": "example.com" + }, + "resource_name": { + "type": "string", + "example": "My Application" + }, + "resource_uuid": { + "type": "string", + "nullable": true, + "example": "abc123-def456" + }, + "resource_type": { + "type": "string", + "enum": [ + "application", + "service", + "instance" + ], + "example": "application" + }, + "message": { + "type": "string", + "example": "Domain example.com is already in use by application 'My Application'" + } + }, + "type": "object" + } + } + }, + "type": "object" + } + } + } + }, "422": { "$ref": "#/components/responses/422" } @@ -19955,29 +23470,33 @@ ] } }, - "/services/{uuid}/databases/{database_uuid}/logs": { + "/services/{uuid}/logs": { "get": { "tags": [ - "Service databases" + "Services" ], - "summary": "Get service database logs", - "description": "Get Docker logs for a compose database container. Requires the `read:sensitive` or `root` token ability.", - "operationId": "get-service-database-logs-by-service-and-database-uuid", + "summary": "Get service logs.", + "description": "Get logs for a specific service sub-resource by service UUID. The `sub_service_name` query parameter must match the `name` field of one of the service applications or databases returned by `GET /services/{uuid}`. Requires the `read:sensitive` or `root` token ability.", + "operationId": "get-service-logs-by-uuid", "parameters": [ { "name": "uuid", "in": "path", + "description": "UUID of the service.", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } }, { - "name": "database_uuid", - "in": "path", + "name": "sub_service_name", + "in": "query", + "description": "Sub-service name from `GET /services/{uuid}` under `applications[].name` or `databases[].name`. Do not use `human_name` or the Docker container name with the service UUID suffix.", "required": true, "schema": { - "type": "string" + "type": "string", + "example": "appwrite-console" } }, { @@ -20002,11 +23521,21 @@ } ] } + }, + { + "name": "show_timestamps", + "in": "query", + "description": "Show timestamps in the logs.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } } ], "responses": { "200": { - "description": "Logs.", + "description": "Get service logs by UUID.", "content": { "application/json": { "schema": { @@ -20028,9 +23557,6 @@ }, "404": { "$ref": "#/components/responses/404" - }, - "501": { - "description": "Swarm not supported." } }, "security": [ @@ -20040,59 +23566,116 @@ ] } }, - "/services/{uuid}/databases/{database_uuid}/start": { - "post": { + "/services/{uuid}/envs": { + "get": { "tags": [ - "Service databases" + "Services" ], - "summary": "Start or redeploy service database container", - "description": "Run docker compose up for a single compose database.", - "operationId": "start-service-database-by-service-and-database-uuid", + "summary": "List Envs", + "description": "List all envs by service UUID.", + "operationId": "list-envs-by-service-uuid", "parameters": [ { "name": "uuid", "in": "path", + "description": "UUID of the service.", "required": true, "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "All environment variables by service UUID.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + } + } + } }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ { - "name": "database_uuid", + "bearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Services" + ], + "summary": "Create Env", + "description": "Create env by service UUID.", + "operationId": "create-env-by-service-uuid", + "parameters": [ + { + "name": "uuid", "in": "path", + "description": "UUID of the service.", "required": true, "schema": { "type": "string" } - }, - { - "name": "force", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "latest", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - } } ], + "requestBody": { + "description": "Env created.", + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "key": { + "type": "string", + "description": "The key of the environment variable." + }, + "value": { + "type": "string", + "description": "The value of the environment variable." + }, + "is_literal": { + "type": "boolean", + "description": "The flag to indicate if the environment variable is a literal, nothing espaced." + }, + "is_multiline": { + "type": "boolean", + "description": "The flag to indicate if the environment variable is multiline." + }, + "is_shown_once": { + "type": "boolean", + "description": "If true, the saved value is hidden in the UI and API responses. A lock is permanent: false does not unlock a locked variable, but a new value can still replace the locked one. MCP never returns environment variable values." + } + }, + "type": "object" + } + } + } + }, "responses": { - "200": { - "description": "Deploy request queued.", + "201": { + "description": "Environment variable created.", "content": { "application/json": { "schema": { "properties": { - "message": { - "type": "string" + "uuid": { + "type": "string", + "example": "nc0k04gk8g0cgsk440g0koko" } }, "type": "object" @@ -20109,8 +23692,8 @@ "404": { "$ref": "#/components/responses/404" }, - "501": { - "description": "Swarm not supported." + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -20118,46 +23701,166 @@ "bearerAuth": [] } ] - } - }, - "/services/{uuid}/databases/{database_uuid}/restart": { - "post": { + }, + "patch": { "tags": [ - "Service databases" + "Services" ], - "summary": "Restart service database container", - "description": "Restart a compose database container.", - "operationId": "restart-service-database-by-service-and-database-uuid", + "summary": "Update Env", + "description": "Update env by service UUID.", + "operationId": "update-env-by-service-uuid", "parameters": [ { "name": "uuid", "in": "path", + "description": "UUID of the service.", "required": true, "schema": { "type": "string" } + } + ], + "requestBody": { + "description": "Env updated.", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "description": "The key of the environment variable." + }, + "value": { + "type": "string", + "description": "The value of the environment variable." + }, + "is_literal": { + "type": "boolean", + "description": "The flag to indicate if the environment variable is a literal, nothing espaced." + }, + "is_multiline": { + "type": "boolean", + "description": "The flag to indicate if the environment variable is multiline." + }, + "is_shown_once": { + "type": "boolean", + "description": "If true, the saved value is hidden in the UI and API responses. A lock is permanent: false does not unlock a locked variable, but a new value can still replace the locked one. MCP never returns environment variable values." + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { + "description": "Environment variable updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" }, + "422": { + "$ref": "#/components/responses/422" + } + }, + "security": [ { - "name": "database_uuid", + "bearerAuth": [] + } + ] + } + }, + "/services/{uuid}/envs/bulk": { + "patch": { + "tags": [ + "Services" + ], + "summary": "Update Envs (Bulk)", + "description": "Update multiple envs by service UUID.", + "operationId": "update-envs-by-service-uuid", + "parameters": [ + { + "name": "uuid", "in": "path", + "description": "UUID of the service.", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "description": "Bulk envs updated.", + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "data" + ], + "properties": { + "data": { + "type": "array", + "items": { + "properties": { + "key": { + "type": "string", + "description": "The key of the environment variable." + }, + "value": { + "type": "string", + "description": "The value of the environment variable." + }, + "is_literal": { + "type": "boolean", + "description": "The flag to indicate if the environment variable is a literal, nothing espaced." + }, + "is_multiline": { + "type": "boolean", + "description": "The flag to indicate if the environment variable is multiline." + }, + "is_shown_once": { + "type": "boolean", + "description": "If true, the saved value is hidden in the UI and API responses. A lock is permanent: false does not unlock a locked variable, but a new value can still replace the locked one. MCP never returns environment variable values." + } + }, + "type": "object" + } + } + }, + "type": "object" + } + } + } + }, "responses": { - "200": { - "description": "Restart queued.", + "201": { + "description": "Environment variables updated.", "content": { "application/json": { "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "type": "object" + "type": "array", + "items": { + "$ref": "#/components/schemas/EnvironmentVariable" + } } } } @@ -20171,8 +23874,8 @@ "404": { "$ref": "#/components/responses/404" }, - "501": { - "description": "Swarm not supported." + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -20182,26 +23885,28 @@ ] } }, - "/services/{uuid}/databases/{database_uuid}/stop": { - "post": { + "/services/{uuid}/envs/{env_uuid}": { + "delete": { "tags": [ - "Service databases" + "Services" ], - "summary": "Stop service database container", - "description": "Stop a compose database container.", - "operationId": "stop-service-database-by-service-and-database-uuid", + "summary": "Delete Env", + "description": "Delete env by UUID.", + "operationId": "delete-env-by-service-uuid", "parameters": [ { "name": "uuid", "in": "path", + "description": "UUID of the service.", "required": true, "schema": { "type": "string" } }, { - "name": "database_uuid", + "name": "env_uuid", "in": "path", + "description": "UUID of the environment variable.", "required": true, "schema": { "type": "string" @@ -20210,13 +23915,14 @@ ], "responses": { "200": { - "description": "Stop queued.", + "description": "Environment variable deleted.", "content": { "application/json": { "schema": { "properties": { "message": { - "type": "string" + "type": "string", + "example": "Environment variable deleted." } }, "type": "object" @@ -20232,9 +23938,6 @@ }, "404": { "$ref": "#/components/responses/404" - }, - "501": { - "description": "Swarm not supported." } }, "security": [ @@ -20244,144 +23947,38 @@ ] } }, - "/services": { - "get": { + "/services/{uuid}/move": { + "post": { "tags": [ "Services" ], - "summary": "List", - "description": "List all services.", - "operationId": "list-services", - "responses": { - "200": { - "description": "Get all services", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Service" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - } - }, - "security": [ + "summary": "Move", + "description": "Move service to another project/environment. This is a purely organizational change — running containers are not affected. Note: after moving, the service will pick up shared environment variables from the new environment on the next deployment.", + "operationId": "move-service-by-uuid", + "parameters": [ { - "bearerAuth": [] + "name": "uuid", + "in": "path", + "description": "UUID of the service.", + "required": true, + "schema": { + "type": "string" + } } - ] - }, - "post": { - "tags": [ - "Services" ], - "summary": "Create service", - "description": "Create a one-click / custom service", - "operationId": "create-service", "requestBody": { + "description": "Target environment to move the service to.", "required": true, "content": { "application/json": { "schema": { "required": [ - "server_uuid", - "project_uuid" + "environment_uuid" ], "properties": { - "type": { - "description": "The one-click service type (e.g. \"actualbudget\", \"calibre-web\", \"gitea-with-mysql\" ...)", - "type": "string" - }, - "name": { - "type": "string", - "maxLength": 255, - "description": "Name of the service." - }, - "description": { - "type": "string", - "nullable": true, - "description": "Description of the service." - }, - "project_uuid": { - "type": "string", - "description": "Project UUID." - }, - "environment_name": { - "type": "string", - "description": "Environment name. You need to provide at least one of environment_name or environment_uuid." - }, "environment_uuid": { "type": "string", - "description": "Environment UUID. You need to provide at least one of environment_name or environment_uuid." - }, - "server_uuid": { - "type": "string", - "description": "Server UUID." - }, - "destination_uuid": { - "type": "string", - "description": "Destination UUID. Required if server has multiple destinations." - }, - "instant_deploy": { - "type": "boolean", - "default": false, - "description": "Start the service immediately after creation." - }, - "docker_compose_raw": { - "type": "string", - "description": "The base64 encoded Docker Compose content." - }, - "connect_to_docker_network": { - "type": "boolean", - "default": false, - "description": "Connect the service to the predefined docker network." - }, - "urls": { - "type": "array", - "description": "Array of URLs to be applied to containers of a service.", - "items": { - "properties": { - "name": { - "type": "string", - "description": "The service name as defined in docker-compose." - }, - "url": { - "type": "string", - "description": "Comma-separated list of URLs (e.g. \"https://app.coolify.io,https://app2.coolify.io\")." - } - }, - "type": "object" - } - }, - "force_domain_override": { - "type": "boolean", - "default": false, - "description": "Force domain override even if conflicts are detected." - }, - "is_container_label_escape_enabled": { - "type": "boolean", - "default": true, - "description": "Escape special characters in labels. By default, $ (and other chars) is escaped. If you want to use env variables inside the labels, turn this off." - }, - "redact_all_env_values_in_logs": { - "type": "boolean", - "default": true, - "description": "Redact all environment variable values in logs. When false, only locked (shown once) values are redacted. Requires team admin permissions." - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Tags to assign to the service." + "description": "UUID of the target environment." } }, "type": "object" @@ -20390,82 +23987,24 @@ } }, "responses": { - "201": { - "description": "Service created successfully.", - "content": { - "application/json": { - "schema": { - "properties": { - "uuid": { - "type": "string", - "description": "Service UUID." - }, - "domains": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Service domains." - } - }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "409": { - "description": "Domain conflicts detected.", + "200": { + "description": "Service moved successfully.", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", - "example": "Domain conflicts detected. Use force_domain_override=true to proceed." + "example": "Service moved successfully." }, - "warning": { - "type": "string", - "example": "Using the same domain for multiple resources can cause routing conflicts and unpredictable behavior." + "uuid": { + "type": "string" }, - "conflicts": { - "type": "array", - "items": { - "properties": { - "domain": { - "type": "string", - "example": "example.com" - }, - "resource_name": { - "type": "string", - "example": "My Application" - }, - "resource_uuid": { - "type": "string", - "nullable": true, - "example": "abc123-def456" - }, - "resource_type": { - "type": "string", - "enum": [ - "application", - "service", - "instance" - ], - "example": "application" - }, - "message": { - "type": "string", - "example": "Domain example.com is already in use by application 'My Application'" - } - }, - "type": "object" - } + "project_uuid": { + "type": "string" + }, + "environment_uuid": { + "type": "string" } }, "type": "object" @@ -20473,6 +24012,15 @@ } } }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, "422": { "$ref": "#/components/responses/422" } @@ -20484,35 +24032,52 @@ ] } }, - "/services/{uuid}": { - "get": { + "/services/{uuid}/migrate": { + "post": { "tags": [ "Services" ], - "summary": "Get", - "description": "Get service by UUID.", - "operationId": "get-service-by-uuid", + "summary": "Migrate to Server", + "description": "Migrate a service to another destination/server owned by the authenticated team. Stops the service, optionally transfers persistent volume data when both servers are managed by Coolify, and updates database records. Redeploy after migration completes.", + "operationId": "migrate-service-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "Service UUID", + "description": "UUID of the service.", "required": true, "schema": { "type": "string" } } ], - "responses": { - "200": { - "description": "Get a service by UUID.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Service" - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "destination_uuid" + ], + "properties": { + "destination_uuid": { + "description": "UUID of the target destination.", + "type": "string" + }, + "migrate_volumes": { + "description": "Whether to transfer persistent volume data when migrating across servers.", + "type": "boolean", + "default": true + } + }, + "type": "object" } } + } + }, + "responses": { + "200": { + "description": "Service migration started or completed." }, "400": { "$ref": "#/components/responses/400" @@ -20522,6 +24087,9 @@ }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -20529,75 +24097,37 @@ "bearerAuth": [] } ] - }, - "delete": { + } + }, + "/services/{uuid}/start": { + "post": { "tags": [ "Services" ], - "summary": "Delete", - "description": "Delete service by UUID. Needs a token with the write and deploy permissions.", - "operationId": "delete-service-by-uuid", + "summary": "Start", + "description": "Start service.", + "operationId": "start-service-by-uuid", "parameters": [ { "name": "uuid", "in": "path", - "description": "Service UUID", + "description": "UUID of the service.", "required": true, "schema": { "type": "string" } - }, - { - "name": "delete_configurations", - "in": "query", - "description": "Delete configurations.", - "required": false, - "schema": { - "type": "boolean", - "default": true - } - }, - { - "name": "delete_volumes", - "in": "query", - "description": "Delete volumes.", - "required": false, - "schema": { - "type": "boolean", - "default": true - } - }, - { - "name": "docker_cleanup", - "in": "query", - "description": "Run docker cleanup when the server disk usage is at or above its cleanup threshold. Skipped when a cleanup ran on the server in the last hour.", - "required": false, - "schema": { - "type": "boolean", - "default": true - } - }, - { - "name": "delete_connected_networks", - "in": "query", - "description": "Delete connected networks.", - "required": false, - "schema": { - "type": "boolean", - "default": true - } } ], "responses": { "200": { - "description": "Delete a service by UUID", + "description": "Start service.", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", - "example": "Service deletion request queued." + "example": "Service starting request queued." } }, "type": "object" @@ -20611,14 +24141,8 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the write and deploy permissions." - }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -20626,113 +24150,46 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/services/{uuid}/stop": { + "post": { "tags": [ "Services" ], - "summary": "Update", - "description": "Update service by UUID.", - "operationId": "update-service-by-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the service.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "Service updated.", - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "name": { - "type": "string", - "description": "The service name." - }, - "description": { - "type": "string", - "description": "The service description." - }, - "instant_deploy": { - "type": "boolean", - "description": "The flag to indicate if the service should be deployed instantly." - }, - "connect_to_docker_network": { - "type": "boolean", - "default": false, - "description": "Connect the service to the predefined docker network." - }, - "docker_compose_raw": { - "type": "string", - "description": "The base64 encoded Docker Compose content." - }, - "urls": { - "type": "array", - "description": "Array of URLs to be applied to containers of a service.", - "items": { - "properties": { - "name": { - "type": "string", - "description": "The service name as defined in docker-compose." - }, - "url": { - "type": "string", - "description": "Comma-separated list of URLs (e.g. \"https://app.coolify.io,https://app2.coolify.io\")." - } - }, - "type": "object" - } - }, - "force_domain_override": { - "type": "boolean", - "default": false, - "description": "Force domain override even if conflicts are detected." - }, - "is_container_label_escape_enabled": { - "type": "boolean", - "default": true, - "description": "Escape special characters in labels. By default, $ (and other chars) is escaped. If you want to use env variables inside the labels, turn this off." - }, - "redact_all_env_values_in_logs": { - "type": "boolean", - "default": true, - "description": "Redact all environment variable values in logs. When false, only locked (shown once) values are redacted. Requires team admin permissions." - }, - "include_coolify_default_variables": { - "type": "boolean", - "default": true, - "description": "Add the predefined COOLIFY_* variables (COOLIFY_URL, COOLIFY_FQDN, ...) to the environment. Requires team admin permissions. Redeploy to apply it." - } - }, - "type": "object" - } + "summary": "Stop", + "description": "Stop service.", + "operationId": "stop-service-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the service.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "docker_cleanup", + "in": "query", + "description": "Run docker cleanup when the server disk usage is at or above its cleanup threshold. Skipped when a cleanup ran on the server in the last hour.", + "schema": { + "type": "boolean", + "default": true } } - }, + ], "responses": { "200": { - "description": "Service updated.", + "description": "Stop service.", "content": { "application/json": { "schema": { "properties": { - "uuid": { + "message": { "type": "string", - "description": "Service UUID." - }, - "domains": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Service domains." + "example": "Service stopping request queued." } }, "type": "object" @@ -20748,54 +24205,53 @@ }, "404": { "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/services/{uuid}/restart": { + "post": { + "tags": [ + "Services" + ], + "summary": "Restart", + "description": "Restart service.", + "operationId": "restart-service-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the service.", + "required": true, + "schema": { + "type": "string" + } }, - "409": { - "description": "Domain conflicts detected.", + { + "name": "latest", + "in": "query", + "description": "Pull latest images.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Restart service.", "content": { "application/json": { "schema": { "properties": { "message": { "type": "string", - "example": "Domain conflicts detected. Use force_domain_override=true to proceed." - }, - "warning": { - "type": "string", - "example": "Using the same domain for multiple resources can cause routing conflicts and unpredictable behavior." - }, - "conflicts": { - "type": "array", - "items": { - "properties": { - "domain": { - "type": "string", - "example": "example.com" - }, - "resource_name": { - "type": "string", - "example": "My Application" - }, - "resource_uuid": { - "type": "string", - "nullable": true, - "example": "abc123-def456" - }, - "resource_type": { - "type": "string", - "enum": [ - "application", - "service", - "instance" - ], - "example": "application" - }, - "message": { - "type": "string", - "example": "Domain example.com is already in use by application 'My Application'" - } - }, - "type": "object" - } + "example": "Service restaring request queued." } }, "type": "object" @@ -20803,8 +24259,14 @@ } } }, - "422": { - "$ref": "#/components/responses/422" + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -20814,14 +24276,14 @@ ] } }, - "/services/{uuid}/logs": { + "/services/{uuid}/storages": { "get": { "tags": [ "Services" ], - "summary": "Get service logs.", - "description": "Get logs for a specific service sub-resource by service UUID. The `sub_service_name` query parameter must match the `name` field of one of the service applications or databases returned by `GET /services/{uuid}`. Requires the `read:sensitive` or `root` token ability.", - "operationId": "get-service-logs-by-uuid", + "summary": "List Storages", + "description": "List all persistent storages and file storages by service UUID.", + "operationId": "list-storages-by-service-uuid", "parameters": [ { "name": "uuid", @@ -20829,63 +24291,28 @@ "description": "UUID of the service.", "required": true, "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "sub_service_name", - "in": "query", - "description": "Sub-service name from `GET /services/{uuid}` under `applications[].name` or `databases[].name`. Do not use `human_name` or the Docker container name with the service UUID suffix.", - "required": true, - "schema": { - "type": "string", - "example": "appwrite-console" - } - }, - { - "name": "lines", - "in": "query", - "description": "Number of lines to show from the end of the logs. Use `all` to return all logs. `-1` remains available as a compatibility alias.", - "required": false, - "schema": { - "oneOf": [ - { - "type": "integer", - "format": "int32", - "default": 100, - "maximum": 10000, - "minimum": -1 - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] - } - }, - { - "name": "show_timestamps", - "in": "query", - "description": "Show timestamps in the logs.", - "required": false, - "schema": { - "type": "boolean", - "default": false + "type": "string" } } ], "responses": { "200": { - "description": "Get service logs by UUID.", + "description": "All storages by service UUID.", "content": { "application/json": { "schema": { "properties": { - "logs": { - "type": "string" + "persistent_storages": { + "type": "array", + "items": { + "type": "object" + } + }, + "file_storages": { + "type": "array", + "items": { + "type": "object" + } } }, "type": "object" @@ -20908,16 +24335,14 @@ "bearerAuth": [] } ] - } - }, - "/services/{uuid}/envs": { - "get": { + }, + "post": { "tags": [ "Services" ], - "summary": "List Envs", - "description": "List all envs by service UUID.", - "operationId": "list-envs-by-service-uuid", + "summary": "Create Storage", + "description": "Create a persistent storage or file storage for a service sub-resource.", + "operationId": "create-storage-by-service-uuid", "parameters": [ { "name": "uuid", @@ -20929,16 +24354,64 @@ } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "type", + "mount_path", + "resource_uuid" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "persistent", + "file" + ], + "description": "The type of storage." + }, + "resource_uuid": { + "type": "string", + "description": "UUID of the service application or database sub-resource." + }, + "name": { + "type": "string", + "description": "Volume name (persistent only, required for persistent)." + }, + "mount_path": { + "type": "string", + "description": "The container mount path." + }, + "content": { + "type": "string", + "nullable": true, + "description": "File content (file only, optional). Needs the deploy ability when set." + }, + "is_directory": { + "type": "boolean", + "description": "Whether this is a directory mount (file only, default false)." + }, + "fs_path": { + "type": "string", + "description": "Host path. Required for directory mounts and host file mounts. Optional for file mounts with content (default: inside the resource directory). An absolute path can be anywhere on the host; a relative path is inside the resource directory. A directory or file mount outside the resource directory needs a token with the deploy permission. Coolify never deletes a path outside the resource directory." + } + }, + "type": "object", + "additionalProperties": false + } + } + } + }, "responses": { - "200": { - "description": "All environment variables by service UUID.", + "201": { + "description": "Storage created.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EnvironmentVariable" - } + "type": "object" } } } @@ -20949,8 +24422,14 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the deploy permission for a mount outside the resource directory or for a file storage with content." + }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -20959,13 +24438,13 @@ } ] }, - "post": { + "patch": { "tags": [ "Services" ], - "summary": "Create Env", - "description": "Create env by service UUID.", - "operationId": "create-env-by-service-uuid", + "summary": "Update Storage", + "description": "Update a persistent storage or file storage by service UUID. Changed file content is saved right away and written to the server in the background, so a failed write does not change the response.", + "operationId": "update-storage-by-service-uuid", "parameters": [ { "name": "uuid", @@ -20978,54 +24457,61 @@ } ], "requestBody": { - "description": "Env created.", + "description": "Storage updated. For read-only storages (from docker-compose or services), only is_preview_suffix_enabled can be updated.", "required": true, "content": { "application/json": { "schema": { + "required": [ + "type" + ], "properties": { - "key": { + "uuid": { "type": "string", - "description": "The key of the environment variable." + "description": "The UUID of the storage (preferred)." }, - "value": { + "id": { + "type": "integer", + "description": "The ID of the storage (deprecated, use uuid instead)." + }, + "type": { "type": "string", - "description": "The value of the environment variable." + "enum": [ + "persistent", + "file" + ], + "description": "The type of storage: persistent or file." }, - "is_preview": { + "is_preview_suffix_enabled": { "type": "boolean", - "description": "The flag to indicate if the environment variable is used in preview deployments." + "description": "Whether to add -pr-N suffix for preview deployments." }, - "is_literal": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is a literal, nothing espaced." + "name": { + "type": "string", + "description": "The volume name (persistent only, not allowed for read-only storages)." }, - "is_multiline": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is multiline." + "mount_path": { + "type": "string", + "description": "The container mount path (not allowed for read-only storages)." }, - "is_shown_once": { - "type": "boolean", - "description": "If true, the saved value is hidden in the UI and API responses. MCP never returns environment variable values." + "content": { + "type": "string", + "nullable": true, + "description": "The file content (file only, not allowed for read-only storages). Changing the content needs the deploy permission." } }, - "type": "object" + "type": "object", + "additionalProperties": false } } } }, "responses": { - "201": { - "description": "Environment variable created.", + "200": { + "description": "Storage updated.", "content": { "application/json": { "schema": { - "properties": { - "uuid": { - "type": "string", - "example": "nc0k04gk8g0cgsk440g0koko" - } - }, "type": "object" } } @@ -21037,6 +24523,9 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the deploy permission to change the content of a file outside the resource directory." + }, "404": { "$ref": "#/components/responses/404" }, @@ -21049,14 +24538,16 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/services/{uuid}/storages/{storage_uuid}": { + "delete": { "tags": [ "Services" ], - "summary": "Update Env", - "description": "Update env by service UUID.", - "operationId": "update-env-by-service-uuid", + "summary": "Delete Storage", + "description": "Delete a persistent storage or file storage by service UUID.", + "operationId": "delete-storage-by-service-uuid", "parameters": [ { "name": "uuid", @@ -21066,56 +24557,29 @@ "schema": { "type": "string" } - } - ], - "requestBody": { - "description": "Env updated.", - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "key", - "value" - ], - "properties": { - "key": { - "type": "string", - "description": "The key of the environment variable." - }, - "value": { - "type": "string", - "description": "The value of the environment variable." - }, - "is_preview": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is used in preview deployments." - }, - "is_literal": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is a literal, nothing espaced." - }, - "is_multiline": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is multiline." - }, - "is_shown_once": { - "type": "boolean", - "description": "If true, the saved value is hidden in the UI and API responses. MCP never returns environment variable values." - } - }, - "type": "object" - } + }, + { + "name": "storage_uuid", + "in": "path", + "description": "UUID of the storage.", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { - "201": { - "description": "Environment variable updated.", + "200": { + "description": "Storage deleted.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvironmentVariable" + "properties": { + "message": { + "type": "string" + } + }, + "type": "object" } } } @@ -21140,14 +24604,62 @@ ] } }, - "/services/{uuid}/envs/bulk": { - "patch": { + "/services/{uuid}/tags": { + "get": { "tags": [ "Services" ], - "summary": "Update Envs (Bulk)", - "description": "Update multiple envs by service UUID.", - "operationId": "update-envs-by-service-uuid", + "summary": "List Tags", + "description": "List tags for a service by UUID.", + "operationId": "list-tags-by-service-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "UUID of the service.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "List of tags.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Services" + ], + "summary": "Create Tag", + "description": "Add tag(s) to a service by UUID.", + "operationId": "create-tag-by-service-uuid", "parameters": [ { "name": "uuid", @@ -21160,46 +24672,21 @@ } ], "requestBody": { - "description": "Bulk envs updated.", "required": true, "content": { "application/json": { "schema": { - "required": [ - "data" - ], "properties": { - "data": { + "tag_name": { + "type": "string", + "description": "The tag name (min 2 characters). Required if tag_names is not provided." + }, + "tag_names": { "type": "array", "items": { - "properties": { - "key": { - "type": "string", - "description": "The key of the environment variable." - }, - "value": { - "type": "string", - "description": "The value of the environment variable." - }, - "is_preview": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is used in preview deployments." - }, - "is_literal": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is a literal, nothing espaced." - }, - "is_multiline": { - "type": "boolean", - "description": "The flag to indicate if the environment variable is multiline." - }, - "is_shown_once": { - "type": "boolean", - "description": "If true, the saved value is hidden in the UI and API responses. MCP never returns environment variable values." - } - }, - "type": "object" - } + "type": "string" + }, + "description": "Array of tag names (each min 2 characters). Required if tag_name is not provided." } }, "type": "object" @@ -21209,13 +24696,13 @@ }, "responses": { "201": { - "description": "Environment variables updated.", + "description": "Tags added successfully.", "content": { "application/json": { "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EnvironmentVariable" + "$ref": "#/components/schemas/Tag" } } } @@ -21241,14 +24728,14 @@ ] } }, - "/services/{uuid}/envs/{env_uuid}": { + "/services/{uuid}/tags/{tag_uuid}": { "delete": { "tags": [ "Services" ], - "summary": "Delete Env", - "description": "Delete env by UUID.", - "operationId": "delete-env-by-service-uuid", + "summary": "Delete Tag", + "description": "Remove a tag from a service by UUID.", + "operationId": "delete-tag-by-service-uuid", "parameters": [ { "name": "uuid", @@ -21260,9 +24747,9 @@ } }, { - "name": "env_uuid", + "name": "tag_uuid", "in": "path", - "description": "UUID of the environment variable.", + "description": "UUID of the tag.", "required": true, "schema": { "type": "string" @@ -21271,20 +24758,7 @@ ], "responses": { "200": { - "description": "Environment variable deleted.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "Environment variable deleted." - } - }, - "type": "object" - } - } - } + "description": "Tag removed." }, "400": { "$ref": "#/components/responses/400" @@ -21303,14 +24777,14 @@ ] } }, - "/services/{uuid}/move": { + "/services/{uuid}/clone": { "post": { "tags": [ "Services" ], - "summary": "Move", - "description": "Move service to another project/environment. This is a purely organizational change — running containers are not affected. Note: after moving, the service will pick up shared environment variables from the new environment on the next deployment.", - "operationId": "move-service-by-uuid", + "summary": "Clone", + "description": "Clone a service to a destination owned by the authenticated team.", + "operationId": "clone-service-by-uuid", "parameters": [ { "name": "uuid", @@ -21323,18 +24797,27 @@ } ], "requestBody": { - "description": "Target environment to move the service to.", "required": true, "content": { "application/json": { "schema": { "required": [ - "environment_uuid" + "destination_uuid" ], "properties": { - "environment_uuid": { - "type": "string", - "description": "UUID of the target environment." + "destination_uuid": { + "type": "string" + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "clone_volumes": { + "description": "Whether to clone volume data. Needs the deploy ability.", + "type": "boolean", + "default": false } }, "type": "object" @@ -21343,30 +24826,8 @@ } }, "responses": { - "200": { - "description": "Service moved successfully.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "Service moved successfully." - }, - "uuid": { - "type": "string" - }, - "project_uuid": { - "type": "string" - }, - "environment_uuid": { - "type": "string" - } - }, - "type": "object" - } - } - } + "201": { + "description": "Service cloned." }, "400": { "$ref": "#/components/responses/400" @@ -21374,6 +24835,9 @@ "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the deploy ability to clone volume data." + }, "404": { "$ref": "#/components/responses/404" }, @@ -21388,22 +24852,117 @@ ] } }, - "/services/{uuid}/migrate": { + "/team/envs": { + "get": { + "tags": [ + "Shared Environment Variables" + ], + "summary": "List Team Shared Envs", + "description": "List shared environment variables for the current team (type=team).", + "operationId": "list-team-shared-envs", + "responses": { + "200": { + "description": "Team shared environment variables." + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, "post": { "tags": [ - "Services" + "Shared Environment Variables" ], - "summary": "Migrate to Server", - "description": "Migrate a service to another destination/server owned by the authenticated team. Stops the service, optionally transfers persistent volume data when both servers are managed by Coolify, and updates database records. Redeploy after migration completes.", - "operationId": "migrate-service-by-uuid", + "summary": "Create Team Shared Env", + "description": "Create a shared environment variable for the current team (type=team).", + "operationId": "create-team-shared-env", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedEnvironmentVariableCreateRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Environment variable created." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "409": { + "description": "Environment variable already exists." + }, + "422": { + "$ref": "#/components/responses/422" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/team/envs/{env_id}": { + "delete": { + "tags": [ + "Shared Environment Variables" + ], + "summary": "Delete Team Shared Env", + "description": "Delete a team shared environment variable by id.", + "operationId": "delete-team-shared-env", "parameters": [ { - "name": "uuid", + "name": "env_id", "in": "path", - "description": "UUID of the service.", + "description": "Shared env id (integer).", "required": true, "schema": { - "type": "string" + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Environment variable deleted." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "patch": { + "tags": [ + "Shared Environment Variables" + ], + "summary": "Update Team Shared Env", + "description": "Update a team shared environment variable by id.", + "operationId": "update-team-shared-env", + "parameters": [ + { + "name": "env_id", + "in": "path", + "description": "Shared env id (integer).", + "required": true, + "schema": { + "type": "integer" } } ], @@ -21412,31 +24971,14 @@ "content": { "application/json": { "schema": { - "required": [ - "destination_uuid" - ], - "properties": { - "destination_uuid": { - "description": "UUID of the target destination.", - "type": "string" - }, - "migrate_volumes": { - "description": "Whether to transfer persistent volume data when migrating across servers.", - "type": "boolean", - "default": true - } - }, - "type": "object" + "$ref": "#/components/schemas/SharedEnvironmentVariableUpdateRequest" } } } }, "responses": { "200": { - "description": "Service migration started or completed." - }, - "400": { - "$ref": "#/components/responses/400" + "description": "Environment variable updated." }, "401": { "$ref": "#/components/responses/401" @@ -21455,50 +24997,85 @@ ] } }, - "/services/{uuid}/start": { + "/projects/{uuid}/envs": { + "get": { + "tags": [ + "Shared Environment Variables" + ], + "summary": "List Project Shared Envs", + "description": "List shared environment variables for a project (type=project).", + "operationId": "list-project-shared-envs", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Project UUID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Project shared environment variables." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, "post": { "tags": [ - "Services" + "Shared Environment Variables" ], - "summary": "Start", - "description": "Start service.", - "operationId": "start-service-by-uuid", + "summary": "Create Project Shared Env", + "description": "Create a shared environment variable for a project (type=project).", + "operationId": "create-project-shared-env", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the service.", + "description": "Project UUID", "required": true, "schema": { "type": "string" } } ], - "responses": { - "200": { - "description": "Start service.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "Service starting request queued." - } - }, - "type": "object" - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedEnvironmentVariableCreateRequest" } } - }, - "400": { - "$ref": "#/components/responses/400" + } + }, + "responses": { + "201": { + "description": "Environment variable created." }, "401": { "$ref": "#/components/responses/401" }, "404": { "$ref": "#/components/responses/404" + }, + "409": { + "description": "Environment variable already exists." + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -21508,53 +25085,37 @@ ] } }, - "/services/{uuid}/stop": { - "post": { + "/projects/{uuid}/envs/{env_id}": { + "delete": { "tags": [ - "Services" + "Shared Environment Variables" ], - "summary": "Stop", - "description": "Stop service.", - "operationId": "stop-service-by-uuid", + "summary": "Delete Project Shared Env", + "description": "Delete a project shared environment variable by id.", + "operationId": "delete-project-shared-env", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the service.", + "description": "Project UUID", "required": true, "schema": { "type": "string" } }, { - "name": "docker_cleanup", - "in": "query", - "description": "Run docker cleanup when the server disk usage is at or above its cleanup threshold. Skipped when a cleanup ran on the server in the last hour.", + "name": "env_id", + "in": "path", + "description": "Shared env id (integer).", + "required": true, "schema": { - "type": "boolean", - "default": true + "type": "integer" } } ], "responses": { "200": { - "description": "Stop service.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "Service stopping request queued." - } - }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "description": "Environment variable deleted." }, "401": { "$ref": "#/components/responses/401" @@ -21568,61 +25129,56 @@ "bearerAuth": [] } ] - } - }, - "/services/{uuid}/restart": { - "post": { + }, + "patch": { "tags": [ - "Services" + "Shared Environment Variables" ], - "summary": "Restart", - "description": "Restart service.", - "operationId": "restart-service-by-uuid", + "summary": "Update Project Shared Env", + "description": "Update a project shared environment variable by id.", + "operationId": "update-project-shared-env", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the service.", + "description": "Project UUID", "required": true, "schema": { "type": "string" } }, { - "name": "latest", - "in": "query", - "description": "Pull latest images.", + "name": "env_id", + "in": "path", + "description": "Shared env id (integer).", + "required": true, "schema": { - "type": "boolean", - "default": false + "type": "integer" } } ], - "responses": { - "200": { - "description": "Restart service.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string", - "example": "Service restaring request queued." - } - }, - "type": "object" - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedEnvironmentVariableUpdateRequest" } } - }, - "400": { - "$ref": "#/components/responses/400" + } + }, + "responses": { + "200": { + "description": "Environment variable updated." }, "401": { "$ref": "#/components/responses/401" }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -21632,19 +25188,28 @@ ] } }, - "/services/{uuid}/storages": { + "/projects/{uuid}/environments/{environment_name_or_uuid}/envs": { "get": { "tags": [ - "Services" + "Shared Environment Variables" ], - "summary": "List Storages", - "description": "List all persistent storages and file storages by service UUID.", - "operationId": "list-storages-by-service-uuid", + "summary": "List Environment Shared Envs", + "description": "List shared environment variables for a project environment (type=environment).", + "operationId": "list-environment-shared-envs", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the service.", + "description": "Project UUID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "environment_name_or_uuid", + "in": "path", + "description": "Environment name or UUID", "required": true, "schema": { "type": "string" @@ -21653,31 +25218,7 @@ ], "responses": { "200": { - "description": "All storages by service UUID.", - "content": { - "application/json": { - "schema": { - "properties": { - "persistent_storages": { - "type": "array", - "items": { - "type": "object" - } - }, - "file_storages": { - "type": "array", - "items": { - "type": "object" - } - } - }, - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "description": "Environment shared environment variables." }, "401": { "$ref": "#/components/responses/401" @@ -21694,16 +25235,25 @@ }, "post": { "tags": [ - "Services" + "Shared Environment Variables" ], - "summary": "Create Storage", - "description": "Create a persistent storage or file storage for a service sub-resource.", - "operationId": "create-storage-by-service-uuid", + "summary": "Create Environment Shared Env", + "description": "Create a shared environment variable for a project environment (type=environment).", + "operationId": "create-environment-shared-env", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the service.", + "description": "Project UUID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "environment_name_or_uuid", + "in": "path", + "description": "Environment name or UUID", "required": true, "schema": { "type": "string" @@ -21715,77 +25265,81 @@ "content": { "application/json": { "schema": { - "required": [ - "type", - "mount_path", - "resource_uuid" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "persistent", - "file" - ], - "description": "The type of storage." - }, - "resource_uuid": { - "type": "string", - "description": "UUID of the service application or database sub-resource." - }, - "name": { - "type": "string", - "description": "Volume name (persistent only, required for persistent)." - }, - "mount_path": { - "type": "string", - "description": "The container mount path." - }, - "content": { - "type": "string", - "nullable": true, - "description": "File content (file only, optional). Needs the deploy ability when set." - }, - "is_directory": { - "type": "boolean", - "description": "Whether this is a directory mount (file only, default false)." - }, - "fs_path": { - "type": "string", - "description": "Host path. Required for directory mounts and host file mounts. Optional for file mounts with content (default: inside the resource directory). An absolute path can be anywhere on the host; a relative path is inside the resource directory. A directory or file mount outside the resource directory needs a token with the deploy permission. Coolify never deletes a path outside the resource directory." - } - }, - "type": "object", - "additionalProperties": false + "$ref": "#/components/schemas/SharedEnvironmentVariableCreateRequest" } } } }, - "responses": { - "201": { - "description": "Storage created.", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } + "responses": { + "201": { + "description": "Environment variable created." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "409": { + "description": "Environment variable already exists." + }, + "422": { + "$ref": "#/components/responses/422" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/projects/{uuid}/environments/{environment_name_or_uuid}/envs/{env_id}": { + "delete": { + "tags": [ + "Shared Environment Variables" + ], + "summary": "Delete Environment Shared Env", + "description": "Delete an environment shared environment variable by id.", + "operationId": "delete-environment-shared-env", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Project UUID", + "required": true, + "schema": { + "type": "string" } }, - "400": { - "$ref": "#/components/responses/400" + { + "name": "environment_name_or_uuid", + "in": "path", + "description": "Environment name or UUID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "env_id", + "in": "path", + "description": "Shared env id (integer).", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Environment variable deleted." }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the deploy permission for a mount outside the resource directory or for a file storage with content." - }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -21796,92 +25350,57 @@ }, "patch": { "tags": [ - "Services" + "Shared Environment Variables" ], - "summary": "Update Storage", - "description": "Update a persistent storage or file storage by service UUID. Changed file content is saved right away and written to the server in the background, so a failed write does not change the response.", - "operationId": "update-storage-by-service-uuid", + "summary": "Update Environment Shared Env", + "description": "Update an environment shared environment variable by id.", + "operationId": "update-environment-shared-env", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the service.", + "description": "Project UUID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "environment_name_or_uuid", + "in": "path", + "description": "Environment name or UUID", "required": true, "schema": { "type": "string" } + }, + { + "name": "env_id", + "in": "path", + "description": "Shared env id (integer).", + "required": true, + "schema": { + "type": "integer" + } } ], "requestBody": { - "description": "Storage updated. For read-only storages (from docker-compose or services), only is_preview_suffix_enabled can be updated.", "required": true, "content": { "application/json": { "schema": { - "required": [ - "type" - ], - "properties": { - "uuid": { - "type": "string", - "description": "The UUID of the storage (preferred)." - }, - "id": { - "type": "integer", - "description": "The ID of the storage (deprecated, use uuid instead)." - }, - "type": { - "type": "string", - "enum": [ - "persistent", - "file" - ], - "description": "The type of storage: persistent or file." - }, - "is_preview_suffix_enabled": { - "type": "boolean", - "description": "Whether to add -pr-N suffix for preview deployments." - }, - "name": { - "type": "string", - "description": "The volume name (persistent only, not allowed for read-only storages)." - }, - "mount_path": { - "type": "string", - "description": "The container mount path (not allowed for read-only storages)." - }, - "content": { - "type": "string", - "nullable": true, - "description": "The file content (file only, not allowed for read-only storages). Changing the content needs the deploy permission." - } - }, - "type": "object", - "additionalProperties": false + "$ref": "#/components/schemas/SharedEnvironmentVariableUpdateRequest" } } } }, "responses": { "200": { - "description": "Storage updated.", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "description": "Environment variable updated." }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the deploy permission to change the content of a file outside the resource directory." - }, "404": { "$ref": "#/components/responses/404" }, @@ -21896,52 +25415,73 @@ ] } }, - "/services/{uuid}/storages/{storage_uuid}": { - "delete": { + "/servers/{uuid}/envs": { + "get": { "tags": [ - "Services" + "Shared Environment Variables" ], - "summary": "Delete Storage", - "description": "Delete a persistent storage or file storage by service UUID.", - "operationId": "delete-storage-by-service-uuid", + "summary": "List Server Shared Envs", + "description": "List shared environment variables for a server (type=server).", + "operationId": "list-server-shared-envs", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the service.", + "description": "Server UUID", "required": true, "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "Server shared environment variables." + }, + "401": { + "$ref": "#/components/responses/401" }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ { - "name": "storage_uuid", + "bearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Shared Environment Variables" + ], + "summary": "Create Server Shared Env", + "description": "Create a shared environment variable for a server (type=server).", + "operationId": "create-server-shared-env", + "parameters": [ + { + "name": "uuid", "in": "path", - "description": "UUID of the storage.", + "description": "Server UUID", "required": true, "schema": { "type": "string" } } ], - "responses": { - "200": { - "description": "Storage deleted.", - "content": { - "application/json": { - "schema": { - "properties": { - "message": { - "type": "string" - } - }, - "type": "object" - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedEnvironmentVariableCreateRequest" } } - }, - "400": { - "$ref": "#/components/responses/400" + } + }, + "responses": { + "201": { + "description": "Environment variable created." }, "401": { "$ref": "#/components/responses/401" @@ -21949,6 +25489,9 @@ "404": { "$ref": "#/components/responses/404" }, + "409": { + "description": "Environment variable already exists." + }, "422": { "$ref": "#/components/responses/422" } @@ -21960,41 +25503,37 @@ ] } }, - "/services/{uuid}/tags": { - "get": { + "/servers/{uuid}/envs/{env_id}": { + "delete": { "tags": [ - "Services" + "Shared Environment Variables" ], - "summary": "List Tags", - "description": "List tags for a service by UUID.", - "operationId": "list-tags-by-service-uuid", + "summary": "Delete Server Shared Env", + "description": "Delete a server shared environment variable by id.", + "operationId": "delete-server-shared-env", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the service.", + "description": "Server UUID", "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "List of tags.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Tag" - } - } - } + }, + { + "name": "env_id", + "in": "path", + "description": "Shared env id (integer).", + "required": true, + "schema": { + "type": "integer" } - }, - "400": { - "$ref": "#/components/responses/400" + } + ], + "responses": { + "200": { + "description": "Environment variable deleted." }, "401": { "$ref": "#/components/responses/401" @@ -22009,22 +25548,31 @@ } ] }, - "post": { + "patch": { "tags": [ - "Services" + "Shared Environment Variables" ], - "summary": "Create Tag", - "description": "Add tag(s) to a service by UUID.", - "operationId": "create-tag-by-service-uuid", + "summary": "Update Server Shared Env", + "description": "Update a server shared environment variable by id.", + "operationId": "update-server-shared-env", "parameters": [ { "name": "uuid", "in": "path", - "description": "UUID of the service.", + "description": "Server UUID", "required": true, "schema": { "type": "string" } + }, + { + "name": "env_id", + "in": "path", + "description": "Shared env id (integer).", + "required": true, + "schema": { + "type": "integer" + } } ], "requestBody": { @@ -22032,40 +25580,14 @@ "content": { "application/json": { "schema": { - "properties": { - "tag_name": { - "type": "string", - "description": "The tag name (min 2 characters). Required if tag_names is not provided." - }, - "tag_names": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Array of tag names (each min 2 characters). Required if tag_name is not provided." - } - }, - "type": "object" + "$ref": "#/components/schemas/SharedEnvironmentVariableUpdateRequest" } } } }, "responses": { - "201": { - "description": "Tags added successfully.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Tag" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "200": { + "description": "Environment variable updated." }, "401": { "$ref": "#/components/responses/401" @@ -22084,46 +25606,33 @@ ] } }, - "/services/{uuid}/tags/{tag_uuid}": { - "delete": { + "/tags": { + "get": { "tags": [ - "Services" - ], - "summary": "Delete Tag", - "description": "Remove a tag from a service by UUID.", - "operationId": "delete-tag-by-service-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the service.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "tag_uuid", - "in": "path", - "description": "UUID of the tag.", - "required": true, - "schema": { - "type": "string" - } - } + "Tags" ], + "summary": "List", + "description": "List all tags for the current team.", + "operationId": "list-tags", "responses": { "200": { - "description": "Tag removed." + "description": "All tags for the current team.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + } }, "400": { "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" } }, "security": [ @@ -22131,49 +25640,27 @@ "bearerAuth": [] } ] - } - }, - "/services/{uuid}/clone": { + }, "post": { "tags": [ - "Services" - ], - "summary": "Clone", - "description": "Clone a service to a destination owned by the authenticated team.", - "operationId": "clone-service-by-uuid", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the service.", - "required": true, - "schema": { - "type": "string" - } - } + "Tags" ], + "summary": "Create", + "description": "Create a tag for the current team.", + "operationId": "create-tag", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ - "destination_uuid" + "name" ], "properties": { - "destination_uuid": { - "type": "string" - }, "name": { - "type": [ - "string", - "null" - ] - }, - "clone_volumes": { - "description": "Whether to clone volume data. Needs the deploy ability.", - "type": "boolean", - "default": false + "type": "string", + "maxLength": 255, + "minLength": 2 } }, "type": "object" @@ -22183,7 +25670,14 @@ }, "responses": { "201": { - "description": "Service cloned." + "description": "Tag created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + } + } }, "400": { "$ref": "#/components/responses/400" @@ -22191,11 +25685,8 @@ "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "The token needs the deploy ability to clone volume data." - }, - "404": { - "$ref": "#/components/responses/404" + "409": { + "description": "Tag with this name already exists." }, "422": { "$ref": "#/components/responses/422" @@ -22208,20 +25699,47 @@ ] } }, - "/team/envs": { - "get": { + "/tags/{uuid}": { + "delete": { "tags": [ - "Shared Environment Variables" + "Tags" + ], + "summary": "Delete", + "description": "Delete a tag for the current team. Detaches the tag from all resources via cascade.", + "operationId": "delete-tag-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Tag UUID", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "List Team Shared Envs", - "description": "List shared environment variables for the current team (type=team).", - "operationId": "list-team-shared-envs", "responses": { "200": { - "description": "Team shared environment variables." + "description": "Tag deleted.", + "content": { + "application/json": { + "schema": { + "properties": { + "message": { + "type": "string", + "example": "Tag deleted." + } + }, + "type": "object" + } + } + } }, "401": { "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -22230,46 +25748,37 @@ } ] }, - "post": { + "patch": { "tags": [ - "Shared Environment Variables" + "Tags" ], - "summary": "Create Team Shared Env", - "description": "Create a shared environment variable for the current team (type=team).", - "operationId": "create-team-shared-env", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "key" - ], - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": [ - "string", - "null" - ] - }, - "is_literal": { - "type": "boolean" - }, - "is_multiline": { - "type": "boolean" - }, - "is_shown_once": { - "description": "If true, the saved value is hidden in the UI and API responses. MCP never returns environment variable values.", - "type": "boolean" - }, - "comment": { - "type": [ - "string", - "null" - ] + "summary": "Update", + "description": "Update a tag name for the current team.", + "operationId": "update-tag-by-uuid", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Tag UUID", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "minLength": 2 } }, "type": "object" @@ -22278,14 +25787,27 @@ } }, "responses": { - "201": { - "description": "Environment variable created." + "200": { + "description": "Tag updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, + "404": { + "$ref": "#/components/responses/404" + }, "409": { - "description": "Environment variable already exists." + "description": "Tag with this name already exists." }, "422": { "$ref": "#/components/responses/422" @@ -22298,19 +25820,55 @@ ] } }, - "/team/envs/{env_id}": { - "delete": { + "/teams": { + "get": { "tags": [ - "Shared Environment Variables" + "Teams" ], - "summary": "Delete Team Shared Env", - "description": "Delete a team shared environment variable by id.", - "operationId": "delete-team-shared-env", + "summary": "List", + "description": "Get all teams.", + "operationId": "list-teams", + "responses": { + "200": { + "description": "List of teams.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Team" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/teams/{id}": { + "get": { + "tags": [ + "Teams" + ], + "summary": "Get", + "description": "Get team by TeamId.", + "operationId": "get-team-by-id", "parameters": [ { - "name": "env_id", + "name": "id", "in": "path", - "description": "Shared env id (integer).", + "description": "Team ID", "required": true, "schema": { "type": "integer" @@ -22319,7 +25877,17 @@ ], "responses": { "200": { - "description": "Environment variable deleted." + "description": "List of teams.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Team" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" @@ -22333,19 +25901,21 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/teams/{id}/members": { + "get": { "tags": [ - "Shared Environment Variables" + "Teams" ], - "summary": "Update Team Shared Env", - "description": "Update a team shared environment variable by id.", - "operationId": "update-team-shared-env", + "summary": "Members", + "description": "Get members by TeamId.", + "operationId": "get-members-by-team-id", "parameters": [ { - "name": "env_id", + "name": "id", "in": "path", - "description": "Shared env id (integer).", + "description": "Team ID", "required": true, "schema": { "type": "integer" @@ -22354,16 +25924,26 @@ ], "responses": { "200": { - "description": "Environment variable updated." + "description": "List of members.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -22373,34 +25953,30 @@ ] } }, - "/projects/{uuid}/envs": { + "/team": { "get": { "tags": [ - "Shared Environment Variables" - ], - "summary": "List Project Shared Envs", - "description": "List shared environment variables for a project (type=project).", - "operationId": "list-project-shared-envs", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "Project UUID", - "required": true, - "schema": { - "type": "string" - } - } + "Teams" ], + "summary": "Authenticated Team", + "description": "Get the team bound to the API token.", + "operationId": "get-token-team", "responses": { "200": { - "description": "Project shared environment variables." + "description": "Team bound to the API token.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Team" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" } }, "security": [ @@ -22409,36 +25985,53 @@ } ] }, - "post": { + "patch": { "tags": [ - "Shared Environment Variables" + "Teams" ], - "summary": "Create Project Shared Env", - "description": "Create a shared environment variable for a project (type=project).", - "operationId": "create-project-shared-env", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "Project UUID", - "required": true, - "schema": { - "type": "string" + "summary": "Update authenticated team", + "description": "Update settings for the team bound to the API token.", + "operationId": "update-token-team", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "minProperties": 1, + "properties": { + "is_build_server_fallback_enabled": { + "type": "boolean", + "description": "Whether deployments can fall back to the deployment server when no usable dedicated build server is available." + }, + "scan_images_on_new_servers": { + "type": "boolean", + "description": "Whether image scanning is turned on for servers added to the team from now on." + } + }, + "type": "object" + } } } - ], + }, "responses": { - "201": { - "description": "Environment variable created." + "200": { + "description": "Updated team.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Team" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, - "404": { - "$ref": "#/components/responses/404" - }, - "409": { - "description": "Environment variable already exists." + "403": { + "description": "Forbidden." }, "422": { "$ref": "#/components/responses/422" @@ -22451,43 +26044,33 @@ ] } }, - "/projects/{uuid}/envs/{env_id}": { - "delete": { + "/team/members": { + "get": { "tags": [ - "Shared Environment Variables" - ], - "summary": "Delete Project Shared Env", - "description": "Delete a project shared environment variable by id.", - "operationId": "delete-project-shared-env", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "Project UUID", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "env_id", - "in": "path", - "description": "Shared env id (integer).", - "required": true, - "schema": { - "type": "integer" - } - } + "Teams" ], + "summary": "Authenticated Team Members", + "description": "Get members of the team bound to the API token.", + "operationId": "get-token-team-members", "responses": { "200": { - "description": "Environment variable deleted." + "description": "Members of the team bound to the API token.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" } }, "security": [ @@ -22495,41 +26078,76 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/applications/{uuid}/storages/{storage_uuid}/backups": { + "put": { "tags": [ - "Shared Environment Variables" + "Applications" ], - "summary": "Update Project Shared Env", - "description": "Update a project shared environment variable by id.", - "operationId": "update-project-shared-env", + "summary": "Set application storage backup schedule", + "description": "Create or replace the backup schedule for an application persistent volume or directory storage. A schedule with stop_during_backup needs a token with the deploy permission.", + "operationId": "set-application-storage-backup-schedule", "parameters": [ { "name": "uuid", "in": "path", - "description": "Project UUID", + "description": "UUID of the application.", "required": true, "schema": { "type": "string" } }, { - "name": "env_id", + "name": "storage_uuid", "in": "path", - "description": "Shared env id (integer).", + "description": "UUID of the persistent volume or directory storage.", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VolumeBackupScheduleRequest" + } + } + } + }, "responses": { "200": { - "description": "Environment variable updated." + "description": "Backup schedule replaced.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VolumeBackupScheduleResponse" + } + } + } + }, + "201": { + "description": "Backup schedule created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VolumeBackupScheduleResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "Forbidden, or the token needs the deploy permission for stop_during_backup." + }, "404": { "$ref": "#/components/responses/404" }, @@ -22542,30 +26160,26 @@ "bearerAuth": [] } ] - } - }, - "/projects/{uuid}/environments/{environment_name_or_uuid}/envs": { - "get": { + }, + "delete": { "tags": [ - "Shared Environment Variables" + "Applications" ], - "summary": "List Environment Shared Envs", - "description": "List shared environment variables for a project environment (type=environment).", - "operationId": "list-environment-shared-envs", + "summary": "Delete application storage backup schedule", + "description": "Delete the backup schedule and its local and S3 archives for an application storage.", + "operationId": "delete-application-storage-backup-schedule", "parameters": [ { "name": "uuid", "in": "path", - "description": "Project UUID", "required": true, "schema": { "type": "string" } }, { - "name": "environment_name_or_uuid", + "name": "storage_uuid", "in": "path", - "description": "Environment name or UUID", "required": true, "schema": { "type": "string" @@ -22574,13 +26188,19 @@ ], "responses": { "200": { - "description": "Environment shared environment variables." + "description": "Backup schedule and archives deleted." }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "Forbidden." + }, "404": { "$ref": "#/components/responses/404" + }, + "409": { + "description": "Backup or recovery operation is still running." } }, "security": [ @@ -22588,47 +26208,79 @@ "bearerAuth": [] } ] - }, - "post": { + } + }, + "/databases/{uuid}/storages/{storage_uuid}/backups": { + "put": { "tags": [ - "Shared Environment Variables" + "Databases" ], - "summary": "Create Environment Shared Env", - "description": "Create a shared environment variable for a project environment (type=environment).", - "operationId": "create-environment-shared-env", + "summary": "Set database storage backup schedule", + "description": "Create or replace the backup schedule for a database persistent volume or directory storage. A schedule with stop_during_backup needs a token with the deploy permission.", + "operationId": "set-database-storage-backup-schedule", "parameters": [ { "name": "uuid", "in": "path", - "description": "Project UUID", + "description": "UUID of the database.", "required": true, "schema": { "type": "string" } }, { - "name": "environment_name_or_uuid", + "name": "storage_uuid", "in": "path", - "description": "Environment name or UUID", + "description": "UUID of the persistent volume or directory storage.", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VolumeBackupScheduleRequest" + } + } + } + }, "responses": { + "200": { + "description": "Backup schedule replaced.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VolumeBackupScheduleResponse" + } + } + } + }, "201": { - "description": "Environment variable created." + "description": "Backup schedule created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VolumeBackupScheduleResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "Forbidden, or the token needs the deploy permission for stop_during_backup." + }, "404": { "$ref": "#/components/responses/404" }, - "409": { - "description": "Environment variable already exists." - }, "422": { "$ref": "#/components/responses/422" } @@ -22638,54 +26290,47 @@ "bearerAuth": [] } ] - } - }, - "/projects/{uuid}/environments/{environment_name_or_uuid}/envs/{env_id}": { + }, "delete": { "tags": [ - "Shared Environment Variables" + "Databases" ], - "summary": "Delete Environment Shared Env", - "description": "Delete an environment shared environment variable by id.", - "operationId": "delete-environment-shared-env", + "summary": "Delete database storage backup schedule", + "description": "Delete the backup schedule and its local and S3 archives for a database storage.", + "operationId": "delete-database-storage-backup-schedule", "parameters": [ { "name": "uuid", "in": "path", - "description": "Project UUID", "required": true, "schema": { "type": "string" } }, { - "name": "environment_name_or_uuid", + "name": "storage_uuid", "in": "path", - "description": "Environment name or UUID", "required": true, "schema": { "type": "string" } - }, - { - "name": "env_id", - "in": "path", - "description": "Shared env id (integer).", - "required": true, - "schema": { - "type": "integer" - } } ], "responses": { "200": { - "description": "Environment variable deleted." + "description": "Backup schedule and archives deleted." }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "Forbidden." + }, "404": { "$ref": "#/components/responses/404" + }, + "409": { + "description": "Backup or recovery operation is still running." } }, "security": [ @@ -22693,50 +26338,76 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/services/{uuid}/storages/{storage_uuid}/backups": { + "put": { "tags": [ - "Shared Environment Variables" + "Services" ], - "summary": "Update Environment Shared Env", - "description": "Update an environment shared environment variable by id.", - "operationId": "update-environment-shared-env", + "summary": "Set service storage backup schedule", + "description": "Create or replace the backup schedule for a service persistent volume or directory storage. A schedule with stop_during_backup needs a token with the deploy permission.", + "operationId": "set-service-storage-backup-schedule", "parameters": [ { "name": "uuid", "in": "path", - "description": "Project UUID", + "description": "UUID of the service.", "required": true, "schema": { "type": "string" } }, { - "name": "environment_name_or_uuid", + "name": "storage_uuid", "in": "path", - "description": "Environment name or UUID", + "description": "UUID of the persistent volume or directory storage.", "required": true, "schema": { "type": "string" } - }, - { - "name": "env_id", - "in": "path", - "description": "Shared env id (integer).", - "required": true, - "schema": { - "type": "integer" - } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VolumeBackupScheduleRequest" + } + } + } + }, "responses": { "200": { - "description": "Environment variable updated." + "description": "Backup schedule replaced.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VolumeBackupScheduleResponse" + } + } + } + }, + "201": { + "description": "Backup schedule created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VolumeBackupScheduleResponse" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "Forbidden, or the token needs the deploy permission for stop_during_backup." + }, "404": { "$ref": "#/components/responses/404" }, @@ -22749,56 +26420,26 @@ "bearerAuth": [] } ] - } - }, - "/servers/{uuid}/envs": { - "get": { + }, + "delete": { "tags": [ - "Shared Environment Variables" + "Services" ], - "summary": "List Server Shared Envs", - "description": "List shared environment variables for a server (type=server).", - "operationId": "list-server-shared-envs", + "summary": "Delete service storage backup schedule", + "description": "Delete the backup schedule and its local and S3 archives for a service storage.", + "operationId": "delete-service-storage-backup-schedule", "parameters": [ { "name": "uuid", "in": "path", - "description": "Server UUID", "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "Server shared environment variables." }, - "401": { - "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "security": [ { - "bearerAuth": [] - } - ] - }, - "post": { - "tags": [ - "Shared Environment Variables" - ], - "summary": "Create Server Shared Env", - "description": "Create a shared environment variable for a server (type=server).", - "operationId": "create-server-shared-env", - "parameters": [ - { - "name": "uuid", + "name": "storage_uuid", "in": "path", - "description": "Server UUID", "required": true, "schema": { "type": "string" @@ -22806,20 +26447,20 @@ } ], "responses": { - "201": { - "description": "Environment variable created." + "200": { + "description": "Backup schedule and archives deleted." }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "Forbidden." + }, "404": { "$ref": "#/components/responses/404" }, "409": { - "description": "Environment variable already exists." - }, - "422": { - "$ref": "#/components/responses/422" + "description": "Backup or recovery operation is still running." } }, "security": [ @@ -22829,41 +26470,42 @@ ] } }, - "/servers/{uuid}/envs/{env_id}": { - "delete": { + "/applications/{uuid}/storages/{storage_uuid}/backups/run": { + "post": { "tags": [ - "Shared Environment Variables" + "Applications" ], - "summary": "Delete Server Shared Env", - "description": "Delete a server shared environment variable by id.", - "operationId": "delete-server-shared-env", + "summary": "Run application storage backup", + "description": "Queue an immediate volume backup for an application storage that has a schedule. Needs a token with the write and deploy permissions.", + "operationId": "run-application-storage-backup", "parameters": [ { "name": "uuid", "in": "path", - "description": "Server UUID", "required": true, "schema": { "type": "string" } }, { - "name": "env_id", + "name": "storage_uuid", "in": "path", - "description": "Shared env id (integer).", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], "responses": { "200": { - "description": "Environment variable deleted." + "description": "Storage backup queued." }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the write and deploy permissions." + }, "404": { "$ref": "#/components/responses/404" } @@ -22873,46 +26515,46 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/databases/{uuid}/storages/{storage_uuid}/backups/run": { + "post": { "tags": [ - "Shared Environment Variables" + "Databases" ], - "summary": "Update Server Shared Env", - "description": "Update a server shared environment variable by id.", - "operationId": "update-server-shared-env", + "summary": "Run database storage backup", + "description": "Queue an immediate volume backup for a database storage that has a schedule. Needs a token with the write and deploy permissions.", + "operationId": "run-database-storage-backup", "parameters": [ { "name": "uuid", "in": "path", - "description": "Server UUID", "required": true, "schema": { "type": "string" } }, { - "name": "env_id", + "name": "storage_uuid", "in": "path", - "description": "Shared env id (integer).", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], "responses": { "200": { - "description": "Environment variable updated." + "description": "Storage backup queued." }, "401": { "$ref": "#/components/responses/401" }, + "403": { + "description": "The token needs the write and deploy permissions." + }, "404": { "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422" } }, "security": [ @@ -22922,90 +26564,44 @@ ] } }, - "/tags": { - "get": { + "/services/{uuid}/storages/{storage_uuid}/backups/run": { + "post": { "tags": [ - "Tags" + "Services" ], - "summary": "List", - "description": "List all tags for the current team.", - "operationId": "list-tags", - "responses": { - "200": { - "description": "All tags for the current team.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Tag" - } - } - } + "summary": "Run service storage backup", + "description": "Queue an immediate volume backup for a service storage that has a schedule. Needs a token with the write and deploy permissions.", + "operationId": "run-service-storage-backup", + "parameters": [ + { + "name": "uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" } }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - } - }, - "security": [ { - "bearerAuth": [] - } - ] - }, - "post": { - "tags": [ - "Tags" - ], - "summary": "Create", - "description": "Create a tag for the current team.", - "operationId": "create-tag", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "maxLength": 255, - "minLength": 2 - } - }, - "type": "object" - } + "name": "storage_uuid", + "in": "path", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { - "201": { - "description": "Tag created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Tag" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "200": { + "description": "Storage backup queued." }, "401": { "$ref": "#/components/responses/401" }, - "409": { - "description": "Tag with this name already exists." + "403": { + "description": "The token needs the write and deploy permissions." }, - "422": { - "$ref": "#/components/responses/422" + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -23015,35 +26611,86 @@ ] } }, - "/tags/{uuid}": { - "delete": { + "/vulnerabilities": { + "get": { "tags": [ - "Tags" + "Vulnerabilities" ], - "summary": "Delete", - "description": "Delete a tag for the current team. Detaches the tag from all resources via cascade.", - "operationId": "delete-tag-by-uuid", + "summary": "List vulnerabilities", + "description": "List the applications, services, and databases of the authenticated team with their stored security status from image scanning.", + "operationId": "list-vulnerabilities", "parameters": [ { - "name": "uuid", - "in": "path", - "description": "Tag UUID", - "required": true, + "name": "status", + "in": "query", + "description": "Comma-separated statuses to return.", + "required": false, "schema": { - "type": "string" + "type": "string", + "example": "update_now,update_available" } } ], "responses": { "200": { - "description": "Tag deleted.", + "description": "Resources with their security status, worst first.", "content": { "application/json": { "schema": { "properties": { - "message": { - "type": "string", - "example": "Tag deleted." + "resources": { + "type": "array", + "items": { + "properties": { + "uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "application", + "service", + "database" + ] + }, + "project_uuid": { + "type": [ + "string", + "null" + ] + }, + "environment_uuid": { + "type": [ + "string", + "null" + ] + }, + "server_uuid": { + "type": [ + "string", + "null" + ] + }, + "images": { + "properties": { + "update": { + "type": "integer" + }, + "total": { + "type": "integer" + } + }, + "type": "object" + }, + "security": { + "$ref": "#/components/schemas/SecurityStatus" + } + }, + "type": "object" + } } }, "type": "object" @@ -23051,11 +26698,11 @@ } } }, + "400": { + "$ref": "#/components/responses/400" + }, "401": { "$ref": "#/components/responses/401" - }, - "404": { - "$ref": "#/components/responses/404" } }, "security": [ @@ -23063,52 +26710,52 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/applications/{uuid}/vulnerabilities": { + "get": { "tags": [ - "Tags" + "Vulnerabilities" ], - "summary": "Update", - "description": "Update a tag name for the current team.", - "operationId": "update-tag-by-uuid", + "summary": "Get application vulnerabilities", + "description": "Get the security status, the scanned images, and the vulnerabilities of an application.", + "operationId": "get-application-vulnerabilities", "parameters": [ { "name": "uuid", "in": "path", - "description": "Tag UUID", + "description": "Application UUID", "required": true, "schema": { "type": "string" } + }, + { + "$ref": "#/components/parameters/VulnerabilityState" + }, + { + "$ref": "#/components/parameters/VulnerabilitySeverity" + }, + { + "$ref": "#/components/parameters/VulnerabilityImage" + }, + { + "$ref": "#/components/parameters/VulnerabilitySearch" + }, + { + "$ref": "#/components/parameters/VulnerabilityPage" + }, + { + "$ref": "#/components/parameters/VulnerabilityPerPage" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "maxLength": 255, - "minLength": 2 - } - }, - "type": "object" - } - } - } - }, "responses": { "200": { - "description": "Tag updated.", + "description": "Scan results.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Tag" + "$ref": "#/components/schemas/ResourceVulnerabilities" } } } @@ -23122,9 +26769,6 @@ "404": { "$ref": "#/components/responses/404" }, - "409": { - "description": "Tag with this name already exists." - }, "422": { "$ref": "#/components/responses/422" } @@ -23136,24 +26780,50 @@ ] } }, - "/teams": { + "/services/{uuid}/vulnerabilities": { "get": { "tags": [ - "Teams" + "Vulnerabilities" + ], + "summary": "Get service vulnerabilities", + "description": "Get the security status, the scanned images, and the vulnerabilities of the applications and databases of a service.", + "operationId": "get-service-vulnerabilities", + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "Service UUID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/VulnerabilityState" + }, + { + "$ref": "#/components/parameters/VulnerabilitySeverity" + }, + { + "$ref": "#/components/parameters/VulnerabilityImage" + }, + { + "$ref": "#/components/parameters/VulnerabilitySearch" + }, + { + "$ref": "#/components/parameters/VulnerabilityPage" + }, + { + "$ref": "#/components/parameters/VulnerabilityPerPage" + } ], - "summary": "List", - "description": "Get all teams.", - "operationId": "list-teams", "responses": { "200": { - "description": "List of teams.", + "description": "Scan results.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Team" - } + "$ref": "#/components/schemas/ResourceVulnerabilities" } } } @@ -23163,6 +26833,12 @@ }, "401": { "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -23172,32 +26848,50 @@ ] } }, - "/teams/{id}": { + "/databases/{uuid}/vulnerabilities": { "get": { "tags": [ - "Teams" + "Vulnerabilities" ], - "summary": "Get", - "description": "Get team by TeamId.", - "operationId": "get-team-by-id", + "summary": "Get database vulnerabilities", + "description": "Get the security status, the scanned image, and the vulnerabilities of a standalone database.", + "operationId": "get-database-vulnerabilities", "parameters": [ { - "name": "id", + "name": "uuid", "in": "path", - "description": "Team ID", + "description": "Database UUID", "required": true, "schema": { - "type": "integer" + "type": "string" } + }, + { + "$ref": "#/components/parameters/VulnerabilityState" + }, + { + "$ref": "#/components/parameters/VulnerabilitySeverity" + }, + { + "$ref": "#/components/parameters/VulnerabilityImage" + }, + { + "$ref": "#/components/parameters/VulnerabilitySearch" + }, + { + "$ref": "#/components/parameters/VulnerabilityPage" + }, + { + "$ref": "#/components/parameters/VulnerabilityPerPage" } ], "responses": { "200": { - "description": "List of teams.", + "description": "Scan results.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Team" + "$ref": "#/components/schemas/ResourceVulnerabilities" } } } @@ -23210,6 +26904,9 @@ }, "404": { "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422" } }, "security": [ @@ -23219,41 +26916,43 @@ ] } }, - "/teams/{id}/members": { + "/vultr/regions": { "get": { "tags": [ - "Teams" + "Vultr" ], - "summary": "Members", - "description": "Get members by TeamId.", - "operationId": "get-members-by-team-id", - "parameters": [ + "summary": "Get Vultr Regions", + "description": "Get all available Vultr regions.", + "operationId": "get-vultr-regions", + "responses": { + "200": { + "description": "List of Vultr regions." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ { - "name": "id", - "in": "path", - "description": "Team ID", - "required": true, - "schema": { - "type": "integer" - } + "bearerAuth": [] } + ] + } + }, + "/vultr/plans": { + "get": { + "tags": [ + "Vultr" ], + "summary": "Get Vultr Plans", + "description": "Get all available Vultr plans.", + "operationId": "get-vultr-plans", "responses": { "200": { - "description": "List of members.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/User" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "description": "List of Vultr plans." }, "401": { "$ref": "#/components/responses/401" @@ -23269,30 +26968,23 @@ ] } }, - "/team": { + "/vultr/os": { "get": { "tags": [ - "Teams" + "Vultr" ], - "summary": "Authenticated Team", - "description": "Get the team bound to the API token.", - "operationId": "get-token-team", + "summary": "Get Vultr Operating Systems", + "description": "Get all available Vultr operating systems.", + "operationId": "get-vultr-operating-systems", "responses": { "200": { - "description": "Team bound to the API token.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Team" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "description": "List of Vultr operating systems." }, "401": { "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -23300,55 +26992,25 @@ "bearerAuth": [] } ] - }, - "patch": { + } + }, + "/vultr/ssh-keys": { + "get": { "tags": [ - "Teams" + "Vultr" ], - "summary": "Update authenticated team", - "description": "Update settings for the team bound to the API token.", - "operationId": "update-token-team", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "is_build_server_fallback_enabled" - ], - "properties": { - "is_build_server_fallback_enabled": { - "type": "boolean", - "description": "Whether deployments can fall back to the deployment server when no usable dedicated build server is available." - } - }, - "type": "object" - } - } - } - }, + "summary": "Get Vultr SSH Keys", + "description": "Get all Vultr SSH keys available to the selected token.", + "operationId": "get-vultr-ssh-keys", "responses": { "200": { - "description": "Updated team.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Team" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "description": "List of Vultr SSH keys." }, "401": { "$ref": "#/components/responses/401" }, - "403": { - "description": "Forbidden." - }, - "422": { - "$ref": "#/components/responses/422" + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -23358,33 +27020,32 @@ ] } }, - "/team/members": { - "get": { + "/servers/vultr": { + "post": { "tags": [ - "Teams" + "Vultr" ], - "summary": "Authenticated Team Members", - "description": "Get members of the team bound to the API token.", - "operationId": "get-token-team-members", + "summary": "Create Vultr Server", + "description": "Create a Vultr instance and link it as a Coolify server. A cloud-init script or extra SSH key IDs need a token with the deploy permission.", + "operationId": "create-vultr-server", "responses": { - "200": { - "description": "Members of the team bound to the API token.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/User" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" + "201": { + "description": "Vultr server created." }, "401": { "$ref": "#/components/responses/401" + }, + "403": { + "description": "The token needs the deploy permission for a cloud-init script or extra SSH keys." + }, + "422": { + "description": "Validation failed." + }, + "429": { + "description": "Vultr API rate limit exceeded." + }, + "502": { + "$ref": "#/components/responses/502" } }, "security": [ @@ -23393,844 +27054,568 @@ } ] } - }, - "/applications/{uuid}/storages/{storage_uuid}/backups": { - "put": { - "tags": [ - "Applications" - ], - "summary": "Set application storage backup schedule", - "description": "Create or replace the backup schedule for an application persistent volume or directory storage. A schedule with stop_during_backup needs a token with the deploy permission.", - "operationId": "set-application-storage-backup-schedule", - "parameters": [ + } + }, + "components": { + "schemas": { + "DatabaseImportRequest": { + "type": "object", + "oneOf": [ { - "name": "uuid", - "in": "path", - "description": "UUID of the application.", - "required": true, - "schema": { - "type": "string" - } + "required": [ + "source", + "upload_id" + ], + "properties": { + "source": { + "type": "string", + "enum": [ + "upload" + ] + }, + "upload_id": { + "type": "string", + "format": "uuid" + }, + "dump_all": { + "type": "boolean", + "default": false + }, + "replace_existing": { + "description": "Drop matching PostgreSQL objects before restoring a single-database archive.", + "type": "boolean", + "default": false + }, + "keep_owners": { + "description": "Restore object owners and privileges from a single-database PostgreSQL archive. By default they are skipped, because the roles of another server usually do not exist.", + "type": "boolean", + "default": false + }, + "restore_mysql_users": { + "description": "MySQL and MariaDB backups containing all databases: also restore the mysql system database (users, passwords, and privileges). By default the system databases are skipped, so the database keeps its own users and passwords.", + "type": "boolean", + "default": false + }, + "sqlite_database": { + "description": "SQLite: the database file to restore into. Must be one of the database files. Defaults to the file named in the backup file name, else the first file.", + "type": "string", + "example": "app.db" + } + }, + "type": "object", + "additionalProperties": false }, { - "name": "storage_uuid", - "in": "path", - "description": "UUID of the persistent volume or directory storage.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VolumeBackupScheduleRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Backup schedule replaced.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VolumeBackupScheduleResponse" - } + "required": [ + "source", + "s3_storage_uuid", + "path" + ], + "properties": { + "source": { + "type": "string", + "enum": [ + "s3" + ] + }, + "s3_storage_uuid": { + "type": "string" + }, + "path": { + "type": "string" + }, + "dump_all": { + "type": "boolean", + "default": false + }, + "replace_existing": { + "description": "Drop matching PostgreSQL objects before restoring a single-database archive.", + "type": "boolean", + "default": false + }, + "keep_owners": { + "description": "Restore object owners and privileges from a single-database PostgreSQL archive. By default they are skipped, because the roles of another server usually do not exist.", + "type": "boolean", + "default": false + }, + "restore_mysql_users": { + "description": "MySQL and MariaDB backups containing all databases: also restore the mysql system database (users, passwords, and privileges). By default the system databases are skipped, so the database keeps its own users and passwords.", + "type": "boolean", + "default": false + }, + "sqlite_database": { + "description": "SQLite: the database file to restore into. Must be one of the database files. Defaults to the file named in the backup file name, else the first file.", + "type": "string", + "example": "app.db" } - } + }, + "type": "object", + "additionalProperties": false }, - "201": { - "description": "Backup schedule created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VolumeBackupScheduleResponse" - } + { + "required": [ + "source", + "path" + ], + "properties": { + "source": { + "type": "string", + "enum": [ + "server" + ] + }, + "path": { + "type": "string", + "example": "/var/backups/database.sql.gz" + }, + "dump_all": { + "type": "boolean", + "default": false + }, + "replace_existing": { + "description": "Drop matching PostgreSQL objects before restoring a single-database archive.", + "type": "boolean", + "default": false + }, + "keep_owners": { + "description": "Restore object owners and privileges from a single-database PostgreSQL archive. By default they are skipped, because the roles of another server usually do not exist.", + "type": "boolean", + "default": false + }, + "restore_mysql_users": { + "description": "MySQL and MariaDB backups containing all databases: also restore the mysql system database (users, passwords, and privileges). By default the system databases are skipped, so the database keeps its own users and passwords.", + "type": "boolean", + "default": false + }, + "sqlite_database": { + "description": "SQLite: the database file to restore into. Must be one of the database files. Defaults to the file named in the backup file name, else the first file.", + "type": "string", + "example": "app.db" } - } + }, + "type": "object", + "additionalProperties": false + } + ] + }, + "DatabaseImportStatus": { + "properties": { + "id": { + "type": "integer" }, - "400": { - "$ref": "#/components/responses/400" + "status": { + "type": "string", + "enum": [ + "queued", + "in_progress", + "finished", + "error", + "killed", + "cancelled", + "closed" + ] + }, + "exit_code": { + "type": [ + "integer", + "null" + ] }, - "401": { - "$ref": "#/components/responses/401" + "output": { + "type": "string" }, - "403": { - "description": "Forbidden, or the token needs the deploy permission for stop_during_backup." + "created_at": { + "type": "string", + "format": "date-time" }, - "404": { - "$ref": "#/components/responses/404" + "updated_at": { + "type": "string", + "format": "date-time" }, - "422": { - "$ref": "#/components/responses/422" + "finished_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" } }, - "security": [ - { - "bearerAuth": [] - } - ] + "type": "object" }, - "delete": { - "tags": [ - "Applications" - ], - "summary": "Delete application storage backup schedule", - "description": "Delete the backup schedule and its local and S3 archives for an application storage.", - "operationId": "delete-application-storage-backup-schedule", - "parameters": [ - { - "name": "uuid", - "in": "path", - "required": true, - "schema": { - "type": "string" - } + "Database": { + "description": "Standalone database. The fields that start with an engine name (for example postgres_ or redis_) are only returned for that engine. Passwords, connection URLs and init_scripts are only returned for tokens with the read:sensitive or root ability.", + "properties": { + "uuid": { + "type": "string" }, - { - "name": "storage_uuid", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Backup schedule and archives deleted." + "name": { + "type": "string" }, - "401": { - "$ref": "#/components/responses/401" + "description": { + "type": [ + "string", + "null" + ] }, - "403": { - "description": "Forbidden." + "database_type": { + "type": "string", + "enum": [ + "standalone-postgresql", + "standalone-redis", + "standalone-mongodb", + "standalone-mysql", + "standalone-mariadb", + "standalone-keydb", + "standalone-dragonfly", + "standalone-clickhouse", + "standalone-sqlite" + ] }, - "404": { - "$ref": "#/components/responses/404" + "image": { + "type": "string" }, - "409": { - "description": "Backup or recovery operation is still running." - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/databases/{uuid}/storages/{storage_uuid}/backups": { - "put": { - "tags": [ - "Databases" - ], - "summary": "Set database storage backup schedule", - "description": "Create or replace the backup schedule for a database persistent volume or directory storage. A schedule with stop_during_backup needs a token with the deploy permission.", - "operationId": "set-database-storage-backup-schedule", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the database.", - "required": true, - "schema": { - "type": "string" - } + "status": { + "description": "Container status and health, for example running:healthy or exited:unhealthy.", + "type": "string" }, - { - "name": "storage_uuid", - "in": "path", - "description": "UUID of the persistent volume or directory storage.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VolumeBackupScheduleRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Backup schedule replaced.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VolumeBackupScheduleResponse" - } - } - } + "server_status": { + "description": "True when the server of the database is reachable and usable.", + "type": "boolean" }, - "201": { - "description": "Backup schedule created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VolumeBackupScheduleResponse" - } - } - } + "environment_id": { + "type": "integer" }, - "400": { - "$ref": "#/components/responses/400" + "environment": { + "$ref": "#/components/schemas/Environment", + "description": "Only returned by GET /databases/{uuid}. Includes the project." }, - "401": { - "$ref": "#/components/responses/401" + "destination_id": { + "type": "integer" }, - "403": { - "description": "Forbidden, or the token needs the deploy permission for stop_during_backup." + "destination_type": { + "type": "string" }, - "404": { - "$ref": "#/components/responses/404" + "destination": { + "description": "Docker network destination of the database, with its server.", + "properties": { + "uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "network": { + "type": "string" + }, + "server_id": { + "type": "integer" + }, + "server": { + "$ref": "#/components/schemas/Server" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "type": "object" }, - "422": { - "$ref": "#/components/responses/422" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - }, - "delete": { - "tags": [ - "Databases" - ], - "summary": "Delete database storage backup schedule", - "description": "Delete the backup schedule and its local and S3 archives for a database storage.", - "operationId": "delete-database-storage-backup-schedule", - "parameters": [ - { - "name": "uuid", - "in": "path", - "required": true, - "schema": { - "type": "string" - } + "is_public": { + "description": "Not returned for SQLite.", + "type": "boolean" }, - { - "name": "storage_uuid", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Backup schedule and archives deleted." + "public_port": { + "description": "Not returned for SQLite.", + "type": [ + "integer", + "null" + ] + }, + "public_port_timeout": { + "description": "Proxy timeout of the public port in seconds. Not returned for SQLite.", + "type": [ + "integer", + "null" + ] }, - "401": { - "$ref": "#/components/responses/401" + "ports_mappings": { + "description": "Comma-separated host:container port mappings. Not returned for SQLite.", + "type": [ + "string", + "null" + ] }, - "403": { - "description": "Forbidden." + "enable_ssl": { + "description": "Not returned for ClickHouse and SQLite.", + "type": "boolean" }, - "404": { - "$ref": "#/components/responses/404" + "ssl_mode": { + "description": "PostgreSQL, MongoDB and MySQL only.", + "type": [ + "string", + "null" + ] }, - "409": { - "description": "Backup or recovery operation is still running." - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/services/{uuid}/storages/{storage_uuid}/backups": { - "put": { - "tags": [ - "Services" - ], - "summary": "Set service storage backup schedule", - "description": "Create or replace the backup schedule for a service persistent volume or directory storage. A schedule with stop_during_backup needs a token with the deploy permission.", - "operationId": "set-service-storage-backup-schedule", - "parameters": [ - { - "name": "uuid", - "in": "path", - "description": "UUID of the service.", - "required": true, - "schema": { - "type": "string" - } + "internal_db_url": { + "description": "Connection URL inside the Docker network. Contains the password. Not returned for SQLite.", + "type": [ + "string", + "null" + ] }, - { - "name": "storage_uuid", - "in": "path", - "description": "UUID of the persistent volume or directory storage.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VolumeBackupScheduleRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Backup schedule replaced.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VolumeBackupScheduleResponse" - } - } - } + "external_db_url": { + "description": "Public connection URL, when the database is public. Contains the password. Not returned for SQLite.", + "type": [ + "string", + "null" + ] }, - "201": { - "description": "Backup schedule created.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VolumeBackupScheduleResponse" + "init_scripts": { + "description": "PostgreSQL only.", + "type": [ + "array", + "null" + ], + "items": { + "properties": { + "index": { + "type": "integer" + }, + "filename": { + "type": "string" + }, + "content": { + "type": "string" } - } + }, + "type": "object" } }, - "400": { - "$ref": "#/components/responses/400" + "custom_docker_run_options": { + "type": [ + "string", + "null" + ] }, - "401": { - "$ref": "#/components/responses/401" + "is_log_drain_enabled": { + "type": "boolean" }, - "403": { - "description": "Forbidden, or the token needs the deploy permission for stop_during_backup." + "is_include_timestamps": { + "description": "Not returned for MariaDB.", + "type": "boolean" }, - "404": { - "$ref": "#/components/responses/404" + "include_coolify_default_variables": { + "type": "boolean" }, - "422": { - "$ref": "#/components/responses/422" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - }, - "delete": { - "tags": [ - "Services" - ], - "summary": "Delete service storage backup schedule", - "description": "Delete the backup schedule and its local and S3 archives for a service storage.", - "operationId": "delete-service-storage-backup-schedule", - "parameters": [ - { - "name": "uuid", - "in": "path", - "required": true, - "schema": { - "type": "string" - } + "redact_all_env_values_in_logs": { + "type": "boolean" }, - { - "name": "storage_uuid", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Backup schedule and archives deleted." + "health_check_enabled": { + "type": "boolean" }, - "401": { - "$ref": "#/components/responses/401" + "health_check_interval": { + "type": "integer" }, - "403": { - "description": "Forbidden." + "health_check_timeout": { + "type": "integer" }, - "404": { - "$ref": "#/components/responses/404" + "health_check_retries": { + "type": "integer" }, - "409": { - "description": "Backup or recovery operation is still running." - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/applications/{uuid}/storages/{storage_uuid}/backups/run": { - "post": { - "tags": [ - "Applications" - ], - "summary": "Run application storage backup", - "description": "Queue an immediate volume backup for an application storage that has a schedule. Needs a token with the write and deploy permissions.", - "operationId": "run-application-storage-backup", - "parameters": [ - { - "name": "uuid", - "in": "path", - "required": true, - "schema": { - "type": "string" - } + "health_check_start_period": { + "type": "integer" }, - { - "name": "storage_uuid", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Storage backup queued." + "limits_memory": { + "type": "string" + }, + "limits_memory_swap": { + "type": "string" + }, + "limits_memory_swappiness": { + "type": "integer" + }, + "limits_memory_reservation": { + "type": "string" + }, + "limits_cpus": { + "type": "string" + }, + "limits_cpuset": { + "type": [ + "string", + "null" + ] + }, + "limits_cpu_shares": { + "type": "integer" }, - "401": { - "$ref": "#/components/responses/401" + "config_hash": { + "description": "Internal hash that Coolify uses to find configuration changes that need a restart. It changes only when the database starts, so do not use it to compare configurations.", + "type": [ + "string", + "null" + ] }, - "403": { - "description": "The token needs the write and deploy permissions." + "restart_count": { + "type": "integer" }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/databases/{uuid}/storages/{storage_uuid}/backups/run": { - "post": { - "tags": [ - "Databases" - ], - "summary": "Run database storage backup", - "description": "Queue an immediate volume backup for a database storage that has a schedule. Needs a token with the write and deploy permissions.", - "operationId": "run-database-storage-backup", - "parameters": [ - { - "name": "uuid", - "in": "path", - "required": true, - "schema": { - "type": "string" - } + "last_restart_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" }, - { - "name": "storage_uuid", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Storage backup queued." + "last_restart_type": { + "type": [ + "string", + "null" + ] }, - "401": { - "$ref": "#/components/responses/401" + "last_online_at": { + "type": [ + "string", + "null" + ] }, - "403": { - "description": "The token needs the write and deploy permissions." + "started_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/services/{uuid}/storages/{storage_uuid}/backups/run": { - "post": { - "tags": [ - "Services" - ], - "summary": "Run service storage backup", - "description": "Queue an immediate volume backup for a service storage that has a schedule. Needs a token with the write and deploy permissions.", - "operationId": "run-service-storage-backup", - "parameters": [ - { - "name": "uuid", - "in": "path", - "required": true, - "schema": { - "type": "string" + "backup_configs": { + "description": "Only returned by GET /databases. The scheduled backups of the database, as returned by GET /databases/{uuid}/backups.", + "type": "array", + "items": { + "type": "object" } }, - { - "name": "storage_uuid", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Storage backup queued." + "postgres_user": { + "type": "string" }, - "401": { - "$ref": "#/components/responses/401" + "postgres_password": { + "type": "string", + "format": "password" }, - "403": { - "description": "The token needs the write and deploy permissions." + "postgres_db": { + "type": "string" }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/vultr/regions": { - "get": { - "tags": [ - "Vultr" - ], - "summary": "Get Vultr Regions", - "description": "Get all available Vultr regions.", - "operationId": "get-vultr-regions", - "responses": { - "200": { - "description": "List of Vultr regions." + "postgres_initdb_args": { + "type": [ + "string", + "null" + ] }, - "401": { - "$ref": "#/components/responses/401" + "postgres_host_auth_method": { + "type": [ + "string", + "null" + ] }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/vultr/plans": { - "get": { - "tags": [ - "Vultr" - ], - "summary": "Get Vultr Plans", - "description": "Get all available Vultr plans.", - "operationId": "get-vultr-plans", - "responses": { - "200": { - "description": "List of Vultr plans." + "postgres_conf": { + "type": [ + "string", + "null" + ] }, - "401": { - "$ref": "#/components/responses/401" + "redis_password": { + "type": "string", + "format": "password" }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/vultr/os": { - "get": { - "tags": [ - "Vultr" - ], - "summary": "Get Vultr Operating Systems", - "description": "Get all available Vultr operating systems.", - "operationId": "get-vultr-operating-systems", - "responses": { - "200": { - "description": "List of Vultr operating systems." + "redis_conf": { + "type": [ + "string", + "null" + ] }, - "401": { - "$ref": "#/components/responses/401" + "mongo_initdb_root_username": { + "type": "string" }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/vultr/ssh-keys": { - "get": { - "tags": [ - "Vultr" - ], - "summary": "Get Vultr SSH Keys", - "description": "Get all Vultr SSH keys available to the selected token.", - "operationId": "get-vultr-ssh-keys", - "responses": { - "200": { - "description": "List of Vultr SSH keys." + "mongo_initdb_root_password": { + "type": "string", + "format": "password" }, - "401": { - "$ref": "#/components/responses/401" + "mongo_initdb_database": { + "type": "string" }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/servers/vultr": { - "post": { - "tags": [ - "Vultr" - ], - "summary": "Create Vultr Server", - "description": "Create a Vultr instance and link it as a Coolify server. A cloud-init script or extra SSH key IDs need a token with the deploy permission.", - "operationId": "create-vultr-server", - "responses": { - "201": { - "description": "Vultr server created." + "mongo_conf": { + "type": [ + "string", + "null" + ] }, - "401": { - "$ref": "#/components/responses/401" + "mysql_user": { + "type": "string" }, - "403": { - "description": "The token needs the deploy permission for a cloud-init script or extra SSH keys." + "mysql_password": { + "type": "string", + "format": "password" }, - "422": { - "description": "Validation failed." + "mysql_root_password": { + "type": "string", + "format": "password" }, - "429": { - "description": "Vultr API rate limit exceeded." + "mysql_database": { + "type": "string" }, - "502": { - "$ref": "#/components/responses/502" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - } - }, - "components": { - "schemas": { - "DatabaseImportRequest": { - "type": "object", - "oneOf": [ - { - "required": [ - "source", - "upload_id" - ], - "properties": { - "source": { - "type": "string", - "enum": [ - "upload" - ] - }, - "upload_id": { - "type": "string", - "format": "uuid" - }, - "dump_all": { - "type": "boolean", - "default": false - }, - "replace_existing": { - "description": "Drop matching PostgreSQL objects before restoring a single-database archive.", - "type": "boolean", - "default": false - }, - "keep_owners": { - "description": "Restore object owners and privileges from a single-database PostgreSQL archive. By default they are skipped, because the roles of another server usually do not exist.", - "type": "boolean", - "default": false - }, - "restore_mysql_users": { - "description": "MySQL and MariaDB backups containing all databases: also restore the mysql system database (users, passwords, and privileges). By default the system databases are skipped, so the database keeps its own users and passwords.", - "type": "boolean", - "default": false - }, - "sqlite_database": { - "description": "SQLite: the database file to restore into. Must be one of the database files. Defaults to the file named in the backup file name, else the first file.", - "type": "string", - "example": "app.db" - } - }, - "type": "object", - "additionalProperties": false + "mysql_conf": { + "type": [ + "string", + "null" + ] }, - { - "required": [ - "source", - "s3_storage_uuid", - "path" - ], - "properties": { - "source": { - "type": "string", - "enum": [ - "s3" - ] - }, - "s3_storage_uuid": { - "type": "string" - }, - "path": { - "type": "string" - }, - "dump_all": { - "type": "boolean", - "default": false - }, - "replace_existing": { - "description": "Drop matching PostgreSQL objects before restoring a single-database archive.", - "type": "boolean", - "default": false - }, - "keep_owners": { - "description": "Restore object owners and privileges from a single-database PostgreSQL archive. By default they are skipped, because the roles of another server usually do not exist.", - "type": "boolean", - "default": false - }, - "restore_mysql_users": { - "description": "MySQL and MariaDB backups containing all databases: also restore the mysql system database (users, passwords, and privileges). By default the system databases are skipped, so the database keeps its own users and passwords.", - "type": "boolean", - "default": false - }, - "sqlite_database": { - "description": "SQLite: the database file to restore into. Must be one of the database files. Defaults to the file named in the backup file name, else the first file.", - "type": "string", - "example": "app.db" - } - }, - "type": "object", - "additionalProperties": false + "mariadb_user": { + "type": "string" }, - { - "required": [ - "source", - "path" - ], - "properties": { - "source": { - "type": "string", - "enum": [ - "server" - ] - }, - "path": { - "type": "string", - "example": "/var/backups/database.sql.gz" - }, - "dump_all": { - "type": "boolean", - "default": false - }, - "replace_existing": { - "description": "Drop matching PostgreSQL objects before restoring a single-database archive.", - "type": "boolean", - "default": false - }, - "keep_owners": { - "description": "Restore object owners and privileges from a single-database PostgreSQL archive. By default they are skipped, because the roles of another server usually do not exist.", - "type": "boolean", - "default": false - }, - "restore_mysql_users": { - "description": "MySQL and MariaDB backups containing all databases: also restore the mysql system database (users, passwords, and privileges). By default the system databases are skipped, so the database keeps its own users and passwords.", - "type": "boolean", - "default": false - }, - "sqlite_database": { - "description": "SQLite: the database file to restore into. Must be one of the database files. Defaults to the file named in the backup file name, else the first file.", - "type": "string", - "example": "app.db" - } - }, - "type": "object", - "additionalProperties": false - } - ] - }, - "DatabaseImportStatus": { - "properties": { - "id": { - "type": "integer" + "mariadb_password": { + "type": "string", + "format": "password" }, - "status": { + "mariadb_root_password": { "type": "string", - "enum": [ - "queued", - "in_progress", - "finished", - "error", - "killed", - "cancelled", - "closed" + "format": "password" + }, + "mariadb_database": { + "type": "string" + }, + "mariadb_conf": { + "type": [ + "string", + "null" ] }, - "exit_code": { + "keydb_password": { + "type": "string", + "format": "password" + }, + "keydb_conf": { "type": [ - "integer", + "string", "null" ] }, - "output": { + "dragonfly_password": { + "type": "string", + "format": "password" + }, + "clickhouse_admin_user": { + "type": "string" + }, + "clickhouse_admin_password": { + "type": "string", + "format": "password" + }, + "clickhouse_db": { + "type": "string" + }, + "sqlite_databases": { + "description": "Comma-separated SQLite database file names.", "type": "string" }, "created_at": { @@ -24241,7 +27626,7 @@ "type": "string", "format": "date-time" }, - "finished_at": { + "deleted_at": { "type": [ "string", "null" @@ -24251,495 +27636,734 @@ }, "type": "object" }, - "Database": { - "description": "Standalone database. The fields that start with an engine name (for example postgres_ or redis_) are only returned for that engine. Passwords, connection URLs and init_scripts are only returned for tokens with the read:sensitive or root ability.", + "SecurityStatus": { + "description": "Security status of a resource from image scanning.", "properties": { - "uuid": { - "type": "string" + "status": { + "type": "string", + "enum": [ + "update_now", + "update_available", + "no_fix", + "check_needed", + "ok", + "not_checked" + ] }, - "name": { + "label": { "type": "string" }, - "description": { + "action": { + "description": "What to do, as the UI shows it.", "type": [ "string", "null" ] }, - "database_type": { - "type": "string", - "enum": [ - "standalone-postgresql", - "standalone-redis", - "standalone-mongodb", - "standalone-mysql", - "standalone-mariadb", - "standalone-keydb", - "standalone-dragonfly", - "standalone-clickhouse", - "standalone-sqlite" + "check_reason": { + "type": [ + "string", + "null" ] }, - "image": { - "type": "string" + "problem_count": { + "type": "integer" }, - "status": { - "description": "Container status and health, for example running:healthy or exited:unhealthy.", - "type": "string" + "exploited_count": { + "type": "integer" }, - "server_status": { - "description": "True when the server of the database is reachable and usable.", + "any_exploited": { "type": "boolean" }, - "environment_id": { + "critical_count": { "type": "integer" }, - "environment": { - "$ref": "#/components/schemas/Environment", - "description": "Only returned by GET /databases/{uuid}. Includes the project." - }, - "destination_id": { + "high_count": { "type": "integer" }, - "destination_type": { - "type": "string" - }, - "destination": { - "description": "Docker network destination of the database, with its server.", - "properties": { - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "network": { - "type": "string" - }, - "server_id": { - "type": "integer" - }, - "server": { - "$ref": "#/components/schemas/Server" - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" - } - }, - "type": "object" - }, - "is_public": { - "description": "Not returned for SQLite.", - "type": "boolean" + "medium_count": { + "type": "integer" }, - "public_port": { - "description": "Not returned for SQLite.", + "eol": { + "description": "The end-of-life OS of the image.", "type": [ - "integer", + "object", "null" ] }, - "public_port_timeout": { - "description": "Proxy timeout of the public port in seconds. Not returned for SQLite.", + "checked_at": { "type": [ - "integer", + "string", "null" + ], + "format": "date-time" + }, + "actions": { + "type": "array", + "items": { + "properties": { + "type": { + "type": "string" + }, + "sentence": { + "type": "string" + }, + "target": { + "type": [ + "string", + "null" + ] + }, + "copy": { + "type": [ + "string", + "null" + ] + }, + "image": { + "type": [ + "string", + "null" + ] + }, + "ref": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "ResourceVulnerabilities": { + "description": "Image scan results of a resource.", + "properties": { + "uuid": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "application", + "service", + "database" ] }, - "ports_mappings": { - "description": "Comma-separated host:container port mappings. Not returned for SQLite.", + "off_reason": { + "description": "Why the resource is not scanned. Null when it is scanned.", "type": [ "string", "null" + ], + "enum": [ + "server", + "application" ] }, - "enable_ssl": { - "description": "Not returned for ClickHouse and SQLite.", - "type": "boolean" + "security": { + "oneOf": [ + { + "$ref": "#/components/schemas/SecurityStatus" + }, + { + "type": "null" + } + ] }, - "ssl_mode": { - "description": "PostgreSQL, MongoDB and MySQL only.", + "images": { + "type": "array", + "items": { + "properties": { + "scan_uuid": { + "type": "string" + }, + "owner_uuid": { + "description": "The application, database, or service application or database that runs the image.", + "type": "string" + }, + "image_ref": { + "type": "string" + }, + "scan_status": { + "type": "string", + "enum": [ + "queued", + "running", + "completed", + "failed" + ] + }, + "error_code": { + "type": [ + "string", + "null" + ] + }, + "scanned_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "truncated": { + "type": "boolean" + }, + "security_status": { + "type": "string" + } + }, + "type": "object" + } + }, + "findings": { + "type": "array", + "items": { + "properties": { + "id": { + "type": "string" + }, + "display_id": { + "type": "string" + }, + "aliases": { + "type": "array", + "items": { + "type": "string" + } + }, + "title": { + "type": "string" + }, + "severity": { + "type": "string", + "enum": [ + "critical", + "high", + "medium", + "low", + "unknown" + ] + }, + "package": { + "type": "string" + }, + "version": { + "type": "string" + }, + "package_type": { + "type": "string" + }, + "fixed_in": { + "type": [ + "string", + "null" + ] + }, + "state": { + "description": "fixed: a fix is available upstream.", + "type": "string", + "enum": [ + "fixed", + "no_fix", + "ignored" + ] + }, + "ignore": { + "type": [ + "object", + "null" + ] + }, + "kev": { + "description": "Listed in the CISA Known Exploited Vulnerabilities catalog.", + "type": "boolean" + }, + "epss": { + "type": [ + "number", + "null" + ] + }, + "risk": { + "type": [ + "number", + "null" + ] + }, + "cvss_score": { + "type": [ + "number", + "null" + ] + }, + "advisory_url": { + "type": [ + "string", + "null" + ] + }, + "image_ref": { + "type": "string" + }, + "owner_uuid": { + "type": "string" + } + }, + "type": "object" + } + }, + "pagination": { + "properties": { + "page": { + "type": "integer" + }, + "per_page": { + "type": "integer" + }, + "total": { + "type": "integer" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "ApplicationPreview": { + "properties": { + "uuid": { + "type": "string" + }, + "pull_request_id": { + "type": "integer" + }, + "pull_request_html_url": { "type": [ "string", "null" ] }, - "internal_db_url": { - "description": "Connection URL inside the Docker network. Contains the password. Not returned for SQLite.", + "git_type": { "type": [ "string", "null" ] }, - "external_db_url": { - "description": "Public connection URL, when the database is public. Contains the password. Not returned for SQLite.", + "status": { + "type": "string" + }, + "domains": { "type": [ "string", "null" ] }, - "init_scripts": { - "description": "PostgreSQL only.", + "docker_compose_domains": { "type": [ "array", "null" ], "items": { "properties": { - "index": { - "type": "integer" - }, - "filename": { + "name": { "type": "string" }, - "content": { - "type": "string" + "domain": { + "type": [ + "string", + "null" + ] + }, + "redirect": { + "type": [ + "string", + "null" + ] } }, "type": "object" } }, - "custom_docker_run_options": { + "domain_port_overrides": { "type": [ - "string", + "object", "null" ] }, - "is_log_drain_enabled": { - "type": "boolean" - }, - "is_include_timestamps": { - "description": "Not returned for MariaDB.", - "type": "boolean" - }, - "include_coolify_default_variables": { - "type": "boolean" - }, - "redact_all_env_values_in_logs": { - "type": "boolean" - }, - "health_check_enabled": { - "type": "boolean" - }, - "health_check_interval": { - "type": "integer" - }, - "health_check_timeout": { - "type": "integer" - }, - "health_check_retries": { - "type": "integer" - }, - "health_check_start_period": { - "type": "integer" - }, - "limits_memory": { - "type": "string" - }, - "limits_memory_swap": { - "type": "string" - }, - "limits_memory_swappiness": { - "type": "integer" - }, - "limits_memory_reservation": { - "type": "string" - }, - "limits_cpus": { - "type": "string" - }, - "limits_cpuset": { + "docker_registry_image_tag": { "type": [ "string", "null" ] }, - "limits_cpu_shares": { - "type": "integer" - }, - "config_hash": { - "description": "Internal hash that Coolify uses to find configuration changes that need a restart. It changes only when the database starts, so do not use it to compare configurations.", + "last_online_at": { "type": [ "string", "null" ] }, - "restart_count": { - "type": "integer" - }, - "last_restart_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" + "created_at": { + "type": "string" }, - "last_restart_type": { - "type": [ - "string", - "null" - ] + "updated_at": { + "type": "string" + } + }, + "type": "object" + }, + "ApplicationPreviewDeployment": { + "properties": { + "message": { + "type": "string" }, - "last_online_at": { + "deployment_uuid": { "type": [ "string", "null" ] }, - "started_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "backup_configs": { - "description": "Only returned by GET /databases. The scheduled backups of the database, as returned by GET /databases/{uuid}/backups.", - "type": "array", - "items": { - "type": "object" - } + "preview": { + "$ref": "#/components/schemas/ApplicationPreview" + } + }, + "type": "object" + }, + "ManagedDnsRecord": { + "description": "DNS record that Coolify manages at a DNS provider.", + "properties": { + "uuid": { + "type": "string" }, - "postgres_user": { + "hostname": { "type": "string" }, - "postgres_password": { + "type": { "type": "string", - "format": "password" + "enum": [ + "A", + "AAAA" + ] }, - "postgres_db": { + "address": { + "description": "Server IP address that the record points to.", "type": "string" }, - "postgres_initdb_args": { - "type": [ - "string", - "null" - ] - }, - "postgres_host_auth_method": { - "type": [ - "string", - "null" - ] + "owned": { + "description": "Coolify created the record, so it can delete it.", + "type": "boolean" }, - "postgres_conf": { + "integration_token_uuid": { + "type": "string" + } + }, + "type": "object" + }, + "ResourceDnsStatus": { + "description": "DNS providers and managed records for the domains of a resource.", + "properties": { + "default_address": { + "description": "Address of a new record when none is given: the first public server address. Null when the server has no public address.", "type": [ "string", "null" ] }, - "redis_password": { - "type": "string", - "format": "password" - }, - "redis_conf": { - "type": [ - "string", - "null" - ] + "public_addresses": { + "type": "array", + "items": { + "type": "string" + } }, - "mongo_initdb_root_username": { + "hostnames": { + "type": "array", + "items": { + "properties": { + "hostname": { + "type": "string" + }, + "providers": { + "type": "array", + "items": { + "properties": { + "integration_token_uuid": { + "type": "string" + }, + "integration_token_name": { + "type": "string" + }, + "zone": { + "type": "string" + }, + "automatic_dns": { + "type": "boolean" + }, + "proxied_dns": { + "type": "boolean" + } + }, + "type": "object" + } + }, + "records": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ManagedDnsRecord" + } + } + }, + "type": "object" + } + } + }, + "type": "object" + }, + "CreateDnsRecordRequest": { + "required": [ + "hostname" + ], + "properties": { + "hostname": { + "description": "A saved domain of the resource.", "type": "string" }, - "mongo_initdb_root_password": { - "type": "string", - "format": "password" + "integration_token_uuid": { + "description": "Cloudflare token to use. Required when several tokens manage the zone of the hostname.", + "type": "string" }, - "mongo_initdb_database": { + "address": { + "description": "A public address of the server. Default: default_address of the DNS status.", + "type": "string" + } + }, + "type": "object" + }, + "ReplaceDnsRecordRequest": { + "required": [ + "hostname", + "record_id", + "current" + ], + "properties": { + "hostname": { + "description": "A saved domain of the resource.", "type": "string" }, - "mongo_conf": { - "type": [ - "string", - "null" - ] + "integration_token_uuid": { + "description": "Cloudflare token to use. Required when several tokens manage the zone of the hostname.", + "type": "string" }, - "mysql_user": { + "record_id": { + "description": "conflict.record_id from the 409 response of the create request.", "type": "string" }, - "mysql_password": { - "type": "string", - "format": "password" + "current": { + "description": "conflict.current from the 409 response. The record is replaced only when it still has this value.", + "type": "string" }, - "mysql_root_password": { - "type": "string", - "format": "password" + "address": { + "description": "A public address of the server. Default: default_address of the DNS status.", + "type": "string" + } + }, + "type": "object" + }, + "DnsRecordConflict": { + "properties": { + "message": { + "type": "string" }, - "mysql_database": { + "conflict": { + "properties": { + "record_id": { + "type": "string" + }, + "current": { + "type": "string" + }, + "proposed": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "IntegrationToken": { + "description": "Integration token. The secret is never returned.", + "properties": { + "uuid": { "type": "string" }, - "mysql_conf": { - "type": [ - "string", - "null" - ] - }, - "mariadb_user": { + "name": { "type": "string" }, - "mariadb_password": { + "provider": { "type": "string", - "format": "password" + "enum": [ + "cloudflare", + "doppler", + "infisical", + "vault" + ] }, - "mariadb_root_password": { - "type": "string", - "format": "password" + "capabilities": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "dns", + "tunnel", + "secrets" + ] + } }, - "mariadb_database": { - "type": "string" + "automatic_dns": { + "description": "Cloudflare only. Create DNS records when a domain is added.", + "type": "boolean" }, - "mariadb_conf": { - "type": [ - "string", - "null" - ] + "proxied_dns": { + "description": "Cloudflare only. Create new records proxied (orange cloud).", + "type": "boolean" }, - "keydb_password": { - "type": "string", - "format": "password" + "dns_zones_count": { + "description": "Cloudflare only.", + "type": "integer" }, - "keydb_conf": { + "zones_synced_at": { + "description": "Cloudflare only.", "type": [ "string", "null" ] }, - "dragonfly_password": { - "type": "string", - "format": "password" - }, - "clickhouse_admin_user": { - "type": "string" - }, - "clickhouse_admin_password": { - "type": "string", - "format": "password" - }, - "clickhouse_db": { - "type": "string" - }, - "sqlite_databases": { - "description": "Comma-separated SQLite database file names.", - "type": "string" - }, "created_at": { - "type": "string", - "format": "date-time" + "type": "string" }, "updated_at": { - "type": "string", - "format": "date-time" - }, - "deleted_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" + "type": "string" } }, "type": "object" }, - "ApplicationPreview": { + "SecretManagerSource": { + "description": "The secret manager source of an application, service, or database. Routes start with the resource type (`applications`, `services`, `databases`), so tokens limited to some resources can use them.", "properties": { - "uuid": { - "type": "string" - }, - "pull_request_id": { - "type": "integer" + "linked": { + "type": "boolean" }, - "pull_request_html_url": { + "integration_token_uuid": { "type": [ "string", "null" ] }, - "git_type": { + "provider": { "type": [ "string", "null" + ], + "enum": [ + "doppler", + "infisical", + "vault", + null ] }, - "status": { - "type": "string" - }, - "domains": { + "settings": { + "description": "Doppler: project, config. Infisical: project_id, environment, secret_path. Vault: mount, path.", "type": [ - "string", + "object", "null" ] }, - "docker_compose_domains": { - "type": [ - "array", - "null" - ], + "available_tokens": { + "type": "array", "items": { "properties": { - "name": { + "uuid": { "type": "string" }, - "domain": { - "type": [ - "string", - "null" - ] + "name": { + "type": "string" }, - "redirect": { - "type": [ - "string", - "null" - ] + "provider": { + "type": "string" } }, "type": "object" } + } + }, + "type": "object" + }, + "SharedEnvironmentVariableCreateRequest": { + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string" }, - "domain_port_overrides": { - "type": [ - "object", - "null" - ] - }, - "docker_registry_image_tag": { + "value": { "type": [ "string", "null" ] }, - "last_online_at": { + "is_literal": { + "type": "boolean" + }, + "is_multiline": { + "type": "boolean" + }, + "is_shown_once": { + "description": "If true, the saved value is hidden in the UI and API responses. A lock is permanent: false does not unlock a locked variable, but a new value can still replace the locked one. MCP never returns environment variable values.", + "type": "boolean" + }, + "comment": { "type": [ "string", "null" - ] - }, - "created_at": { - "type": "string" - }, - "updated_at": { - "type": "string" + ], + "maxLength": 256 } }, "type": "object" }, - "ApplicationPreviewDeployment": { + "SharedEnvironmentVariableUpdateRequest": { + "description": "Send at least one field.", "properties": { - "message": { + "key": { "type": "string" }, - "deployment_uuid": { + "value": { "type": [ "string", "null" ] }, - "preview": { - "$ref": "#/components/schemas/ApplicationPreview" + "is_literal": { + "type": "boolean" + }, + "is_multiline": { + "type": "boolean" + }, + "is_shown_once": { + "description": "If true, the saved value is hidden in the UI and API responses. A lock is permanent: false does not unlock a locked variable, but a new value can still replace the locked one. MCP never returns environment variable values.", + "type": "boolean" + }, + "comment": { + "type": [ + "string", + "null" + ], + "maxLength": 256 } }, "type": "object" @@ -24994,6 +28618,16 @@ "nullable": true, "description": "Git full URL." }, + "git_ssh_known_hosts": { + "type": "string", + "nullable": true, + "description": "SSH host keys (known_hosts lines) of self-hosted Git hosts that git over SSH accepts. Saved on the first deployment." + }, + "git_https_username": { + "type": "string", + "nullable": true, + "description": "Username for HTTPS access to a private repository on a custom Git host. The password or token is never returned." + }, "docker_registry_image_name": { "type": "string", "nullable": true, @@ -25419,6 +29053,9 @@ "is_api": { "type": "boolean" }, + "is_mcp": { + "type": "boolean" + }, "created_at": { "type": "string" }, @@ -25595,6 +29232,10 @@ "include_source_commit_in_build": { "type": "boolean" }, + "include_network_hosts_in_build": { + "type": "boolean", + "description": "Add the containers of the destination network as build hosts (--add-host). Turn off to keep the build cache when resources on the network change." + }, "docker_images_to_keep": { "type": "integer" }, @@ -25668,7 +29309,7 @@ }, "is_shown_once": { "type": "boolean", - "description": "If true, the saved value is hidden in the UI and API responses. MCP never returns environment variable values." + "description": "If true, the saved value is hidden in the UI and API responses. A lock is permanent: false does not unlock a locked variable, but a new value can still replace the locked one. MCP never returns environment variable values." }, "key": { "type": "string" @@ -25791,6 +29432,25 @@ "type": "integer", "description": "The timeout of the scheduled task in seconds." }, + "use_shell": { + "type": "boolean", + "description": "Run the command with `sh -c` in the container. Set it to false for containers without a shell: the command is then split into arguments and run directly, without shell features such as variables, pipes, or redirects." + }, + "consecutive_failures": { + "type": "integer", + "description": "The number of failed runs since the last successful run." + }, + "failing_since": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "The date and time of the first failed run since the last successful run." + }, + "disabled_reason": { + "type": "string", + "nullable": true, + "description": "Why Coolify disabled the task automatically. It is cleared when the task is enabled again." + }, "created_at": { "type": "string", "format": "date-time", @@ -25986,9 +29646,6 @@ "is_logdrain_custom_enabled": { "type": "boolean" }, - "is_logdrain_highlight_enabled": { - "type": "boolean" - }, "is_logdrain_newrelic_enabled": { "type": "boolean" }, @@ -26032,6 +29689,54 @@ "is_reachable": { "type": "boolean" }, + "ssh_host_key": { + "type": "string", + "nullable": true, + "description": "Pinned SSH host key(s) of the server, one \"type base64\" line per key." + }, + "ssh_host_key_source": { + "type": "string", + "nullable": true, + "enum": [ + "tofu", + "upgrade", + "transfer", + "manual" + ] + }, + "ssh_host_key_trusted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "ssh_host_key_pending": { + "type": "string", + "nullable": true, + "description": "Host key that the server sent when it did not match the pinned key." + }, + "is_ssh_host_key_check_disabled": { + "type": "boolean" + }, + "is_ssh_host_key_check_enforced": { + "type": "boolean", + "description": "Refuse a changed host key on this server, also when the instance only warns." + }, + "ssh_host_key_fingerprints": { + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true, + "description": "SHA256 fingerprints of the pinned host keys, as `ssh-keygen -lf` shows them." + }, + "ssh_host_key_pending_fingerprints": { + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true, + "description": "SHA256 fingerprints of the host key that did not match." + }, "is_sentinel_enabled": { "type": "boolean" }, @@ -26072,9 +29777,6 @@ "logdrain_custom_config_parser": { "type": "string" }, - "logdrain_highlight_project_id": { - "type": "string" - }, "logdrain_newrelic_base_uri": { "type": "string" }, @@ -26315,6 +30017,10 @@ "type": "boolean", "description": "Whether deployments can fall back to the deployment server when no usable dedicated build server is available." }, + "scan_images_on_new_servers": { + "type": "boolean", + "description": "Whether image scanning is turned on for servers added to the team from now on." + }, "members": { "description": "The members of the team.", "type": "array", @@ -26506,6 +30212,65 @@ } } }, + "parameters": { + "VulnerabilityState": { + "name": "state", + "in": "query", + "description": "Comma-separated finding states: fixed, no_fix, ignored. All when not sent.", + "required": false, + "schema": { + "type": "string" + } + }, + "VulnerabilitySeverity": { + "name": "severity", + "in": "query", + "description": "Comma-separated severities: critical, high, medium, low, unknown.", + "required": false, + "schema": { + "type": "string" + } + }, + "VulnerabilityImage": { + "name": "image", + "in": "query", + "description": "Only the findings of this scanned image ref.", + "required": false, + "schema": { + "type": "string" + } + }, + "VulnerabilitySearch": { + "name": "search", + "in": "query", + "description": "Text in the vulnerability ID, an alias, the package, or the version.", + "required": false, + "schema": { + "type": "string" + } + }, + "VulnerabilityPage": { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 1, + "minimum": 1 + } + }, + "VulnerabilityPerPage": { + "name": "per_page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 50, + "maximum": 200, + "minimum": 1 + } + } + }, "securitySchemes": { "bearerAuth": { "type": "http", @@ -26519,10 +30284,6 @@ "name": "Applications", "description": "Applications" }, - { - "name": "Secret Managers", - "description": "Secret Managers" - }, { "name": "Audit Events", "description": "Audit Events" @@ -26551,6 +30312,14 @@ "name": "DigitalOcean", "description": "DigitalOcean" }, + { + "name": "DNS", + "description": "DNS" + }, + { + "name": "Gitea Apps", + "description": "Gitea Apps" + }, { "name": "GitHub Apps", "description": "GitHub Apps" @@ -26571,6 +30340,10 @@ "name": "Settings", "description": "Settings" }, + { + "name": "Integration Tokens", + "description": "Integration Tokens" + }, { "name": "Notifications", "description": "Notifications" @@ -26591,6 +30364,10 @@ "name": "Scheduled Tasks", "description": "Scheduled Tasks" }, + { + "name": "Secret Managers", + "description": "Secret Managers" + }, { "name": "Private Keys", "description": "Private Keys" @@ -26623,6 +30400,10 @@ "name": "Teams", "description": "Teams" }, + { + "name": "Vulnerabilities", + "description": "Vulnerabilities" + }, { "name": "Vultr", "description": "Vultr" diff --git a/content/docs/api/authorization.mdx b/content/docs/api/authorization.mdx index 2f750c669..0df0c9cd0 100644 --- a/content/docs/api/authorization.mdx +++ b/content/docs/api/authorization.mdx @@ -5,14 +5,14 @@ description: Authenticate Coolify API requests with a Bearer token and understan # API Authorization -Coolify authenticates protected API requests with Bearer tokens. Each token belongs to the user and active team that created it and includes the permissions selected during creation. +Coolify authenticates protected API requests with Bearer tokens. Each token belongs to the user and active team that created it and includes the permissions and access selected for it. ## Before you make a request Follow [API Tokens](/core/security/credentials/api-tokens) to: - create a token for the correct active team -- choose permissions and an expiration period +- choose permissions, access, and an expiration period - copy the token into the caller's secret store Use a separate token for each integration and team. Do not place tokens in source code, query strings, or deployment logs. @@ -31,7 +31,7 @@ export COOLIFY_TOKEN="" curl --fail-with-body \ --header "Authorization: Bearer $COOLIFY_TOKEN" \ - "$COOLIFY_URL/api/v1/teams/current" + "$COOLIFY_URL/api/v1/team" ``` The header format is: @@ -40,9 +40,9 @@ The header format is: Authorization: Bearer ``` -The token includes an ID, a `|` separator, and the secret value. Send the complete value exactly as Coolify displayed it when the token was created. +The token includes an ID, a `|` separator, and the secret value. Send the complete value exactly as Coolify displayed it when the token was created or rolled. -A successful request returns the team bound to the token. +A successful request returns the team bound to the token. A token limited to selected projects, environments, or resources gets `403 Forbidden` from this team-level endpoint. Test it with `GET /api/v1/projects` instead. --- @@ -50,19 +50,22 @@ A successful request returns the team bound to the token. A protected request passes through these checks: -1. The token exists, has not expired, and authenticates a user. +1. The token exists, has not expired, is not paused, and authenticates a user. 2. The user still belongs to the team recorded when the token was created. -3. On a self-hosted instance, [API Access](/api/ip-allowlist) is enabled and the caller matches the IP allowlist when one is set. -4. The token has the permission required by the endpoint, unless it has `root`. -5. A token using `write` or `root` still belongs to a team administrator or owner. +3. The token does not have more access than its owner currently has in that team. +4. On a self-hosted instance, [API Access](/api/ip-allowlist) is enabled and the caller matches the IP allowlist when one is set. The instance-administrator endpoints check only the IP allowlist. +5. A token limited to selected projects, environments, or resources calls an endpoint for projects and resources, not a team-level endpoint. +6. The token has the permission required by the endpoint, unless it has `root`. +7. The requested project, environment, or resource is inside the access of the token and its owner. Some endpoints also need the token owner to be a team administrator or owner. See [Permissions](/api/permissions#team-and-role-scope). | Status | Typical meaning | | :--- | :--- | -| `401` | Unauthenticated. The token is missing, invalid, expired, revoked, or no longer belongs to a current team member. | -| `403` | Forbidden. API access or the caller's IP is blocked, the token lacks the required permission, or the token owner lacks the required role. | +| `401` | Unauthenticated. The token is missing, invalid, expired, paused, revoked, or no longer belongs to a current team member. | +| `403` | Forbidden. API access or the caller's IP is blocked, the token lacks the required permission or access, or the token has more access than its owner. | +| `429` | Too many requests. The caller sent too many requests or too many failed requests. See [Rate Limits](/api/rate-limits). | See [API errors](/api/errors) for other status codes and response-handling guidance. --- -Review [Permissions](/api/permissions) before choosing token abilities. Read the [API overview](/api/overview) for base URLs and the other API reference sections. +Review [Permissions](/api/permissions) before choosing token permissions and access. Read the [API overview](/api/overview) for base URLs and the other API reference sections. diff --git a/content/docs/api/errors.mdx b/content/docs/api/errors.mdx index 8ed83bf5a..97aad95dd 100644 --- a/content/docs/api/errors.mdx +++ b/content/docs/api/errors.mdx @@ -39,12 +39,12 @@ Do not parse the human-readable message to decide whether a request succeeded. U | `200 OK` | The request succeeded. | Read the response body for the operation result. | | `201 Created` | Coolify created the requested resource. | Store the returned identifier and verify the resource state when required. | | `400 Bad Request` | The request or token is invalid for the operation. | Check the endpoint schema, parameters, and complete token value. | -| `401 Unauthenticated` | Coolify could not authenticate the request. | Replace a missing, invalid, expired, or revoked token. | -| `403 Forbidden` | The authenticated caller cannot perform the operation. | Check token permissions, team role, API access, and the source-IP allowlist. | +| `401 Unauthenticated` | Coolify could not authenticate the request. | Replace a missing, invalid, expired, or revoked token, or resume a paused token. | +| `403 Forbidden` | The authenticated caller cannot perform the operation. | Check token permissions and access, the owner's access, API access, and the source-IP allowlist. | | `404 Not Found` | The route or requested resource is unavailable to the caller. | Check the URL, resource identifier, and token team. | | `409 Conflict` | The requested change conflicts with existing state, such as an existing domain. | Read the response and resolve the conflicting state before retrying. | | `422 Unprocessable Content` | One or more request fields failed validation. | Correct the fields listed in `errors`, then send a new request. | -| `429 Too Many Requests` | A request limit, deployment queue, or upstream provider rejected the request temporarily. | Follow `Retry-After` and the [rate-limit guidance](/api/rate-limits#handle-a-429-response). | +| `429 Too Many Requests` | A request limit, the failed request limit, a deployment queue, or an upstream provider rejected the request temporarily. | Follow `Retry-After` and the [rate-limit guidance](/api/rate-limits#handle-a-429-response). | Each operation page under **Endpoints** lists its documented responses. @@ -56,32 +56,55 @@ For `401 Unauthenticated`, confirm that: - the header uses `Authorization: Bearer ` - the complete token value, including the ID and `|` separator, is present -- the token has not expired or been revoked +- the token has not expired, been paused, or been revoked - the token owner still belongs to the token's team +The `message` field shows the cause: + +| Message | Cause | +| :--- | :--- | +| `Unauthenticated.` | The token is missing, invalid, expired, paused, or revoked. | +| `Invalid token.` | The token owner is no longer a member of the token's team. | + A password change revokes that user's issued API tokens. Create a replacement token when this happens. For `403 Forbidden`, confirm that: -- the token has the endpoint's required `read`, `write`, or `deploy` permission -- the token owner still has an administrator or owner role when using `write` or `root` -- **API Access** is enabled on a self-hosted instance -- the caller matches **Allowed IPs for API Access** when an allowlist is configured - -Token permissions cannot be changed after creation. Create a replacement token with the required permissions and revoke the previous token. +- the token has the endpoint's required `read`, `write`, `delete`, or `deploy` permission +- a token limited to selected projects, environments, or resources calls an endpoint for projects and resources, and the requested item is inside its access +- the token owner still has the access that the token uses +- the token owner has the role that the endpoint needs, for example team administrator or owner +- **API access** is enabled on a self-hosted instance +- the caller matches **Allowed IPs** when an allowlist is configured + +The `message` field tells you which check failed: + +| Message | Cause | +| :--- | :--- | +| `Missing required permissions: ` | The token does not have the permission that the endpoint requires. For an [operation-specific check](/api/permissions#operation-specific-checks), Coolify adds the reason after the permission. | +| `This API token is limited to selected projects, environments, or resources, so it cannot use this endpoint.` | The endpoint is team-level, and the token has limited access. | +| `This API token has more access than you have in this team. Revoke it and create a new token.` | The token owner lost access that the token uses, or a selected project, environment, or resource of a member's token was deleted. | +| `API is disabled.` | **API access** is off on a self-hosted instance. | +| `You are not allowed to disable the API.`, `You are not allowed to enable the MCP server.`, `You are not allowed to disable the MCP server.` | The token is not a root-team token of an instance administrator. | +| `Instance email settings require a root-team API token.` | The token for `/settings/email` was not created in the root team. | +| `This action is unauthorized.` | `GET /cloud-tokens` needs a token owner who is a team administrator or owner. | +| `Only team admins and owners can view audit logs.` | `GET /audit-events` needs a token owner who is a team administrator or owner. | +| `You are not authorized to perform this action.` | The role or access of the token owner does not allow the operation, for example a member who manages cloud tokens. | + +To fix the permissions or access of a token, [edit the token](/core/security/credentials/api-tokens#manage-a-token). Its value does not change. ### IP allowlist rejections -On a self-hosted instance, a request from an address outside **Allowed IPs for API Access** returns `403 Forbidden`: +On a self-hosted instance, a request from an address outside **Allowed IPs** returns `403 Forbidden`: ```json { - "success": true, + "success": false, "message": "You are not allowed to access the API." } ``` -Treat the HTTP `403` status as the failure signal even though this response contains `"success": true`. Add the caller's exact source IP address or network to the allowlist, then make the request again. Follow [Restrict API access by IP address](/api/ip-allowlist#restrict-api-access-by-ip-address) for supported values and configuration steps. +Treat the HTTP `403` status as the failure signal. Add the caller's exact source IP address or network to the allowlist, then make the request again. Follow [Restrict API access by IP address](/api/ip-allowlist#restrict-api-access-by-ip-address) for supported values and configuration steps. --- @@ -89,8 +112,8 @@ Treat the HTTP `403` status as the failure signal even though this response cont A successful request can still omit expected resources or redact sensitive values. -- If a resource is missing, confirm that it belongs to the team recorded when the token was created. Create a separate token for another team. -- If passwords, private keys, environment values, logs, or Compose content are redacted, use a token with `read:sensitive` in addition to the endpoint's required permission. +- If a resource is missing, confirm that it belongs to the team recorded when the token was created and that it is inside the token's access. Create a separate token for another team. +- If passwords, private keys, environment values, logs, or Compose content are redacted, use a token with `read:sensitive` in addition to the endpoint's required permission. For most values, the token owner must also be a team administrator or owner. Locked environment variable values are never returned. See [Sensitive response data](/api/permissions#sensitive-response-data). Read [Authorization](/api/authorization) for the complete request and access-check flow. diff --git a/content/docs/api/ip-allowlist.mdx b/content/docs/api/ip-allowlist.mdx index 95ad0fac2..3eb08526e 100644 --- a/content/docs/api/ip-allowlist.mdx +++ b/content/docs/api/ip-allowlist.mdx @@ -12,23 +12,25 @@ Self-hosted Coolify administrators can enable API access for the instance and re Open **Settings > Advanced**. Under **API and MCP**, the page contains: - **API access**, which allows or blocks authenticated REST API requests -- **Allowed API IPs**, which accepts exact IP addresses and networks in CIDR notation +- **Allowed IPs**, which accepts exact IP addresses and networks in CIDR notation When **API access** is off, protected REST API requests return `403 Forbidden` even when the Bearer token is valid. Enable REST API access through the dashboard; `POST /api/v1/enable` has been removed. -MCP has its own **MCP server** switch and can remain enabled while REST API access is off. **Allowed API IPs** applies to both REST API and MCP requests, including API/MCP control endpoints. See [Set up MCP](/mcp/setup). +Through the API, only an instance administrator can disable the API or enable and disable the MCP server. `POST /api/v1/disable`, `POST /api/v1/mcp/enable`, and `POST /api/v1/mcp/disable` require a `write` or `root` token created in the root team by an administrator or owner of that team. Other tokens receive `403 Forbidden`. + +MCP has its own **MCP server** switch and can remain enabled while REST API access is off. **Allowed IPs** applies to both REST API and MCP requests, including API/MCP control endpoints. See [Set up MCP](/mcp/setup). --- ## Restrict API access by IP address -**Allowed API IPs** is an instance-wide allowlist. When the field contains one or more entries, Coolify rejects a request unless its source IP matches an exact address or one of the listed networks. +**Allowed IPs** is an instance-wide allowlist. When the field contains one or more entries, Coolify rejects a request unless its source IP matches an exact address or one of the listed networks. Before changing the allowlist, identify the source address that Coolify receives from each API client. If a client connects through NAT, add its public outbound IP address rather than its private address. 1. Open **Settings > Advanced**. 2. Under **API and MCP**, set **API access** to **Enabled**. -3. Enter exact IPv4 or IPv6 addresses, or networks in CIDR notation, in **Allowed API IPs**. +3. Enter exact IPv4 or IPv6 addresses, or networks in CIDR notation, in **Allowed IPs**. 4. Separate multiple entries with commas. 5. Select **Save changes**. @@ -68,7 +70,7 @@ docker network inspect coolify \ --format '{{range .IPAM.Config}}{{println .Subnet}}{{end}}' ``` -Add every IPv4 and IPv6 subnet returned by the command to **Allowed API IPs**, separated by commas. +Add every IPv4 and IPv6 subnet returned by the command to **Allowed IPs**, separated by commas. Allowing an entire Docker subnet permits every container on that subnet to pass the IP check. API tokens and their permissions still apply, but you should connect only trusted containers to the `coolify` network. diff --git a/content/docs/api/making-requests.mdx b/content/docs/api/making-requests.mdx index 16aa09593..30de3c2e8 100644 --- a/content/docs/api/making-requests.mdx +++ b/content/docs/api/making-requests.mdx @@ -56,7 +56,7 @@ curl --fail-with-body \ --request GET \ --header "Authorization: Bearer $COOLIFY_TOKEN" \ --header "Accept: application/json" \ - "$COOLIFY_URL/api/v1/teams/current" + "$COOLIFY_URL/api/v1/team" ``` Use `Content-Type: application/json` when the request includes a JSON body: diff --git a/content/docs/api/overview.mdx b/content/docs/api/overview.mdx index 746bae8bc..183d0ad8a 100644 --- a/content/docs/api/overview.mdx +++ b/content/docs/api/overview.mdx @@ -39,7 +39,7 @@ On a self-hosted instance, an administrator must also enable API access. Use [IP - [Making Requests](/api/making-requests) explains URLs, methods, headers, parameters, bodies, and responses. - [Authorization](/api/authorization) explains Bearer tokens and access checks. -- [Permissions](/api/permissions) covers token abilities, team scope, roles, and sensitive data. +- [Permissions](/api/permissions) covers token permissions, access, team scope, roles, and sensitive data. - [IP Allowlist](/api/ip-allowlist) covers self-hosted API access and source-IP restrictions. - [Rate Limits](/api/rate-limits) documents request limits, response headers, and retries. - [Errors](/api/errors) explains status codes and common failure responses. diff --git a/content/docs/api/permissions.mdx b/content/docs/api/permissions.mdx index 64beec90b..1dda55617 100644 --- a/content/docs/api/permissions.mdx +++ b/content/docs/api/permissions.mdx @@ -1,44 +1,54 @@ --- title: Permissions -description: Choose Coolify API token permissions and understand team, role, and sensitive-data restrictions. +description: Choose Coolify API token permissions and access, and understand team, role, and sensitive-data restrictions. --- # API permissions -Each API token belongs to the user and active team that created it. Its permissions determine which endpoints it can use and whether supported responses can include sensitive values. +Each API token belongs to the user and active team that created it. Its permissions determine which endpoints it can use and whether supported responses can include sensitive values. Its access determines which projects, environments, and resources it can reach. -Choose the smallest permission set required by the integration. +Choose the smallest permission set and the narrowest access required by the integration. ## Permission levels | Permission | Allows | Important restrictions | | :--- | :--- | :--- | | `read` | List and inspect resources. | Sensitive response values remain redacted. | -| `read:sensitive` | Read secrets, logs, passwords, private keys, environment values, and Compose content returned by supported endpoints. | Coolify also adds `read`. The token owner must be a team administrator or owner. | -| `write` | Create, update, and delete resources through write endpoints. | The token owner must remain a team administrator or owner when the request runs. | -| `deploy` | Trigger deployments, restarts, stops, cancellations, and [deploy webhooks](/core/automation/deploy-webhooks) (`/api/v1/deploy`). | Selecting it in the dashboard creates a deploy-only token. The token owner must be a team administrator or owner. | -| `root` | Bypass the `read`, `write`, and `deploy` checks on API endpoints. | It remains team-bound and does not bypass instance-wide API access or the IP allowlist. The token owner must be a team administrator or owner. | +| `read:sensitive` | Read secrets, logs, passwords, private keys, environment values, and Compose content returned by supported endpoints. | Coolify also adds `read`. Most sensitive values are returned only when the token owner is a team administrator or owner. Container logs need only this permission. | +| `write` | Create and update resources through write endpoints. | It cannot delete. Use `delete` for every `DELETE` request. | +| `delete` | Delete resources, environment variables, storages, backups, scheduled tasks, and tags, and detach a tag from a resource. | Every `DELETE` endpoint requires `delete` or `root`. | +| `deploy` | Trigger deployments, restarts, stops, cancellations, and [deploy webhooks](/core/automation/deploy-webhooks) (`/api/v1/deploy`). | Some write operations that run on a server at once also require `deploy`. See [Operation-specific checks](#operation-specific-checks). | +| `root` | Bypass the `read`, `read:sensitive`, `write`, `write:sensitive`, `delete`, and `deploy` checks on API endpoints. | It remains team-bound and does not bypass instance-wide API access, the IP allowlist, the token's access, or the role checks of the token owner. | Selecting `root` in the dashboard removes the other permissions because they are unnecessary. It does not provide access to resources owned by another team. +A token never gets more access than its owner. Team administrators and owners can select every permission. A member can select only the permissions that their own access in the team includes. See [Roles & Permissions](/core/team/roles-and-permissions). + +### `write:sensitive` + +`write:sensitive` is only for `PATCH /api/v1/settings/email`, which changes the instance email settings. Only team administrators and owners can give it to a token. The dashboard has no checkbox for it, so use a `root` token for this endpoint. + --- -## Team and role scope +## Access -Coolify records the active team when the token is created. Switching teams later does not change an issued token. +Each token has one of two **Resources** settings: -- Create a separate token for each team an integration must access. -- Removing the token owner from the team makes the token invalid. -- A token that performs privileged operations requires its owner to remain a team administrator or owner. -- Instance-wide [API access and IP allowlist controls](/api/ip-allowlist) still apply to every self-hosted token, including `root`. +- **All resources in the team** lets the token use every project, resource, and team-level endpoint that its permissions allow. +- **Selected projects, environments, or resources** limits the token to the items in **Selected**. A selected project includes its environments and resources. A selected environment includes its resources. ---- +A limited token can use only the endpoints under `/applications`, `/services`, `/databases`, `/projects`, `/deploy`, `/deployments`, `/resources`, `/version`, and `/vulnerabilities`. Other endpoints, such as servers, keys, Git sources, S3 storages, cloud tokens, notifications, and the team, return `403 Forbidden`: + +```json +{ + "message": "This API token is limited to selected projects, environments, or resources, so it cannot use this endpoint." +} +``` -## Tokens limited to projects, environments, or resources +List endpoints return only the projects, environments, and resources that the token can access. Coolify also applies the token's access to changes. The response message explains when the token's limits block a change. -You can limit a token to selected projects, environments, or resources. Such a token: +A limited token also: -- Can use only the project, application, service, database, and deployment endpoints. - Cannot read or reference team and server shared variables. - Cannot use team credentials, such as private keys, git sources, and S3 storages, that its resources do not use yet. - Can place resources only on servers that already run a resource inside its scope. @@ -52,13 +62,34 @@ To keep a limited token away from other resources: - Give it only `read` and `deploy` when it does not need to change configuration. - Run the resources of each environment on their own servers. +A member who has access only to some projects or resources can create only limited tokens. + +If you delete a selected project, environment, or resource, the access list of the token in **Issued tokens** shows it as `Unavailable project`, `Unavailable environment`, or `Unavailable resource`. A token of a member then stops working with `This API token has more access than you have in this team. Revoke it and create a new token.` [Edit the token](/core/security/credentials/api-tokens#manage-a-token) and remove the unavailable item. + +--- + +## Team and role scope + +Coolify records the active team when the token is created. Switching teams later does not change an issued token. + +- Create a separate token for each team an integration must access. +- Removing the token owner from the team makes the token invalid. +- Coolify checks the token against its owner's current access on every request. If the owner loses access that the token uses, the token stops working and returns `403 Forbidden` with `This API token has more access than you have in this team. Revoke it and create a new token.` +- Some endpoints also need the token owner to be a team administrator or owner, whatever the token permissions. For example, cloud tokens (`/cloud-tokens`) and audit events (`/audit-events`) return `403 Forbidden` to the token of a member. +- Instance-wide [API access and IP allowlist controls](/api/ip-allowlist) still apply to every self-hosted REST API request, including with `root`. The instance-administrator endpoints and the [MCP server](/mcp/security) check only the IP allowlist. They work while **API access** is disabled. +- A team that requires [two-factor authentication](/core/security/authentication/2fa) does not block its API tokens. The requirement applies only to dashboard sign-in. + --- ## Sensitive response data Endpoint access and sensitive-data access are separate checks. A request with `read` may succeed while passwords, private keys, environment values, logs, or Compose content remain redacted. -Add `read:sensitive` only when the integration needs supported sensitive fields. The token must have that permission, and its owner must be a team administrator or owner. A `root` token can also receive supported sensitive data, but it should be reserved for integrations that need full API access. +Add `read:sensitive` only when the integration needs supported sensitive fields. For most fields, the token must have that permission, and its owner must be a team administrator or owner. Container logs are the exception: they need only `read:sensitive`, also for the token of a member. A `root` token can also receive supported sensitive data, but it should be reserved for integrations that need full API access. + +Locked environment variable values are never returned, also not to a `read:sensitive` or `root` token. Coolify also hides them in the generated Compose content and hides the connection URLs of a database with a locked password. + +Server data in application, service, and database responses, such as the nested server settings, the Sentinel token, log drain keys, and the saved proxy configuration, is returned only to a token that can read sensitive data and has access to **All resources in the team**. Servers are team-level, so a token limited to selected projects, environments, or resources does not receive these values. --- @@ -67,18 +98,53 @@ Add `read:sensitive` only when the integration needs supported sensitive fields. - Use `read` for inventory, monitoring, and status checks. - Use `deploy` for a deployment-only CI or automation workflow. - Use `write` only when the integration must change resource configuration. +- Add `delete` only when the integration must delete resources or their settings. - Add `read:sensitive` only when redacted responses are insufficient. +- Limit the token to the projects, environments, or resources it needs when it does not use team-level endpoints. - Use `root` only when the integration must call endpoints across permission levels or manage instance-wide API functions. -Follow [API Tokens](/core/security/credentials/api-tokens) to create, store, rotate, and revoke credentials. Each endpoint under **Endpoints** identifies the permission required for that operation. +Follow [API Tokens](/core/security/credentials/api-tokens) to create, store, edit, roll, and revoke credentials. Each endpoint under **Endpoints** identifies the permission required for that operation. ## Operation-specific checks -- Container log endpoints and scheduled-task output require `read:sensitive` or `root`, rather than ordinary `read`. -- Saved proxy configuration and server validation logs are returned only with `read:sensitive` or `root`. -- Database import uploads and starts require `write`; server-path imports also require `deploy`. -- Creating a resource with `instant_deploy` requires `deploy` in addition to its creation permission. -- API mounts outside the resource directory require `deploy`. -- Git provider webhook secrets (the GitHub App webhook secret, the GitLab App webhook token, and the manual webhook secrets of an application) are configuration and require `write`. A push webhook that is signed with one of these secrets can start a deployment, so give `write` only to integrations that you trust to change what a resource deploys. +These operations need more than the usual permission of their HTTP method. `root` passes every permission check in this table. In the paths, `{type}` is `applications`, `services`, or `databases`. + +| Operation | Endpoint | Permissions | +| :--- | :--- | :--- | +| Read container logs | `GET /{type}/{uuid}/logs`, `GET /applications/{uuid}/previews/{pull_request_id}/logs`, `GET /services/{uuid}/applications/{app_uuid}/logs`, `GET /services/{uuid}/databases/{database_uuid}/logs` | `read:sensitive` | +| List the registry logins of a server | `GET /servers/{uuid}/registries` | `read:sensitive` | +| Read the command and output of scheduled tasks | `GET /applications/{uuid}/scheduled-tasks` and `GET /services/{uuid}/scheduled-tasks`, with their `/executions` | `read`. The command and output are returned only with `read:sensitive` and a token owner who is a team administrator or owner. | +| Read the saved proxy configuration and server validation logs | Server data in responses, such as `GET /servers/{uuid}` and `GET /servers/{uuid}/proxy` | `read`. These fields are returned only with `read:sensitive` and a token owner who is a team administrator or owner. | +| List the keys of a secret manager | `GET /{type}/{uuid}/secret-manager/keys` | `write` | +| Upload a database import file | `POST /databases/{uuid}/imports/uploads`, `POST /services/{uuid}/databases/{database_uuid}/imports/uploads` | `write` | +| Start a database import from any source (upload, S3, or server path) | `POST /databases/{uuid}/imports`, `POST /services/{uuid}/databases/{database_uuid}/imports` | `write` and `deploy` | +| Create or update a resource with `instant_deploy` | Application, database, and service create endpoints, and `PATCH /{type}/{uuid}` | `write` and `deploy` | +| Make a database public or private | `PATCH /databases/{uuid}` or `PATCH /services/{uuid}/databases/{database_uuid}` with a changed `is_public` | `write` and `deploy` | +| Add a mount outside the resource directory or a file mount with `content` | `POST /{type}/{uuid}/storages` | `write` and `deploy` | +| Change the content of a file mount | `PATCH /{type}/{uuid}/storages` with a changed `content` | `write` and `deploy` | +| Clone a resource with its volume data | `POST /{type}/{uuid}/clone` with `clone_volumes` | `write` and `deploy` | +| Create or update an enabled scheduled task | `POST` and `PATCH` under `/applications/{uuid}/scheduled-tasks` and `/services/{uuid}/scheduled-tasks`. A new task is enabled by default. | `write` and `deploy` | +| Create or update a database backup with `backup_now` | `POST /databases/{uuid}/backups`, `PATCH /databases/{uuid}/backups/{scheduled_backup_uuid}` | `write` and `deploy` | +| Save a volume backup with `stop_during_backup` | `PUT /{type}/{uuid}/storages/{storage_uuid}/backups` | `write` and `deploy` | +| Run a volume backup now | `POST /{type}/{uuid}/storages/{storage_uuid}/backups/run` | `write` and `deploy` | +| Open a preview, or change its pull request URL, Git type, Docker tag, or commit | `POST /applications/{uuid}/previews` | `deploy` and `write`. With `deploy` alone, the token can only redeploy an existing preview. | +| Open a preview or change its Docker tag with a deploy request | `/api/v1/deploy` with `pr` and a new `docker_tag` | `deploy` and `write` | +| Log in to a registry or check a registry login | `POST /servers/{uuid}/registries`, `POST /servers/{uuid}/registries/{registry}/check` | `write` and `deploy` | +| Run a Docker cleanup now | `POST /servers/{uuid}/docker-cleanup/run` | `write` and `deploy` | +| Turn on the deletion of unused volumes | `PATCH /servers/{uuid}/docker-cleanup` with `delete_unused_volumes` | `write` and `deploy` | +| Change log drain or Sentinel settings | `PATCH /servers/{uuid}/log-drains`, `PATCH /servers/{uuid}/sentinel` | `write` and `deploy` | +| Save and apply the proxy configuration | `PUT /servers/{uuid}/proxy/configuration` | `write` and `deploy` | +| Change the proxy type | `PATCH /servers/{uuid}` or `PATCH /servers/{uuid}/proxy` with a new `proxy_type` | `write` and `deploy` | +| Validate a server and install it | `POST /servers/{uuid}/validate` with `install` | `write` and `deploy` | +| Create a cloud server with a cloud-init or post-install script, extra SSH keys, or `instant_validate` | `POST /servers/hetzner`, `POST /servers/vultr`, `POST /servers/digitalocean`, `POST /servers/hostinger` | `write` and `deploy` | +| Check or start a server import | `GET /servers/import/check`, `POST /servers/import` | `write` and `deploy` | +| Delete a server with its resources or from the cloud provider | `DELETE /servers/{uuid}` with `force` or `delete_from_provider` | `delete` and `deploy` | +| Disable the API, or enable or disable the MCP server | `POST /api/v1/disable`, `POST /api/v1/mcp/enable`, `POST /api/v1/mcp/disable` | `write`, in a root-team token of an instance administrator | +| Read the instance email settings | `GET /settings/email` | `read`, in a root-team token of an instance administrator | +| Change the instance email settings | `PATCH /settings/email` | `write:sensitive`, in a root-team token of an instance administrator | + +An instance administrator is an administrator or owner of the root team. A root-team token is a token created while the root team is active. Other tokens receive `403 Forbidden` from the instance endpoints. + +Git provider webhook secrets (the GitHub App webhook secret, the GitLab App webhook token, and the manual webhook secrets of an application) are configuration and require `write`. A push webhook that is signed with one of these secrets can start a deployment, so give `write` only to integrations that you trust to change what a resource deploys. Only recognized token permissions are accepted. Resource and credential ownership is checked against the resource's team, even if the user switches teams in another browser tab. diff --git a/content/docs/api/rate-limits.mdx b/content/docs/api/rate-limits.mdx index a2ca0cc8a..6250400c7 100644 --- a/content/docs/api/rate-limits.mdx +++ b/content/docs/api/rate-limits.mdx @@ -1,6 +1,6 @@ --- title: Rate Limits -description: Understand Coolify API request limits, response headers, reset times, and safe retry behavior. +description: Understand Coolify API request limits, the failed request limit, response headers, reset times, and safe retry behavior. --- # API rate limits @@ -20,6 +20,29 @@ Coolify identifies a rate-limit bucket by the authenticated user when one is ava --- +## Failed request limit + +Coolify also limits API clients that keep failing. By default, a client can send 30 failed requests per minute. Coolify counts these responses: + +- `401 Unauthenticated` and `403 Forbidden` +- `404 Not Found` for a request without a Bearer token + +Each API token has its own count. Requests without a token are counted by source IP address. The `/api/health` and `/api/v1/health` endpoints are not counted. The limit applies only to REST API requests under `/api/`. Requests to the MCP endpoint `/mcp` are not counted or blocked. + +When a client reaches the limit, Coolify answers all its requests with `429 Too Many Requests` and a `Retry-After` header: + +```json +{ + "message": "Too many failed API requests. Retry after 60 seconds." +} +``` + +The first block lasts 1 minute. If the client reaches the limit again within one hour, the block lasts 5 minutes and then 15 minutes. + +When a token reaches the limit, the team of the token receives a notification on each enabled notification channel, at most once a day for each token. Find the client that uses the token and fix its requests, give the token the permissions it needs, or revoke it. + +--- + ## Rate-limit headers API responses include headers that describe the current request bucket: @@ -39,7 +62,7 @@ export COOLIFY_TOKEN="67|abcthisisa123dummytoken" curl --head \ --header "Authorization: Bearer $COOLIFY_TOKEN" \ - "$COOLIFY_URL/api/v1/teams/current" + "$COOLIFY_URL/api/v1/team" ``` Some endpoints can also return `429 Too Many Requests` because a deployment queue or an upstream cloud provider is busy. Use `Retry-After` whenever the response provides it, even when `X-RateLimit-Remaining` shows capacity in Coolify's general API limit. @@ -56,6 +79,8 @@ When Coolify returns `429 Too Many Requests`: 4. Add exponential backoff and random jitter if repeated attempts still fail. 5. Avoid retrying unsafe write requests unless the endpoint and client can prevent duplicate changes. +A `429` with the message `Too many failed API requests` means that the client reached the [failed request limit](#failed-request-limit). Fix the cause of the `401`, `403`, or `404` responses before you retry. + Do not send parallel retries for the same failed request. Parallel retries consume the remaining capacity faster and can repeat a write operation. --- @@ -65,10 +90,11 @@ Do not send parallel retries for the same failed request. Parallel retries consu -Set `API_RATE_LIMIT` in `/data/coolify/source/.env` to change the number of general API requests allowed per minute: +Set `API_RATE_LIMIT` in `/data/coolify/source/.env` to change the number of general API requests allowed per minute. Set `API_FAILED_REQUEST_RATE_LIMIT` to change the number of failed requests allowed per minute; `0` turns off the failed request limit: ```dotenv API_RATE_LIMIT=400 +API_FAILED_REQUEST_RATE_LIMIT=30 ``` The running container does not pick up this change from a normal restart. Run the Coolify installation script to recreate the Coolify containers with the updated environment: @@ -79,7 +105,7 @@ curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash The installation script also updates Coolify to the latest release. Follow [Update Coolify](/core/instance-management/update#manual-update-via-terminal) if you need to install a specific version. -After the containers are recreated, make a request and confirm that `X-RateLimit-Limit` reports the new limit. +After the containers are recreated, make a request and confirm that `X-RateLimit-Limit` reports the new general limit. Increasing this value does not increase the capacity of the Coolify instance, deployment queues, or upstream providers. Prefer client-side caching, request batching, and backoff before raising it. diff --git a/content/docs/applications/builds/custom-docker-options.mdx b/content/docs/applications/builds/custom-docker-options.mdx index 9a3faa687..dca40c5ba 100644 --- a/content/docs/applications/builds/custom-docker-options.mdx +++ b/content/docs/applications/builds/custom-docker-options.mdx @@ -33,11 +33,16 @@ Coolify accepts these options: - `--read-only` - `--runtime` - `--tmpfs` +- `-i` or `--interactive`, `-t` or `--tty`, and combined forms such as `-it` Coolify converts only the listed options into the generated container configuration. Other Docker run options, such as `--network`, `--name`, `-v`, `-p`, and `-e`, are not applied because they can conflict with the network, storage, or lifecycle configuration Coolify manages. The deployment log shows a warning that lists each option Coolify did not apply. Use the dedicated Coolify settings for these values instead: **Persistent Storage** for volumes, **Environment Variables** for `-e`, and the network and port settings for networking. +## Keep stdin open for the terminal console + +Add `-i` (or `-it`) when the main process of the container reads commands from stdin, for example a game server or a REPL. Coolify keeps stdin open (`stdin_open`), and `-t` allocates a TTY (`tty`). The web terminal can then connect to the main process in **Console** mode. Refer to [Use console mode for a container](/core/infrastructure/servers/web-terminal#use-console-mode-for-a-container). + ## Use a custom seccomp profile Put the profile file on the server, then refer to it with an absolute path: diff --git a/content/docs/applications/builds/docker-compose.mdx b/content/docs/applications/builds/docker-compose.mdx index 7bc2495a5..71eec1e30 100644 --- a/content/docs/applications/builds/docker-compose.mdx +++ b/content/docs/applications/builds/docker-compose.mdx @@ -58,7 +58,7 @@ Set: Coolify combines both values when locating the file. -Coolify runs Docker Compose in the base directory. Relative paths in the Compose file, such as `build.context`, resolve from the base directory, not from the directory of the file. If the file is in a subdirectory and uses paths relative to itself (for example `context: ..`), set **Base Directory** to that subdirectory, for example `/docker`, and **Docker Compose Location** to `/docker-compose.yml`. +Coolify runs Docker Compose in the base directory, so relative paths in the file, such as `build.context: ..`, resolve from the base directory. When the Compose file is in a subdirectory, Coolify shows a warning. If the paths in the file are relative to the file itself, select **Use `` as base directory** to move the file's directory into **Base Directory**. For example, for `/docker/docker-compose.yml` with `context: ..`, set **Base Directory** to `/docker` and **Docker Compose Location** to `/docker-compose.yml`. diff --git a/content/docs/applications/configuration/advanced.mdx b/content/docs/applications/configuration/advanced.mdx index 1b8db4b33..d29dd9435 100644 --- a/content/docs/applications/configuration/advanced.mdx +++ b/content/docs/applications/configuration/advanced.mdx @@ -57,6 +57,20 @@ The default is **Runtime only (preserves cache)** so commits with otherwise iden Read [Build cache](/applications/builds/overview#build-cache) before enabling it for every deployment. +--- + + + +### Network hosts during build + +**Network hosts during build** defaults to **Add network containers as hosts**. Coolify adds the containers of the destination network to the build with `--add-host`, so the build can reach them by name. + +When a resource is added to or removed from the network, the host list changes and Docker rebuilds the cached layers. Choose **Do not add (preserves cache)** when the build does not need to reach other containers. + +Coolify never adds preview deployment containers. A build on a [build server](/core/infrastructure/servers/build-servers) gets no hosts, because the build server cannot reach the deployment server's network. + +The API field is `include_network_hosts_in_build`. + @@ -70,6 +84,25 @@ Choose **Manual deployments only** when deployments should start only from the C --- + + +### Older webhook deployments + +When you push several commits quickly, each push starts a webhook deployment. By default, Coolify builds only the latest commit. + +| Setting | Options | Default | +| :--- | :--- | :--- | +| **Queued webhook deployments** | **Cancel when a newer push arrives** cancels the older webhook deployments that still wait in the queue. **Deploy every push** builds each push. | **Cancel when a newer push arrives** | +| **Building webhook deployments** | **Stop the build when a newer push arrives** also stops an older webhook deployment that is still building. **Let the build finish** keeps it running. | **Let the build finish** | + +Coolify cancels only older webhook deployments with the same target: the same application, the same server, and the same production or preview deployment. A deployment that started to replace containers always finishes. Manual, API, restart, and rollback deployments are never cancelled. + +When **Building webhook deployments** stops builds, Coolify also cancels queued webhook deployments, so **Queued webhook deployments** cannot be changed. + +The API fields are `is_auto_cancel_queued_deployments_enabled` and `is_auto_cancel_building_deployments_enabled`. + +--- + ### Preview deployments Preview enablement and pull-request access are configured on **Preview Deployments** in the application settings sidebar. Select **Enable preview deployments**, then choose **Repository members only** or **Public (fork PRs allowed)** in **PR deployment access**. @@ -251,8 +284,8 @@ Give the process enough time to finish in-flight work after receiving its shutdo **Accepted values:** -- The default is `10` restarts. -- Enter `0` to disable the limit. +- The default is `0`, which disables the limit. +- Applications that had the old default of `10` were changed to `0`. - Enter a positive whole number to set another limit. --- diff --git a/content/docs/applications/configuration/environment-variables.mdx b/content/docs/applications/configuration/environment-variables.mdx index f60e701c2..82ee2b927 100644 --- a/content/docs/applications/configuration/environment-variables.mdx +++ b/content/docs/applications/configuration/environment-variables.mdx @@ -33,6 +33,8 @@ Lines beginning with `#` are ignored, except `# coolify:` lines. Saving Develope Locked secrets and multiline values cannot be edited in Developer view. Change those entries in Normal view. +For a Docker Compose application, an empty variable with a default in the Compose file gets a `# Compose default: ` line above it. The deployment uses that default while the value is empty. Coolify ignores this line when you save. + ### Set flags in Developer view To set the flags of a variable, put a `# coolify:` line directly above the variable line: @@ -107,6 +109,20 @@ Set **Value type** to **Multiline** when a value contains line breaks, such as a Set **Interpolation** to **Literal (keep $ characters as-is)** when characters such as `$` must remain unchanged. Without it, Coolify can expand references contained in the value. Multiline values are already treated literally. +Coolify saves a value with more than one line exactly as you enter it, in the UI and in the API, including a trailing newline. Coolify removes the leading and trailing whitespace of a single-line value. + + + +Before v4.7.0, Coolify removed the trailing newline of multiline values. Some tools reject such a value, for example OpenSSH rejects a private key with `error in libcrypto`. Enter the value again and save it to restore the newline. + + + +## Lock a variable + +Select **Lock** on a variable, then confirm, to hide its value. After you lock a variable, nobody can see or copy its value in the UI or the API. + +A lock is permanent. You cannot unlock the variable in the UI, the API, or MCP. To change a locked value, enter a new value in **Value** and select **Update variable**. Leave **Value** empty to keep the current value. + ## Shared variables Reference a team, project, environment, or server variable instead of copying the same value into every resource: diff --git a/content/docs/applications/configuration/general.mdx b/content/docs/applications/configuration/general.mdx index c3b100c4f..78dfa9d89 100644 --- a/content/docs/applications/configuration/general.mdx +++ b/content/docs/applications/configuration/general.mdx @@ -124,6 +124,10 @@ Docker Compose Location: /compose.yaml Resolved file: /deploy/compose.yaml ``` +Coolify runs Docker Compose in **Base Directory**, not in the directory of the Compose file. Relative paths in the file, such as `build.context: ..`, resolve from **Base Directory**. + +When **Docker Compose Location** points to a file in a subdirectory, Coolify shows the **Relative paths resolve from the base directory** warning. If the relative paths in the file are relative to the file itself, select **Use `` as base directory**. Coolify moves the file's directory into **Base Directory** and keeps only the file name in **Docker Compose Location**. + **Load Compose File** parses the repository file. After it has been loaded, **Reload Compose File** reads it again. Coolify then shows: - **Docker Compose Content (raw)** for the definition read from the repository. @@ -166,7 +170,7 @@ Read [Docker Compose deployments](/applications/builds/docker-compose) for envir **Watch Paths** accepts one pattern per line. See [Limit deployments by changed paths](/applications/deployments/automatic-deployments#limit-deployments-by-changed-paths) for the pattern syntax. -**Watch Paths** is available when you select a repository through a GitHub App or GitLab source integration. It is not available for applications created from a public repository URL or a deploy key. +**Watch Paths** is available for applications connected through a Git App source or a deploy key. It is not available for applications created from a public repository URL. The setting filters which changed paths can start a webhook deployment. @@ -182,6 +186,8 @@ For a Docker Image application, **Image** and **Tag** identify the image Coolify For a source build, **Image** names an image Coolify can push after building it. Include the registry hostname for a private registry, for example `ghcr.io/example/api`. If **Tag** is set, Coolify pushes that tag in addition to the commit-based tag. +Each source-built application of the team needs its own image name. Two applications that build the same image push the same tags, so one can run the image of the other. Coolify rejects an **Image** that another application of the team already builds, in the UI and in the API. A deployment of an application that shares its image name with another one fails with the same message. + An output image name is required when the application uses Docker Swarm, additional deployment servers, or a separate build server. Those destinations must be able to pull the built image from a registry. Read [Docker registries](/applications/builds/docker-registries) for authentication and image naming. diff --git a/content/docs/applications/configuration/health-checks.mdx b/content/docs/applications/configuration/health-checks.mdx index ba23baace..0c805f67a 100644 --- a/content/docs/applications/configuration/health-checks.mdx +++ b/content/docs/applications/configuration/health-checks.mdx @@ -22,7 +22,7 @@ This routing behavior applies only when Coolify Proxy uses Traefik. When applica Docker Compose applications do not use the standard application **Healthcheck** page. Define the check in each service's Dockerfile or in the Compose definition. -For a non-Compose Dockerfile application, Coolify detects the image's `HEALTHCHECK` and uses it instead of adding the health check configured in the dashboard. Remove the Dockerfile instruction and redeploy before switching that application to a Coolify-managed check. +When the dashboard **Healthcheck** is enabled, it replaces the image's Dockerfile `HEALTHCHECK` in the generated container definition. To use the Dockerfile `HEALTHCHECK`, disable the dashboard **Healthcheck** and redeploy. @@ -198,7 +198,7 @@ CMD ["npm", "start"] The command runs inside containers created from the image. It must use the internal listening port, and every binary referenced by `HEALTHCHECK` must be installed in the final image stage. -For a non-Compose Dockerfile application, Coolify detects this instruction and does not add its dashboard-configured health check to the generated container definition. +For a non-Compose application, Coolify uses this instruction only while the dashboard **Healthcheck** is disabled. An enabled dashboard **Healthcheck** replaces it. diff --git a/content/docs/applications/deployments/automatic-deployments.mdx b/content/docs/applications/deployments/automatic-deployments.mdx index 6d5a11943..7ba740f8f 100644 --- a/content/docs/applications/deployments/automatic-deployments.mdx +++ b/content/docs/applications/deployments/automatic-deployments.mdx @@ -160,6 +160,10 @@ Watch paths filter Git provider webhook events that include changed-file informa Test the patterns with a documentation-only commit before relying on them for production automation. +## Cancel older webhook deployments + +When a newer push arrives, Coolify cancels the older webhook deployments of the application that still wait in the queue, so only the latest commit is built. To build every push, or to also stop older builds, change **Advanced > Deployment**. See [Older webhook deployments](/applications/configuration/advanced#cancel-older-webhook-deployments). + ## Disable automatic Git deployments Choose **Manual deployments only** under **Advanced > Deployment > Auto deploy** to keep the source connection while ignoring automatic commit deployments from Git provider events. diff --git a/content/docs/applications/deployments/manual-webhooks.mdx b/content/docs/applications/deployments/manual-webhooks.mdx index 82a9807cb..17490edba 100644 --- a/content/docs/applications/deployments/manual-webhooks.mdx +++ b/content/docs/applications/deployments/manual-webhooks.mdx @@ -5,7 +5,7 @@ description: Configure repository events for applications connected by a public # Manual Git webhooks -A manual Git webhook lets GitHub, GitLab, Bitbucket, or Gitea notify Coolify when a repository changes. Use one for an application created from a public repository URL or **Private Repository (with deploy key)**. +A manual Git webhook lets GitHub, GitLab, Bitbucket, Gitea, or Forgejo notify Coolify when a repository changes. Use one for an application created from a public repository URL or **Private Repository (with deploy key)**. Applications connected through an official Git App receive provider events through that integration and do not need a manual Git webhook. @@ -176,7 +176,7 @@ Open **Webhooks** in Coolify. Enter a long random value in **Webhook secret** in ### Add the webhook on Gitea -Open the Gitea repository and select **Settings > Webhooks > Add Webhook > Gitea**. Paste the Coolify URL into **Target URL** and enter the same secret. +Open the Gitea repository and select **Settings > Webhooks > Add Webhook > Gitea**. On Forgejo, select **Forgejo** as the webhook type. Paste the Coolify URL into **Target URL** and enter the same secret. diff --git a/content/docs/applications/deployments/preview-deployments.mdx b/content/docs/applications/deployments/preview-deployments.mdx index ab253efe3..bd0001b7d 100644 --- a/content/docs/applications/deployments/preview-deployments.mdx +++ b/content/docs/applications/deployments/preview-deployments.mdx @@ -263,7 +263,7 @@ Depending on the preview state, you can: ## Manage previews through the API -Use `GET /applications/{uuid}/previews` to list previews and `GET /applications/{uuid}/previews/{pull_request_id}` to inspect one. Creating or redeploying a preview requires `deploy`: +Use `GET /applications/{uuid}/previews` to list previews and `GET /applications/{uuid}/previews/{pull_request_id}` to inspect one. Use `POST /applications/{uuid}/previews` to open or redeploy a preview: ```sh curl --request POST "https://coolify.example.com/api/v1/applications//previews" \ @@ -272,8 +272,16 @@ curl --request POST "https://coolify.example.com/api/v1/applications/ Image rollback only changes application code and image contents. Use persistent-storage and database backups for state that must be restored. diff --git a/content/docs/applications/operations/overview.mdx b/content/docs/applications/operations/overview.mdx index 8888738f3..30838b9f9 100644 --- a/content/docs/applications/operations/overview.mdx +++ b/content/docs/applications/operations/overview.mdx @@ -106,7 +106,7 @@ Keep at least one tested backup outside the deployment server. A local backup on Use **Scheduled Tasks** for commands that must run inside an application container on a schedule, such as a framework scheduler, queue maintenance, or cache cleanup. -A disabled task does not start scheduled executions. An enabled execution fails when the application has no running container or the deployment server is not functional. Follow [Application scheduled tasks](/applications/operations/scheduled-tasks) to configure the command, frequency, timeout, and target container. +A disabled task does not start scheduled executions. When the application has no running container, Coolify skips the run. An enabled execution fails when the deployment server is not functional. Follow [Application scheduled tasks](/applications/operations/scheduled-tasks) to configure the command, frequency, timeout, and target container. Use [Tags](/core/automation/tags/overview) to group related resources across projects and environments. @@ -157,4 +157,4 @@ Viewing container logs requires permission to update the resource. API log reque ## Show a maintenance page -Open **Domains > Maintenance mode** to return a maintenance page with HTTP `503` while the containers keep running. The change applies without redeployment on supported Traefik and Caddy servers. See [Maintenance and error pages](/core/networking/proxy/maintenance-and-error-pages). +Open **Maintenance Mode** in the application settings sidebar, select **Enable maintenance**, then confirm. All domains of the application return a maintenance page with HTTP `503` while the containers keep running. The change applies without redeployment on Traefik and Caddy servers that are not part of a Docker Swarm. See [Maintenance and error pages](/core/networking/proxy/maintenance-and-error-pages). diff --git a/content/docs/applications/operations/scheduled-tasks.mdx b/content/docs/applications/operations/scheduled-tasks.mdx index e749c836a..47fff21f4 100644 --- a/content/docs/applications/operations/scheduled-tasks.mdx +++ b/content/docs/applications/operations/scheduled-tasks.mdx @@ -47,7 +47,7 @@ Open the new record under **Recent executions**. Confirm that it finishes succes ## Application-specific behavior -When the schedule is due, Coolify finds the application's running container and runs the saved command through `sh`. +When the schedule is due, Coolify finds the application's running container and runs the saved command. With **Run in a shell** selected (the default), Coolify runs the command with `sh -c`. Clear it for a container without a shell, such as a distroless or scratch image: Coolify then splits the command into arguments and runs it directly. Before following the detailed guide, check these application-specific requirements: @@ -57,7 +57,9 @@ Before following the detailed guide, check these application-specific requiremen - The schedule uses the timezone configured for the application's deployment server. - **Timeout (seconds)** accepts `60` to `36000` and defaults to `300`. -An execution fails when no application container is running, the configured container cannot be found, the command exits with an error, or the command exceeds its timeout. +When no application container is running, Coolify skips the run. A skipped run does not send a notification and does not count as a failure. + +An execution fails when the configured container cannot be found, the command exits with an error, or the command exceeds its timeout. Coolify records the status, timing, and captured output under **Recent executions**. A successful exit does not prove that the command produced the intended application result, so verify the affected records, files, or external system when necessary. diff --git a/content/docs/applications/sources/deploy-keys.mdx b/content/docs/applications/sources/deploy-keys.mdx index e05a690bc..c436db6b2 100644 --- a/content/docs/applications/sources/deploy-keys.mdx +++ b/content/docs/applications/sources/deploy-keys.mdx @@ -80,6 +80,36 @@ The deployment step in the [GitHub Actions example](/applications/sources/github +## SSH host keys + + + Coolify pins the SSH host keys of Git hosts in Coolify v4.7.0 or above. + + +Coolify checks the SSH host key of the Git host on every deployment, so a deployment cannot clone from a host that pretends to be your Git host. For an application that clones over SSH, open the application and select **Git Source** to see the keys in **SSH host keys**. + +- **GitHub, GitLab.com, and Bitbucket Cloud**: Coolify accepts only the host keys that the provider publishes. The list shows them with **Published by the provider, used for every deployment**. +- **Other Git hosts**: on the first deployment, Coolify saves the key that the host sends. Later deployments fail if the key changes. This also applies to the hosts of Git submodules. + +To save the key of a self-hosted Git host before the first deployment, select **Fetch current host key**. Compare the fingerprint with the fingerprint from the administrator of the Git host, then select **Accept**. + +### When a host key changes + +The deployment fails, and the deployment log shows that the Git host sent an SSH host key that is not the saved or published key. This can be an attack. + +1. Ask the administrator of the Git host if the key changed. +2. Open **Git Source** and select **Fetch current host key** in **SSH host keys**. +3. Select **Accept** only if the fingerprint is the same as the fingerprint from the administrator. Otherwise, select **Decline**. +4. Redeploy the application. + +If GitHub or Bitbucket Cloud changes its keys, **Fetch current host key** reads the new keys from the official HTTPS endpoint of the provider. If GitLab.com changes its keys, compare the fingerprint with the keys on [docs.gitlab.com](https://docs.gitlab.com/user/gitlab_com/#ssh-known_hosts-entries?utm_source=coolify.io). + +### Add or remove host keys manually + +To add a key, select **Edit manually** and enter one line for each key in **Known hosts**, in the format `host key-type key`. Use `[host]:port` for a custom SSH port, for example `[git.example.com]:2222 ssh-ed25519 AAAA...`. Hashed hosts and comments are not supported, and you cannot add keys for GitHub or Bitbucket Cloud. Select **Save changes**. + +To remove a saved key, select the delete icon next to it, then confirm **Remove host key**. The next deployment saves the key that the Git host sends then, without a check. + ## Key scope Prefer a separate deploy key for each repository. If a key is exposed, remove it from the repository and Coolify, create a replacement, attach the new key under **Git Source**, and redeploy. diff --git a/content/docs/applications/sources/gitea.mdx b/content/docs/applications/sources/gitea.mdx index 8e318ea5e..76d2873c6 100644 --- a/content/docs/applications/sources/gitea.mdx +++ b/content/docs/applications/sources/gitea.mdx @@ -1,17 +1,17 @@ --- -title: Gitea -description: Deploy public and private Gitea repositories with a Gitea App, deploy key, or repository URL. +title: Gitea and Forgejo +description: Deploy public and private Gitea, Forgejo, and Codeberg repositories with a Gitea / Forgejo App, deploy key, or repository URL. --- -# Gitea +# Gitea and Forgejo -Coolify can deploy Gitea repositories through a public HTTPS URL, an SSH deploy key, or a Gitea App. +Coolify can deploy Gitea, Forgejo, and Codeberg repositories through a public HTTPS URL, an SSH deploy key, or a Gitea / Forgejo App. Codeberg runs Forgejo. The steps on this page are the same for Gitea and Forgejo. | Method | Best for | Repository access | | :--- | :--- | :--- | | Public repository | Public source that needs no authentication | HTTPS URL | -| Deploy key | One private repository, or a Gitea instance where an OAuth2 application is unavailable | SSH URL and repository deploy key | -| Gitea App | Private repositories on gitea.com or a self-hosted Gitea instance | OAuth2 application with repository browsing | +| Deploy key | One private repository, or a Gitea or Forgejo instance where an OAuth2 application is unavailable | SSH URL and repository deploy key | +| Gitea / Forgejo App | Private repositories on gitea.com, Codeberg, or a self-hosted Gitea or Forgejo instance | OAuth2 application with repository browsing | ## Set up a Gitea App @@ -19,16 +19,28 @@ Coolify can deploy Gitea repositories through a public HTTPS URL, an SSH deploy Gitea App integration is available in Coolify v4.5.0 or above. -A Gitea App lets Coolify list repositories and branches, clone private source over HTTPS, and receive push and pull-request events. Gitea has no installable apps like GitHub, so a Gitea App is a Gitea OAuth2 application that you connect to Coolify. + + The **Provider** list for Codeberg and Forgejo instances is available in Coolify v4.7.0 or above. + + +A Gitea / Forgejo App lets Coolify list repositories and branches, clone private source over HTTPS, and receive push and pull-request events. Gitea and Forgejo have no installable apps like GitHub, so a Gitea / Forgejo App is an OAuth2 application that you connect to Coolify. ### Add the source in Coolify -Open **Sources** and select **New Source > Gitea App**. +Open **Sources** and select **New source > Gitea / Forgejo App**. + +In **Provider**, select: -Enter **Name**. To limit the repositories that Coolify lists, enter comma-separated organization or user names in **Organization**. For a self-hosted instance, expand **Self-hosted Gitea** and enter **Gitea URL**. Coolify fills in **API URL** (the Gitea URL with `/api/v1`). gitea.com is the default. +- **Gitea.com** for gitea.com (the default) +- **Codeberg (Forgejo)** for codeberg.org +- **Self-hosted Gitea or Forgejo** for your own instance + +For Gitea.com and Codeberg, Coolify fills in the instance URL and the API URL. For a self-hosted instance, enter **Instance URL** in the **Self-hosted Gitea or Forgejo** section. Coolify fills in **API URL** (the instance URL with `/api/v1`). Change **Custom Git user** and **Custom Git port** when the SSH user or port of the instance is not `git` and `22`. + +Enter **Name**. To limit the repositories that Coolify lists, enter comma-separated organization or user names in **Organization**. On a self-hosted Coolify instance, enable **System wide** only when every team must be able to select this source. Otherwise, keep the source scoped to the active team. @@ -37,9 +49,9 @@ Select **Continue**. Coolify shows the redirect URI for the OAuth2 application. -### Create the OAuth2 application in Gitea +### Create the OAuth2 application in Gitea or Forgejo -In Gitea, open **Settings > Applications** and go to **Manage OAuth2 Applications**. An organization owner can create the application in the organization settings, and an administrator can create it in **Site Administration > Applications**, when one user must not own it. +In Gitea or Forgejo, open **Settings > Applications** and go to **Manage OAuth2 Applications**. An organization owner can create the application in the organization settings, and an administrator can create it in **Site Administration > Applications**, when one user must not own it. Create an application with: @@ -51,13 +63,13 @@ Save the application, then copy its **Client ID** and **Client secret**. -### Connect Coolify to Gitea +### Connect Coolify to Gitea or Forgejo -Go back to the Gitea source in Coolify. Enter **Client ID** and **Client secret**, then select **Save**. +Go back to the source in Coolify. Enter **Client ID** and **Client secret**, then select **Save**. -Select **Connect to Gitea**. Gitea asks you to authorize the `read:user`, `read:repository`, and `read:organization` scopes. Select **Authorize Application**. +Select **Connect to Gitea / Forgejo**. The instance asks you to authorize the `read:user`, `read:repository`, and `read:organization` scopes. Select **Authorize Application**. -After Gitea sends you back to Coolify, the source shows **Connected**. Select **Test Connection** to make sure that Coolify can call the Gitea API. +After the instance sends you back to Coolify, the source shows **Connected**. Select **Test connection** to make sure that Coolify can call the API of the instance. @@ -66,7 +78,7 @@ After Gitea sends you back to Coolify, the source shows **Connected**. Select ** Copy **Webhook URL** and **Webhook secret** from the connected source. -In Gitea, add a webhook of type **Gitea**. You can add it in the settings of a user, an organization, or one repository. A user or organization webhook sends events for all repositories of that owner. Set: +In Gitea or Forgejo, add a webhook of type **Gitea** or **Forgejo**. You can add it in the settings of a user, an organization, or one repository. A user or organization webhook sends events for all repositories of that owner. Set: - **Target URL** to the Coolify webhook URL - **HTTP Method** to `POST` and **POST Content Type** to `application/json` @@ -74,50 +86,66 @@ In Gitea, add a webhook of type **Gitea**. You can add it in the settings of a u - **Push** events for branch deployments - **Pull Request** events for preview deployments -Coolify rejects Gitea webhook requests when the signature is missing or does not match the secret. +Coolify accepts the `X-Gitea-*` and `X-Forgejo-*` headers. It rejects webhook requests when the signature is missing or does not match the secret. ### Deploy a repository -Open a Coolify project, select **+ New**, then select **Git Repository (with Gitea App)**. +Open a Coolify project, select **+ New**, then select **Git Repository (with Gitea / Forgejo App)**. -Choose the server and the connected Gitea App. Select a repository, select **Load Repository**, choose the branch, then configure and deploy the application. +Choose the server and the connected Gitea / Forgejo App. Select a repository, select **Load repository**, choose the branch, then configure and deploy the application. Make sure that the deployment log imports the selected repository and checks out the requested commit. -### Self-hosted Gitea network requirements +### Self-hosted network requirements + +- Coolify must reach the instance URL to exchange OAuth2 codes, refresh tokens, and call the API. The deployment server must reach it to clone repositories. +- Your browser must reach the instance URL to authorize the application. +- The instance must reach the Coolify webhook URL. By default, Gitea and Forgejo block webhooks to private networks. If Coolify runs on a private address, add it to `ALLOWED_HOST_LIST` in the `[webhook]` section of `app.ini`. +- Set `ROOT_URL` in `app.ini` to the URL that you enter in Coolify. + +Gitea and Forgejo OAuth2 access tokens expire after one hour. Coolify refreshes them automatically before each API call and clone. + +### Team access + +A member who has access only to some projects, environments, or resources cannot select a team Gitea / Forgejo App for a new application or as the new source of an application. This needs write access on the whole team, in the UI and through the API. An application keeps the source that it already uses. + +### Use the API + + + The Gitea App endpoints are available in Coolify v4.7.0 or above. + -- Coolify must reach the Gitea URL to exchange OAuth2 codes, refresh tokens, and call the API. The deployment server must reach it to clone repositories. -- Your browser must reach the Gitea URL to authorize the application. -- Gitea must reach the Coolify webhook URL. By default, Gitea blocks webhooks to private networks. If Coolify runs on a private address, add it to `ALLOWED_HOST_LIST` in the `[webhook]` section of the Gitea `app.ini`. -- Set `ROOT_URL` in the Gitea `app.ini` to the URL that you enter in Coolify. +- [`GET /api/v1/gitea-apps`](/api/endpoints/gitea-apps/list-gitea-apps) lists the Gitea / Forgejo Apps of the team and the system-wide apps. +- [`POST /api/v1/applications/private-gitea-app`](/api/endpoints/applications/create-private-gitea-app-application) creates an application from a private repository. Send `gitea_app_uuid`, and `git_repository` as `owner/name`. +- `gitea_app_uuid` in `PATCH /api/v1/applications/{uuid}` changes the source of an application. -Gitea OAuth2 access tokens expire after one hour. Coolify refreshes them automatically before each API call and clone. +The source must be connected. Create and connect a Gitea / Forgejo App in the UI. ## Use a deploy key -Use a deploy key when Coolify only needs one private repository, or when Coolify cannot connect to the Gitea instance through OAuth2. +Use a deploy key when Coolify only needs one private repository, or when Coolify cannot connect to the instance through OAuth2. 1. Add a private key under **Keys & Tokens > Private Keys**. -2. Add its public key in the Gitea repository under **Settings > Deploy Keys**. +2. Add its public key in the repository under **Settings > Deploy Keys**. 3. Copy the repository SSH URL, such as `git@gitea.example.com:example/application.git`. 4. In Coolify, create **Private Repository (with deploy key)** and select the stored key. Read [Deploy keys](/applications/sources/deploy-keys) for the complete setup and security guidance. -## Configure a manual Gitea webhook +## Configure a manual Gitea or Forgejo webhook For an application that you created from a public URL or a deploy key: 1. Open **Webhooks** in the Coolify application. 2. Copy the **Gitea** URL. 3. Enter **Webhook secret** in the **Gitea** section, then select **Save changes**. -4. In Gitea, open the repository webhook settings. +4. In Gitea or Forgejo, open the repository webhook settings. 5. Enter the URL and the same secret. 6. Enable **Push**. 7. Enable pull-request events when you use preview deployments. diff --git a/content/docs/applications/sources/github/app.mdx b/content/docs/applications/sources/github/app.mdx index 87f09b9bb..7f188469c 100644 --- a/content/docs/applications/sources/github/app.mdx +++ b/content/docs/applications/sources/github/app.mdx @@ -74,6 +74,8 @@ Repository access can work while automatic and preview deployments fail if GitHu Set **Preview deployment access** to **Read and update pull requests** when Coolify should add deployment information to pull requests. This grants read-and-write access to pull requests. +Keep **GitHub deployments** at **Create GitHub deployments** when GitHub should show each deployment and its status. This grants read-and-write access to deployments. Read [Show deployments on GitHub](#show-deployments-on-github). + The mandatory permissions grant read access to repository contents, metadata, and email addresses. Select **Register with GitHub**. @@ -233,6 +235,7 @@ Under **Repository permissions**, grant: | Metadata | Read-only | | Email addresses | Read-only | | Pull requests | Read and write only when preview deployments are required | +| Deployments | Read and write only when GitHub should [show deployments](#show-deployments-on-github) | @@ -337,6 +340,30 @@ Open **Sources**, select the GitHub App, open **General**, then select **Reposit Refresh the repository list before creating another application. Removing repository access prevents new clones and webhook deployments for applications that use that repository. +## Show deployments on GitHub + + + GitHub deployments are available in Coolify v4.7.0 or above. + + +When the GitHub App has the `Deployments: write` repository permission, Coolify reports each deployment and preview deployment to GitHub Deployments. GitHub then shows what is deployed on the branch and the pull request. + +- The production environment has the name of the application. A preview uses the name of the application with `(preview)`. +- Each status links to the deployment log in Coolify. After a successful deployment, the status also links to the first domain of the application or the preview. +- When a pull request closes, Coolify marks its preview deployments as inactive. + +This needs a private GitHub App. The public GitHub source of public repositories cannot report deployments. + +To add the permission to an existing GitHub App: + +1. Open **Sources**, select the GitHub App, then open **Permissions**. +2. Select **Update on GitHub**, set **Deployments** to **Read and write**, and accept the permission update on GitHub. +3. Return to Coolify and select **Refetch**. The **GitHub deployments** section shows `write` for **Deployments**. + +## Team access + +A member who has access only to some projects, environments, or resources cannot select a team GitHub App for a new application or as the new source of an application. This needs write access on the whole team, in the UI and through the API. An application keeps the source that it already uses. + ## Detect build files Use [Smart Scan](/applications/builds/smart-scan) in the creation form to detect Dockerfiles or Compose files and review optional environment-template imports. Set the correct **Base directory** before scanning a monorepo. diff --git a/content/docs/applications/sources/other-providers.mdx b/content/docs/applications/sources/other-providers.mdx index c340fe089..756a72bf8 100644 --- a/content/docs/applications/sources/other-providers.mdx +++ b/content/docs/applications/sources/other-providers.mdx @@ -1,19 +1,65 @@ --- title: Other Git Providers -description: Deploy from another Git-compatible provider with public HTTPS access or an SSH deploy key. +description: Deploy from another Git-compatible provider with public HTTPS access, HTTPS credentials, or an SSH deploy key. --- # Other Git providers -Coolify can deploy from another Git-compatible provider, including Forgejo, Gogs, and self-hosted Git servers. +Coolify can deploy from another Git-compatible provider, including Azure DevOps, Gogs, and self-hosted Git servers. For Gitea, Forgejo, and Codeberg, read [Gitea and Forgejo](/applications/sources/gitea), which also covers the Gitea / Forgejo App. Use: - [Public Repository](/applications/sources/public-repositories) with an unauthenticated HTTPS clone URL +- [Public Repository](#use-https-credentials) with an HTTPS clone URL and a username and password or access token - [Private Repository (with deploy key)](/applications/sources/deploy-keys) with an SSH clone URL The deployment server must be able to resolve and reach the Git host. +## Use HTTPS credentials + + + HTTPS credentials are available in Coolify v4.6.0 or above. + + +Coolify can clone a private repository from a custom Git host over HTTP(S) with a username and a password or access token. Use this instead of a token in the repository URL. Coolify sends the credentials only to the host of the repository URL and never shows the saved password or token. + +This does not work for `github.com` repositories. Use a [GitHub App](/applications/sources/github/app) or a [deploy key](/applications/sources/deploy-keys) for them. + + + + +### Create the application + +Open a project, select **+ New**, then select **Public Repository**. Paste the HTTPS clone URL without credentials, such as `https://git.example.com/example/application.git`, then select **Check repository**. + +Smart Scan cannot read the private repository before you add the credentials, so it shows **Could not read the repository**. Enter **Branch**, select the **Build pack** yourself, then select **Continue**. Do not deploy the application yet. + + + + +### Add the credentials + +Open the application and select **Git Source**. In **HTTPS credentials**, enter: + +- **Username**. Some hosts accept any username with an access token, for example Azure DevOps. +- **Password or token**. Use an access token with read access to the repository when the host supports it. + +Select **Save changes**. + + + + +### Deploy + +Deploy the application. Make sure that the deployment log clones the repository and checks out the requested commit. + + + + +To replace the password or token, enter a new value and save. To delete the credentials, select **Remove credentials**. + +Through the API, send `git_https_username` and `git_https_password` when you create the application with `POST /api/v1/applications/public` or update it with `PATCH /api/v1/applications/{uuid}`. To remove the credentials, send `git_https_password` as `null`. The API never returns the password or token. + ## Automatic deployments The manual provider webhooks in Coolify have provider-specific payload and signature handling for GitHub, GitLab, Bitbucket, and Gitea. diff --git a/content/docs/applications/sources/overview.mdx b/content/docs/applications/sources/overview.mdx index db0d634d0..56db98b3c 100644 --- a/content/docs/applications/sources/overview.mdx +++ b/content/docs/applications/sources/overview.mdx @@ -25,9 +25,9 @@ Use HTTPS for a public repository, an SSH deploy key for one private repository, | Deploy key | One private repository needs read-only SSH access. | [Use a deploy key](/applications/sources/deploy-keys) | | GitHub App | GitHub repositories need scoped access, integrated webhooks, and pull-request events. | [Configure a GitHub App](/applications/sources/github/app) | | GitLab App | GitLab repositories need repository browsing, private HTTPS cloning, and merge-request events. | [Set up a GitLab App](/applications/sources/gitlab#set-up-a-gitlab-app) | -| Gitea App | Gitea repositories need repository browsing, private HTTPS cloning, and pull-request events. | [Set up a Gitea App](/applications/sources/gitea#set-up-a-gitea-app) | +| Gitea / Forgejo App | Gitea, Forgejo, or Codeberg repositories need repository browsing, private HTTPS cloning, and pull-request events. | [Set up a Gitea App](/applications/sources/gitea#set-up-a-gitea-app) | -A GitHub App configures provider webhooks as part of the source. For a GitLab App or a Gitea App, add one webhook with the source's URL and secret in the provider. Public repositories and deploy keys require [manual webhooks](/applications/deployments/manual-webhooks) for automatic deployments and previews. +A GitHub App configures provider webhooks as part of the source. For a GitLab App or a Gitea / Forgejo App, add one webhook with the source's URL and secret in the provider. Public repositories and deploy keys require [manual webhooks](/applications/deployments/manual-webhooks) for automatic deployments and previews. ## Repository access and container registries are separate diff --git a/content/docs/applications/sources/public-repositories.mdx b/content/docs/applications/sources/public-repositories.mdx index 55f6dd7b1..fe0e4da68 100644 --- a/content/docs/applications/sources/public-repositories.mdx +++ b/content/docs/applications/sources/public-repositories.mdx @@ -7,6 +7,8 @@ description: Deploy a public Git repository without creating a Git source or dep Use **Public Repository** when the repository can be cloned over HTTPS without authentication. +For a private repository on a custom Git host, you can also use **Public Repository** and add a username and a password or access token. Read [Use HTTPS credentials](/applications/sources/other-providers#use-https-credentials). + ## Create the application diff --git a/content/docs/core/automation/deploy-webhooks.mdx b/content/docs/core/automation/deploy-webhooks.mdx index 20fca66b9..15b27c6b4 100644 --- a/content/docs/core/automation/deploy-webhooks.mdx +++ b/content/docs/core/automation/deploy-webhooks.mdx @@ -36,7 +36,7 @@ Open **Keys & Tokens** in the main sidebar, then select **API Tokens**. ### Configure the token -Enter a description, choose an expiration period, and select the `deploy` permission. +Enter a description, choose an expiration period, and select the `deploy` permission. Clear the `read` permission, which the form selects by default. A deploy-only token can trigger deploy webhooks without receiving general read or write access to the API. @@ -104,14 +104,14 @@ Review [Deploy by Tag](/core/automation/tags/deploy-by-tag) before automating a ## Trigger the deployment -Store the copied URL as `COOLIFY_DEPLOY_WEBHOOK`, then send a `GET` request with the token in the `Authorization` header: +Store the copied URL as `COOLIFY_DEPLOY_WEBHOOK`, then send a `POST` request with the token in the `Authorization` header: ```sh -curl --request GET "$COOLIFY_DEPLOY_WEBHOOK" \ +curl --request POST "$COOLIFY_DEPLOY_WEBHOOK" \ --header "Authorization: Bearer $COOLIFY_TOKEN" ``` -Coolify also accepts `POST` requests. The endpoint requires either `uuid` or `tag`; do not send both in one request. +A `GET` request does not deploy: Coolify answers with `405` and `This endpoint has changed to a POST request.` The endpoint requires either `uuid` or `tag`; do not send both in one request. The URL identifies the deployment target, but the Bearer token authorizes the action. Revoke the token from **Keys & Tokens > API Tokens** if it is exposed. @@ -126,6 +126,13 @@ The URL identifies the deployment target, but the Bearer token authorizes the ac | `uuid` | Deploy one or more resource UUIDs. Separate several UUIDs with commas. | `uuid=abc,def` | | `tag` | Deploy one or more tag groups. Separate several names with commas. | `tag=api,worker` | | `force` | Rebuild an application without using its build cache. | `force=true` | +| `pr` or `pull_request_id` | Deploy the preview of one pull request. Cannot be used with `tag`. | `pr=42` | +| `docker_tag` | Set the image tag of a Docker Image preview. Requires `pr` or `pull_request_id`. Cannot be used with `tag`. | `docker_tag=pr-42` | +| `cancel_previous` | Cancel older webhook, API, and MCP deployments of the same application, pull request, and server: `none` (default), `queued`, or `building`. | `cancel_previous=queued` | + +`cancel_previous=queued` cancels the older deployments that wait in the queue. `building` also stops the older deployments that are still building. A deployment that already started to replace containers always finishes. Manual, restart, and rollback deployments are never cancelled. + +For an application with the Docker Image build pack, a request with `pr` and `docker_tag` can open a new preview or change the image tag of a preview. This needs a token with `write` in addition to `deploy`. A `deploy`-only token can only redeploy an existing preview with its current tag. For other build packs, the preview must already exist. For a JSON `POST` request, send the same option names in the request body: diff --git a/content/docs/core/automation/scheduled-tasks/create-a-task.mdx b/content/docs/core/automation/scheduled-tasks/create-a-task.mdx index ba76bfd40..7f1ed1908 100644 --- a/content/docs/core/automation/scheduled-tasks/create-a-task.mdx +++ b/content/docs/core/automation/scheduled-tasks/create-a-task.mdx @@ -59,6 +59,15 @@ Do not include `docker exec`. Coolify enters the selected container before runni +### Choose how the command runs + +Keep **Run in a shell** on to run the command with `sh -c`. You can then use variables, pipes, and redirects. + +Turn it off when the container has no shell, for example a distroless or scratch image. Coolify then splits the command into arguments and runs it directly, without shell features. Quote an argument that contains spaces. + + + + ### Set the frequency Enter a five-field cron expression such as `0 0 * * *`, or a named schedule such as `daily`. @@ -121,6 +130,11 @@ Use a valid five-field expression or one of Coolify's named schedules. The named Open the task and set **Container** to the application container or service component that should run the command. + + + +The container has no shell, for example a distroless or scratch image. Open the task, turn off **Run in a shell**, save the change, and click **Execute now** again. + diff --git a/content/docs/core/automation/scheduled-tasks/execution-history.mdx b/content/docs/core/automation/scheduled-tasks/execution-history.mdx index 1fd8a1754..4d97f826a 100644 --- a/content/docs/core/automation/scheduled-tasks/execution-history.mdx +++ b/content/docs/core/automation/scheduled-tasks/execution-history.mdx @@ -25,6 +25,7 @@ Coolify shows the 20 most recent execution records, newest first. | In Progress | The command is still running. | Keep the task modal open while Coolify refreshes the record. | | Success | The command exited without a reported error. | Open the output and confirm the command produced the intended result. | | Failed | The command failed, timed out, or could not run in the selected container. | Open the output and start with the first reported error. | +| Skipped | The resource had no running container, so Coolify did not run the command. A skipped run sends no notification and does not count as a failure. | Start the application or service if the task should run. | Completed records also show the start time, end time, and duration. Times are displayed in the timezone configured for the server that runs the resource. diff --git a/content/docs/core/automation/scheduled-tasks/manage-tasks.mdx b/content/docs/core/automation/scheduled-tasks/manage-tasks.mdx index 4237501f6..a80402b86 100644 --- a/content/docs/core/automation/scheduled-tasks/manage-tasks.mdx +++ b/content/docs/core/automation/scheduled-tasks/manage-tasks.mdx @@ -21,7 +21,7 @@ The address includes `task_uuid` while a task is open, so a link can reopen that ## Update task configuration -You can change the task's **Name**, **Schedule**, **Timeout (seconds)**, **Container** or **Service**, and **Command**. +You can change the task's **Name**, **Schedule**, **Timeout (seconds)**, **Container** or **Service**, **Command**, and **Run in a shell**. Click **Save changes** after making changes. Coolify validates the schedule before saving it. @@ -37,6 +37,35 @@ Disabling a task does not stop an execution that is already running. --- +## Automatic disable after repeated failures + +Coolify disables a task that keeps failing. This occurs after 10 failures in a row, when the first of these failures is more than 24 hours old. A short outage therefore does not disable a task that runs often. + +When Coolify disables a task: + +- the team gets one notification with the reason +- the task page shows **Disabled because it keeps failing** with the reason + +Fix the cause, then click **Enable**. Enabling the task clears the reason and starts a new failure count. + +A run that Coolify skips because the resource has no running container does not count as a failure. Database backups, storage backups, and Docker cleanup are never disabled automatically. + +### Failure notifications + +While a task keeps failing, the team gets a notification for the first failure, then at most one notification each day. The first successful run after a failure sends one "works again" notification to the same channels. + +### Failure status in the API + +The scheduled tasks API returns these fields: + +| Field | Meaning | +| :--- | :--- | +| `consecutive_failures` | The number of failed runs since the last successful run. | +| `failing_since` | The date and time of the first failed run since the last successful run. | +| `disabled_reason` | Why Coolify disabled the task. Enabling the task clears it. | + +--- + ## Run a task now When the application or service is running, click **Execute now** to dispatch the task immediately. Manual execution uses the saved command, container, and timeout, but it does not change the task's next scheduled time. @@ -67,7 +96,7 @@ The modal closes and the task disappears from the resource's **Scheduled Tasks** -Confirm that the task is enabled, the application or service is running, and its server is validated and functional. Then compare **Schedule** with [Cron Syntax](/core/automation/cron-syntax) and the server timezone. +Confirm that the task is enabled, the application or service is running, and its server is validated and functional. If Coolify disabled the task because it kept failing, the task page shows the reason. Then compare **Schedule** with [Cron Syntax](/core/automation/cron-syntax) and the server timezone. diff --git a/content/docs/core/automation/scheduled-tasks/overview.mdx b/content/docs/core/automation/scheduled-tasks/overview.mdx index d7d14b189..d759db575 100644 --- a/content/docs/core/automation/scheduled-tasks/overview.mdx +++ b/content/docs/core/automation/scheduled-tasks/overview.mdx @@ -19,10 +19,11 @@ Add a task from an application's or service's **Scheduled Tasks** page. Choose t ## What a scheduled task contains -Each task has five main settings: +Each task has six main settings: - **Name** identifies the task in Coolify. - **Command** is the exact command Coolify runs inside the container. +- **Run in a shell** runs the command with `sh -c`. Turn it off for a container without a shell. - **Frequency** controls when the command runs. It accepts a five-field cron expression or a supported named schedule. - **Timeout** limits how long one execution may run. - **Container name** selects where the command runs when the resource has more than one container. @@ -35,10 +36,16 @@ Read [Cron Syntax](/core/automation/cron-syntax) for supported fields, named sch Scheduled tasks, database backups, volume backups, and Docker cleanups each have their own scheduler process that dispatches due work every minute. A busy queue or slow schedule type does not delay dispatch of the others. -Coolify evaluates the schedule in the timezone configured for the server that runs the resource. When the task is due, Coolify runs the command in a shell inside the selected running container. +Coolify evaluates the schedule in the timezone configured for the server that runs the resource. When the task is due, Coolify runs the command inside the selected running container. + +With **Run in a shell** on, the default, Coolify runs the command with `sh -c`, so you can use variables, pipes, and redirects. With the option off, Coolify splits the command into arguments and runs it directly. Use this for containers without `sh`, such as distroless or scratch images. Shell features such as variables, pipes, and redirects do not work then. A scheduled execution is skipped when the task is disabled, the application or service is not running, or the connected server is not functional. A task with multiple containers also needs the correct container or service name. +If the resource has no running container when the task starts, Coolify records the run as **Skipped**. A skipped run sends no notification and does not count as a failure. + +A task that keeps failing notifies the team on the first failure, then at most once a day. After 10 failures in a row, when the first failure is more than 24 hours old, Coolify disables the task. Read [Manage tasks](/core/automation/scheduled-tasks/manage-tasks#automatic-disable-after-repeated-failures). + Fixed-time schedules run once when daylight saving time repeats an hour. One failing schedule does not prevent other due schedules from being dispatched. After Coolify starts a command, **Recent executions** shows its status, start and end times, duration, and captured output. diff --git a/content/docs/core/infrastructure/servers/add-server.mdx b/content/docs/core/infrastructure/servers/add-server.mdx index 84617eb19..04d22253f 100644 --- a/content/docs/core/infrastructure/servers/add-server.mdx +++ b/content/docs/core/infrastructure/servers/add-server.mdx @@ -108,6 +108,7 @@ You can also generate or import a private key from the **New key** menu beside * | **User** | Enter `root` for this guide. | | **Private key** | Select the key whose public key you authorized on the server. | | **Server role** | Select **Deployments and builds**, **Deployments only**, or **Builds only** according to the server's purpose. | +| **Scan images for vulnerabilities** | Optional. Select **On** to scan the images on this server for known vulnerabilities. You can change it later on the server's **Security** page. See [Image scanning](/core/security/image-scanning). | Expand **Advanced settings** to access **User**, **Port**, and **Server role**. Choose **Deployments and builds** for a server that builds and runs resources, or **Deployments only** to keep builds on other servers. Choose **Builds only** for a dedicated build server. See [Server roles](/core/infrastructure/servers/build-servers#server-roles). @@ -122,7 +123,7 @@ Select **Validate connection** to open the validation panel. After a successful During validation, Coolify: -1. tests the SSH connection +1. tests the SSH connection and saves the [SSH host key](/core/infrastructure/servers/security#ssh-host-key) of the server 2. checks the operating system and required tools 3. installs or verifies Docker Engine and Docker Compose 4. records server information diff --git a/content/docs/core/infrastructure/servers/build-servers.mdx b/content/docs/core/infrastructure/servers/build-servers.mdx index b129d8fbe..2f7681345 100644 --- a/content/docs/core/infrastructure/servers/build-servers.mdx +++ b/content/docs/core/infrastructure/servers/build-servers.mdx @@ -111,7 +111,7 @@ If the server has managed resources, move or delete them before continuing. Cool 1. Open **General** for the server. -2. Expand **Advanced settings** and set **Server role** to **Builds only**. +2. In the **Connection** section, set **Server role** to **Builds only**. The setting saves immediately. The server can no longer be selected as a deployment destination while it remains a build server. @@ -122,7 +122,7 @@ The setting saves immediately. The server can no longer be selected as a deploym -When more than one usable build server is available, Coolify selects one at random for each build. +When more than one usable build server is available, Coolify selects the build server with the fewest running builds that still has a free slot under its **Concurrent builds** limit. If several servers have the same number of builds, Coolify selects one at random. If every build server is full, the deployment waits in the queue. diff --git a/content/docs/core/infrastructure/servers/manage-server.mdx b/content/docs/core/infrastructure/servers/manage-server.mdx index 6c7c5ad67..cd83d491d 100644 --- a/content/docs/core/infrastructure/servers/manage-server.mdx +++ b/content/docs/core/infrastructure/servers/manage-server.mdx @@ -39,7 +39,7 @@ Create a DNS record for `*.example.com` that points to this server. Changing the ## Server details -After successful validation, the **General** page displays detected information such as: +After successful validation, the **Server overview** section of the **General** page displays detected information such as: - operating system - CPU architecture and core count @@ -47,7 +47,9 @@ After successful validation, the **General** page displays detected information - kernel version - Docker versions -Coolify refreshes this information when it validates or checks the server. Use it to confirm that the connected machine and its available resources match what you expect. +Coolify refreshes this information when it validates or checks the server. To refresh it yourself, select **Fetch server details**, or **Refresh details** when details already exist. For a server linked to a cloud provider, this action also refreshes the status at the provider. It refreshes the provider status also when the server is not validated yet. + +Use this information to confirm that the connected machine and its available resources match what you expect. --- @@ -55,7 +57,7 @@ Coolify refreshes this information when it validates or checks the server. Use i If you added a Hetzner, DigitalOcean, Vultr, or Hostinger server manually, you can link its Coolify record to the matching provider machine. -Linking lets Coolify read provider status and display provider-backed actions such as **Power On** when the machine is stopped. It does not create a new machine. +Linking lets Coolify read provider status and display provider-backed actions such as **Power On** when a Hetzner, DigitalOcean, or Vultr machine is stopped. It does not create a new machine. @@ -71,7 +73,7 @@ Follow [Cloud Tokens](/core/security/credentials/cloud-tokens) to add a token fo 1. Open **Servers** and select the server. 2. Open **General**. -3. Select **Link Cloud Provider**. +3. In the **Connection** section, select **Link provider**. 4. Choose **Hetzner**, **DigitalOcean**, **Vultr**, or **Hostinger**. 5. Select the matching provider token. @@ -80,25 +82,18 @@ Follow [Cloud Tokens](/core/security/credentials/cloud-tokens) to add a token fo ### Find the provider machine -Search using the provider's server ID or the server IP address. - -Confirm that **Match Found** shows the intended machine, then select **Link This Server**. - -For Hostinger, the flow is different: +Enter the provider ID of the machine and select **Search ID**, or select **Search by server IP**. The ID field is **Server ID** for Hetzner, **Droplet ID** for DigitalOcean, **Instance ID** for Vultr, and **Virtual Machine ID** for Hostinger. -1. Select **Link Provider**, then select **Hostinger**. -2. Select the Hostinger token. -3. Enter the Virtual Machine ID, or select **Search By Server IP**. -4. Select **Link Resource**. +Confirm that **Match found** shows the intended machine, then select **Link resource**. ### Confirm the link -Return to the server page and confirm that provider status is shown. If the status is stale, refresh it before taking a provider-backed action. +Return to the server page and confirm that the **Server overview** section shows a badge with the provider and its status, for example `Hetzner · Running`. If the status is stale, select **Refresh details** before taking a provider-backed action. -A linked Hostinger server shows a `Hostinger · ` badge. Select **Refresh Status** to update it. If the VPS is stopped, you can start it from Coolify. Coolify does not validate the server over SSH while the VPS is stopped or suspended. +Coolify does not validate a linked Hostinger server over SSH while the VPS is stopped or suspended. Start the VPS in hPanel first. @@ -127,14 +122,14 @@ Open **Advanced** to control how many deployments a server runs at once and how | Setting | What it controls | Default | | :--- | :--- | :--- | -| **Concurrent builds** | How many build and deployment processes run at the same time on this server. Raise it to deploy more resources in parallel; lower it to protect a small server from resource exhaustion during builds. | `2` | +| **Concurrent builds** | How many deployments can build at the same time on this server. Raise it to deploy more resources in parallel; lower it to protect a small server from resource exhaustion during builds. | `2` | | **Deployment timeout** | The maximum time a single deployment may run before Coolify cancels it. Increase it for large images or slow builds that legitimately exceed the limit. | `3600` | -| **Queue limit** | The maximum number of deployments allowed to wait in the queue. When the limit is reached, Coolify rejects new deployments with an HTTP `429` response. | — | +| **Queue limit** | The maximum number of deployments allowed to wait in the queue. When the limit is reached, Coolify rejects new deployments with an HTTP `429` response. | `25` | Select **Save changes** after changing these values. -The concurrent-build count and queue limit apply to each server independently. A dedicated [build server](/core/infrastructure/servers/build-servers) has its own limits, so raising them there does not affect deployments on other servers. +The concurrent-build count and queue limit apply to each server independently. A build counts on the server that runs it: the deployment server, or the [build server](/core/infrastructure/servers/build-servers) that builds the image. When a deployment starts, it reserves a build server with a free slot. When a build server slot is free again, the waiting deployments of other servers can start. ## Disk usage notifications diff --git a/content/docs/core/infrastructure/servers/meta.json b/content/docs/core/infrastructure/servers/meta.json index 54c830e9e..7ca348816 100644 --- a/content/docs/core/infrastructure/servers/meta.json +++ b/content/docs/core/infrastructure/servers/meta.json @@ -12,6 +12,7 @@ "non-root-user", "build-servers", "github-actions-runners", + "security", "server-patching", "docker-images", "automated-docker-cleanup", diff --git a/content/docs/core/infrastructure/servers/provision-cloud-server.mdx b/content/docs/core/infrastructure/servers/provision-cloud-server.mdx index eb8f5190a..f002c7796 100644 --- a/content/docs/core/infrastructure/servers/provision-cloud-server.mdx +++ b/content/docs/core/infrastructure/servers/provision-cloud-server.mdx @@ -181,9 +181,9 @@ If the setup still fails, the server shows the state `initial`. Finish the VPS s ### Server status -A linked Hostinger server shows a `Hostinger · ` badge on the server page. Select **Refresh Status** to get the current state from Hostinger. +A linked Hostinger server shows a `Hostinger · ` badge in the **Server overview** section of the server page. Select **Refresh details** (or **Fetch server details**) to get the current state from Hostinger. -If the VPS is stopped, you can start it from Coolify. Coolify does not validate the server over SSH while the VPS is stopped or suspended. +Coolify does not validate the server over SSH while the VPS is stopped or suspended. Start the VPS in hPanel first. ### Delete a Hostinger VPS diff --git a/content/docs/core/infrastructure/servers/remove-server.mdx b/content/docs/core/infrastructure/servers/remove-server.mdx index f9207acae..c4f0a607d 100644 --- a/content/docs/core/infrastructure/servers/remove-server.mdx +++ b/content/docs/core/infrastructure/servers/remove-server.mdx @@ -5,7 +5,7 @@ description: Remove a server from Coolify, optionally delete its resources, and # Remove a server -Deleting a server always removes it's details from the Coolify database. Depending on the options you choose, Coolify can also delete its managed resources and its linked Hetzner, DigitalOcean, Vultr, or Hostinger machine. +Deleting a server always removes its details from the Coolify database. Depending on the options you choose, Coolify can also delete its managed resources and its linked Hetzner, DigitalOcean, Vultr, or Hostinger machine. The **localhost** server in a self-hosted Coolify installation cannot be deleted. @@ -20,11 +20,24 @@ Before opening the deletion dialog, choose the required outcome. | Option | Result | | :--- | :--- | | **Only delete server from Coolify** | Removes the server from Coolify. The Linux machine, Docker installation, and files remain. | -| **Delete all resources** | Starts deletion for every resource Coolify manages on this server, then removes the server from database. | +| **Delete all resources** | Starts deletion for every resource whose main destination is this server, then removes the server from database. | +| **Remove the public key of this server's SSH key from ~/.ssh/authorized_keys on the server** | Removes the public key of the server's SSH key from `~/.ssh/authorized_keys` before Coolify deletes the server, so the key can no longer log in. | | **Also delete server/droplet from the provider** | Sends a deletion request for the linked Hetzner server, Vultr instance, or DigitalOcean Droplet. For a Hostinger VPS, turns off auto-renewal so Hostinger deletes the VPS at the end of the paid period. | Provider deletion is not selected by default. If you leave it disabled, the provider continues billing for a machine that still exists. +### Applications on more than one server + +An application can use this server only as an [additional destination](/core/infrastructure/scaling/multi-server-deployments), while its main destination is another server. Coolify does not delete such an application. It removes the application from this server, stops its containers here, and the application keeps running on its other servers. + +This applies with or without **Delete all resources**. A server that has only such applications can be deleted without **Delete all resources**. + +### Remove the SSH key from the server + +The SSH key option shows only when the server has no resources. Coolify removes every line with the public key from `~/.ssh/authorized_keys` of the SSH user. If another server record in Coolify uses the same key for the same host and user, the key stays on the server. + +If Coolify cannot remove the key, it does not delete the server. Clear the option to delete the server without removing the key. When you also delete the machine at the provider, Coolify skips this step. + Hostinger has no API to delete a VPS immediately. If you select the Hostinger option, Coolify turns off auto-renewal. The VPS keeps running until the paid period ends. Then Hostinger deletes the VPS and all its data. @@ -53,7 +66,7 @@ Back up important data. Redeploy resources you want to keep to another server an For the safest and most controlled migration, move or delete each resource before removing the server. -If resources remain, the confirmation dialog offers **Delete all resources** and shows how many will be deleted. Enable it only if every remaining resource can be destroyed. +If resources remain, the confirmation dialog offers **Delete all resources** and lists the resources it deletes. Enable it only if every listed resource can be destroyed. The page also lists the applications that Coolify removes only from this server and that keep running on another server. @@ -76,24 +89,25 @@ Keep the provider option disabled if you need the machine, its files, or console ### Open the Danger Zone -Open the server's **Danger** page and find **Delete Server** under **Danger Zone**. +Open the server's **Danger Zone** page and find the **Delete server** section. ### Review the confirmation -Select **Delete** and review every action shown in the dialog. +Select **Delete server** and review every action shown in the dialog. When applicable: - enable **Delete all resources** only if the remaining managed resources can be destroyed +- enable **Remove the public key of this server's SSH key from ~/.ssh/authorized_keys on the server** if the key must no longer log in to the machine - enable **Also delete server from Hetzner Cloud** only if the linked Hetzner server should be permanently deleted - enable **Also delete server from Vultr** only if the linked Vultr instance should be permanently deleted - enable **Also delete droplet from DigitalOcean** only if the linked DigitalOcean Droplet should be permanently deleted - enable **Also delete VPS from Hostinger (at the end of the paid period)** only if the linked Hostinger VPS should be deleted when its paid period ends -Enter the required confirmation value and complete the deletion. +Enter the server name and your Coolify account password, then complete the deletion. @@ -125,4 +139,10 @@ Applications, databases, and services from the deleted record do not automatical ## Provider deletion through the API -For Hetzner, Vultr, or DigitalOcean, `DELETE /servers/{uuid}?delete_from_provider=true` also deletes the linked provider machine. Review the provider link before requesting deletion. The default is `false`. Use `force=true` only when you also intend to delete all resources. Deleting a server marks its queued deployments as failed. +For Hetzner, Vultr, or DigitalOcean, `DELETE /servers/{uuid}?delete_from_provider=true` also deletes the linked provider machine. Review the provider link before requesting deletion. The default is `false`. + +Use `force=true` only when you also intend to delete all resources whose main destination is the server. Applications that use the server only as an additional destination are not deleted: Coolify removes them from the server and they keep running on their other servers. `force` and `delete_from_provider` need a token with the `deploy` permission. + +`remove_ssh_key=true` removes the public key of the server's SSH key from `~/.ssh/authorized_keys` before Coolify deletes the server. The server must have no resources. If the key cannot be removed, Coolify does not delete the server. + +Deleting a server marks its queued deployments as failed. diff --git a/content/docs/core/infrastructure/servers/security.mdx b/content/docs/core/infrastructure/servers/security.mdx new file mode 100644 index 000000000..fb6ba29ec --- /dev/null +++ b/content/docs/core/infrastructure/servers/security.mdx @@ -0,0 +1,116 @@ +--- +title: Server Security +description: Use the server Security page to check the pinned SSH host key, control terminal access, patch packages, and scan images. +--- + +# Server security + +Open **Servers**, select a server, then select **Security**. The **Security** menu has these pages: + +| Page | What it contains | +| :--- | :--- | +| **General** | The [SSH host key](#ssh-host-key) of the server and [terminal access](/core/infrastructure/servers/web-terminal#change-terminal-access). | +| **Patching** | Operating-system package updates. See [Server Patching](/core/infrastructure/servers/server-patching). | +| **Vulnerabilities** | Container image scanning for the server. See [Image scanning](/core/security/image-scanning). | + +**Patching** and **Vulnerabilities** show only after the server is validated. Only team owners and administrators can open the **Security** page. + +--- + +## SSH host key + +The SSH host key identifies the server. Coolify uses it to make sure that it connects to the correct machine and not to another machine at the same address. + +Coolify saves the host key on the first connection to the server and trusts it after that (trust on first use). When the server later sends a different key, Coolify reports the change and, in enforce mode, refuses to connect. + +The **SSH host key** section shows: + +- the fingerprint of the trusted key, or **No key yet** before the first connection +- how Coolify got the key, for example **Saved on the first connection** or **Moved with the server transfer**, and when it was trusted +- the current mode + +The badge shows the state of the check: + +| Badge | Meaning | +| :--- | :--- | +| **Trusted, warn mode** or **Trusted, enforce mode** | Coolify trusts a key and the server sends it. | +| **Key changed** | The server sent a key that does not match the trusted key. | +| **Check off** | Coolify does not check the host key of this server. | +| **No key yet** | Coolify saves the key on the next connection. | + +When you change the IP address or the SSH port of the server, Coolify removes the trusted key and saves the new key on the next connection. + +### Check modes + +| Mode | What Coolify does when the host key changes | +| :--- | :--- | +| `warn` | Coolify connects, shows the new key, and notifies the team. This is the default. | +| `enforce` | Coolify refuses to connect until you trust or reset the new key. Deployments, backups, and server checks on this server stop. | +| `off` | Coolify does not check the host key. | + +To refuse a changed key on one server, set **When the host key changes** to **Refuse to connect (enforce)**. Select **Warn and connect** to use warn mode again. The setting saves immediately. It shows only when the instance uses warn mode and the check is not disabled for the server. + +### When the host key changes + +When the server sends a different host key: + +- Coolify shows a callout with the fingerprint of the new key on the **Security** page and on the server **General** page. +- The team gets a notification on the channels that receive the **Server unreachable** event. Coolify sends at most one notification an hour for each server. +- Coolify writes the change to the [audit log](/core/team/audit-log). + +A new host key is expected after you reinstall the server. If you did not change the server, another machine can answer at its address. Do not trust the key until you compare it with the key on the server. + + + + +### Compare the key on the server + +From a trusted terminal or the provider console, run on the server: + +```sh +for f in /etc/ssh/ssh_host_*_key.pub; do ssh-keygen -lf "$f"; done +``` + +Compare the `SHA256:` fingerprints with the fingerprint in the Coolify callout. + + + + +### Trust the new key + +1. Open **Servers > your server > Security**. +2. In **SSH host key**, select **Trust new key**. +3. Enter the server name and your Coolify account password, then confirm. + +Coolify trusts the new key, stops trusting the old key, and checks the connection again. + + + + +### Other actions + +| Action | Result | +| :--- | :--- | +| **Reset** | Removes the trusted key and the new key. Coolify trusts the key that the server sends on the next connection. | +| **Disable check** | Turns off the host key check for this server. Use it only for a server that changes its host key often, for example a load balancer address or a server that you rebuild often. | +| **Enable check** | Turns the host key check on again for this server. | + +Each action asks for the server name and your Coolify account password. + +### Set the mode for the instance + +On a self-hosted instance, an instance administrator sets the mode for all servers with `SSH_HOST_KEY_CHECKING` in `/data/coolify/source/.env`. The values are `warn` (default), `enforce`, and `off`. Coolify uses `warn` for any other value. + +```sh +SSH_HOST_KEY_CHECKING=enforce +``` + +Recreate the Coolify container to apply the change. Follow [Environment Variables](/core/instance-management/environment-variables#apply-the-changes). + +With `enforce` or `off` for the instance, the mode of each server follows the instance. With `warn`, you can set enforce mode for one server. + +### Reset the host key through the API + +`POST /servers/{uuid}/host-key/reset` removes the trusted key of the server. Coolify then trusts the key that the server sends on the next connection. + +To trust a known key instead, send it in `ssh_host_key`, as public key lines (`type base64`) or `known_hosts` lines. The response contains the fingerprints in `ssh_host_key_fingerprints`. The request needs a token with the `write` permission of a team administrator or owner. See [API](/api/overview). diff --git a/content/docs/core/infrastructure/servers/server-transfer.mdx b/content/docs/core/infrastructure/servers/server-transfer.mdx index 1ce36e11a..ade4dd325 100644 --- a/content/docs/core/infrastructure/servers/server-transfer.mdx +++ b/content/docs/core/infrastructure/servers/server-transfer.mdx @@ -16,12 +16,12 @@ Server transfer is in beta. The settings and the behavior can change in later ve ## Prerequisites - Both instances run the same Coolify version. The target must support server transfer and read the same transfer bundle version as the source. -- You are an admin or owner of the team of the server on the source. +- You are an Owner of the team of the server on the source. Admins cannot start a transfer. - The target uses `https`. The transfer sends credentials, so Coolify does not accept an `http` target URL. - The source can connect to the target URL. - The target can connect to the SSH port of the server. - The source can connect to the server over SSH. -- On a self-hosted target, **API access** is enabled in **Settings > Advanced**. If the target uses **Allowed API IPs**, add the IP address of the source. +- On a self-hosted target, **API access** is enabled in **Settings > Advanced**. If the target uses **Allowed IPs**, add the IP address of the source. - You have an [API token](/core/security/credentials/api-tokens) of the target. Create it in the team that receives the server. Use a token with the `root` permission, or with the `write` and `deploy` permissions. The token must belong to an admin or owner of that team. - No deployment is queued or running on the server. - On the target, the team can have one more server, and no other server uses the same UUID or IP address. diff --git a/content/docs/core/infrastructure/servers/web-terminal.mdx b/content/docs/core/infrastructure/servers/web-terminal.mdx index 520a9df34..794058de7 100644 --- a/content/docs/core/infrastructure/servers/web-terminal.mdx +++ b/content/docs/core/infrastructure/servers/web-terminal.mdx @@ -56,6 +56,20 @@ You can also open **Terminal** from an individual server, application, database, The same server setting controls both the global Terminal page and these resource terminals. +## When a session ends + +Coolify checks every minute that you can still use an open terminal session. The session ends when: + +- you log out of Coolify +- you are no longer an owner or administrator of the team, or you are removed from the team +- **Terminal Access** is disabled for the server +- the server is disabled or transferred to another Coolify instance +- the team requires two-factor authentication and you have not set it up + +The terminal shows `Terminal session ended:` and the reason. If Coolify cannot answer the check three times in a row, for example during an upgrade, the session also ends. + +A session ends after 8 hours, also when it is active. + --- ## Use console mode for a container @@ -125,14 +139,13 @@ Use this setting when nobody should be able to open dashboard terminals for a se 1. Open **Servers**. 2. Select the server. -3. Select **Security**. -4. Open **Terminal Access**. - +3. Select **Security > General**. +4. Find the **Terminal access** section. 5. Select **Disable terminal**. 6. Enter the server name and your Coolify account password in the confirmation window. 7. Complete the confirmation. -The change takes effect immediately. The server and its containers disappear from dashboard terminal selectors, including for owners and administrators. +The change takes effect immediately. The server and its containers disappear from dashboard terminal selectors, including for owners and administrators. Open terminal sessions end within one minute. Disabling this setting does not block normal SSH connections made outside Coolify. @@ -141,7 +154,7 @@ Disabling this setting does not block normal SSH connections made outside Coolif ### Enable terminal access again -1. Return to **Servers > your server > Security > Terminal Access**. +1. Return to **Servers > your server > Security > General** and find **Terminal access**. 2. Select **Enable terminal**. 3. Enter the server name and your Coolify account password. 4. Complete the confirmation. diff --git a/content/docs/core/instance-management/environment-variables.mdx b/content/docs/core/instance-management/environment-variables.mdx index c60481668..6b2b9e4d9 100644 --- a/content/docs/core/instance-management/environment-variables.mdx +++ b/content/docs/core/instance-management/environment-variables.mdx @@ -1,11 +1,11 @@ --- title: Instance Environment Variables -description: Configure PHP memory, workers, and scheduled job dispatch for a self-hosted Coolify instance and apply environment changes. +description: Configure PHP memory, workers, scheduled job dispatch, SSH host key checks, and API limits for a self-hosted Coolify instance and apply environment changes. --- # Instance environment variables -Self-hosted Coolify reads its instance environment from `/data/coolify/source/.env`. Use this file for settings such as PHP memory, workers, and scheduled job dispatch that are not exposed in the dashboard. +Self-hosted Coolify reads its instance environment from `/data/coolify/source/.env`. Use this file for settings such as PHP memory, workers, scheduled job dispatch, SSH host key checks, and API limits that are not exposed in the dashboard. These settings affect the Coolify instance. To configure a deployed application, use that application's [environment variables](/applications/configuration/environment-variables) and image configuration instead. @@ -44,6 +44,32 @@ SCHEDULED_JOBS_DISPATCH_MODE=concurrent Then follow [Apply the changes](#apply-the-changes) below to recreate the Coolify container while preserving its current image and any custom Compose overrides. +## SSH host key checking + +Coolify saves the SSH host key of a server on the first connection. `SSH_HOST_KEY_CHECKING` sets what Coolify does when the key changes, for all servers of the instance: + +| Value | Behavior | +| :--- | :--- | +| `warn` | Coolify connects, shows the new key, and notifies the team. This is the default. | +| `enforce` | Coolify refuses to connect until you trust or reset the new key. | +| `off` | Coolify does not check the host key. | + +Coolify uses `warn` for any other value. With `warn`, a team can still enforce the check on one server. Read [SSH host key](/core/infrastructure/servers/security#ssh-host-key) for details. + +```dotenv +SSH_HOST_KEY_CHECKING=enforce +``` + +## API failed request limit + +`API_FAILED_REQUEST_RATE_LIMIT` sets how many failed API requests one token or IP address can send in one minute. The default is `30`. Requests that return `401` or `403` count, and `404` counts only for requests without a token. When a client reaches the limit, Coolify answers all its API requests with `429` for 1 minute, then for 5 and 15 minutes when the client reaches the limit again within one hour. The team of the token gets one notification a day. Set `0` to turn the limit off. + +```dotenv +API_FAILED_REQUEST_RATE_LIMIT=60 +``` + +For the general API request limit, read [Rate limits](/api/rate-limits). + ## Change a setting Connect to the server where the Coolify instance runs. Back up the existing environment file, then edit it: diff --git a/content/docs/core/instance-management/instance-settings.mdx b/content/docs/core/instance-management/instance-settings.mdx index 3f53a8e43..8435cd205 100644 --- a/content/docs/core/instance-management/instance-settings.mdx +++ b/content/docs/core/instance-management/instance-settings.mdx @@ -258,9 +258,9 @@ For the detailed guide, follow [Set up MCP](/mcp/setup). --- -### Allowed API IPs +### Allowed IPs - + Restricts which source IP addresses can call the Coolify API. Enter comma-separated IPs or CIDR ranges, then click **Save changes**. @@ -325,12 +325,12 @@ Enables SPA-style navigation and prefetching for smoother dashboard page transit Controls whether this instance sends an anonymous installation count to Coolify, contributing to the self-hosted installation count shown on [coolify.io](https://coolify.io/). Coolify does not store IP addresses or send error reports. -Choose **Enabled** or **Disabled**, then click **Save changes**. +Choose **Enabled** or **Disabled**. Coolify saves the change immediately. **Accepted values:** -- **Enabled:** do not send anonymous installation counts. -- **Disabled:** allow anonymous installation counts. +- **Enabled:** send the anonymous installation count. +- **Disabled:** do not send the anonymous installation count. --- @@ -547,85 +547,104 @@ Click the download icon on a successful run to download its backup. - +Choose one provider to send Coolify's transactional email, such as password resets and invitations. Teams that select **Use system-wide settings** on their email notification page also send through this provider. -Configure the sender identity and choose SMTP or Resend to deliver Coolify's transactional email. +### Email delivery -### Sender +Select the provider in the list next to the **Email delivery** title: - +- **None:** Coolify does not send email. +- **SMTP:** Coolify sends email through one of your [SMTP servers](#smtp-servers). +- **Resend:** Coolify sends email through [Resend](#resend). -Sender settings are shared by SMTP and Resend. +Only one provider sends email. When the settings of the selected provider are complete, Coolify saves the selection immediately. Otherwise, the page shows a **Not active yet** warning. Enter the provider settings, then click **Save changes**. Until you save, Coolify continues to send email with the previous provider, if one is active. -#### From name +--- -Sets the display name shown in outgoing email, such as password resets and invitations. Enter a name, then click **Save changes**. +### SMTP servers -**Accepted values:** +You can save more than one SMTP server. Coolify sends email through the server that the **SMTP server** list shows. The first server is named `Default`. -- A required text value, for example `Coolify`. +- **Add a server:** Click **Add server**. Enter a **Name**, optionally select a **Template**, and click **Add server**. Enter the remaining settings, then click **Save changes**. The previous server stays in the list. +- **Switch servers:** Select another server in the **SMTP server** list. Coolify saves the change immediately and uses that server. +- **Rename a server:** Click the edit icon next to the list, enter the new **Name**, and click **Save**. +- **Delete a server:** Click the delete icon next to the list. Coolify then uses the next server in the list. You cannot delete the only server. To stop using SMTP, select another provider. -#### From address +A **Template** fills in the **Host**, **Port**, and **Encryption** of a common provider: PostShiba, Amazon SES (us-east-1), Brevo, Gmail, Mailgun, Mailjet, Microsoft 365, Postmark, Proton Mail, Resend, SendGrid, and Zoho Mail. The Resend and SendGrid templates also fill in the **Username**. You then enter the credentials from the provider. -Sets the sender address used for outgoing email. Enter a valid email address, then click **Save changes**. +Each server has these settings: -**Accepted values:** +#### Sender -- A required email address, for example `noreply@shadowarcanist.com`. +Each SMTP server has its own sender, because each server usually sends from its own verified domain. ---- +- **From name:** the display name in email from this server, for example `Coolify`. Required. +- **From address:** the sender address of this server, for example `noreply@shadowarcanist.com`. It must be on a domain that this server can send from. Required. -### SMTP server +#### Connection - +- **Host:** the SMTP server hostname from your provider, for example `smtp.mailgun.org`. Required. +- **Port:** the port from your provider, from `1` to `65535`. Common values are `587`, `465`, and `25`. Required. +- **Encryption:** **StartTLS**, **TLS / SSL**, or **None**, as your provider requires. -Connect Coolify to an SMTP-compatible email provider. +#### Authentication -Enter the required **Host**, **Port**, and **Encryption** values supplied by your provider. Fill the remaining fields as needed. +- **Username:** the SMTP username from your provider. +- **Password:** the SMTP password from your provider. It is required when you enter a username. -#### SMTP delivery +Leave both fields empty only for a relay that does not need a login, for example a local mail server. When the **Host** is the host of a template provider, both fields are required. -Choose **Enabled** to send email through SMTP or **Disabled** to turn SMTP off. This selection saves immediately. Enabling SMTP turns off Resend. +#### Advanced -#### Host +- **Timeout:** the maximum delivery time in seconds. Leave it empty to use the default mailer behavior. +- **EHLO domain:** the fully qualified domain Coolify sends in the SMTP `EHLO` command, for example `coolify.example.com`. Leave it empty to use the system default. -Enter the SMTP server hostname provided by your email provider, for example `smtp.mailgun.org`. +--- -#### Port +### Resend -Enter the port provided by your email provider. It must be between `1` and `65535`; common values are `587`, `465`, and `25`. +Connect Coolify to [Resend](https://resend.com) to send email through that provider. Select **Resend** under **Email delivery**, then enter: -#### Encryption +- **Resend API key:** an API key that you create in Resend. Required. +- **From name:** the display name in email from Resend. Required. +- **From address:** the sender address for email from Resend. It must be on a domain verified in Resend. Required. -Select the encryption method required by your email provider: +Click **Save changes**. -- **StartTLS** -- **TLS / SSL** -- **None** +Resend has its own sender. It does not use the sender of your SMTP servers. When you upgrade from a version before v4.7.0, Coolify copies the old shared sender into the Resend sender, so nothing changes until you edit it. -#### Username and password + +The API uses `resend_from_name` and `resend_from_address` for the Resend sender. `smtp_from_name` and `smtp_from_address` set only the sender of the SMTP server in use. Update API clients that set the Resend sender with the SMTP fields. + -Enter the credentials required by your SMTP provider. Leave these fields empty if the provider does not require authentication. +--- -#### Timeout +### Notification sender -Sets the maximum delivery time in seconds. Leave it empty to use the default mailer behavior. +Optionally, send notification emails from a different sender than account emails. Both fields show when a provider is selected: -#### EHLO domain +- **Notification from name:** the display name in notification emails. When it is empty, Coolify uses the **From name** of the provider. +- **Notification from address:** the sender address of notification emails. When it is empty, Coolify uses the **From address** of the provider. Your SMTP provider or Resend must allow this address. -Optionally set the fully qualified domain Coolify sends in the SMTP EHLO command. Leave it empty to use the system default. +Coolify uses the notification sender for: -After editing SMTP connection settings, click **Save changes**. +- Team notifications, such as deployments, backups, and server alerts, of teams that use the instance email settings. +- The alert that an S3 storage cannot connect. +- The alert to team admins that Coolify disabled a notification channel after failed deliveries. ---- +Account emails, such as password resets, invitations, and email changes, always use the **From address** of the provider. -### Resend + +Use a separate subdomain for the notification sender, for example `alerts@notifications.shadowarcanist.com`. Then many alerts do not affect the delivery of account emails. + + +--- - +### Send test -Connect Coolify to [Resend](https://resend.com) to send transactional email through that provider. +Click **Send test** next to the **Email delivery** title, enter the **Recipient**, and click **Send email**. Select **Send from the notification sender** to test the notification sender. The test uses the sender values on the page, and Coolify saves them before it sends the test. -Create an API key in Resend and enter it in **API key**. The key is required when Resend is enabled. Choose **Enabled** under **Resend delivery** to use Resend, or **Disabled** to turn it off. This selection saves immediately, and enabling Resend turns off SMTP. Click **Save changes** to save the API key and sender fields. +The button is available to admins after you save a provider. diff --git a/content/docs/core/instance-management/reverb-migration.mdx b/content/docs/core/instance-management/reverb-migration.mdx index 3ef88ecf6..125a019f0 100644 --- a/content/docs/core/instance-management/reverb-migration.mdx +++ b/content/docs/core/instance-management/reverb-migration.mdx @@ -25,9 +25,10 @@ The update accepts a `soketi` override in `docker-compose.custom.yml`. Existing The external paths do not change: - `/app/*` carries browser WebSocket connections. -- `/apps/*` carries Pusher-compatible API requests. - `/terminal/ws` carries web terminal connections. +Since Coolify 4.6.0, the generated Traefik and Caddy configurations no longer route `/apps/*`, the Reverb HTTP API, through the dashboard domain. Coolify sends events to Reverb inside the `coolify` container, so the browser does not need this path. If your own reverse proxy routes `/apps/*` to port `6001`, remove that route. + The update keeps the existing Pusher application ID, key, and secret. It also keeps `SOKETI_PORT` as the compatible Docker host-port setting. Do not rename that variable during this migration. The update script also removes the old `coolify-realtime` container. If `.env` still contains `PUSHER_BACKEND_HOST=coolify-realtime`, the script changes it to `127.0.0.1`, because Reverb now runs in the same container as Coolify. @@ -161,7 +162,6 @@ This is the recommended configuration. Send the dashboard hostname to the Coolif ```text /app/* -> coolify:6001 -/apps/* -> coolify:6001 /terminal/ws -> coolify:6002 /* -> coolify:8080 ``` diff --git a/content/docs/core/instance-management/uninstallation.mdx b/content/docs/core/instance-management/uninstallation.mdx index b9ee49f0e..8fcf852e1 100644 --- a/content/docs/core/instance-management/uninstallation.mdx +++ b/content/docs/core/instance-management/uninstallation.mdx @@ -130,14 +130,16 @@ This is the final destructive step. It permanently removes the instance `.env` f Image tags can vary depending on when you last updated Coolify. Run `docker images` to see the images and tags on your server, then use those tags in the commands below. + +Coolify pulls its images from Docker Hub by default, and `docker images` shows them without a registry prefix. If your instance uses `REGISTRY_URL=ghcr.io`, the image names start with `ghcr.io/`. Remove the default Coolify images to free disk space: ```sh -docker rmi ghcr.io/coollabsio/coolify:latest -docker rmi ghcr.io/coollabsio/coolify-helper:latest -docker rmi ghcr.io/coollabsio/sentinel:1.0.1 +docker rmi coollabsio/coolify:latest +docker rmi coollabsio/coolify-helper:latest +docker rmi coollabsio/sentinel:1.1.5 docker rmi postgres:15-alpine docker rmi redis:7-alpine ``` @@ -145,7 +147,7 @@ docker rmi redis:7-alpine If you removed a `coolify-realtime` container, remove its image too: ```sh -docker rmi ghcr.io/coollabsio/coolify-realtime:1.0.16 +docker rmi coollabsio/coolify-realtime:1.0.16 ``` If you used the default Traefik proxy, remove its image too: @@ -275,13 +277,15 @@ This permanently deletes files Coolify stored under `/data/coolify` on this serv Image tags can vary depending on when you last updated Coolify. Run `docker images` to see the images and tags on your server, then use those tags in the commands below. + +Coolify pulls its images from Docker Hub by default, and `docker images` shows them without a registry prefix. If your instance uses `REGISTRY_URL=ghcr.io`, the image names start with `ghcr.io/`. Remove the default Coolify images to free disk space: ```sh -docker rmi ghcr.io/coollabsio/coolify-helper:latest -docker rmi ghcr.io/coollabsio/sentinel:1.0.1 +docker rmi coollabsio/coolify-helper:latest +docker rmi coollabsio/sentinel:1.1.5 ``` If you used the default Traefik proxy, remove its image too: diff --git a/content/docs/core/instance-management/update.mdx b/content/docs/core/instance-management/update.mdx index 025f0a399..4e4fcc1c3 100644 --- a/content/docs/core/instance-management/update.mdx +++ b/content/docs/core/instance-management/update.mdx @@ -36,6 +36,35 @@ Coolify waits for the backup to finish. If the database backup fails, the update The option does not create a backup configuration for you. Without a configured instance backup, the update proceeds without this backup step. Running `upgrade.sh` directly also requires you to [create a backup yourself](/core/backup-and-recovery/instance-backup). Keep the instance `APP_KEY` separately so you can restore encrypted data. +## Choose an update channel + +In **Settings > Updates**, **Channel** sets the versions this instance upgrades to. Select a channel, then click **Save changes**. + +| Channel | Installs | Image tags | +| :--- | :--- | :--- | +| **Stable** | Stable releases. This is the default. | `4.7.2`, moving `latest` | +| **Preview** | Betas and release candidates, then the stable release. | `4.6.0-beta.1`, moving `preview` | +| **Nightly** | A build of the next version, two times each day. Nightly builds get less testing. | `4.6.0-alpha.0.20261026.1`, moving `nightly` | +| **Custom image** | The image tag that you enter in **Image tag**, such as `pr-1234` for the build of pull request 1234. | `ghcr.io/coollabsio/coolify:pr-` | + +An instance installs the newest version of its channel and of the more stable channels. For example, the **Preview** channel also installs stable releases. + +On the **Stable** channel, the page shows a **Try the next version early** hint about the **Nightly** channel. + + +Breaking changes are possible in nightly builds, including database changes that a stable release does not expect. Back up first, and use **Nightly** only on an instance that you can rebuild. + + +When you switch to a more stable channel, the instance keeps the updates of the old channel until the stable release of the installed version is out. For example, an instance on a nightly build of `4.6.0` that switches to **Stable** gets the nightly builds of `4.6.0` until `4.6.0` is released. + +**Custom image** pulls the tag from `ghcr.io/coollabsio/coolify`. Coolify installs it only when you click **Upgrade now** on the update page. Automatic updates pause until you select a channel again. Pull request builds are untested and can include database changes that a later release does not expect. + +To switch the channel from the command line, run this command on the Coolify server. It accepts `stable`, `preview`, or `nightly`: + +```sh +docker exec coolify php artisan app:update-channel nightly +``` + ## Choose an update path @@ -72,6 +101,10 @@ During an update, Coolify restarts to apply the new version. The dashboard is un Click **Check now** to check for a new version immediately. This does not install the update. +### Update notifications + +Coolify sends a notification to the root team when an automatic update starts, fails, or finishes. It uses the enabled [notification channels](/core/notifications/overview) of the root team, except email. If the new version does not start within 30 minutes, Coolify reports the update as failed. + @@ -86,19 +119,19 @@ Open the **Settings** page, then select **Updates**. -When a new version is available, Coolify shows **Update available** beside the version number at the top left of the sidebar. **Check frequency** controls how often Coolify checks the [versions file on the CDN](https://cdn.coollabs.io/coolify/versions.json). To check immediately, click **Check now** in the **Update checks** section. This checks for an update but does not install it. +When a new version is available, Coolify shows **Update available** beside the version number at the top left of the sidebar. **Check frequency** controls how often Coolify checks the [versions file on the CDN](https://cdn.coollabs.io/coolify/versions.json). To check immediately, click **Check now** in the **Updates** section. This checks for an update but does not install it. ### Update Coolify -Click **Upgrade Now** in the **Update Coolify** section, or click **Update available** beside the version number in the sidebar. Both options open the upgrade modal. +Click **Upgrade now** in the **Updates** section, or click **Update available** beside the version number in the sidebar. Both options open the upgrade modal. ### Review update version -Review the current and new version in the modal. Check that no deployments are pending or running, because deployments during the update will fail. Then click **Upgrade Now** to start the update. +Review the current and new version in the modal. The modal also shows the update channel, with a **Change channel** link. Check that no deployments are pending or running, because deployments during the update will fail. Then click **Upgrade now** to start the update. ### Wait for the update to finish @@ -106,13 +139,15 @@ Review the current and new version in the modal. Check that no deployments are p An update can take longer while the configured instance backup runs. The remaining update time depends on network conditions and server resources. Coolify restarts while applying the update, so the dashboard may be unavailable briefly. +If the update fails before the upgrade script starts, for example because the database backup fails, the modal shows the error. + If the progress modal remains on **Restart** for more than five minutes, refresh the page. Coolify may have finished updating but failed to reload the page automatically. If you see a **Gateway Timeout** or **Bad Gateway** error, wait two minutes before refreshing. If the error remains after refreshing, check the update logs under `/data/coolify/source/upgrade-*`. ### Upgrade complete -When all update stages are complete, Coolify confirms the new version and reloads the page. If the page does not reload automatically, click **Reload Now**. +When all update stages are complete, Coolify confirms the new version and reloads the page. If the page does not reload automatically, click **Reload now**. @@ -150,8 +185,12 @@ curl -fsSL https://cdn.coollabs.io/coolify/upgrade.sh | bash -s 4.3.23 Replace `4.3.23` with the Coolify version you want to install. The upgrade script updates configuration files from the [versions file on the CDN](https://cdn.coollabs.io/coolify/versions.json) as part of the process. +For a preview or nightly version, use the upgrade script of that channel, for example `https://cdn.coollabs.io/coolify/nightly/upgrade.sh`. + -Do not omit the version. Without one, the script writes `COOLIFY_VERSION=latest` to `.env`, which prevents update checks from working correctly. +The script writes the version to `LATEST_IMAGE` in `.env`, and the Coolify containers use that image tag. Without a version, the script installs the `latest` image and writes `LATEST_IMAGE=latest`. A later `docker compose up --pull always` can then install a newer release. + +Coolify reads its version from the image. The script removes `COOLIFY_VERSION` from `.env`. Do not add it again, because it overrides the version that Coolify shows and uses for update checks. diff --git a/content/docs/core/meta.json b/content/docs/core/meta.json index 2e3325a9a..30eacec02 100644 --- a/content/docs/core/meta.json +++ b/content/docs/core/meta.json @@ -34,6 +34,7 @@ "---Security---", "security/authentication", "security/credentials", + "security/image-scanning", "---Observability---", "...observability", "---Notifications---", diff --git a/content/docs/core/networking/dns.mdx b/content/docs/core/networking/dns.mdx index 3150b110e..76a67bb98 100644 --- a/content/docs/core/networking/dns.mdx +++ b/content/docs/core/networking/dns.mdx @@ -98,6 +98,8 @@ Open **Settings > Advanced** to manage: Current DNS validation checks the domain's `A` records. Validation succeeds when an address matches the selected server's IPv4 address or a recognized Cloudflare proxy address. Coolify skips this check for generated `sslip.io` domains. +For a Cloudflare proxy address in a zone that one of the team's [Cloudflare integration tokens](/integrations/security/cloudflare/dns-management) can access, Coolify also reads the record in Cloudflare. If the record, or the closest wildcard record, points to a different server, the domain shows **DNS mismatch**. A `CNAME` record, for example of a Cloudflare Tunnel, still passes. + DNS validation reports a mismatch, but it does not replace a public DNS check. A cached resolver result, an incorrect `AAAA` record, firewall rules, or a proxy configuration can still prevent the domain from working. ## Use internationalized domain names diff --git a/content/docs/core/networking/proxy/custom/nginx.mdx b/content/docs/core/networking/proxy/custom/nginx.mdx index 04d5c92c5..bc6f7c404 100644 --- a/content/docs/core/networking/proxy/custom/nginx.mdx +++ b/content/docs/core/networking/proxy/custom/nginx.mdx @@ -429,7 +429,7 @@ server { proxy_request_buffering off; } - location /app { + location /app/ { proxy_pass http://coolify_realtime; include /etc/nginx/managed/current/proxy.conf; proxy_set_header Upgrade $http_upgrade; @@ -449,6 +449,8 @@ server { } ``` +Keep the trailing slash in `location /app/`. Without it, NGINX also sends `/apps` to port `6001` and exposes the Reverb HTTP API. Coolify's own Traefik and Caddy configurations route only `/app/`. + All three targets are the `coolify` container, reached through the `coolify` network. Recent Coolify releases removed the separate `coolify-realtime` container and serve realtime updates and the terminal from `coolify` itself; see [realtime migration](/core/instance-management/reverb-migration). `proxy_request_buffering off` streams uploads, such as backup files, to Coolify instead of storing them in NGINX first. `client_max_body_size 256m` matches Coolify's own upload limit, so a large server transfer file is not rejected by NGINX. diff --git a/content/docs/core/networking/proxy/maintenance-and-error-pages.mdx b/content/docs/core/networking/proxy/maintenance-and-error-pages.mdx index 1917bc948..744eb8d20 100644 --- a/content/docs/core/networking/proxy/maintenance-and-error-pages.mdx +++ b/content/docs/core/networking/proxy/maintenance-and-error-pages.mdx @@ -17,14 +17,20 @@ Direct access through a published container port bypasses these proxy pages. Dat ## Enable maintenance mode -1. Open the application or service and select **Domains**. -2. Find **Maintenance mode**. -3. Set it to **On: show the maintenance page**. +1. Open the application or service and select **Maintenance Mode**. +2. Select **Enable maintenance**. +3. Review the actions in the dialog and select **Enable maintenance** to confirm. 4. Open one of the resource's domains and confirm the maintenance page and HTTP `503` response. -The change applies without redeploying. Existing containers and background jobs continue running; pause writes or jobs separately if your maintenance requires it. For a service, the setting applies across the stack's configured domains. +The badge beside **Maintenance mode** changes to **On**. The change applies without redeploying. Existing containers and background jobs continue running; pause writes or jobs separately if your maintenance requires it. For a service, the setting applies across the stack's configured domains. -To resume traffic, set **Maintenance mode** to **Off: serve the resource**. Verify the resource is healthy and its domains serve the expected content. +To resume traffic, select **Disable maintenance** and confirm in the dialog. Verify the resource is healthy and its domains serve the expected content. + +If the resource's server does not use Traefik or Caddy, or is part of Docker Swarm, the **Maintenance Mode** page shows that maintenance mode is not available. + +### Applications with custom container labels + +When you edit an application's container labels manually (read-only labels turned off), maintenance mode uses the labels instead of the domains. Traefik shows the maintenance page for the rule of each router in the labels, and Caddy for each site address in the labels. This also covers wildcard domains and custom router rules. Docker Compose applications always use their domains. ### Customize the maintenance page @@ -47,6 +53,6 @@ Choose **Return the default 503 response** to stop using custom fallback handlin ## Diagnose an unexpected 503 -Check whether **Domains > Maintenance mode** is on before investigating a deployment failure. If maintenance mode is off, check the resource's status, health checks, domain, and listening port. A custom error page changes what visitors see while the underlying routing problem remains. +Check whether the resource's **Maintenance Mode** page shows **On** before investigating a deployment failure. If maintenance mode is off, check the resource's status, health checks, domain, and listening port. A custom error page changes what visitors see while the underlying routing problem remains. Follow [No Available Server (503)](/troubleshoot/applications/no-available-server) to investigate unavailable backends. diff --git a/content/docs/core/networking/proxy/overview.mdx b/content/docs/core/networking/proxy/overview.mdx index 8862baf9a..7b79c6288 100644 --- a/content/docs/core/networking/proxy/overview.mdx +++ b/content/docs/core/networking/proxy/overview.mdx @@ -77,7 +77,7 @@ An invalid proxy configuration can make every application and service on the ser ## Maintenance and fallback responses -Use a resource's **Domains > Maintenance mode** to show a 503 maintenance page while its containers keep running. Under **Servers > [server] > Proxy > Routing behavior**, customize the server's fallback error page or redirect URL. See [Maintenance and error pages](/core/networking/proxy/maintenance-and-error-pages) for scope, setup, and proxy limitations. +Use a resource's **Maintenance Mode** page to show a 503 maintenance page while its containers keep running. Under **Servers > [server] > Proxy > Routing behavior**, customize the server's fallback error page or redirect URL. See [Maintenance and error pages](/core/networking/proxy/maintenance-and-error-pages) for scope, setup, and proxy limitations. ## Switch between Traefik and Caddy diff --git a/content/docs/core/networking/proxy/traefik/tls-certificates.mdx b/content/docs/core/networking/proxy/traefik/tls-certificates.mdx index f2e2f49f5..bfc7a123e 100644 --- a/content/docs/core/networking/proxy/traefik/tls-certificates.mdx +++ b/content/docs/core/networking/proxy/traefik/tls-certificates.mdx @@ -13,6 +13,18 @@ Review the domains covered by a certificate before deleting it. Deleting its ent After a change, Coolify indicates that the proxy needs a restart. Restart the proxy to apply the updated storage. Traefik may need to obtain a replacement certificate for domains that still require one. +## Delete unused certificates + +Traefik renews every certificate in `acme.json`, also when no route uses its domain any more, until you delete the certificate and restart the proxy. + +A certificate shows **Not used** when no route of the proxy and no resource on the server uses one of its domains. Coolify checks the Traefik labels of the containers, the proxy and dynamic configuration files, and the domains of the server's resources, including stopped resources. + +1. Select **Delete unused**. The button shows the number of unused certificates. +2. Review the listed domains and select **Delete Certificates**. +3. Restart the proxy. + +Coolify saves a backup of `acme.json` first, so you can undo the deletion with [Restore ACME storage](#restore-acme-storage). + ## Restore ACME storage Coolify backs up `acme.json` before every change and retains the last 10 backups. On the same page, choose a backup to restore or delete. diff --git a/content/docs/core/networking/proxy/traefik/update.mdx b/content/docs/core/networking/proxy/traefik/update.mdx index 230450c88..dfe24f092 100644 --- a/content/docs/core/networking/proxy/traefik/update.mdx +++ b/content/docs/core/networking/proxy/traefik/update.mdx @@ -32,7 +32,7 @@ In **Configuration file**, find `image` under `services.traefik` and replace its ```yaml services: traefik: - image: traefik:v3.7.14 + image: traefik:v3.7.17 # Keep the rest of your existing configuration. ``` diff --git a/content/docs/core/notifications/channels/email.mdx b/content/docs/core/notifications/channels/email.mdx index fb6a6fe72..81557040a 100644 --- a/content/docs/core/notifications/channels/email.mdx +++ b/content/docs/core/notifications/channels/email.mdx @@ -1,6 +1,6 @@ --- title: Email -description: Configure Coolify email notifications with hosted email, self-hosted instance-wide transactional email, SMTP, or Resend. +description: Configure Coolify email notifications with hosted email, self-hosted instance-wide transactional email, one or more SMTP servers, or Resend. --- import { Cloud, Rocket2, Server, ServerCloud } from 'reicon-react'; @@ -12,7 +12,7 @@ Coolify can send team notifications through a hosted email service, a team-speci Open **Notifications > Email** to configure the channel. -The **Email service > Use system-wide settings** option appears only on self-hosted Coolify. It uses the sender and SMTP or Resend provider configured under [**Settings > Email**](/core/instance-management/instance-settings#sender) for the Coolify instance. +The **Email service > Use system-wide settings** option appears only on self-hosted Coolify. It uses the provider configured under [**Settings > Email**](/core/instance-management/instance-settings#email-delivery) for the Coolify instance. When the instance has a [notification sender](/core/instance-management/instance-settings#notification-sender), team notifications come from that sender. Coolify Cloud shows **Use hosted email service** instead. Cloud users do not configure the instance-wide provider. @@ -25,15 +25,15 @@ The available choices depend on how you use Coolify: | :--- | :--- | :--- | | **Use hosted email service** | Coolify Cloud | No provider credentials. | | **Use system-wide settings** | Self-hosted Coolify | A working email provider under **Settings > Email**. | -| **SMTP server** | Coolify Cloud and self-hosted Coolify | SMTP sender, host, port, encryption, and optional authentication details. | -| **Resend** | Coolify Cloud and self-hosted Coolify | A sender name, sender address, and Resend API key. | +| **SMTP** | Coolify Cloud and self-hosted Coolify | One or more SMTP servers, each with a sender, host, port, encryption, and optional authentication details. | +| **Resend** | Coolify Cloud and self-hosted Coolify | A Resend API key, a sender name, and a sender address. | -A team can use only one email path at a time. The hosted and instance-wide options disable team-specific SMTP and Resend. Enabling team-specific SMTP disables Resend, and enabling Resend disables SMTP. +Only one provider sends the team's email. Under **Email provider**, select **None**, **SMTP**, or **Resend**. When you change **Email service**, Coolify turns off the team's SMTP or Resend provider. After you change back to **Use team email settings**, select the provider again. Before you start, prepare the values required by the option you plan to use: - For **SMTP**, copy the host, port, encryption method, username, and password from your email provider. Confirm that the provider permits the sender address you want to use. -- For **Resend**, verify your sending domain or sender in Resend and create an API key. +- For **Resend**, verify your sending domain in Resend and create an API key. - For **system-wide email**, configure and test the instance provider first. This requires access to the self-hosted instance settings. --- @@ -50,7 +50,7 @@ The dashboard shows the option for your Coolify deployment type. It does not sho ### Configure the instance provider -As an instance administrator, open [**Settings > Email**](/core/instance-management/instance-settings#sender). Enter the shared sender details, configure either SMTP or Resend, enable that provider, and save it. +As an instance administrator, open [**Settings > Email**](/core/instance-management/instance-settings#email-delivery). Select **SMTP** or **Resend** next to **Email delivery**, enter its settings, and save. Optionally, set a [notification sender](/core/instance-management/instance-settings#notification-sender) for team notifications. Use **Send test** on the instance settings page. Continue only after that test arrives. This confirms that the instance-wide provider works before a team tries to reuse it. @@ -61,7 +61,7 @@ Use **Send test** on the instance settings page. Continue only after that test a Open **Notifications > Email** for the team and set **Email service** to **Use system-wide settings**. -The team now uses the instance sender and provider credentials. It does not receive its own copy of those credentials, and team members cannot change them from the Notifications page. +The team now uses the instance provider and sender. It does not receive its own copy of those credentials, and team members cannot change them from the Notifications page. @@ -99,22 +99,26 @@ Choose SMTP or Resend when this team should use its own email provider instead o Enter the connection details supplied by your SMTP provider. 1. Open **Notifications > Email** and set **Email service** to **Use team email settings**. -2. Enter **From name** and a valid **From address**. Both are required. If either is empty, saving fails with an error such as `From Address is required. (and 1 more error)`. -3. Under **SMTP server**, enter the connection details supplied by your email provider: - - | Field | Value | - | :--- | :--- | - | **Host** | SMTP hostname, such as `smtp.example.com`. | - | **Port** | Provider's SMTP port. Common values are `587`, `465`, and `25`; Coolify accepts ports from `1` to `65535`. | - | **Encryption** | `StartTLS`, `TLS/SSL`, or `None`. Port `587` commonly uses StartTLS and port `465` commonly uses TLS/SSL, but follow your provider's instructions. | - | **SMTP username** | Authentication username, when required. | - | **SMTP password** | Authentication password, when required. | - | **Timeout** | Optional send timeout in seconds. | - | **EHLO domain** | Optional fully qualified domain Coolify sends in the SMTP `EHLO` command, such as `coolify.example.com`. Leave it empty to use the system default. | - -4. Check the values against your provider's documentation. A mismatched port and encryption option prevents Coolify from connecting. -5. Select **Save changes** in the **SMTP server** section. -6. Set **SMTP delivery** to **Enabled** and select **Save changes**. Coolify disables Resend when SMTP is enabled. +2. Under **Email provider**, select **SMTP**. The page shows the settings of the server in the **SMTP server** list. The first server is named `Default`. +3. Optionally, select **Add server**, enter a **Name**, and select a **Template** for your provider. A template fills in **Host**, **Port**, and **Encryption**. Templates are available for PostShiba, Amazon SES (us-east-1), Brevo, Gmail, Mailgun, Mailjet, Microsoft 365, Postmark, Proton Mail, Resend, SendGrid, and Zoho Mail. +4. Enter the settings of the server: + + | Group | Field | Value | + | :--- | :--- | :--- | + | **Sender** | **From name** | Name shown in email from this server. Required. | + | | **From address** | Sender address of this server. It must be on a domain that this server can send from. Required. | + | **Connection** | **Host** | SMTP hostname, such as `smtp.example.com`. Required. Coolify [checks the host](#smtp-host-checks). | + | | **Port** | Provider's SMTP port. Common values are `587`, `465`, and `25`. Required. | + | | **Encryption** | **StartTLS**, **TLS / SSL**, or **None**. Port `587` commonly uses StartTLS and port `465` commonly uses TLS / SSL, but follow your provider's instructions. | + | **Authentication** | **Username** | SMTP username. Leave it empty only for a relay that does not need a login. Required when the host is the host of a template. | + | | **Password** | SMTP password. Required when you enter a username. | + | **Advanced** | **Timeout** | Optional maximum delivery time in seconds. | + | | **EHLO domain** | Optional fully qualified domain Coolify sends in the SMTP `EHLO` command, such as `coolify.example.com`. Leave it empty to use the system default. | + +5. Check the values against your provider's documentation. A mismatched port and encryption option prevents Coolify from connecting. +6. Select **Save changes**. Coolify turns on SMTP and turns off Resend. Until you save complete settings, the page shows **Not active yet**. + +If a required field is empty, saving fails with an error such as `From Address is required.` Choose **None** only when your email provider explicitly requires it and the connection stays on a trusted network. Prefer an encrypted option supported by the provider. @@ -123,20 +127,52 @@ Choose **None** only when your email provider explicitly requires it and the con -Create a Resend API key and use a sender address that Resend has verified. +Create a Resend API key and use a sender address on a domain that Resend has verified. 1. Create an API key in the [Resend dashboard](https://resend.com/api-keys). -2. Verify the domain or sender address that Coolify will use in Resend. +2. Verify the domain that Coolify will send from in Resend. 3. Open **Notifications > Email** and set **Email service** to **Use team email settings**. -4. Enter **From name** and the verified **From address**. Resend also requires both fields. -5. Under **Resend**, enter the **API key** and select **Save changes**. -6. Set **Resend delivery** to **Enabled** and select **Save changes**. Coolify disables SMTP when Resend is enabled. +4. Under **Email provider**, select **Resend**. +5. Enter the **Resend API key**, the **From name**, and the **From address**. All three fields are required. The address must be on a domain verified in Resend. +6. Select **Save changes**. Coolify turns on Resend and turns off SMTP. + +Resend has its own sender. It does not use the sender of the SMTP servers. With the API, set it with `resend_from_name` and `resend_from_address` in a `PATCH` request to `/api/v1/notifications/email`. When you upgrade from a version before v4.7.0, Coolify copies the old shared sender into these fields. --- +## Manage more than one SMTP server + +A team can save more than one SMTP server, each with its own sender. Coolify sends email through the server that the **SMTP server** list shows. + +- **Add a server:** Select **Add server**, enter a **Name**, optionally select a **Template**, and select **Add server**. Enter the settings, then select **Save changes**. The previous server stays in the list. Select **Cancel** to discard the new server. +- **Switch servers:** Select another server in the **SMTP server** list. Coolify saves the change immediately. +- **Rename a server:** Select the edit icon next to the list, enter the new **Name**, and select **Save**. +- **Delete a server:** Select the delete icon next to the list. Coolify then uses the next server in the list. You cannot delete the only server. To stop using SMTP, select another provider. + +--- + +## SMTP host checks + +Coolify checks the **Host** of a team SMTP server when you save a new host and again before each email. It connects only to the address that it checked, so a later DNS change cannot send the connection to another address. + +| Host | Self-hosted Coolify | Coolify Cloud | +| :--- | :--- | :--- | +| Public address | Accepted | Accepted | +| Private network address, such as `10.0.0.0/8` or `192.168.0.0/16`, and Docker service names | Accepted | Refused | +| Loopback address, such as `localhost` or `127.0.0.1` | Refused, unless an instance administrator allows it | Refused | +| Link-local address, such as `169.254.0.0/16` (cloud metadata) | Always refused | Always refused | + +To allow a refused internal host on a self-hosted instance, an instance administrator adds it to [**Allowed internal targets**](/core/instance-management/instance-settings#allowed-internal-targets). A loopback host also needs **Localhost targets** set to **Allowed**. + +When Coolify refuses a host, the error explains why, for example `The SMTP host points to a local or private address that is not allowed.` For an instance administrator, the error links to the allowed internal targets setting. If the host does not resolve, the error is `The SMTP host could not be resolved.` + +These checks apply to the team SMTP servers. The instance email settings under **Settings > Email** do not use them. + +--- + ## Choose events and verify delivery Under **Notification events**, select the events to send by email. See [Notification events](/core/notifications/events) for the trigger behind each setting. @@ -174,9 +210,10 @@ To change the setting with the API, send `deployment_commit_details_email_notifi If the test email does not arrive: -1. Confirm that the intended provider is enabled. SMTP, Resend, and the hosted or system-wide option are mutually exclusive. -2. For SMTP, compare the host, port, and encryption method with the provider's current settings. Also confirm that the Coolify server can make outbound connections on that port. -3. Check whether the provider requires the **From address** or its domain to be verified. -4. Check the provider's delivery or activity logs. An accepted request can still be rejected later because of sender policy or recipient filtering. -5. Check the recipient's spam or junk folder. -6. When using the self-hosted system-wide provider, send a test from **Settings > Email**. If that test also fails, fix the instance provider before troubleshooting the team channel. +1. Confirm that **Email service** and **Email provider** show the provider you want, and that the page does not show **Not active yet**. **Send test** is available only after you save a provider. +2. For SMTP, confirm that the **SMTP server** list shows the server you want. Compare its host, port, and encryption method with the provider's current settings. Also confirm that the Coolify server can make outbound connections on that port. +3. If Coolify refuses the SMTP host, read the error and see [SMTP host checks](#smtp-host-checks). +4. Check whether the provider requires the **From address** or its domain to be verified. +5. Check the provider's delivery or activity logs. An accepted request can still be rejected later because of sender policy or recipient filtering. +6. Check the recipient's spam or junk folder. +7. When using the self-hosted system-wide provider, send a test from **Settings > Email**. If that test also fails, fix the instance provider before troubleshooting the team channel. diff --git a/content/docs/core/notifications/channels/slack-mattermost.mdx b/content/docs/core/notifications/channels/slack-mattermost.mdx index dfd6198b6..49296b87f 100644 --- a/content/docs/core/notifications/channels/slack-mattermost.mdx +++ b/content/docs/core/notifications/channels/slack-mattermost.mdx @@ -111,4 +111,5 @@ If the test does not arrive: 3. If the app or webhook was reinstalled or recreated, copy the new URL into Coolify and save it. 4. In Slack, confirm that the app remains authorized for the workspace and channel. 5. In Mattermost, confirm that incoming webhooks remain enabled in the server's integration settings. -6. Send another test before enabling production events. +6. If Coolify refuses the URL of a self-hosted Mattermost server on a private network or with a `.local` or `.internal` hostname, ask an instance administrator to add the host to **Allowed internal targets**. See the [endpoint requirements](/core/notifications/channels/webhook/setup#endpoint-requirements). +7. Send another test before enabling production events. diff --git a/content/docs/core/notifications/channels/telegram.mdx b/content/docs/core/notifications/channels/telegram.mdx index 21748832b..3b73c3e1c 100644 --- a/content/docs/core/notifications/channels/telegram.mdx +++ b/content/docs/core/notifications/channels/telegram.mdx @@ -118,9 +118,9 @@ Select **Send test** and confirm that it arrives in the configured chat. The gen -Custom thread IDs currently apply to deployment success and failure, application and container stopped or restarted events, backup success and failure, scheduled tasks, Docker cleanup, disk usage, server reachability, and server patching. +Each event under **Notification events** can use a custom thread ID. Backup S3 upload warnings and missing backup alerts use the thread ID of **Backup failure**. -Restart-limit alerts, backup S3 upload warnings, Traefik proxy outdated alerts, and test notifications use the main chat without a custom thread ID. +These notifications use the main chat without a custom thread ID: SSH host key changes, "works again" notifications of scheduled jobs, API token alerts, automatic update and other general messages, and test notifications. --- diff --git a/content/docs/core/notifications/channels/webhook/payload-reference.mdx b/content/docs/core/notifications/channels/webhook/payload-reference.mdx index ef2b313fd..98ffc8db0 100644 --- a/content/docs/core/notifications/channels/webhook/payload-reference.mdx +++ b/content/docs/core/notifications/channels/webhook/payload-reference.mdx @@ -97,22 +97,27 @@ Same structure as `deployment_success`, with `"success": false`. PR preview fiel -Sent when an application stops unexpectedly (not via a manual stop). +Sent when an application, preview, service, or database stops unexpectedly and is still stopped after 2 minutes. A stop from Coolify does not send this event. See [Resource status changes](/core/notifications/events#resource-status-changes). ```json { "success": false, "event": "status_changed", - "message": "Application stopped", + "message": "Resource stopped", + "status": "exited", "application_name": "my-app", "application_uuid": "...", + "resource_name": "my-app", + "resource_uuid": "...", + "url": "...", "project": "...", "environment": "...", - "fqdn": "...", - "url": "..." + "fqdn": "..." } ``` +`resource_name` and `resource_uuid` identify the stopped resource of any type. `application_name` and `application_uuid` contain the same values, for existing receivers. + @@ -212,7 +217,7 @@ Sent when the local backup succeeds but uploading to S3 fails. ## Scheduled tasks - + Sent when a scheduled task completes successfully. @@ -233,7 +238,7 @@ Sent when a scheduled task completes successfully. -Sent when a scheduled task fails. +Sent on the first failure of a scheduled task, then at most once a day while it keeps failing. See [Repeated failures](/core/notifications/events#repeated-failures). ```json { @@ -243,6 +248,7 @@ Sent when a scheduled task fails. "task_name": "...", "task_uuid": "...", "output": "...", + "consecutive_failures": 3, "application_uuid": "...", "url": "..." } @@ -255,6 +261,27 @@ Sent when a scheduled task fails. + + + +Sent once when Coolify disables a scheduled task after 10 failed runs in a row and the first of these failures is more than 24 hours old. This event uses the **Scheduled task failure** selection. + +```json +{ + "success": false, + "event": "task_disabled", + "message": "Scheduled task disabled", + "task_name": "...", + "task_uuid": "...", + "output": "...", + "consecutive_failures": 10, + "application_uuid": "...", + "url": "..." +} +``` + +The conditional fields are the same as for `task_failed`. + @@ -301,9 +328,36 @@ Sent when a Docker cleanup job fails. --- +## Recovery events + +Sent once on the first successful run after Coolify sent a failure notification for a scheduled job. A recovery event uses the selection of the failure event, for example **Backup failure**. + +| Event | Job | Failure selection | Extra fields | +|-------|-----|-------------------|--------------| +| `task_recovered` | Scheduled task | **Scheduled task failure** | `task_name`, `task_uuid` | +| `backup_recovered` | Database backup | **Backup failure** | `database_name`, `database_uuid`, `backup_uuid` | +| `volume_backup_recovered` | Storage backup | **Backup failure** | `backup_uuid` | +| `docker_cleanup_recovered` | Docker cleanup | **Docker cleanup failure** | `server_name`, `server_uuid` | + +```json +{ + "success": true, + "event": "backup_recovered", + "message": "Database backup for my-database works again.", + "database_name": "my-database", + "database_uuid": "...", + "backup_uuid": "...", + "url": "..." +} +``` + +`url` is only present when available. + +--- + ## Server events - + Sent when a previously unreachable server becomes reachable again. @@ -335,6 +389,22 @@ Sent when Coolify cannot reach a server. } ``` + + + +Sent when the SSH host key of a server does not match the key that Coolify trusts. This event uses the **Server unreachable** selection. `url` opens the SSH host key section of the server's **Security** page. + +```json +{ + "success": false, + "event": "server_ssh_host_key_changed", + "message": "SSH host key changed", + "server_name": "...", + "server_uuid": "...", + "url": "..." +} +``` + @@ -434,16 +504,16 @@ Sent when one or more servers are running an outdated version of the Traefik pro ## Container events - - + + -Sent when a container stops unexpectedly (not via a manual stop action). +Sent when Coolify restarts a container automatically, for example the proxy. This event uses the **Resource status changes** selection. The same container sends at most one event an hour. ```json { - "success": false, - "event": "container_stopped", - "message": "Resource stopped unexpectedly", + "success": true, + "event": "container_restarted", + "message": "Resource restarted automatically", "container_name": "...", "server_name": "...", "server_uuid": "...", @@ -451,29 +521,126 @@ Sent when a container stops unexpectedly (not via a manual stop action). } ``` + + + +`url` is only present when available. + + + - + + +--- -Sent when a container is automatically restarted by Coolify. +## Image vulnerabilities + +These events use the **Resources > Image vulnerabilities** selection. They do not contain vulnerability IDs. + + + + +Sent right after a scan finds new problems in a resource that attackers are using or are likely to use. ```json { - "success": true, - "event": "container_restarted", - "message": "Resource restarted automatically", - "container_name": "...", - "server_name": "...", - "server_uuid": "...", + "success": false, + "event": "image_exploited_problem", + "message": "Update now", + "resource_name": "api", + "resource_uuid": "...", + "url": "...", + "status": "update_now", + "text": "api: problems that attackers are using. Update to 1.28.", + "action": "Update to 1.28." +} +``` + +| Field | Description | +|-------|-------------| +| `status` | `update_now` when an update fixes the problems, `check_needed` when Coolify could not check for a fixed version yet, or `no_fix` when no fixed version exists yet. | +| `message` | The status as text: `Update now`, `Check needed`, or `No fix yet`. | +| `action` | The update that fixes the most problems, or `null`. | + + + + +The daily security digest of the team. Coolify sends it only when something changed. + +```json +{ + "success": false, + "event": "image_vulnerabilities_digest", + "message": "Daily security digest", + "url": "...", + "resources": [ + { + "name": "...", + "uuid": "...", + "url": "...", + "status": "update_available", + "action": "..." + } + ], + "ignores_ending": false, + "servers_failing": [ + { + "name": "...", + "url": "..." + } + ] +} +``` + +| Field | Description | +|-------|-------------| +| `resources` | Resources with a new status or a new fixing version. `status` is the security status of the resource, for example `update_now`, `update_available`, or `check_needed`. | +| `ignores_ending` | `true` when ignored vulnerabilities have an ignore that ends within 7 days. | +| `servers_failing` | Servers whose scans failed 2 days in a row. | + + + + +--- + +## Always-sent events + +These events have no event setting. Coolify sends them to every enabled webhook. See [Notifications that are always sent](/core/notifications/events#notifications-that-are-always-sent). + + + + +Sent when an API token of the team reaches the limit of failed requests. Coolify sends it at most once a day for each token. + +```json +{ + "success": false, + "event": "api_token_failing", + "message": "API token 'ci' sent 30 failed requests in one minute. Coolify now answers its requests with 429 (Too Many Requests) until the failures stop.", + "token_name": "ci", + "failed_requests": 30, + "last_request": "GET /api/v1/applications → 403", "url": "..." } ``` +`failed_requests` is the configured limit. `url` opens the API tokens page. - + + -`url` is only present when available. +A general message, for example about an automatic update of Coolify to the root team, or that Coolify [turned off a notification channel](/core/notifications/overview#disabled-channels). - +```json +{ + "success": true, + "event": "general", + "message": "Automatic update finished: Coolify is now on 4.7.1.", + "url": "..." +} +``` + +`success` is `false` for failure messages, for example `Automatic update failed: ...`. `url` is the URL of the Coolify instance. diff --git a/content/docs/core/notifications/channels/webhook/setup.mdx b/content/docs/core/notifications/channels/webhook/setup.mdx index 91d22d601..43f3d8316 100644 --- a/content/docs/core/notifications/channels/webhook/setup.mdx +++ b/content/docs/core/notifications/channels/webhook/setup.mdx @@ -68,24 +68,39 @@ A received test confirms that Coolify can reach the current URL and submit a req ## Endpoint requirements -Coolify accepts URLs with the `http` or `https` scheme. The URL must contain a valid host. +Coolify accepts URLs with the `http` or `https` scheme. The URL must contain a valid host without a trailing dot. -For server-side request protection, Coolify rejects: +For server-side request protection, Coolify resolves the host and checks every address when you save the URL and again before each delivery. It connects only to the checked address and does not follow redirects. Use the final URL of the endpoint. -- `localhost`, `0.0.0.0`, and IPv6 loopback addresses. -- IPv4 addresses in `127.0.0.0/8`. -- Link-local IPv4 addresses in `169.254.0.0/16`, including common cloud metadata endpoints. -- Hostnames ending in `.internal`. +| Target | Result | +| :--- | :--- | +| Public address | Accepted. | +| Private network address, such as `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`, or `fc00::/7` | Refused, unless the host or address is in **Allowed internal targets**. | +| Hostname that ends in `.local`, `.internal`, or `.cluster.local` | Refused, unless the hostname is in **Allowed internal targets**. | +| Loopback address, such as `localhost`, `127.0.0.0/8`, or `::1` | Refused, unless **Localhost targets** is **Allowed** and the host or address is in **Allowed internal targets**. | +| Link-local address, such as `169.254.0.0/16` or `fe80::/10`, including cloud metadata endpoints | Always refused. | +| Other reserved or special-use address, such as `0.0.0.0` or `100.64.0.0/10` | Refused, unless the address or its range is in **Allowed internal targets**. | -Private-network IP addresses are accepted, but the Coolify instance must still have a network route to the endpoint. +On a self-hosted instance, an instance administrator sets both options under [**Settings > Advanced > Outbound endpoints**](/core/instance-management/instance-settings#allowed-internal-targets). When Coolify refuses a URL, the error says that the URL points to a local or private address that is not allowed, and links to that setting. + +The same rules apply to the Discord and Slack webhook URLs. --- ## Delivery behavior -Coolify queues webhook deliveries and sends the JSON request body with Laravel's HTTP client. A delivery job allows up to five total attempts, with a 10-second backoff after an unhandled exception. +Coolify queues webhook deliveries and sends the JSON request body with Laravel's HTTP client. A delivery job allows up to five total attempts, with a 10-second backoff between attempts. + +Coolify handles the response status of the endpoint as follows: + +| Response | What Coolify does | +| :--- | :--- | +| `2xx` | The delivery succeeded. | +| `429` or `5xx` | Coolify tries the delivery again. | +| `401`, `403`, `404`, or `410` | Coolify counts a failed delivery and does not try again. After 3 failed deliveries in a row, Coolify [disables the channel](/core/notifications/overview#disabled-channels). | +| Other status, including redirects | Coolify logs a warning and does not try again. | -Coolify currently does not fail the job only because the endpoint returns a non-2xx HTTP status. Return a 2xx response when your application accepts the event, and use the receiver's logs or monitoring to detect rejected requests. +If the URL fails the endpoint checks at delivery time, Coolify does not send the request and logs a warning. Your endpoint should respond promptly and handle duplicate event payloads safely. Coolify does not add a signature or shared-secret header, so use an unguessable HTTPS URL or an authenticated gateway when the endpoint is exposed to the internet. @@ -98,10 +113,12 @@ See the [webhook payload reference](/core/notifications/channels/webhook/payload If the test does not reach your endpoint: 1. Confirm that the URL starts with `http://` or `https://` and includes the complete path expected by the receiver. -2. Confirm that the URL is not in one of the blocked loopback, link-local, or `.internal` ranges above. +2. Confirm that the URL is not refused by the [endpoint requirements](#endpoint-requirements). For a private or internal endpoint, ask an instance administrator to add it to **Allowed internal targets**. 3. From the Coolify server's network, confirm that DNS resolves the hostname and that firewalls allow the connection. 4. Check the receiving service's access and application logs. A request can reach a reverse proxy but fail before the application records it. 5. Confirm that the endpoint accepts `POST` with a JSON body and responds promptly. 6. If a private IP is used, confirm that the Coolify instance has a route to that private network. +7. If the endpoint answers with a redirect, enter the final URL. Coolify does not follow redirects. +8. If the channel turned off by itself, fix the URL and select **Enable** again. See [Disabled channels](/core/notifications/overview#disabled-channels). If the test succeeds but a production event does not arrive, confirm that the event is enabled under **Notification events** and compare the receiver's parser with the [payload for that event](/core/notifications/channels/webhook/payload-reference). diff --git a/content/docs/core/notifications/events.mdx b/content/docs/core/notifications/events.mdx index e11500d03..526f66dee 100644 --- a/content/docs/core/notifications/events.mdx +++ b/content/docs/core/notifications/events.mdx @@ -1,6 +1,6 @@ --- title: Notification Events -description: Choose which deployment, backup, scheduled task, container, and server events Coolify sends through each notification channel. +description: Choose which deployment, resource, backup, scheduled task, and server events Coolify sends through each notification channel. --- # Notification events @@ -13,12 +13,39 @@ Changing an event for one channel does not change the other channels. | Setting | When Coolify sends the notification | | :--- | :--- | -| **Deployment Success** | An application deployment completes successfully. | -| **Deployment Failure** | An application deployment fails. | -| **Resource status changes** | An application or resource container stops unexpectedly or restarts automatically. | +| **Deployment success** | An application deployment completes successfully. | +| **Deployment failure** | An application deployment fails. | + +Pull request preview deployments use the same **Deployment success** and **Deployment failure** selections as regular application deployments. + +--- + +## Resources + +| Setting | When Coolify sends the notification | +| :--- | :--- | +| **Resource status changes** | An application, preview, service, or database stops unexpectedly, for example after a crash or `docker kill`, or Coolify restarts a container automatically. | | **Restart limit reached** | A resource reaches its automatic restart limit and is stopped. | +| **Image vulnerabilities** | [Image scanning](#image-vulnerabilities) finds security problems in the images of your resources. | + +### Resource status changes + +When a resource stops unexpectedly, Coolify waits 2 minutes and checks the resource again. It sends the notification only when the resource is still stopped. A resource that Docker restarted or a deployment replaced in that time sends no notification. -Pull request preview deployments use the same **Deployment Success** and **Deployment Failure** selections as regular application deployments. +- A stop, restart, or redeploy that you start from Coolify sends no notification. +- The same resource sends at most one notification in 15 minutes. +- An automatic restart of the same container, for example the proxy, sends at most one notification an hour. + +### Image vulnerabilities + +When you turn on container image vulnerability scanning, Coolify sends two kinds of notifications through this setting: + +- **An alert right after a scan** that finds new problems that attackers are using or are likely to use. The alert names the resource and the update that fixes the problems, or tells you that no fixed version exists yet. +- **A daily security digest** when something changed: resources with new problems that an update fixes, resources that need a check, ignored vulnerabilities whose ignore ends within 7 days, and servers whose scans failed 2 days in a row. + +Chat and webhook messages do not contain vulnerability IDs. The email lists the problems, at most 10. + +By default, **Image vulnerabilities** is on for email and off for the other channels. --- @@ -26,21 +53,27 @@ Pull request preview deployments use the same **Deployment Success** and **Deplo | Setting | When Coolify sends the notification | | :--- | :--- | -| **Backup Success** | A scheduled database backup completes successfully. | -| **Backup Failure** | A scheduled database backup fails, or the local backup succeeds but its S3 upload fails. | +| **Backup success** | A scheduled database backup or [storage backup](/core/persistent-storage/storage-mounts/backups) completes successfully. | +| **Backup failure** | A scheduled database backup or storage backup fails, the local backup succeeds but its S3 upload fails, an enabled backup schedule has no recent run, or a storage backup recovery fails. | - -When Coolify creates the local backup but cannot upload its S3 copy, it sends a warning through channels that have **Backup Failure** selected. + +When Coolify creates the local backup but cannot upload its S3 copy, it sends a warning through channels that have **Backup failure** selected. While the S3 upload keeps failing, Coolify sends this warning at most once a day. +See [Repeated failures](#repeated-failures) for how often Coolify sends backup failures. + --- ## Scheduled tasks | Setting | When Coolify sends the notification | | :--- | :--- | -| **Scheduled Task Success** | A scheduled application or service task completes successfully. | -| **Scheduled Task Failure** | A scheduled application or service task fails. | +| **Scheduled task success** | A scheduled application or service task completes successfully. | +| **Scheduled task failure** | A scheduled application or service task fails, or Coolify disables the task because it keeps failing. | + +Coolify disables a scheduled task automatically after 10 failed runs in a row when the first of these failures is more than 24 hours old. It sends one notification through **Scheduled task failure**, and the task page shows the reason. Enable the task again to clear the reason. + +A task that skips a run because the application or service has no running container sends no notification. The skipped run does not count toward the automatic disable. --- @@ -48,13 +81,48 @@ When Coolify creates the local backup but cannot upload its S3 copy, it sends a | Setting | When Coolify sends the notification | | :--- | :--- | -| **Docker Cleanup Success** | An automatic Docker cleanup job completes successfully. | -| **Docker Cleanup Failure** | An automatic Docker cleanup job fails. | +| **Docker cleanup success** | An automatic Docker cleanup job completes successfully. | +| **Docker cleanup failure** | An automatic Docker cleanup job fails. | | **Disk usage warning** (**Server disk usage** on Email) | Server disk usage exceeds the threshold configured for that server. | -| **Server Reachable** | A previously unreachable server becomes reachable again. | -| **Server Unreachable** | Coolify cannot reach a server after two consecutive checks. | -| **Server Patching** | Coolify finds operating system updates during a patch check, or the patch check fails. | -| **Traefik Proxy Outdated** | Coolify detects one or more servers running an outdated Traefik version. | +| **Server reachable** | A previously unreachable server becomes reachable again. | +| **Server unreachable** | Coolify cannot reach a server after two consecutive checks, or the SSH host key of a server changed. | +| **Server patching** | Coolify finds operating system updates during a patch check, or the patch check fails. | +| **Traefik proxy outdated** | Coolify detects a server that runs an outdated Traefik version, also when a newer patch version of the running branch is available. Coolify sends one notification for each new version, not one for each check. | + + +Coolify saves the SSH host key of a server on the first connection. When the server shows a different key later, Coolify notifies the channels that have **Server unreachable** selected. The message links to the **Security** page of the server, where you compare the new key and trust it or reset it. Coolify sends this notification at most once an hour for each server. See [When the host key changes](/core/infrastructure/servers/security#when-the-host-key-changes). + + +High-disk alerts default to a 24-hour repeat interval per server; configure the interval under the server’s **Advanced** settings. + +--- + +## Repeated failures + +When a scheduled job keeps failing, Coolify does not send a notification for each failed run. This applies to scheduled tasks, database backups, storage backups, and Docker cleanup. + +1. Coolify sends a notification for the first failure. +2. While the job keeps failing, Coolify sends at most one failure notification a day. +3. The first successful run after a failure notification sends one "works again" notification. It goes to the channels that have the failure event selected, for example **Backup failure**. + +Coolify never disables backups or Docker cleanup automatically, so they start again by themselves after an outage. Only scheduled tasks can be [disabled automatically](#scheduled-tasks). + +--- + +## Notifications that are always sent + +Some notifications do not have an event setting. Coolify sends them through every enabled channel of the team: + +| Notification | When Coolify sends it | +| :--- | :--- | +| API token expires soon | An API token of the team expires within 7 days. A token that lives 7 days or less gets the warning 24 hours before it expires. | +| API token sends many failed requests | An API token reached the limit of failed requests, and Coolify answers its requests with `429` until the failures stop. Coolify sends this at most once a day for each token. | +| SSL certificates renewed | Coolify renewed SSL certificates that it manages, and the resources that use them need a manual redeployment. | + +These notifications go to every enabled channel except email: + +- Automatic updates: the root team gets a message when an automatic update of Coolify starts, fails, or finishes. A failure message contains the reason and a link to the update settings. +- The message that Coolify [turned off a channel](/core/notifications/overview#disabled-channels) after failed deliveries. --- @@ -68,5 +136,3 @@ After you configure a channel, select its test action: A test confirms that the current channel credentials can deliver a message. It does not trigger or verify every selected event. For webhook event identifiers and fields, see the [webhook payload reference](/core/notifications/channels/webhook/payload-reference). - -High-disk alerts default to a 24-hour repeat interval per server; configure the interval under the server’s **Advanced** settings. A proxy stuck in a restart loop sends at most one container-restarted notification per hour. diff --git a/content/docs/core/notifications/overview.mdx b/content/docs/core/notifications/overview.mdx index 718df78dd..cbe307784 100644 --- a/content/docs/core/notifications/overview.mdx +++ b/content/docs/core/notifications/overview.mdx @@ -48,6 +48,19 @@ If the test does not arrive, keep the channel enabled while you check its creden --- +## Disabled channels + +Coolify turns off a channel after 3 failed deliveries in a row that come from the channel settings. Examples are a rejected token, API key, or SMTP password, a webhook URL that does not exist anymore, or a refused SMTP host. Rate limits, server errors, and connection problems do not count. Coolify tries these deliveries again. + +When Coolify turns off a channel: + +- The team admins and owners get an email through the instance email settings, when the instance can send email. +- The other enabled channels of the team, except email, get a message with the reason. + +Fix the channel settings, then turn the channel on again. A successful delivery or a change to the channel settings sets the count back to zero. Test notifications never count. + +--- + ## What to read next - [Notification events](/core/notifications/events) explains every selectable event and its trigger. diff --git a/content/docs/core/observability/log-drains/custom-fluent-bit.mdx b/content/docs/core/observability/log-drains/custom-fluent-bit.mdx index 102564ef7..18a55c117 100644 --- a/content/docs/core/observability/log-drains/custom-fluent-bit.mdx +++ b/content/docs/core/observability/log-drains/custom-fluent-bit.mdx @@ -8,6 +8,7 @@ import { Box2, Globe3, Layers, + Refresh, Server, Settings, Warning22, @@ -19,13 +20,13 @@ Use **Custom Fluent Bit** when the built-in Axiom and New Relic destinations do -Provide a complete Fluent Bit 2.0 configuration that accepts the `forward` protocol on port `24224` and sends records to your destination. Coolify writes the configuration, starts `coolify-log-drain`, and connects opted-in resource containers to it. +Provide a complete Fluent Bit 5.1 configuration that accepts the `forward` protocol on port `24224` and sends records to your destination. Coolify writes the configuration, starts `coolify-log-drain`, and connects opted-in resource containers to it. -Coolify only checks that **Fluent Bit configuration** is not empty. An invalid directive, unavailable plugin, or rejected credential can leave `coolify-log-drain` stopped or unable to deliver logs. +Coolify blocks some plugins and directives, but it does not check the Fluent Bit syntax. An invalid directive, unavailable plugin, or rejected credential can leave `coolify-log-drain` stopped or unable to deliver logs. @@ -70,14 +71,14 @@ Treat the configuration as sensitive when it contains credentials. Coolify does steps={[ 'Save the main configuration', 'Write the server files', - 'Start Fluent Bit 2.0', + 'Start Fluent Bit 5.1', 'Receive resource records', 'Send records to the destination', ]} list={[ <>Coolify saves Fluent Bit configuration and the optional Parser configuration., 'It writes the managed files under `/data/coolify/log-drains` on the resource server.', - 'The `coolify-log-drain` container starts from `cr.fluentbit.io/fluent/fluent-bit:2.0` with `-c /fluent-bit.conf`.', + 'The `coolify-log-drain` container starts from `cr.fluentbit.io/fluent/fluent-bit:5.1` with `-c /fluent-bit.conf`.', 'Opted-in resources send Docker log records to `tcp://127.0.0.1:24224` through the Fluentd driver.', 'Your filters, parsers, and outputs transform and deliver those records.', ]} @@ -94,6 +95,35 @@ By default, Coolify writes these files on the resource server: The container mounts the two configuration files at `/fluent-bit.conf` and `/parsers.conf`. +Coolify writes these files again from your settings each time it starts `coolify-log-drain`. Do not edit the files on the server, because Coolify replaces your changes. Change the configuration in **Log Drains** instead. + +--- + +## Fluent Bit version and automatic updates + +Coolify runs custom drains with the same Fluent Bit image as the built-in destinations. The current image is `cr.fluentbit.io/fluent/fluent-bit:5.1`. + + + +When a Coolify upgrade changes the log drain image or files, the next server check starts `coolify-log-drain` again with the new image. You do not have to disable and enable the drain. + + + +Coolify versions before Fluent Bit 5.1 used `cr.fluentbit.io/fluent/fluent-bit:2.0`. Fluent Bit 2.0 does not get security fixes. For example, the fixes for the Fluent Bit vulnerabilities in [VU#761751](https://kb.cert.org/vuls/id/761751) are only in Fluent Bit 4.2.0 and later. Most configurations work on 5.1 without changes. Before you upgrade Coolify, do these checks: + +1. If your configuration sends records to a **Fluentd** server with the `forward` output, add `retain_metadata_in_forward_mode false` to that output. From Fluent Bit 5.0.4, this option is `true` by default, and Fluentd rejects these records. +2. If you changed the files in `/data/coolify/log-drains` on the server by hand, copy your changes into **Fluent Bit configuration** and **Parser configuration**. The automatic update replaces the files on the server. +3. Read the [Fluent Bit upgrade notes](https://docs.fluentbit.io/manual/installation/upgrade-notes) for the plugins that you use. + +If Coolify blocks your configuration, the update does not start. The running `coolify-log-drain` container continues to run with the old image until you fix the configuration. + +After the update, make sure that the drain runs: + +```sh +docker inspect -f '{{.Config.Image}}' coolify-log-drain +docker logs --tail 100 coolify-log-drain +``` + --- ## Write the main configuration @@ -126,7 +156,17 @@ This skeleton shows the required input and an example HTTPS output. Replace the The example is not a complete configuration for a specific provider. Add the provider's required header, token, payload, retry, and TLS options before enabling the drain. -Use only input, filter, parser, and output plugins included in the Fluent Bit 2.0 image used by Coolify. +Use only input, filter, parser, and output plugins included in the Fluent Bit 5.1 image used by Coolify. + +Coolify does not accept these plugins and directives: + +| Not accepted | Where | +| :--- | :--- | +| `lua`, `wasm`, `exec`, `exec_wasi`, and `file` plugins | **Fluent Bit configuration** | +| `@` directives other than `@SET`, such as `@INCLUDE`, and the `plugins_file` key | **Fluent Bit configuration** | +| Sections other than `[SERVICE]`, `[INPUT]`, `[FILTER]`, `[OUTPUT]`, `[PARSER]`, and `[MULTILINE_PARSER]` | **Fluent Bit configuration** | +| `@` directives | **Parser configuration** | +| Sections other than `[PARSER]` and `[MULTILINE_PARSER]` | **Parser configuration** | --- @@ -235,7 +275,8 @@ The configuration fields are read-only while the drain is enabled. - Confirm the main configuration has a `forward` input listening on port `24224`. - Read `docker logs --tail 100 coolify-log-drain` for syntax, plugin, DNS, TLS, and authentication errors. - Confirm every parser referenced by the main configuration exists in **Parser configuration**. -- Confirm the selected plugins and options are available in Fluent Bit 2.0. +- Confirm the selected plugins and options are available in Fluent Bit 5.1. +- If the drain stopped after a Coolify upgrade, read [Fluent Bit version and automatic updates](#fluent-bit-version-and-automatic-updates). - Confirm the resource's **Log drain** setting is enabled and that the resource was restarted afterward. - Confirm the resource server can reach the configured output host and port. diff --git a/content/docs/core/persistent-storage/storage-mounts/backups.mdx b/content/docs/core/persistent-storage/storage-mounts/backups.mdx index 2f36d915b..fa9f49d47 100644 --- a/content/docs/core/persistent-storage/storage-mounts/backups.mdx +++ b/content/docs/core/persistent-storage/storage-mounts/backups.mdx @@ -1,11 +1,11 @@ --- title: Backup -description: Schedule local and S3 backups for application volume and directory mounts, set retention, and verify each execution. +description: Schedule local and off-server backups for application volume and directory mounts, set retention, and verify each execution. --- # Back up storage mounts -Coolify can create scheduled file-level archives of eligible storage mounts attached to an application. Coolify first creates each compressed `.tar.gz` archive on the application's deployment server. It can then send a copy to S3-compatible storage and, if configured, remove the local archive after every selected destination has a successful copy. +Coolify can create scheduled file-level archives of eligible storage mounts attached to an application. Coolify first creates each compressed `.tar.gz` archive on the application's deployment server. It can then send a copy to S3-compatible, SFTP, FTPS, or WebDAV storage and, if configured, remove the local archive after every selected destination has a successful copy. If the application changes files while Coolify creates the archive, the backup may be inconsistent or corrupted. This is especially important for databases. Use an application-aware backup when one is available, or stop application writes during the archive step. @@ -55,13 +55,15 @@ Every schedule keeps a local archive on the deployment server by default. Local To create an off-server copy: -1. Configure and validate an [S3-compatible storage destination](/core/s3-storage/overview) for the current team. +1. Configure and validate an [S3-compatible storage destination](/core/s3-storage/overview), or an [SFTP, FTPS, or WebDAV storage](/core/s3-storage/sftp-ftps-webdav), for the current team. 2. Open the storage backup schedule and select **S3** to open **S3 storage**. 3. Select one or more destinations in **S3 storages**, then select **Enable S3**. 4. Select **Save changes**. Set **Local copy** to **Delete after S3 upload** when you want to retain only the remote copies. Each backup is uploaded to every selected destination. Coolify deletes the local archive only after all uploads succeed. If any upload fails, the execution shows **S3 warning** and Coolify keeps the local archive. +The **S3 storages** list also shows the SFTP, FTPS, and WebDAV storages of the team. A member whose access is limited to some projects or resources cannot add a new storage to a backup schedule. This needs write access on the whole team, also through the API. + ## Set retention limits Under **Retention**, local and S3 archives each have three independent limits: @@ -82,7 +84,9 @@ Open **Executions** and wait for the run to finish. A usable result shows **Succ - **Failed** means the archive was not completed. Read the execution message before retrying. - **Needs attention** means recovery requires action. Read the reason, correct it, and use the retry button. Failed recovery does not indefinitely block new backups. -**Download** uses the local archive when available and can fall back to a retained S3 copy. S3 links expire after 15 minutes. An instance configured with S3 for file downloads can first prepare local archives in that storage. Wait for preparation to finish. Downloads require an Admin or Owner role. +**Download** uses the local archive when available and can fall back to a retained S3 copy. S3 links expire after 15 minutes. A copy in an SFTP, FTPS, or WebDAV storage downloads through Coolify. An instance configured with S3 for file downloads can first prepare local archives in that storage. Wait for preparation to finish. Downloads require an Admin or Owner role. + +A failed storage backup notifies the team on the first failure, then at most once a day while it keeps failing. The first successful run after a failure sends one "works again" notification. Coolify never disables a storage backup schedule automatically. The storage backup workflow creates, downloads, and deletes archives, but it does not provide a dashboard restore action. Before relying on a schedule, download an archive and test your restore procedure in a separate environment. diff --git a/content/docs/core/persistent-storage/storage-mounts/volume-mounts.mdx b/content/docs/core/persistent-storage/storage-mounts/volume-mounts.mdx index f553c9771..dd2b323f5 100644 --- a/content/docs/core/persistent-storage/storage-mounts/volume-mounts.mdx +++ b/content/docs/core/persistent-storage/storage-mounts/volume-mounts.mdx @@ -36,6 +36,17 @@ Coolify prefixes the name with the resource UUID to prevent name collisions on t Verify the mount by letting the application write a test file under the destination path. Redeploy the resource again and confirm that the application can still read the file. +## Change the volume name + +Changing the **Storage Name** of a volume mount on **Persistent Storage** does not rename or move the Docker volume. After the next restart or deployment, the resource uses a Docker volume with the new name. If that volume does not exist, Docker creates it empty. Your data stays in the old volume, and Coolify does not delete the old volume when you delete the resource. + +When you save a new name, the **Change the volume name?** dialog asks for confirmation. To keep your data: + +1. Stop the resource. +2. Change the **Storage Name**, save it, and select **Change Volume Name** in the dialog. +3. On the server, find both names with `docker volume ls`. Create the new volume with `docker volume create ` if it does not exist, then copy the data from the old volume into it. +4. Start the resource and confirm that the application can read its data. + ## Use volume mounts with preview deployments Application preview deployments use separate storage by default. Coolify adds a `-pr-N` suffix to the volume name, where `N` is the pull request number. diff --git a/content/docs/core/s3-storage/aws.mdx b/content/docs/core/s3-storage/aws.mdx index e29b4eada..769a8353f 100644 --- a/content/docs/core/s3-storage/aws.mdx +++ b/content/docs/core/s3-storage/aws.mdx @@ -199,7 +199,7 @@ AWS does not show the secret access key again after you close this page. If you ### Set up Amazon S3 in Coolify -In the Coolify dashboard, open **S3 Storage** from the sidebar. +In the Coolify dashboard, open **Storage** from the sidebar. diff --git a/content/docs/core/s3-storage/meta.json b/content/docs/core/s3-storage/meta.json index e32195d02..b658dbe7c 100644 --- a/content/docs/core/s3-storage/meta.json +++ b/content/docs/core/s3-storage/meta.json @@ -5,6 +5,7 @@ "aws", "r2", "neon", - "supabase" + "supabase", + "sftp-ftps-webdav" ] } diff --git a/content/docs/core/s3-storage/neon.mdx b/content/docs/core/s3-storage/neon.mdx index 3a36df6ab..2c8cccfa3 100644 --- a/content/docs/core/s3-storage/neon.mdx +++ b/content/docs/core/s3-storage/neon.mdx @@ -57,7 +57,7 @@ Save the access key and secret key somewhere secure. ### Add Neon Object Storage to Coolify -In Coolify, open **S3 Storage** and select **New storage**. Enter: +In Coolify, open **Storage** and select **New storage**. Enter: | Coolify field | Neon value | |---|---| diff --git a/content/docs/core/s3-storage/overview.mdx b/content/docs/core/s3-storage/overview.mdx index caa613954..29d7fd01f 100644 --- a/content/docs/core/s3-storage/overview.mdx +++ b/content/docs/core/s3-storage/overview.mdx @@ -7,6 +7,8 @@ description: Configure S3-compatible storage for Coolify backups with Amazon S3, Coolify connects to S3-compatible storage for backup files. You create the bucket with a storage provider, then add its connection details to Coolify as an S3 storage. +Coolify can also store backups on an SFTP, FTPS, or WebDAV server. See [SFTP, FTPS, and WebDAV storage](/core/s3-storage/sftp-ftps-webdav). + ## Before you add S3 storage Create the bucket with your provider and collect these connection details: @@ -54,13 +56,25 @@ Other providers may also work. If you successfully connect another provider, let After you prepare the bucket and credentials: -1. Open **S3 Storage** in the Coolify sidebar. +1. Open **Storage** in the Coolify sidebar. 2. Select **New storage**. -3. Enter **Name**, optional **Description**, **Bucket**, **Region**, **Access Key**, and **Secret Key**. Split the endpoint into **Protocol**, **Host**, optional **Port**, and optional **Path**. Keep the bucket name separate from the endpoint. -4. Select **Validate Connection & Continue**. +3. Keep **Type** set to **S3**. +4. Enter **Name**, optional **Description**, **Bucket**, **Region**, **Access Key**, and **Secret Key**. Split the endpoint into **Protocol**, **Host**, optional **Port**, and optional **Path**. Keep the bucket name separate from the endpoint. +5. Turn on **Skip TLS certificate verification** only if the endpoint uses a self-signed or private CA certificate. See [Self-signed certificates](#self-signed-certificates). +6. Select **Validate Connection & Continue**. After validation succeeds, Coolify opens the storage details page. The S3 storage is then ready to select when you configure a backup. Database and volume backup schedules can select multiple destinations; Coolify uploads each backup to every selected destination and tracks each copy separately. +## Self-signed certificates + +Turn on **Skip TLS certificate verification** for an endpoint with a self-signed or private CA certificate. Coolify then accepts any certificate for the connection test, backups, restores, and the deletion of old backups. + + +With this setting on, Coolify does not check the certificate of the endpoint. Turn it on only when the endpoint cannot use a trusted certificate. + + +The setting does not apply to your browser. Backup downloads open a link to the storage, so the browser must still trust the certificate. Through the API, set `skip_tls_verification` on the S3 storage. + ## Recovering an unusable storage Coolify tests S3 storages marked unusable again every hour. Once the connection works, the storage becomes usable automatically. You can also validate it after correcting credentials or connectivity. diff --git a/content/docs/core/s3-storage/r2.mdx b/content/docs/core/s3-storage/r2.mdx index 5a233e81a..3381431f5 100644 --- a/content/docs/core/s3-storage/r2.mdx +++ b/content/docs/core/s3-storage/r2.mdx @@ -39,7 +39,7 @@ Save the **Access Key ID**, **Secret Access Key**, and **S3 endpoint**. You need ### Add Cloudflare R2 to Coolify -Open **S3 Storage** in the Coolify sidebar, select **New storage**, and enter the bucket name, endpoint, and credentials from the previous steps. Set **Protocol** to `https` and **Host** to the hostname from the R2 S3 endpoint, without `https://`. Leave **Port** and **Path** empty for the standard endpoint. Leave **Region** at its default value for R2. +Open **Storage** in the Coolify sidebar, select **New storage**, and enter the bucket name, endpoint, and credentials from the previous steps. Set **Protocol** to `https` and **Host** to the hostname from the R2 S3 endpoint, without `https://`. Leave **Port** and **Path** empty for the standard endpoint. Leave **Region** at its default value for R2. Select **Validate Connection & Continue**. Coolify verifies the connection by listing objects in the bucket. diff --git a/content/docs/core/s3-storage/sftp-ftps-webdav.mdx b/content/docs/core/s3-storage/sftp-ftps-webdav.mdx new file mode 100644 index 000000000..0ed95531b --- /dev/null +++ b/content/docs/core/s3-storage/sftp-ftps-webdav.mdx @@ -0,0 +1,71 @@ +--- +title: SFTP, FTPS, and WebDAV +description: Store Coolify database and volume backups on an SFTP, FTPS, or WebDAV server, and save the SFTP host key. +--- + +# SFTP, FTPS, and WebDAV storage + +Coolify can store database and volume backups on an SFTP, FTPS, or WebDAV server instead of S3-compatible storage. These storages support uploads, retention, downloads, and database restores, the same as S3 storages. Backup schedules select them in the same **S3 storages** list. + +## How Coolify connects + +Coolify connects to the storage from two places: + +- Each server uploads its backups with an `rclone/rclone` container. +- The Coolify container checks the connection, restores backups, downloads backups, and deletes old backups. + +The storage must be reachable from Coolify and from every server that runs a backup. Below the storage directory, each backup keeps its full path on the server, for example `data/coolify/backups/...`. + +## Before you add the storage + +Create a directory for the backups and a user that can write to it. + +| Type | Protocol | Default port | Login | +| :--- | :--- | :---: | :--- | +| SFTP | SSH file transfer | `22` | Password or private key | +| FTPS | FTP with explicit TLS | `21` | Username and password | +| WebDAV | `https` or `http` | Protocol default | Username and password | + +FTPS uses explicit TLS, so the server must accept `AUTH TLS` and use a certificate that Coolify trusts. + +## Add the storage + +Only team admins and owners can add and validate a storage. + +1. Open **Storage** in the Coolify sidebar. +2. Select **New storage**. +3. Set **Type** to **SFTP**, **FTPS**, or **WebDAV**. +4. Enter **Name** and an optional **Description**. +5. Enter the server address: + - For SFTP and FTPS, enter **Host**, an optional **Port**, and an optional **Directory**. **Directory** is an absolute path from the root of the server, for example `home/user/backups`. Leave it empty to use the login directory. + - For WebDAV, select the **Protocol** and enter **Host**, an optional **Port**, and the **Path** of the backup directory. For Nextcloud, the path is for example `/remote.php/dav/files/USER/backups`. +6. Enter the login: + - For SFTP, enter **Username**, then set **Authentication** to **Private key** or **Password**. For a private key, select a key from **Keys & Tokens** and add the **Public key** that Coolify shows to `~/.ssh/authorized_keys` of the user on the SFTP server. + - For FTPS and WebDAV, enter **Username** and **Password**. +7. Select **Validate Connection & Continue**. + +After validation succeeds, Coolify opens the storage details page. You cannot change the type after creation. To use another type, create a new storage. + +## Save the SFTP host key + +When an admin validates an SFTP storage, Coolify saves the host key of the server and shows it in **Host key fingerprint**. After that, Coolify refuses the server if its key changes. A backup never saves a new key. + + +Coolify does not use an SFTP storage before an admin saves its host key with a validation. Until then, uploads, restores, downloads, and the deletion of old backups fail. If you change the host or the port, Coolify removes the saved key, and an admin must validate the storage again. + + +If the host key of the server changed and you know why: + +1. Open the storage. +2. Select **Reset host key**. +3. Select **Validate connection** to save the new key. + +## Use the storage in a backup + +Open a database or volume backup schedule, then select the storage in **S3 storages** and select **Enable S3**. Read [Database backups](/databases/backups#upload-backups-to-s3) and [Storage mount backups](/core/persistent-storage/storage-mounts/backups#choose-where-backups-are-stored). + +A backup copy in an SFTP, FTPS, or WebDAV storage downloads through Coolify. To restore a database from the storage, select **Storage** as the source in **Import backup**. See [Restore a database](/databases/restore). + +## Manage the storage through the API + +The S3 storages API also manages these types. Set `type` to `sftp`, `ftps`, or `webdav`. An SFTP storage can log in with `private_key_uuid` instead of a password in `secret`, and returns its pinned host key in `sftp_host_key`. `POST /s3-storages/{uuid}/validate` validates the storage and saves the SFTP host key. See the [API reference](/api/overview). diff --git a/content/docs/core/s3-storage/supabase.mdx b/content/docs/core/s3-storage/supabase.mdx index 4e67784d4..404cd25b3 100644 --- a/content/docs/core/s3-storage/supabase.mdx +++ b/content/docs/core/s3-storage/supabase.mdx @@ -48,7 +48,7 @@ Also record the project Region shown in the Supabase dashboard. ### Add Supabase Storage to Coolify -In Coolify, open **S3 Storage** and select **New storage**. Enter: +In Coolify, open **Storage** and select **New storage**. Enter: | Coolify field | Supabase value | |---|---| diff --git a/content/docs/core/security-model.mdx b/content/docs/core/security-model.mdx index 93c1e1cc8..5bc0ed6e8 100644 --- a/content/docs/core/security-model.mdx +++ b/content/docs/core/security-model.mdx @@ -48,7 +48,7 @@ Coolify supplies security controls for the management layer. Those controls do n title="Coolify provides" items={[ 'Dashboard authentication, optional two-factor authentication, OAuth sign-in, and team-based access controls', - 'Authenticated API access with team-scoped tokens, selected permissions, expiration, and optional source-IP restrictions', + 'Authenticated API and MCP access with team-scoped tokens, selected permissions, access to selected projects or resources, expiration, pause, and optional source-IP restrictions', 'Encrypted database storage for supported credentials, private keys, environment values, and integration secrets', 'Signature or token verification for supported Git provider webhooks', 'Server-local proxy routing and HTTPS certificate automation for configured domains', @@ -79,12 +79,12 @@ The built-in controls cover four parts of control-plane security. cards={[ { title: 'Account access', - description: 'Email and password sign-in, optional OAuth and 2FA, team membership, and roles control dashboard access.', + description: 'Email and password sign-in, optional OAuth, SSO, passkeys, and 2FA, team membership, roles, and member access to selected projects or resources control dashboard access.', icon: SecuritySafe2, }, { title: 'API automation', - description: 'API tokens belong to a team and carry selected permissions and an optional expiration date.', + description: 'API tokens belong to a team and carry selected permissions, access to the whole team or selected projects or resources, and an optional expiration date. A token never gets more access than its owner.', icon: Key2, }, { @@ -100,9 +100,9 @@ The built-in controls cover four parts of control-plane security. ]} /> -On self-hosted instances, **Settings > Advanced** also lets you disable API access or restrict it to specific IP addresses and CIDR ranges. Create and revoke tokens under **Keys & Tokens > API Tokens**. +On self-hosted instances, **Settings > Advanced** also lets you disable **API access** and the **MCP server**, or restrict both to specific IP addresses and CIDR ranges with **Allowed IPs**. The two switches are separate: disabling **API access** does not disable MCP. Create, edit, pause, roll, and revoke tokens under **Keys & Tokens > API Tokens**. -Read [API tokens](/core/security/credentials/api-tokens) for the available token permissions and request format. +Read [API tokens](/core/security/credentials/api-tokens) for the available token permissions and request format, and [MCP security](/mcp/security) for MCP clients. These controls reduce risk in the paths Coolify manages. They do not replace security reviews, dependency updates, or runtime protections inside your applications. @@ -124,14 +124,14 @@ Restrict administrative access. If you self-host Coolify, install supported upda - Keep **Registration Allowed** disabled unless you intentionally allow people to create accounts. - Enable two-factor authentication for every account with elevated access and store recovery codes safely. -- Give team members the lowest role they need, then remove access when it is no longer required. +- Give team members the lowest role and the narrowest [access](/core/team/members/set-member-access) they need, then remove access when it is no longer required. - Configure OAuth or SSO with trusted identity providers and limit who the provider allows to sign in. ### Limit API and integration access -- Enable **API Access** only when an integration needs it. -- Restrict **Allowed IPs for API Access** on a self-hosted instance whenever the callers have predictable source addresses. -- Give each integration its own token with only the permissions it needs and an appropriate expiration date. +- Enable **API access** and the **MCP server** only when an integration needs them. Disabling **API access** does not disable MCP. +- Restrict **Allowed IPs** on a self-hosted instance whenever the callers have predictable source addresses. The list applies to the API and to MCP. +- Give each integration its own token with only the permissions and access it needs and an appropriate expiration date. - Revoke unused or exposed tokens, then replace them in every integration that used them. ### Protect encrypted data and recovery material @@ -187,7 +187,7 @@ Review this baseline before placing production workloads on a connected server: 1. Serve the Coolify dashboard over HTTPS and restrict who can reach it when possible. 2. Disable public registration unless it is required, enable 2FA, and review team roles. -3. Keep API access disabled unless needed; otherwise, restrict source IPs and issue separate least-privilege tokens. +3. Keep API access and the MCP server disabled unless needed; otherwise, restrict source IPs and issue separate least-privilege tokens. 4. Use a dedicated SSH key, harden SSH, patch the server, and allow only required firewall ports. 5. Review deployment sources, environment values, volume mounts, and every publicly exposed port. 6. Back up workload data. For self-hosted Coolify, also back up the instance database and save its `APP_KEY` separately. diff --git a/content/docs/core/security/authentication/2fa.mdx b/content/docs/core/security/authentication/2fa.mdx index 156103447..4398a59b5 100644 --- a/content/docs/core/security/authentication/2fa.mdx +++ b/content/docs/core/security/authentication/2fa.mdx @@ -7,6 +7,8 @@ description: Configure two-factor authentication, save recovery codes, and manag Two-factor authentication (2FA) adds an authenticator-code challenge after a successful password, OAuth, or SSO sign-in. Each Coolify user configures 2FA for their own account from the profile page. +Team Owners and Admins can make 2FA required for everyone in a team. See [Require two-factor authentication](/core/team/members/overview#require-two-factor-authentication). The requirement applies to dashboard sessions, not to API or MCP tokens. + Coolify requests its 2FA challenge after provider authentication when 2FA is enabled for the account. SSO users can enable 2FA without a Coolify password. diff --git a/content/docs/core/security/credentials/api-tokens.mdx b/content/docs/core/security/credentials/api-tokens.mdx index b1638e334..8667235db 100644 --- a/content/docs/core/security/credentials/api-tokens.mdx +++ b/content/docs/core/security/credentials/api-tokens.mdx @@ -1,11 +1,11 @@ --- title: API Tokens -description: Create, scope, store, rotate, and revoke Coolify API tokens for integrations and automation. +description: Create, scope, edit, pause, roll, and revoke Coolify API tokens for integrations and automation. --- # API tokens -API tokens authenticate integrations, scripts, deploy webhooks, and MCP clients to Coolify. Each token belongs to the user who creates it, is bound to the active team, and carries selected permissions. +API tokens authenticate integrations, scripts, deploy webhooks, and MCP clients to Coolify. Each token belongs to the user who creates it, is bound to the active team, and carries selected permissions and access. A token grants access without an interactive sign-in or 2FA challenge. Store it in a secret manager, never commit it to a repository, and revoke it immediately if it is exposed. @@ -17,8 +17,8 @@ Choose the team and API controls first: - Switch to the team that owns the resources the integration must access. A token cannot access another team's resources. - On self-hosted Coolify, open **Settings > Advanced** and set **API access** to **Enabled**. -- When callers use predictable source addresses, set **Allowed API IPs** to the required IP addresses or CIDR ranges. -- Decide the smallest permission set and shortest practical expiration period. +- When callers use predictable source addresses, set **Allowed IPs** to the required IP addresses or CIDR ranges. +- Decide the smallest permission set, the narrowest access, and the shortest practical expiration period. Coolify Cloud keeps API access available, so Cloud users do not enable the instance-wide **API access** setting. @@ -31,7 +31,7 @@ Coolify Cloud keeps API access available, so Cloud users do not enable the insta ### Open API Tokens -Open **Keys & Tokens** in the main sidebar, then select **API Tokens**. +Open **Keys & Tokens** in the main sidebar, then select **API Tokens**. Select **New token** to open the **New API token** form. @@ -56,16 +56,28 @@ Prefer an expiration date for automation that can be rotated. Use **Never** only ### Select permissions -Open **Permissions** and select only the permissions required by the integration. Review [Token permissions](#token-permissions) before using `write`, `read:sensitive`, or `root`. +Open **Permissions** and select only the permissions required by the integration. Review [Token permissions](#token-permissions) before using `write`, `delete`, `read:sensitive`, or `root`. + + + + +### Choose the access + +Under **Access**, set **Resources**: + +- **All resources in the team** lets the token use every project, resource, and team-level endpoint that its permissions allow. +- **Selected projects, environments, or resources** limits the token. Choose the items in **Selected**. + +Read [Token access](#token-access) before you limit a token. ### Create and copy the token -Select **Create token**, then copy the generated token immediately. Coolify shows the complete token value only once. +Select **Create token**. Coolify shows the token in the **Copy your token** window. Copy it before you select **Done**: Coolify does not show the complete value again after you close the window. -Store it in the caller's secret manager before leaving the page. If the value is lost, revoke the issued token and create another one. +Store it in the caller's secret manager. If the value is lost, [roll the token](#manage-a-token) to get a new value. @@ -80,16 +92,35 @@ Store it in the caller's secret manager before leaving the page. If the value is | :--- | :--- | :--- | | `read` | List and inspect resources. | Sensitive response values remain redacted. | | `read:sensitive` | Read secrets, logs, passwords, private keys, environment values, and Compose content returned by supported endpoints. | Coolify also adds `read` when this permission is selected. | -| `write` | Create, update, and delete resources through write endpoints. | The token owner must remain an administrator or owner of the token's team when the request runs. | -| `deploy` | Trigger deployments, restarts, stops, cancellations, and [deploy webhooks](/core/automation/deploy-webhooks) (`/api/v1/deploy`). | Selecting `deploy` creates a deploy-only token in the dashboard. | -| `root` | Bypass the `read`, `write`, and `deploy` permission checks on API endpoints. | Instance-wide **API access** and IP allowlist controls still apply. Only team administrators and owners can create this token. Selecting it removes the other permissions because they are unnecessary. | +| `write` | Create and update resources through write endpoints. | It cannot delete. Add `delete` when the caller must delete. | +| `delete` | Delete resources, environment variables, storages, backups, scheduled tasks, and tags, and detach a tag. | Every `DELETE` request requires `delete` or `root`. | +| `deploy` | Trigger deployments, restarts, stops, cancellations, and [deploy webhooks](/core/automation/deploy-webhooks) (`/api/v1/deploy`). | With `write`, it also applies changes that run on servers at once, such as scheduled tasks, proxy configuration, and imports. | +| `root` | Bypass the `read`, `write`, `delete`, and `deploy` permission checks on API endpoints. | Instance-wide **API access** and IP allowlist controls and the token's access still apply. Selecting it removes the other permissions because they are unnecessary. | -Use `read` for inventory and monitoring, `deploy` for a deployment-only workflow, and `write` only when the caller must change configuration. Add `read:sensitive` only when redacted values are insufficient. +Use `read` for inventory and monitoring, `deploy` for a deployment-only workflow, and `write` only when the caller must change configuration. Add `delete` only when the caller must delete, and `read:sensitive` only when redacted values are insufficient. + +Team administrators and owners can select every permission. A member can select only the permissions that their own access in the team includes. Most sensitive values are returned only when the token owner is a team administrator or owner. Container logs need only `read:sensitive`. See [Sensitive response data](/api/permissions#sensitive-response-data). A `root` token still belongs to one team and its owner must remain a member of that team. It does not provide cross-team access. --- +## Token access + +A token never gets more access than its owner. A token with **All resources in the team** can use every endpoint that its permissions allow. A member who has access only to some projects or resources can create only limited tokens. + +A token limited to **Selected projects, environments, or resources**: + +- sees only the selected items. A selected project includes its environments and resources, and a selected environment includes its resources. +- can use only the endpoints for applications, services, databases, projects, deploy webhooks (`/deploy`), deployments, resources, the version, and vulnerabilities. Team-level endpoints, such as servers, keys, Git sources, and notifications, return `403 Forbidden`. +- does not receive server secrets, such as the Sentinel token, log drain keys, and the saved proxy configuration, in application, service, and database responses. + +The **Issued tokens** list shows **All resources in the team** under each token, or the number of selected projects, environments, and resources, such as `2 projects, 1 resource`. Select the numbers to see the items. A deleted item shows as `Unavailable project`, `Unavailable environment`, or `Unavailable resource`. Edit the token and remove it: a token of a member stops working until you do. + +Read [API Permissions](/api/permissions#access) for the complete rules. + +--- + ## Make a test request Send the complete token as a Bearer credential: @@ -100,10 +131,10 @@ export COOLIFY_TOKEN="" curl --fail-with-body \ --header "Authorization: Bearer $COOLIFY_TOKEN" \ - "$COOLIFY_URL/api/v1/teams/current" + "$COOLIFY_URL/api/v1/team" ``` -A successful request returns the team bound to the token. Do not paste a real token directly into shell history; load it from the caller's secret store in production. +A successful request returns the team bound to the token. A token limited to selected projects, environments, or resources gets `403 Forbidden` from this team-level endpoint. Test it with `GET /api/v1/projects` instead. Do not paste a real token directly into shell history; load it from the caller's secret store in production. Read [Making Requests](/api/making-requests) for request examples and [API Permissions](/api/permissions) for token scope and role restrictions. [Rate Limits](/api/rate-limits) documents response headers and retry behavior, while [API Errors](/api/errors) covers status codes. For deployment-only automation, follow [Deploy Webhooks](/core/automation/deploy-webhooks). @@ -115,25 +146,47 @@ Coolify records the active team when the token is created. Switching teams later - Create a separate token for each team an integration must access. - Removing the token owner from the team makes the token invalid. -- A `write` or `root` request fails if the token owner no longer has the administrator or owner role. +- If the token owner loses access that the token uses, the token stops working and returns `403 Forbidden`. The owner can edit the token to remove that access, or revoke it. - Changing a user's password revokes that user's API tokens. - Removing a member, downgrading a member's role through Coolify, or deleting a team revokes affected team tokens. -The **Issued Tokens** list belongs to the signed-in user. A user can revoke their own token but cannot copy its secret value again. +The **Issued tokens** list shows only the tokens of the signed-in user for the active team. Switch teams to see your tokens of another team. A user can manage their own tokens but cannot copy a secret value again. + +A team that requires [two-factor authentication](/core/security/authentication/2fa) does not block its API tokens. The requirement applies only to dashboard sign-in. --- -## Rotate or revoke a token +## Manage a token -Rotate a token before it expires or whenever its storage or caller changes: +Open **Keys & Tokens > API Tokens**, then open the **Token actions** menu (`...`) at the end of the token's row: + +| Action | Result | +| :--- | :--- | +| **Edit** | Change the **Description**, **Expires in**, **Permissions**, and **Access** in the **Edit API token** form, then select **Save changes**. The token value does not change. Clients get the new access on their next request. **Keep current** keeps the expiry date. Another choice sets a new expiry date from today. | +| **Pause** | Stop the token without deleting it. A paused token returns `401 Unauthenticated` from the API and cannot authenticate to the MCP server. The list marks it **Paused**. | +| **Resume** | Let a paused token authenticate again. The token value does not change. | +| **Roll** | Replace the secret. The description, permissions, access, and expiry do not change. Enter the token description to confirm, then select **Roll token**. The current secret stops working at once. Copy the new value from the **Copy your token** window. | +| **Revoke** | Delete the token permanently. Enter the token description to confirm, then select **Revoke token**. | + +--- -1. Create a replacement with the same team and only the permissions still required. +## Rotate a token + +Rotate a token before it expires or whenever its storage or caller changes. + +**Roll** is the quickest way. The previous secret stops working at once, so update the integration immediately after you roll the token. + +To rotate without an interruption, use a replacement token: + +1. Create a replacement with the same team and only the permissions and access still required. 2. Copy the replacement into the integration's secret store. 3. Make a test request with the replacement. -4. Return to **Keys & Tokens > API Tokens** and select **Revoke token** for the previous token. +4. Revoke the previous token. 5. Confirm that the integration continues working and the previous token now returns `401 Unauthenticated`. -An expired token is rejected automatically. Coolify checks hourly for tokens that expire within 7 days and sends the team's enabled **API token expiring** notifications. A token with an expiration of 7 days or less gets the warning 24 hours before it expires. +An expired token is rejected automatically. Coolify checks every hour for tokens that expire soon. It warns 7 days before a token expires, or 24 hours before for a token that lives 7 days or less. The warning goes to every enabled notification channel of the token's team. When you edit a token and set a new expiry, Coolify sends a new warning before the new date. + +When a client sends too many failed REST API requests with a token, Coolify blocks the token for the REST API for a short time and notifies its team. MCP requests are not counted. See [Failed request limit](/api/rate-limits#failed-request-limit). --- @@ -142,31 +195,33 @@ An expired token is rejected automatically. Coolify checks hourly for tokens tha -Confirm that the complete token appears after `Bearer`, has not expired or been revoked, and still belongs to a user who is a member of the token's team. +Confirm that the complete, current token appears after `Bearer`. A roll replaces the value. Also confirm that the token has not expired, been paused, or been revoked, and that it still belongs to a user who is a member of the token's team. A password change, team removal, or team deletion can revoke or invalidate the token. -On self-hosted Coolify, confirm that **API access** is enabled and the caller's IP matches **Allowed API IPs**. +On self-hosted Coolify, confirm that **API access** is enabled and the caller's IP matches **Allowed IPs**. -Then check the endpoint's required permission. For `write` or `root`, confirm that the token owner is still a team administrator or owner. +Then check the endpoint's required permission and the token's access. A token limited to selected projects, environments, or resources cannot use team-level endpoints. If the message says that the token has more access than you have, the token owner lost access: edit the token or revoke it. -Create or use a token with both `read` and `read:sensitive`, or use a `root` token only when full administrative access is required. +Create or use a token with both `read` and `read:sensitive`, or use a `root` token only when full administrative access is required. The token owner must be a team administrator or owner. Server secrets also need a token with **All resources in the team**. Locked environment variable values are never returned. -The resource may belong to another team. Switch to that team in the dashboard and create a separate token; an issued token's team cannot be changed. +The resource may be outside the token's access. Edit the token and add the resource, or select **All resources in the team**. + +The resource may also belong to another team. Switch to that team in the dashboard and create a separate token; an issued token's team cannot be changed. -Coolify displays the complete token only after creation. Revoke the token if its value was not saved, then create and store a replacement. +Coolify displays the complete token only in the **Copy your token** window after you create or roll it. If the value was not saved, roll the token and store the new value. diff --git a/content/docs/core/security/credentials/ssh-keys.mdx b/content/docs/core/security/credentials/ssh-keys.mdx index e2d45d314..5e1ab4cb2 100644 --- a/content/docs/core/security/credentials/ssh-keys.mdx +++ b/content/docs/core/security/credentials/ssh-keys.mdx @@ -31,7 +31,7 @@ Open **Keys & Tokens** in the main sidebar, select **Private Keys**, then open * -Select **Generate ED25519** for the default choice. Use **Generate RSA** only when the target system does not accept ED25519 keys. +Select **Generate ED25519** for the default choice. Use **Generate RSA** only when the target system does not accept ED25519 keys. Coolify generates 4096-bit RSA keys. Coolify generates and saves the key immediately. Select its **Edit** icon to review the public key or change the name to identify its purpose, such as `production-servers`. Select **Save changes** after editing. @@ -57,7 +57,7 @@ Do not import a passphrase-protected key. Coolify cannot answer an interactive p -Coolify rejects invalid private keys and duplicate keys in the active team. +Coolify rejects invalid private keys, keys with a passphrase, and duplicate keys in the active team. A new or changed key must also meet the key type rules above. The error message tells you which rule the key does not meet. Keys that you added before these checks continue to work, and you can still rename them. To replace a weak key, open the key and select **Rotate key**. Coolify moves its servers to a new Ed25519 key. @@ -142,22 +142,69 @@ Use a dedicated key when you want to rotate or revoke repository access without ## Rotate an SSH key -Create a new key instead of replacing a shared private key in place. This keeps the current connection available during the transition. +**Rotate key** moves every server that uses a key to a new key. Coolify adds the new public key to `~/.ssh/authorized_keys` on each server, so you do not have to change the servers yourself. -1. Create the replacement key under **Keys & Tokens > Private Keys**. -2. Add its public key to every target server account or Git repository that needs it. -3. For each connected server, select the replacement under **Server > Private Key** and run **Check connection**. -4. Update applications or Git integrations that use the previous key and verify repository access with a deployment. -5. Remove the previous public key from each server or provider only after every dependent resource uses the replacement. -6. Delete the previous key from Coolify after it is marked unused. + + + +### Start the rotation + +1. Open **Keys & Tokens > Private Keys** and select the **Edit** icon of the key. +2. Select **Rotate key**. The button shows only when a server uses the key. +3. Select **New key type**: **Ed25519** (recommended) or **RSA 4096** for hosts that do not accept Ed25519, for example FIPS hosts. +4. Select **Rotate key** in the dialog. + + + + +### Check the result + +Coolify creates the new key with the old name and `(rotated )`. For each server, Coolify: + +1. adds the new public key to `~/.ssh/authorized_keys` of the SSH user +2. logs in with the new key +3. moves the server to the new key + +If the new key cannot log in, Coolify removes it from the server again and the server stays on the old key. + +The dialog shows a status for each server: + +| Status | Meaning | +| :--- | :--- | +| **Moved** | The server uses the new key. | +| **Failed** | The server stays on the old key. The message shows the reason. | +| **Old key not found** | The old key is not in `~/.ssh/authorized_keys`, so Coolify cannot replace it. Add the new public key on the server yourself. | +| **Unreachable** | Coolify could not connect, or the server is disabled. | +| **Transferred** | Another Coolify instance manages the server now. | + +To try again for the servers that stay on the old key, select **Rotate again**. Coolify uses the same new key. + + + + +### Wait for the old key to be removed + +Coolify removes the old public key from each moved server after at least one hour, or after the deployment timeout of the server if it is longer. Deployments, backups, and scheduled tasks that started before the rotation can finish with the old key. + + + + +### Delete the old key + +Applications and Git sources stay on the old key. Move them to another key yourself. When nothing uses the old key, the dialog shows **Delete old key**. + + + + +Deleting a private key in Coolify does not remove its public key from servers. To remove it, rotate the key before you delete it, or select the SSH key option when you [remove a server](/core/infrastructure/servers/remove-server). -If several resources share one key, rotate them one at a time. Replacing the private key value on the existing key changes the credential for every linked server and Git integration at once. +For a Git deploy key, create a new key, add its public key to the repository, update the application, and verify the access with a deployment. Then remove the old deploy key from the Git provider. --- ## Delete unused keys -The **Private Keys** list marks a key **Unused** when no server, application, GitHub App, or GitLab App references it. +The **Private Keys** list marks a key **Unused** when no server, application, GitHub App, GitLab App, Gitea App, or SFTP backup storage references it. The **Used by** list of a key shows the servers, applications, and Git apps that use it. - Open an unused key and select **Delete** to remove it. - Select **Delete unused keys** on the list page to remove all keys currently marked unused for the active team. @@ -170,6 +217,6 @@ Coolify prevents its safe-delete operation from removing a key that is still ref Only team administrators and owners can create, change, or delete private keys. Give each key a purpose-specific name and avoid sharing one key across unrelated environments. -Coolify encrypts the private-key value stored in its database. On a self-hosted instance, Coolify also writes the key to its SSH key storage with restrictive file permissions so the SSH client can use it. Protect the Coolify database, `/data/coolify/source/.env`, `/data/coolify/ssh/keys/`, and instance backups as privileged recovery material. +Coolify encrypts the private-key value stored in its database. On a self-hosted instance, Coolify also writes the key to its SSH key storage with restrictive file permissions so the SSH client can use it. Every hour, Coolify deletes key files that nothing uses and that did not change for one day. Coolify writes a key file again when it needs it. Protect the Coolify database, `/data/coolify/source/.env`, `/data/coolify/ssh/keys/`, and instance backups as privileged recovery material. For a self-hosted instance migration, follow [Restore Coolify](/core/backup-and-recovery/instance-restore) so the database, encryption key, and SSH key files remain consistent. diff --git a/content/docs/core/security/image-scanning.mdx b/content/docs/core/security/image-scanning.mdx new file mode 100644 index 000000000..cb1ba896c --- /dev/null +++ b/content/docs/core/security/image-scanning.mdx @@ -0,0 +1,218 @@ +--- +title: Image Scanning +description: Scan the container images of your applications, databases, and services for known vulnerabilities, get version recommendations, and block risky deploys. +--- + +# Image scanning + +Image scanning checks the container images on a server for known vulnerabilities. Coolify runs [Syft](https://github.com/anchore/syft) and [Grype](https://github.com/anchore/grype) on your server. Coolify does not send your images or their package lists (SBOMs) to a third party. + +Each application, database, and service gets one security status and a recommended version that fixes the problems. For applications, you can also block a deploy when the new image has security problems. + +Image scanning is off by default. Turn it on for each server. When the server scans, each application on it is scanned too, unless you turn it off for that application. + +## Before you begin + +- You must be a team admin or owner to turn on image scanning for a server. +- The server must be able to reach Docker Hub, to pull the scanner images (`anchore/syft`, `anchore/grype`, `regclient/regctl`, and `alpine`), and `grype.anchore.io`, to download the vulnerability database. +- Scans use up to 1 CPU and 1 GB of memory while they run. You can raise the memory limit, see [Scanner memory limit](#scanner-memory-limit). The scanner data uses about 1.2 GB of disk, plus temporary space for one image. + +Coolify keeps the scanner data in `/data/coolify/image-scans` and in the Docker volume `coolify-grype-db` on the server. + +## Turn on image scanning for a server + + + + +### Open the Vulnerabilities page + +1. Open **Servers** in the Coolify sidebar. +2. Select the server. +3. Select **Security** in the server menu. +4. Select **Vulnerabilities**. + +**Vulnerabilities** shows only after the server is validated. Read [Server security](/core/infrastructure/servers/security). + + + + +### Enable image scanning + +1. In the **Image scanning** section, select **Enable**. +2. Select **Enable image scanning** to confirm. + + + + +### Wait for the scanner + +Coolify gets the scanner in two steps: + +- **Get scanner**: Coolify pulls the scanner images. +- **Update database**: Coolify downloads the vulnerability database. + +If a step fails, fix the cause in its message, then select **Try again**. + + + + +When you add a server, you can also set **Scan images for vulnerabilities** in the **Image scanning** section of the form. A team admin can preselect this option for all new servers with **Scan images on new servers** in **Team** > **Image Scanning**. + +## Turn off scanning for one application + +Applications on a server that scans are scanned by default. + +1. Open the application and select **Security** in its menu. +2. Open **Settings** and set **Scan this app** to **Off**. + +For a Docker image application, **Who builds this image** tells Coolify whether your team builds the image. Coolify detects it. Change it only when the detection is wrong, because it changes the recommendation, for example a rebuild in your CI instead of a newer tag. + +Databases and services have no scan setting of their own. Coolify scans them when their server scans. + +## When Coolify scans + +| Event | What Coolify scans | +| :--- | :--- | +| Application deploy | The new image. When **Block deploys** is **On** or **Strict**, before the new container starts, else after it starts. Restarts and deploys that skip the build are not scanned again, rollbacks are. | +| Database or service start | The images of the database, or of the applications and databases of the service, after the start. | +| Every day | All running images on the server, between 02:00 and 04:59 server time. Coolify updates the vulnerability database first. | +| Every day and after a package update | The operating system packages of the server. The results show in the **Vulnerabilities** section of the same server page. Read [Patch server packages](/core/infrastructure/servers/server-patching). | +| **Scan now** | The images of one resource. Select it on the **Security** page of the resource. Coolify pulls an image that is not on the server. | + +Coolify also looks for newer versions of a scanned image: a newer build of the same tag, the newest tag of the same version line, and the next major version for information. It scans these candidates from the registry on the server. For a Dockerfile build, it also checks the base image. + +If an application uses a [build server](/core/infrastructure/servers/build-servers), turn on image scanning on the build server too. Else the deploy scan cannot run. + +## Read the results + +Open **Security** in the menu of an application, database, or service. The page shows: + +- The security status of the resource, with the time of the last check. +- The recommended action and the problems that it fixes. Coolify can update the image, pull a newer build, or start a rebuild with a button. For other actions, such as a new base image in a Dockerfile, Coolify gives the text to copy. +- **All findings**, with filters for fix state and severity, and a list grouped by package. + +A service shows the images of all its applications and databases. + +### Security status + +| Status | Meaning | +| :--- | :--- | +| **Update now** | An update fixes a problem that attackers are using or are likely to use. | +| **Security update** | An update fixes a critical or high problem. With **Count medium problems**, also a medium problem. | +| **No fix yet** | The image has a problem that attackers are using or are likely to use, and no fixed version exists yet. Coolify checks every day. | +| **Check needed** | Coolify must check the image again, for example because the last result is more than 2 days old or the vulnerability database was more than 5 days old. | + +A resource with no badge has no problem that needs an action, or was not scanned yet. + +"Attackers are using" means that the problem is in the CISA Known Exploited Vulnerabilities catalog. "Likely to use" means an EPSS score of 0.10 or more and a CVSS score of 7.0 or more. + +### Team Security page + +Open **Monitoring** > **Security** in the Coolify sidebar. The page lists the resources of the team with their status, most urgent first. Filter by status, server, or project, or search for a vulnerability ID or a package across all scanned images. Each resource links to its **Security** page. + +Members who can access only some projects see only the resources of those projects. + +## Rules and deploy blocking + +Rules are set on four levels. Each level uses the value of the level above until you change it: + +1. **Settings** > **Image Scanning**: defaults for every team. Only instance admins can change them. +2. **Team** > **Image Scanning**: defaults for the servers and applications of the team. +3. The **Vulnerabilities** page of a server: defaults for the applications on the server. +4. **Settings** > **Rules** on the **Security** page of an application. + +| Rule | Options | Default | +| :--- | :--- | :--- | +| **Block deploys** | **Off**, **On**, **Strict** | **Off** | +| **If the scan cannot run** | **Deploy anyway**, **Block the deploy**. Applies when **Block deploys** is **On** or **Strict**. | **Deploy anyway** | +| **Count medium problems** | **Yes**, **No**. Medium problems that an update fixes give a security update. | **No** | + +**Block deploys** applies only to applications: + +- **On** blocks a deploy when the new image adds a problem that attackers are using or are likely to use. Problems that the running image already has do not block. They show as a warning in the deployment log. +- **Strict** also blocks critical, high, and counted medium problems that have a fix, and operating systems that no longer get security fixes. + +A blocked deployment has the **Blocked** status. The deployment log lists the problems, and the deployment failure notification names the block. A user with write access to the application can select **Deploy anyway** on the deployment page to deploy the same commit without the check. A rollback to an image that ran before is never blocked. + + +Coolify cannot check an image before the start when a Docker Compose application uses a custom build or start command. With **Block deploys** on, **If the scan cannot run** decides. + + +## Ignore a finding + +Ignore a finding when it does not apply to you, for example because your application does not use the affected part. + +1. On the **Security** page of the resource, open **All findings**. +2. Select the ignore button of a finding or a package. +3. Enter a **Reason**. +4. Set the **Scope**: **This resource**, or **All team resources** (team admins and owners only). +5. Set when the ignore **Expires**, then select **Ignore**. + +Ignored findings do not count for the status, the notifications, or **Block deploys**. + +## Notifications + +The **Image vulnerabilities** event sends: + +- A daily summary of new vulnerabilities with a fix, between 06:00 and 07:59. +- An alert right after a scan finds a new problem that attackers are using or are likely to use. + +The event is on by default for email and off for the other channels. Read [Notification events](/core/notifications/events). + +## Failed scans + +When a scan cannot run, the **Security** page of the resource shows **The last scan could not run** with the reason. For the operating system packages, the server **Vulnerabilities** page shows **The last scan failed**. + +Select **Show error log** to see the failed step, its exit code, and the end of the command output. Only users who can change the resource or the server see the error log. Coolify also writes the failure to the Laravel log. + +| Message | What to do | +| :--- | :--- | +| Not enough disk space | Free disk space on the server. | +| The vulnerability database is not on the server yet, or is too old | Check that the server can reach `grype.anchore.io`. | +| The scanner ran out of memory | Raise the [Scanner memory limit](#scanner-memory-limit). The server must have that much free memory. | +| Coolify cannot read this image from its registry | Log in to the registry on the server. | +| The image is not on the server | Select **Scan now** to pull and scan it. An image that Coolify builds needs a new deploy. | +| Another scan is still running | Wait. Coolify runs one scan at a time on a server. | + +## Scanner memory limit + +Large images can need more memory than the default of 1 GB. To set a higher limit: + +1. Open the server **Vulnerabilities** page. +2. In the **Image scanning** section, select **1 GB**, **2 GB**, **4 GB**, or **8 GB** in **Scanner memory limit**. + +The limit applies to each scanner step. The server must have that much free memory while a scan runs. The help text of the **Image scanning** section also shows the disk space that the scanner data uses on the server. + +## Turn off image scanning + +On the server **Vulnerabilities** page, select **Disable** and confirm. Coolify stops scanning the images and the operating system packages of the server. The scan results and the scanner data on the server stay. + +To remove the scanner data, select **Delete scanner data**. Coolify removes the stored SBOMs, the vulnerability database, and the scanner images from the server. The scan results in Coolify stay, and the next scan gets the scanner again. When the server has no scanner data, Coolify hides the button. + +## Permissions + +| Action | Who can do it | +| :--- | :--- | +| Turn image scanning of a server on or off, open the server **Vulnerabilities** page | Team admins and owners | +| Change the team rules and **Scan images on new servers** | Team admins and owners. Other members can read them. | +| Change the instance rules | Instance admins | +| Change **Scan this app** and the rules of an application, **Scan now**, ignore a finding for one resource, **Deploy anyway** | Users with write access to the resource | +| Ignore a finding for all team resources | Team admins and owners | +| See the results of a resource | Users who can view the resource | + +Read [Roles and permissions](/core/team/roles-and-permissions). + +## API and MCP + +| Endpoint | Purpose | +| :--- | :--- | +| [`GET /api/v1/servers/{uuid}/image-scanning`](/api/endpoints/servers/get-server-image-scanning) | Read whether the server scans, the memory limit, the state of the scanner, and the disk space of the scanner data (`scanner_disk_used_bytes`). | +| [`PATCH /api/v1/servers/{uuid}/image-scanning`](/api/endpoints/servers/update-server-image-scanning) | Turn scanning of the server on or off with `is_image_scan_enabled`, and set the scanner memory limit with `image_scan_memory_mb` (`1024`, `2048`, `4096`, or `8192`). | +| [`GET /api/v1/vulnerabilities`](/api/endpoints/vulnerabilities/list-vulnerabilities) | List the resources of the team with their security status. | +| [`GET /api/v1/applications/{uuid}/vulnerabilities`](/api/endpoints/vulnerabilities/get-application-vulnerabilities) | Read the status, images, and findings of an application. | +| [`GET /api/v1/databases/{uuid}/vulnerabilities`](/api/endpoints/vulnerabilities/get-database-vulnerabilities) | Read the status, image, and findings of a database. | +| [`GET /api/v1/services/{uuid}/vulnerabilities`](/api/endpoints/vulnerabilities/get-service-vulnerabilities) | Read the status, images, and findings of a service. | + +The `GET` endpoints need the `read` ability, the `PATCH` endpoint needs `write`. The server endpoints need a team admin or owner. Set `is_image_scan_enabled` on the applications API to turn scanning of one application on or off, and `scan_images_on_new_servers` on `PATCH /api/v1/team` for the team default. Read [API permissions](/api/permissions). + +The MCP tools `get_vulnerabilities` and `manage_image_scanning` read the results and change the scan settings with the same permissions as the API. Read [Image scanning MCP tools](/mcp/capabilities/image-scanning). diff --git a/content/docs/core/team/audit-log.mdx b/content/docs/core/team/audit-log.mdx index eab914e79..38b1100e0 100644 --- a/content/docs/core/team/audit-log.mdx +++ b/content/docs/core/team/audit-log.mdx @@ -7,14 +7,18 @@ description: Search team activity and review resource changes in Coolify's audit Team administrators and owners can open **Team > Audit Log** to review activity from the UI, API, MCP, and webhooks. Search and filter events to find an actor, resource, or action. -Events cover resource changes, deployments, backups, proxy controls, membership, API tokens, integrations, account security, and server, application, service, and instance settings. Each entry records actor, resource, and request context where available. +Events cover resource changes, deployments, backups, proxy controls, membership and member access, API tokens, integrations, account security, and server, application, service, and instance settings. Each entry records actor, resource, and request context where available. ## Review changes -Select **View changes** to compare previous and new values for changed fields. Changes are encrypted at rest. Secrets, commands, and configuration content are excluded, and sensitive request metadata is redacted. The audit log is an activity record rather than a configuration backup. +Select **View changes** to compare previous and new values for changed fields. Changes are encrypted at rest. Secrets, credentials, commands, and configuration content are excluded, and sensitive request metadata is redacted. The audit log is an activity record rather than a configuration backup. Events are pruned after 90 days. Export events through the API if your team needs a separate archive beyond that window. +## Deleted users + +When a user account is deleted, Coolify anonymizes the user in the audit log. Events that the user did show `[deleted user]` as the actor, without the email address, IP address, and user agent. Events about the user, such as membership changes, also replace the user's name and email address with `[deleted user]`. The events themselves stay in the log. + ## API access Use `GET /audit-events` with a token owned by a team administrator or owner. Actor email, token context, metadata, changes, IP address, and user agent are returned only with `read:sensitive` or `root`. See the [API reference](/api/overview) for filters and pagination and [API permissions](/api/permissions) for token abilities. diff --git a/content/docs/core/team/members/add-a-member.mdx b/content/docs/core/team/members/add-a-member.mdx index babce400f..dc0d14ef3 100644 --- a/content/docs/core/team/members/add-a-member.mdx +++ b/content/docs/core/team/members/add-a-member.mdx @@ -15,7 +15,7 @@ You must be an **Owner** or **Admin** in the active team. Choose the lowest role the person needs: -- **Member** for read-only access to team resources +- **Member** for read-only access to team resources, or for access to only some projects, environments, or resources - **Admin** to manage team settings, invitations, and members at the Admin or Member level - **Owner** for full control over roles, including other Owners @@ -41,7 +41,7 @@ Sending the invitation from Coolify requires transactional email to be enabled. ### Enter the email address -Under **Invite a member**, enter the person's email address. Coolify stores invitation email addresses in lowercase and uses the address to identify who may accept the invitation. +Under **Invite a member**, enter the person's address in **Email address**. Coolify stores invitation email addresses in lowercase and uses the address to identify who may accept the invitation. If the address already belongs to this team, Coolify reports that the person is already a member. If Coolify reports an existing pending invitation for the address, that invitation must be accepted, revoked from the team that created it, or allowed to expire before you create another one. @@ -54,6 +54,17 @@ Select **Member**, **Admin**, or **Owner** from **Role**. Admins can invite Members and Admins. Owners can invite all three roles. + + + +### Choose the access of a Member + +When **Role** is **Member**, the form shows the current access next to **Scopes**. By default, a Member gets **Read** on the whole team, shown as `Scopes: Team: read`. + +To change it, select **Scopes**. In the **Access for the invited member** dialog, select a preset or set the scopes, then select **Save**. The person gets these scopes when they accept the invitation. See [Set member access](/core/team/members/set-member-access) for the access levels and presets. + +Owners and Admins always have full access to the team's projects and resources, so the access settings show only for the **Member** role. + @@ -74,10 +85,10 @@ Select **Send email**. Coolify sends the invitation to the entered address using ### Share an invitation link -Select **Generate link** to add the invitation under **Pending Invitations**. On an HTTPS dashboard, select **Copy Invitation Link** and send it directly to that person. On an HTTP dashboard, copy the displayed link manually. +Select **Generate link** to add the invitation under **Pending invitations**. In the **Link** column, select the copy button (**Copy invitation link**) and send the link directly to that person. -The invitation is tied to the entered email address and grants the selected role. Treat the link as sensitive until it is accepted or revoked. +The invitation is tied to the entered email address and grants the selected role and access. Treat the link as sensitive until it is accepted or revoked. @@ -91,13 +102,14 @@ An existing Coolify user must sign in with the invited email address, then accep ## Verify the invitation -Before acceptance, confirm that **Pending Invitations** shows the correct email address, delivery method, and role. +Before acceptance, confirm that **Pending invitations** shows the correct email address, method, and role. For a Member, the **Role** column also shows a summary of their access. After the person accepts, confirm that: -1. the invitation no longer appears under **Pending Invitations** +1. the invitation no longer appears under **Pending invitations** 2. the person appears in the member list 3. the **Role** column shows the role you selected +4. for a Member, the summary under their email address shows the access you selected --- @@ -105,4 +117,4 @@ After the person accepts, confirm that: Invitation links are valid for three days. After a link expires, create a new invitation. -To invalidate a link before it is accepted, select **Revoke** beside the pending invitation. The revoked link can no longer be used to join the team. +To invalidate a link before it is accepted, select the trash icon (**Revoke invitation**) in the row of the pending invitation. In the **Revoke invitation?** dialog, select **Revoke invitation**. The revoked link can no longer be used to join the team. diff --git a/content/docs/core/team/members/delete-user.mdx b/content/docs/core/team/members/delete-user.mdx index fd0cd27e6..e7e7b984e 100644 --- a/content/docs/core/team/members/delete-user.mdx +++ b/content/docs/core/team/members/delete-user.mdx @@ -13,19 +13,19 @@ If Coolify still has a working connection to the user's servers, deleting the us ## Before you delete a user -- You must belong to the `root` team. Only `root` team members can delete users from the UI. -- The `root` team and the `root` user cannot be deleted. +- You must be an **Owner** or **Admin** of the `root` team, which makes you an instance administrator. +- You cannot delete the `root` user, your own account, or a user with a higher role in the `root` team than yours. A user who is alone in the `root` team also cannot be deleted. - Confirm which teams the user belongs to and what resources those teams own. ## Delete the user -1. Go to the **Team** page. -2. Switch to the **Admin View** tab. This lists every user registered in Coolify. -3. Select **Delete** next to the user you want to remove. +1. Select **Team** in the Coolify sidebar, then select **Admin View**. The **Instance users** list shows every user except you. +2. Find the user, then select the trash icon (**Delete user**) in their row. +3. In the **Confirm User Deletion?** dialog, enter the user name and your password to confirm. ## What happens during deletion -Coolify iterates over every team the user belongs to and applies these rules per team: +Coolify revokes the API tokens of the user. Then it applies these rules to every team that the user belongs to: ### The user is alone in the team @@ -33,16 +33,16 @@ The team and all of its resources are deleted from both the servers and Coolify' ### The user is not alone in the team -1. The user is the owner or admin, no other owner or admin exists, and the team **has** other members: - - Ownership transfers to the first team member who is not the owner or admin. +1. The user is an Owner, and another Owner or Admin is in the team: - The user is removed from the team. No resources are deleted. -2. The user is the owner or admin, no other owner or admin exists, and the team has **no** other members: - - The team and all of its resources are deleted from both the servers and Coolify's database. - -3. The user is not the owner or admin of the team: +2. The user is an Owner, and no other Owner or Admin is in the team: + - The first person with the **Member** role becomes an Owner. - The user is removed from the team. No resources are deleted. +3. The user is an Admin or a Member: + - The user is removed from the team. No resources are deleted. Ownership does not change. + ## Delete your own account -Use [Profile and account deletion](/core/security/authentication/profile) to delete your own account. Root team administrators cannot delete the root user, root team owners, or their own account from the team admin view. +Use [Profile and account deletion](/core/security/authentication/profile) to delete your own account. The team admin view does not let you delete your own account, the root user, or a user with a higher role in the root team. For example, a root team Admin cannot delete a root team Owner. diff --git a/content/docs/core/team/members/manage-members.mdx b/content/docs/core/team/members/manage-members.mdx index 193afedaa..b3852cb61 100644 --- a/content/docs/core/team/members/manage-members.mdx +++ b/content/docs/core/team/members/manage-members.mdx @@ -1,11 +1,11 @@ --- title: Manage Members -description: Review a Coolify team, change member roles, and manage pending invitations. +description: Review a Coolify team, change member roles and access, and manage pending invitations. --- # Manage members -Use the active team's **Members** page to review access, change another member's role, and revoke invitations that should no longer be accepted. +Use the active team's **Members** page to review access, change another member's role or access, and revoke invitations that should no longer be accepted. ## Review the member list @@ -13,7 +13,7 @@ Use the active team's **Members** page to review access, change another member's 2. Select **Team** in the Coolify sidebar. 3. Select **Members**. -The table shows **Name**, **Email**, **Role**, and the actions your role permits. Owners and administrators also see **2FA** status. Use search and the role or 2FA filters to narrow the list. +The table shows **Name**, **Email**, **Role**, and the actions your role permits. Owners and administrators also see **2FA** status and, under the email address of each Member, a summary of their access, such as `Access: Team-wide read (default)`. Use search and the role filter to narrow the list, and select a column header to sort it. Review the list regularly and remove access that is no longer needed. A person's role applies only to this team; the same account can have a different role in another team. @@ -29,28 +29,38 @@ Owners and Admins can change another member's role. The available actions depend | **Admin** | Change an Admin to Member, or change a Member to Admin. Owners cannot be changed. | | **Member** | No role-change actions. | -Find the member, open **Manage**, then select **Make owner**, **Make admin**, or **Make member**. +Find the member, open the `...` menu in their row, then select **Make owner**, **Make admin**, or **Make member**. - -When you change a member's role, Coolify revokes that user's API tokens for this team. The person must create replacement tokens if they still need API access. + +When you change a member to a lower role, Coolify revokes that user's API tokens for this team. The person must create replacement tokens if they still need API access. A change to a higher role keeps the tokens. +When an Owner or Admin becomes a Member, Coolify also resets their access to `Team-wide read (default)`. + The member list reloads after the change. Confirm that the **Role** column shows the new role. You cannot change your own role from the member list. Ask another person with sufficient access to make the change. --- +## Change a Member's access + +For a person with the **Member** role, open the `...` menu in their row and select **Edit access**. Choose a preset or set the scopes, then select **Save**. + +Follow [Set member access](/core/team/members/set-member-access) for the access levels, presets, and what a Member with limited access can see. + +--- + ## Review pending invitations -Owners and Admins can review **Pending Invitations** below the invitation form. +Owners and Admins can review **Pending invitations** below the invitation form. Each row shows: -- the invited email address -- whether the invitation was created for email delivery or as a link -- the role the person will receive -- the invitation link +- **Email**: the invited email address +- **Method**: whether the invitation was created for email delivery or as a link +- **Role**: the role the person will receive, and for a Member a summary of their access +- **Link**: a copy button for the invitation link Invitation links are valid for three days. A valid invitation for an email address must be accepted, revoked, or allowed to expire before another invitation can be created for that address. @@ -58,6 +68,6 @@ Invitation links are valid for three days. A valid invitation for an email addre ## Revoke an invitation -Select **Revoke** beside an invitation that should no longer grant access. +Select the trash icon (**Revoke invitation**) in the row of an invitation that should no longer grant access. The **Revoke invitation?** dialog shows that the invitation link stops working. Select **Revoke invitation** to confirm. -Coolify removes the pending invitation immediately. Confirm that its row disappears from **Pending Invitations**. If the person still needs access, create a new invitation with the correct role. +Coolify removes the pending invitation. Confirm that its row disappears from **Pending invitations**. If the person still needs access, create a new invitation with the correct role. diff --git a/content/docs/core/team/members/meta.json b/content/docs/core/team/members/meta.json index 63a026c57..90a147535 100644 --- a/content/docs/core/team/members/meta.json +++ b/content/docs/core/team/members/meta.json @@ -3,6 +3,7 @@ "pages": [ "overview", "add-a-member", + "set-member-access", "remove-a-member", "delete-user", "manage-members" diff --git a/content/docs/core/team/members/overview.mdx b/content/docs/core/team/members/overview.mdx index 54faa4ab5..bad1cc699 100644 --- a/content/docs/core/team/members/overview.mdx +++ b/content/docs/core/team/members/overview.mdx @@ -3,7 +3,7 @@ title: Overview description: Understand how team membership controls access to team-scoped resources and choose the right member management task. --- -import { ArrowsRight, Settings, UserAdd, UserRemove2 } from 'reicon-react'; +import { ArrowsRight, Key, Settings, UserAdd, UserRemove2 } from 'reicon-react'; # Members overview @@ -11,7 +11,7 @@ A Coolify team groups the people, resources, and settings they work with. Each p -Select the team you want to work with before changing its members. Owners and administrators can invite people, change other members' roles, revoke pending invitations, and remove members. +Select the team you want to work with before changing its members. Owners and administrators can invite people, change other members' roles, set the access of Members, revoke pending invitations, and remove members. @@ -25,6 +25,8 @@ When you switch teams, Coolify changes the resources and settings available in t Removing someone from a team removes their access to that team. It does not delete their Coolify account, their membership in other teams, or resources owned by the team. +A person with the **Member** role can have read access to the whole team, or access only to some projects, environments, or resources. See [Set member access](/core/team/members/set-member-access). + Read [Roles & Permissions](/core/team/roles-and-permissions) before granting administrative access. --- @@ -35,11 +37,25 @@ Owners and Admins can open **Team > General** to change the team name, descripti Team avatars use the instance's configured [Image storage](/core/instance-management/instance-settings). Check the active team before uploading an image or changing its details. +## Require two-factor authentication + +Owners and Admins can require [two-factor authentication](/core/security/authentication/2fa) for everyone in the team: + +1. Open **Team > General**. +2. In **Two-factor authentication**, select **Required for all members**. Select **Optional for members** to remove the requirement. +3. Select **Save changes**. + +You must configure 2FA on your own profile before you can require it. Otherwise Coolify shows `Enable two-factor authentication on your profile before you require it for the team.` + +When the team requires 2FA, a person without 2FA who opens the dashboard in this team goes to the **Two-factor authentication required** page. They must configure 2FA there before they can use the team, or switch to a team that does not require it. + +The requirement applies to dashboard sessions only. It does not block API tokens or MCP clients. + ## What the Members page shows Open **Team** in the Coolify sidebar, then select **Members**. -The member list shows each person's name, email address, role in the active team, and the actions available to you. Owners and administrators also see the invitation form and any pending invitations. +The member list shows each person's name, email address, role in the active team, and the actions available to you. Owners and administrators also see a summary of each Member's access under their email address, the invitation form, and any pending invitations. Coolify marks your own row with **You**. You cannot change your own role or remove yourself from this page. @@ -48,7 +64,7 @@ Coolify marks your own row with **You**. You cannot change your own role or remo ## Choose the next task -The **Manage > Remove member** action does not open a confirmation step. Confirm the person's name, email address, and role before selecting it. +After you confirm the removal, the person loses access to all resources of this team. Confirm the person's name, email address, and role before you continue. @@ -39,16 +39,23 @@ The **Manage > Remove member** action does not open a confirmation step. Confirm -### Select Remove +### Select Remove member -Find the person by name and email address, open **Manage** in their row, then select **Remove member**. +Find the person by name and email address, open the `...` menu in their row, then select **Remove member**. + + + + +### Confirm the removal + +The **Remove team member?** dialog shows that the user loses access to all resources of this team. Select **Remove member** to confirm. Coolify removes the team membership and revokes API tokens that belong to that user and team. -### Confirm the removal +### Verify the removal Verify that the person's row no longer appears in the member list. diff --git a/content/docs/core/team/members/set-member-access.mdx b/content/docs/core/team/members/set-member-access.mdx new file mode 100644 index 000000000..aecfb759f --- /dev/null +++ b/content/docs/core/team/members/set-member-access.mdx @@ -0,0 +1,154 @@ +--- +title: Set Member Access +description: Limit a Coolify team member to selected projects, environments, or resources, and choose the access levels they get there. +--- + +# Set member access + +Give a person with the **Member** role more than read-only access, or limit them to some projects, environments, or resources of the team. + +Owners and Admins always have full access to the projects and resources of their team. Access settings apply only to people with the **Member** role. + +## How member access works + +The access of a Member is a list of scopes. Each scope has two parts: + +- **Applies to**: the whole team, or one or more projects, environments, or resources +- the access levels that the Member gets there + +Scopes add up. A level on a project applies to all environments and resources in that project. A level on an environment applies to all resources in that environment. + +A new Member gets **Read** on the whole team. For a person that you invite, the invitation form and the member list show this as `Team: read`. A Member without saved access, for example after **Make member**, shows `Team-wide read (default)`. Both give the same access. + +### Access levels + +| Level | What the Member can do | Also gives | API ability | +| :--- | :--- | :--- | :--- | +| **Read** | See resources and their settings. Secrets, logs, and scheduled-task output stay hidden. | - | `read` | +| **Read secrets** | Also see environment variables and other secrets in the dashboard. | Read | `read:sensitive` | +| **Deploy** | Deploy, start, stop, and restart applications and services. | Read | `deploy` | +| **Write** | Change settings and create resources. Start, stop, and restart databases. See logs and scheduled-task output. | Deploy, Read secrets, Read | `write` | +| **Delete** | Delete resources, and their storage and backups. To delete a scheduled task, the Member also needs **Write**. | Read | `delete` | +| **Full access** | Every level. | All levels | `root` | + +**Write** gives **Read secrets** because a person who can change a resource can always read its secrets back. **Write** does not give **Delete**. Select **Delete** too if the Member must delete resources. + +The level descriptions in the access editor differ in some details. For example, the editor says that **Read** shows logs, but Coolify shows container logs, deployment debug output, and scheduled-task commands and output only with **Write**, because they can contain secrets. + +### What access levels do not give + +Access levels apply only to projects, environments, and resources. Even **Full access** on the whole team does not let a Member: + +- open a resource terminal, the container file browser, or the [Web Terminal](/core/infrastructure/servers/web-terminal) +- add, change, or remove servers, destinations, private keys, Git sources, S3 storages, tags, or notification settings +- change team or server shared variables, team settings, or members +- read the team audit log +- place resources on the localhost server +- read secret values through the API, or give a token `write:sensitive` + +A Member with **Write** or **Full access** can never open a resource terminal, the file browser, or the Web Terminal. Make the person an **Admin** if they need these controls. See [Roles & Permissions](/core/team/roles-and-permissions). + +### Presets + +A preset fills in the scopes for a common case. You can change the scopes after you select a preset. + +| Preset | Scopes | +| :--- | :--- | +| **Viewer** | **Read** on the whole team | +| **Developer** | **Write** and **Deploy** in one project. Select the project from the list. This preset shows only when the team has a project. | +| **Operator** | **Write**, **Deploy**, and **Delete** on the whole team | +| **Full access** | **Full access** on the whole team | + +--- + +## Set access when you invite a person + +Select **Member** as the role in the invitation form, then select **Scopes** to choose the access. The person gets these scopes when they accept the invitation. Follow [Add a member](/core/team/members/add-a-member) for the full steps. + +## Change the access of a Member + +You must be an **Owner** or **Admin** in the active team. + + + + +### Open the member list + +1. Confirm that the intended team is active. +2. Select **Team** in the Coolify sidebar. +3. Select **Members**. + + + + +### Open the access editor + +Find the person, open the `...` menu in their row, then select **Edit access**. + +**Edit access** shows only for people with the **Member** role. The dialog title is **Access for** followed by the person's name, and the dialog shows their current access. + + + + +### Choose the scopes + +Select a preset under **Start from a preset**, or change the scopes under **Scopes**: + +1. In **Applies to**, select the whole team, or one or more projects, environments, or resources. +2. Select the access levels for the scope. Levels that a selected level already gives are checked and locked. +3. Select **Add scope** to add a scope with other levels. Select the trash icon to remove a scope. + + + + +### Save the access + +Select **Save**. Coolify reloads the page. + +Confirm that the summary under the person's email address shows the new access, for example `Access: Team: read + 2 projects`. + + + + +If you remove every scope, the Member has no access. They do not see any project, environment, or resource of this team, and the member list shows `No access`. + + +In the root team, write access on a resource that runs on the localhost server lets a Member run a privileged container there. That gives root on the server that runs Coolify, and access to the data of all teams. Give **Write** or **Full access** in the root team only to people that you trust as instance administrators. + + +--- + +## What a Member with limited access sees + +A Member sees only the projects, environments, resources, deployments, and search results that their scopes cover. A project or environment shows when it holds a scope of the Member. It then shows only the environments and resources that the Member can access. + +A Member who has no scope on the whole team cannot open team-wide pages. These pages include servers, destinations, private keys and other credentials, Git sources, S3 storages, notifications, tags, team and server shared variables, and the team settings, members, and audit log pages. Coolify shows `Your access in this team is limited to some projects.` The API also rejects team-level endpoints for this Member with `403`. + +## Servers and team credentials + +A Member with access grants can use only some servers and team credentials: + +- To create, clone, or migrate a resource to a server, the Member needs **Write** on the whole team, or **Write** on a resource that already runs on that server. Server lists show only the servers that the Member can use. +- Only an instance administrator can place resources on the localhost server, the server that runs Coolify. +- To use team credentials, the Member needs **Write** on the whole team. This also applies to the API. A resource keeps the key or source that it already uses. Team credentials are: + - team private keys + - GitHub Apps, GitLab Apps, and Gitea Apps + - secret manager links, which use the team's integration tokens + - a new S3 storage for a database or volume backup schedule + - a server or S3 file that is not a backup of the same database, when the Member imports it into a database + +When the Member does not have this access, Coolify shows a message, for example `You need write access on the whole team to use team credentials, such as private keys, git sources, and S3 storages.` or `You need write access on the whole team to add an S3 storage to this backup.` + +Only Owners and Admins can add, change, or remove servers and team credentials. See [Roles & Permissions](/core/team/roles-and-permissions). + +## API tokens of a Member + +A Member can create [API tokens](/core/security/credentials/api-tokens) only with the levels and scopes that they have. A token never gets more access than its owner. A Member without a scope on the whole team must select **Selected projects, environments, or resources** for the token. A Member cannot give a token `write:sensitive`. + +The API returns secret values only to tokens of Owners and Admins. A Member's token with `read:sensitive` still gets API responses with the secrets hidden. To read secrets, the Member uses the dashboard. + +If the access of a Member becomes smaller, a token that has more access than the Member stops working. The API returns `403` with `This API token has more access than you have in this team. Revoke it and create a new token.` + +The same happens when a project, environment, or resource that a token of the Member selects is deleted. The token list shows the item as `Unavailable project`, `Unavailable environment`, or `Unavailable resource`. Edit the token to remove it. + +When an Owner or Admin becomes a Member with **Make member**, Coolify resets their access to `Team-wide read (default)` and revokes their API tokens for this team. Follow [Manage members](/core/team/members/manage-members) to change a role. diff --git a/content/docs/core/team/roles-and-permissions.mdx b/content/docs/core/team/roles-and-permissions.mdx index f7e5dc6d7..e2ca10c59 100644 --- a/content/docs/core/team/roles-and-permissions.mdx +++ b/content/docs/core/team/roles-and-permissions.mdx @@ -7,7 +7,13 @@ description: Compare Owner, Admin, and Member access across team management, res Coolify assigns each person a role for each team they join. A person can be an Owner in one team and a Member or Admin in another. -In Coolify v4.x, **Member** is the read-only role for most team resources. **Admin** and **Owner** can operate resources and manage team settings. Owner adds control over who else can become or remain an Owner. +By default, **Member** is the read-only role for team resources. **Admin** and **Owner** can operate resources and manage team settings. Owner adds control over who else can become or remain an Owner. + +Owners and Admins can give a Member more access, or limit a Member to some projects, environments, or resources. This access uses the levels **Read**, **Read secrets**, **Deploy**, **Write**, **Delete**, and **Full access**. See [Set member access](/core/team/members/set-member-access). + +In the tables below, the **Member** column shows the default access (**Read** on the whole team). When an entry names a level, a Member with that level on the resource can do the action. A Member whose access does not include the whole team cannot open team-wide pages, such as servers, credentials, notifications, team settings, and members. + +Access levels apply only to projects, environments, and resources. When the **Member** column shows **No**, a Member cannot do the action at any level, also with **Full access** on the whole team. ## Role comparison @@ -17,11 +23,12 @@ In Coolify v4.x, **Member** is the read-only role for most team resources. **Adm | :--- | :---: | :---: | :---: | | View the team and member list | Yes | Yes | Yes | | Change the team name and description | Yes | Yes | No | +| Require two-factor authentication for the team | Yes | Yes | No | | Invite Members or Admins | Yes | Yes | No | | Invite Owners | Yes | No | No | | Change or remove Members or Admins | Yes | Yes | No | | Change or remove Owners | Yes | No | No | -| Delete an eligible team | Yes | Yes | No | +| Delete an eligible team | Yes | No | No | The member-management controls apply to other people. Coolify does not show actions for changing your own role or removing yourself on the **Members** page. @@ -30,52 +37,84 @@ The member-management controls apply to other people. Coolify does not show acti | Permission | Owner | Admin | Member | | :--- | :---: | :---: | :---: | | View projects, environments, applications, databases, and services | Yes | Yes | Yes | -| Create, update, or delete projects and environments | Yes | Yes | No | -| Create, update, or delete applications, databases, and services | Yes | Yes | No | -| Deploy applications and services | Yes | Yes | No | -| Start, stop, restart, or otherwise operate resources | Yes | Yes | No | -| Manage deployments, environment variables, storage, scheduled tasks, tags, webhooks, and backups | Yes | Yes | No | +| View environment variables and other secrets in the dashboard | Yes | Yes | With **Read secrets** | +| View container logs, deployment debug output, and scheduled-task commands and output | Yes | Yes | With **Write** | +| Create projects | Yes | Yes | With **Write** on the whole team | +| Create environments in a project | Yes | Yes | With **Write** on the project | +| Create resources in an environment | Yes | Yes | With **Write** on the environment | +| Update projects, environments, applications, databases, and services | Yes | Yes | With **Write** | +| Delete projects, environments, applications, databases, and services | Yes | Yes | With **Delete** | +| Deploy, start, stop, or restart applications and services | Yes | Yes | With **Deploy** | +| Start, stop, or restart databases | Yes | Yes | With **Write** | +| Add or change environment variables, storage, scheduled tasks, webhooks, and backups | Yes | Yes | With **Write** | +| Delete storage, backup schedules, or backup executions | Yes | Yes | With **Delete** | +| Delete scheduled tasks | Yes | Yes | With **Write** and **Delete** | | Open a resource terminal or container file browser | Yes | Yes | No | -Member access lets a person inspect team resources without changing or deploying them. A page may still be visible to a Member while its editing and operational controls are unavailable. +Default Member access lets a person inspect team resources without changing or deploying them. A page may still be visible to a Member while its editing and operational controls are unavailable. + +**Write** on a project or environment also applies to the environments and resources in it. **Write** on one resource lets a Member change only that resource. A Member who can change environment variables can also delete them. ### Servers and destinations | Permission | Owner | Admin | Member | | :--- | :---: | :---: | :---: | | View team servers and destinations | Yes | Yes | Yes | +| Create, clone, or migrate a resource to a server | Yes | Yes | With **Write** on the whole team, or on a resource that already runs on that server | | Add, update, or remove servers and destinations | Yes | Yes | No | | Manage the proxy and server certificate authorities | Yes | Yes | No | | View or manage server security and Sentinel | Yes | Yes | No | | Use the Web Terminal | Yes | Yes | No | +| [Transfer a server](/core/infrastructure/servers/server-transfer) to another Coolify instance | Yes | No | No | + +Terminal commands run on your infrastructure. Coolify therefore restricts both the global [Web Terminal](/core/infrastructure/servers/web-terminal) and resource terminals to Owners and Admins. A Member cannot open a terminal or the file browser, also with **Write** or **Full access**. -Terminal commands run on your infrastructure. Coolify therefore restricts both the global [Web Terminal](/core/infrastructure/servers/web-terminal) and resource terminals to Owners and Admins. +Server lists, for example when you create a resource, show only the servers that you can use. Only an instance administrator can place resources on the localhost server, the server that runs Coolify. ### Team configuration and credentials | Permission | Owner | Admin | Member | | :--- | :---: | :---: | :---: | | View shared-variable entries | Yes | Yes | Yes | -| Create, update, or delete shared variables | Yes | Yes | No | +| Create, update, or delete project and environment shared variables | Yes | Yes | With **Write** on that project or environment | +| Create, update, or delete team and server shared variables | Yes | Yes | No | | View notification settings | Yes | Yes | Yes | | Configure notifications or send test notifications | Yes | Yes | No | | View team S3 storage, Git sources, and private-key entries | Yes | Yes | Yes | +| Use team credentials in a resource (see the list below) | Yes | Yes | With **Write** on the whole team | | Create, update, or delete S3 storage, Git sources, and private keys | Yes | Yes | No | -| View or manage cloud-init scripts and cloud provider tokens | Yes | Yes | No | +| Create, update, or delete tags | Yes | Yes | No | +| View or manage cloud-init scripts, cloud provider tokens, and integration tokens | Yes | Yes | No | + +Team credentials that need **Write** on the whole team: + +- team private keys +- GitHub Apps, GitLab Apps, and Gitea Apps +- secret manager links, which use the team's integration tokens +- a new S3 storage for a database or volume backup schedule +- a server or S3 file that is not a backup of the same database, when you import it into a database Viewing a credential entry does not mean Coolify reveals every stored secret. Secret fields can remain concealed even when the surrounding resource is visible. +The rule for team credentials also applies to the API. A resource keeps the private key or Git source that it already uses. When you do not have the access, Coolify shows a message that write access on the whole team is needed. + +Only an instance administrator can make a Git App system-wide, or change or delete a system-wide Git App. + ### API tokens -When API access is enabled for the instance, each role can create and revoke its own tokens. +Each role can create and revoke its own tokens. Tokens work only when an instance administrator turns on API access. While API access is off, the token page shows `API access is turned off`. | Permission | Owner | Admin | Member | | :--- | :---: | :---: | :---: | | Create and revoke personal API tokens | Yes | Yes | Yes | | Create a token with `read` permission | Yes | Yes | Yes | -| Grant `read:sensitive`, `write`, `write:sensitive`, `deploy`, or `root` permissions | Yes | Yes | No | +| Grant `read:sensitive`, `deploy`, `write`, `delete`, or `root` permissions | Yes | Yes | Only the levels the Member has | +| Grant `write:sensitive` permission | Yes | Yes | No | +| Give a token access to all resources in the team | Yes | Yes | Only with access on the whole team | + +API tokens belong to the person who creates them and are scoped to the active team. A token never gets more access than its owner. With default access, a Member can create only a read-only token. See [API permissions](/api/permissions) for the available token permissions. -API tokens belong to the person who creates them and are scoped to the active team. A Member can create a read-only token, but cannot grant it sensitive, write, deployment, or root permissions. See [API permissions](/api/permissions) for the available token permissions. +The API returns secret values only to a token with `read:sensitive` or `root` that belongs to an Owner or Admin. A Member's token with `read:sensitive` still gets API responses with the secrets hidden. --- @@ -87,6 +126,8 @@ Owner is the highest team role. Only an Owner can: - promote an Admin or Member to Owner - change another Owner to Admin or Member - remove another Owner from the team +- transfer a server to another Coolify instance +- delete the team More than one person can have the Owner role. Keep at least one trusted Owner available so the team does not depend on a single account. @@ -102,16 +143,16 @@ An Owner or Admin role in another team does not make a person an instance admini ## Choose a role -- Choose **Member** when the person only needs to review team resources and their current state. +- Choose **Member** when the person only needs to review team resources and their current state, or when they must work only in some projects, environments, or resources. Then [set their access](/core/team/members/set-member-access). - Choose **Admin** when the person should deploy and operate resources, manage servers and credentials, change team settings, and manage Members or Admins. - Choose **Owner** only when the person must also grant, change, or remove Owner access. -Use the lowest role that provides the access the person needs. You can update another person's role from **Teams > Members**. Follow [Manage Members](/core/team/members/manage-members) for the role-change rules and verification steps. +Use the lowest role that provides the access the person needs. You can update another person's role from **Team > Members**. Follow [Manage Members](/core/team/members/manage-members) for the role-change rules and verification steps. Team administrators and owners can review [Audit Log](/core/team/audit-log) events. Members cannot read the team audit log. ## Sensitive content in the dashboard -Users without permission to update a resource cannot view container logs, scheduled-task commands/output, Compose or file-mount content, hardcoded Compose environment values, proxy configuration, server shared values, or protected credentials such as basic-auth passwords, log-drain keys, and the Sentinel token. Sensitive API responses have an additional token-permission check; see [API permissions](/api/permissions). +Users without permission to update a resource cannot view container logs, scheduled-task commands/output, Compose or file-mount content, hardcoded Compose environment values, proxy configuration, server shared values, or protected credentials such as basic-auth passwords, log-drain keys, and the Sentinel token. Sensitive API responses have an additional token-permission check, and still need a token owned by a team Owner or Admin; see [API permissions](/api/permissions). Container logs are an exception: through the API, a token with `read:sensitive` can read them, also when its owner is a Member. -The team Danger Zone is visible only to its owner. Impersonation and the team admin view require an instance administrator. Credentials such as private keys, Git sources, S3 storage, and integration tokens must belong to the team that owns the resource. +The team Danger Zone is visible only to its owner. The team admin view requires an instance administrator. Impersonation is available only on Coolify Cloud, and only to the root user. Credentials such as private keys, Git sources, S3 storage, and integration tokens must belong to the team that owns the resource. diff --git a/content/docs/core/team/shared-variables.mdx b/content/docs/core/team/shared-variables.mdx index 28f092c0a..2e796b4ce 100644 --- a/content/docs/core/team/shared-variables.mdx +++ b/content/docs/core/team/shared-variables.mdx @@ -136,7 +136,7 @@ Lines beginning with `#` are treated as comments, except `# coolify:` lines. Dev Removing a variable's line and saving deletes that shared variable. Review the entire editor before selecting **Save changes**. -Locked and multiline variables appear as placeholders in Developer view and cannot be changed there. Edit multiline variables in **Normal view**. To change a locked value, delete the variable and create it again. +Locked and multiline variables appear as placeholders in Developer view and cannot be changed there. Edit multiline variables in **Normal view**. To replace a locked value, use **Normal view**, as described in [Lock a shared variable](#lock-a-shared-variable). To make a shared variable literal in Developer view, put `# coolify: literal` directly above its line. Use `# coolify: literal=false` to turn it off. Shared variables support only the `literal` flag. If a variable has no `# coolify:` line, its flag does not change when you save. @@ -147,12 +147,24 @@ TEMPLATE=$NOT_A_REFERENCE --- -## Update or delete a shared variable +## Update a shared variable In **Normal view**, open the variable entry to change its name, value, comment, or **Value type**, then select **Update variable**. References use the variable name. If you rename a shared variable, update every `{{scope.VARIABLE_NAME}}` reference that used the previous name. +## Lock a shared variable + +Lock a variable to hide its value for good. In **Normal view**, open the variable entry and select **Lock**. The **Lock Environment Variable?** dialog shows what changes: the value is hidden, and you cannot see or copy it again. Select **Lock** to confirm. + +The lock is permanent. You cannot unlock the variable in the UI, the API, or MCP. + +To replace a locked value, open the variable entry and enter the new value in **Value**, then select **Update variable**. Leave **Value** empty to keep the current value. Coolify never shows the locked value. + +--- + +## Delete a shared variable + To permanently remove a variable, select **Delete**, enter the variable name shown in the confirmation dialog, and select **Permanently Delete**. Deleting a shared variable does not remove its references from resource configuration. Search the affected resources and replace or remove those references before their next deployment. diff --git a/content/docs/databases/backups.mdx b/content/docs/databases/backups.mdx index f274ba1d8..10eb7a878 100644 --- a/content/docs/databases/backups.mdx +++ b/content/docs/databases/backups.mdx @@ -7,7 +7,7 @@ import { BranchUp, Refresh23, Server } from 'reicon-react'; # Backups -Coolify can create scheduled, engine-aware database backups for PostgreSQL, MySQL, MariaDB, MongoDB, ClickHouse, and SQLite. Each backup schedule creates a backup on the database's server, and can upload a copy to an S3-compatible storage provider. To deploy a database and turn backups on, start with [Databases](/databases#self-host-a-database-with-backups). +Coolify can create scheduled, engine-aware database backups for PostgreSQL, MySQL, MariaDB, MongoDB, ClickHouse, and SQLite. Each backup schedule creates a backup on the database's server, and can upload a copy to an S3-compatible, SFTP, FTPS, or WebDAV storage. To deploy a database and turn backups on, start with [Databases](/databases#self-host-a-database-with-backups). Redis, Dragonfly, and KeyDB do not support this scheduled database backup workflow. Use the engine's persistence and backup tools for those databases, or deploy a backup-capable service separately. @@ -122,11 +122,15 @@ The limits work independently. Coolify deletes a backup when any configured limi ## Upload backups to S3 -1. Configure and validate an S3-compatible storage under [S3 storage](/core/s3-storage/overview). +1. Configure and validate an S3-compatible storage under [S3 storage](/core/s3-storage/overview), or an [SFTP, FTPS, or WebDAV storage](/core/s3-storage/sftp-ftps-webdav). 2. Open the database schedule and open **S3 storage**. 3. Select one or more destinations in **S3 storages**, select **Enable S3**, and select **Save changes**. 4. Optionally set **Local copy** to **Delete after S3 upload**. +The **S3 storages** list also shows the SFTP, FTPS, and WebDAV storages of the team. Uploads, retention, downloads, and restores work the same for every storage type. + +A member whose access is limited to some projects or resources cannot add a new storage to a backup schedule. This needs write access on the whole team, also through the API. + Coolify uploads the local backup file to every selected S3 storage after the local dump succeeds. The execution shows each destination and its upload result. **S3 warning** means at least one upload failed; other destinations may still contain a usable copy. **Local copy > Delete after S3 upload** removes the local file only after every selected S3 destination has a successful copy. If any upload fails, Coolify keeps the local file. It does not remove the S3 copy. Set S3 retention separately; local and S3 retention rules are independent. The S3 limits apply separately to each destination. @@ -149,7 +153,7 @@ A failed S3 upload does not necessarily mean the local database dump failed. Rea ## Download backup copies -Open **Executions** and select **Download** on a successful backup. Coolify uses the local file when available, or redirects to a short-lived link for an available S3 copy when the local file is gone. S3 download links expire after 15 minutes; request another download if a link expires. Backup downloads require an Admin or Owner role. +Open **Executions** and select **Download** on a successful backup. Coolify uses the local file when available, or redirects to a short-lived link for an available S3 copy when the local file is gone. S3 download links expire after 15 minutes; request another download if a link expires. A copy in an SFTP, FTPS, or WebDAV storage downloads through Coolify. Backup downloads require an Admin or Owner role. If the instance administrator has configured S3 for file downloads, Coolify may first prepare the local backup in that storage. Wait for preparation to finish and allow the browser to open the download. @@ -184,4 +188,6 @@ Changing a schedule's destinations affects future uploads. Existing copies remai Due database backups are dispatched every minute independently of other schedule types. A scheduled backup whose queued job was lost is queued again after 60 minutes. A backup is skipped while the database starts, restarts, or imports, and a backup that exceeds its timeout fails with the timeout error. +A failed backup notifies the team on the first failure, then at most once a day while it keeps failing. This also applies to a backup whose S3 upload keeps failing. The first successful run after a failure sends one "works again" notification. Coolify never disables a backup schedule automatically, so it starts again by itself after an outage. + For backups of several databases, each database has its own result and finish time. All-database PostgreSQL, MySQL, and MariaDB backups fail if the dump command fails rather than retaining an incomplete archive. Review every result before relying on a backup set. diff --git a/content/docs/databases/choose-a-database.mdx b/content/docs/databases/choose-a-database.mdx index fb543e087..05d672cd9 100644 --- a/content/docs/databases/choose-a-database.mdx +++ b/content/docs/databases/choose-a-database.mdx @@ -37,7 +37,7 @@ Create the database from **New Resource > Databases**. Use an application only f ## Choose a version and image -The database selector provides the versions and images supported by the current Coolify release. PostgreSQL currently offers PostgreSQL 18, 17, and 16, plus Supabase PostgreSQL, PostGIS, and PGVector extension images. Select an image that matches your application's compatibility, architecture, and migration requirements. +The database selector provides the versions and images supported by the current Coolify release. PostgreSQL currently offers PostgreSQL 18, 17, and 16, plus Supabase PostgreSQL, PostGIS, and PGVector extension images. **Redis / Valkey** offers Valkey 9, the default, and Redis 8. Select an image that matches your application's compatibility, architecture, and migration requirements. Do not change a production database image to another major version without checking the engine's upgrade procedure and taking a verified backup first. A database image version is not the same as a Coolify version. diff --git a/content/docs/databases/clickhouse.mdx b/content/docs/databases/clickhouse.mdx index 74a24e547..e02fb7448 100644 --- a/content/docs/databases/clickhouse.mdx +++ b/content/docs/databases/clickhouse.mdx @@ -61,7 +61,7 @@ Select **Start** and follow the startup output. Wait until ClickHouse is running | Setting | Default or behavior | | :--- | :--- | | Native internal port | `9000` | -| Default image | `clickhouse/clickhouse-server:25.11` | +| Default image | `clickhouse/clickhouse-server:26.8`. Existing databases keep their image. | | HTTP interface | `8123` inside the container | | Administrator username | `default` | | Database | `default` when no other database is configured | diff --git a/content/docs/databases/configuration/overview.mdx b/content/docs/databases/configuration/overview.mdx index 29baece8d..e8339a40b 100644 --- a/content/docs/databases/configuration/overview.mdx +++ b/content/docs/databases/configuration/overview.mdx @@ -19,7 +19,7 @@ The available pages depend on the database engine and the resource state. For ex | **Environment Variables** | Runtime variables passed to the database container. | [Configure environment variables](/databases/configuration/environment-variables) | | **Servers** | The server and destination where the database runs. | [Configure multi-server deployments](/core/infrastructure/scaling/multi-server-deployments) | | **Persistent Storage** | Volumes, directories, and files mounted into the database container. | [Configure persistent storage](/databases/configuration/persistent-storage) | -| **Backups** | Scheduled backups, and **Import backup** to restore a PostgreSQL, MySQL, MariaDB, MongoDB, or SQLite backup. Shown only for engines with backup support. | [Database backups](/databases/backups), [Restore a database](/databases/restore) | +| **Backups** | Scheduled backups, and **Import backup** to restore a PostgreSQL, MySQL, MariaDB, MongoDB, or SQLite backup. Redis, Dragonfly, and KeyDB do not show this page. | [Back up a database](/databases/backups) and [Restore a database](/databases/restore) | | **Webhooks** | Authenticated requests for database operations from external automation. | [Deploy webhooks](/core/automation/deploy-webhooks) | | **Healthcheck** | The Docker health probe used to report database health. | [Configure health checks](/databases/configuration/health-checks) | | **Resource Limits** | CPU and memory limits applied to the database container. | [Configure resource limits](/databases/configuration/resource-limits) | diff --git a/content/docs/databases/index.mdx b/content/docs/databases/index.mdx index 0c12bbe8c..603b7b51b 100644 --- a/content/docs/databases/index.mdx +++ b/content/docs/databases/index.mdx @@ -27,7 +27,7 @@ If you are new to Coolify databases, start with [What is a database](/databases/ | [ClickHouse](/databases/clickhouse) | Analytical and column-oriented workloads | Yes | No | `9000` | | [SQLite](/databases/sqlite) | File-based databases on the same server; experimental | Yes | Yes | None | -Scheduled backups means Coolify can run an engine-specific dump from the database's **Backups** page. Dashboard restore means **Import backup** on the **Backups** page can load a backup while the database is running. For ClickHouse, the **Import backup** dialog reports that restore is not supported. Redis, Dragonfly, and KeyDB do not show **Backups**, so they have no dashboard restore. They still have persistent storage. +Scheduled backups means Coolify can run an engine-specific dump from the database's **Backups** page. Dashboard restore means the **Import backup** button on **Backups** can load a backup while the database is running. For ClickHouse, the import dialog reports that restore is not supported. Redis, Dragonfly, and KeyDB do not show **Backups**, so they have no import. They still have persistent storage. ClickHouse and SQLite schedules apply to the standalone database resource. A PostgreSQL, MySQL, MariaDB, or MongoDB database inside a [Service](/services) can use the same scheduled backup workflow. See [Back up a database inside a service](/databases/backups#back-up-a-database-inside-a-service). @@ -38,9 +38,9 @@ ClickHouse and SQLite schedules apply to the standalone database resource. A Pos 3. Review the generated credentials and persistent volume, then select **Start**. Wait until the database is running and healthy. Copy the **Internal URL** into applications on the same destination network. A new database has no public endpoint. Read [Network access](#network-access) and [Database SSL](/databases/ssl) before you publish a port. 4. Open **Backups**, select **+ Add**, and enter a five-field cron expression or one of these names: `every_minute`, `hourly`, `daily`, `weekly`, `monthly`, `yearly`. The schedule uses the server timezone, or the Coolify instance timezone when the server has none. If the database is stopped when the schedule fires, Coolify skips that run. Scope and per-engine dump commands are in [Database backups](/databases/backups). 5. Set retention. **Backups to keep**, **Days to keep**, and **Maximum storage (GB)** each use `0` for no limit. The limits work independently: Coolify deletes a backup when any configured limit is reached, keeping the most recent backups first. S3 retention uses the same three fields and is independent of the local limits. Local files are written under `/data/coolify/backups` on the database server. -6. Send a copy off the server. Add and validate an [S3-compatible storage](/core/s3-storage/overview). The bucket must already exist. Coolify has setup guides for Amazon S3, Cloudflare R2, Neon Object Storage, and Supabase Storage, and also supports DigitalOcean Spaces, MinIO, Backblaze B2, Scaleway Object Storage, Hetzner S3 Storage, Wasabi Hot Cloud Storage, Vultr, CloudPe Object Storage, and IDrive e2. On the schedule, select the storage and **Enable S3**. **Delete after S3 upload** removes the local file only after the upload succeeds. +6. Send a copy off the server. Add and validate an [S3-compatible storage](/core/s3-storage/overview), or an [SFTP, FTPS, or WebDAV storage](/core/s3-storage/sftp-ftps-webdav). An S3 bucket must already exist. Coolify has setup guides for Amazon S3, Cloudflare R2, Neon Object Storage, and Supabase Storage, and also supports DigitalOcean Spaces, MinIO, Backblaze B2, Scaleway Object Storage, Hetzner S3 Storage, Wasabi Hot Cloud Storage, Vultr, CloudPe Object Storage, and IDrive e2. On the schedule, select the storage and **Enable S3**. **Delete after S3 upload** removes the local file only after the upload succeeds. 7. Select **Back up now** while the database is running. Confirm the execution status is **Success**, the database names match the scope you chose, the file size is greater than zero, and the S3 upload succeeded when S3 is enabled. -8. Restore a copy before you trust the backup. **Import backup** on the **Backups** page accepts a file from your computer, an absolute path on the server, or an object in S3 storage for PostgreSQL, MySQL, MariaDB, MongoDB, and SQLite. Stop application writes and take a separate backup of the target first. ClickHouse has no built-in import; restore that archive with a ClickHouse client. Follow [Restore a database](/databases/restore). +8. Restore a copy before you trust the backup. On **Backups**, select **Import backup**. It accepts a file from your computer, an absolute path on the server, or a file in a backup storage for PostgreSQL, MySQL, MariaDB, MongoDB, and SQLite. Stop application writes and take a separate backup of the target first. ClickHouse has no built-in import; restore that archive with a ClickHouse client. Follow [Restore a database](/databases/restore). ## What you still own @@ -66,7 +66,7 @@ PostgreSQL, MySQL, MariaDB, MongoDB, ClickHouse, and experimental SQLite. Redis, -PostgreSQL, MySQL, MariaDB, MongoDB, and SQLite. **Import backup** on the **Backups** page can take a file from your computer, a path on the server, or S3 storage. ClickHouse shows the same dialog and reports that restore is not supported. See [Restore a database](/databases/restore). +PostgreSQL, MySQL, MariaDB, MongoDB, and SQLite. Select **Import backup** on the **Backups** page. It can take a file from your computer, a path on the server, or a file in a backup storage. For ClickHouse, the import dialog reports that restore is not supported. Redis, Dragonfly, and KeyDB have no **Backups** page and no import. See [Restore a database](/databases/restore). @@ -189,7 +189,7 @@ The database resource navigation separates configuration from day-to-day operati | **Environment Variables** | Manage runtime variables passed to the database container. | [Environment variables](/databases/configuration/environment-variables) | | **Servers** | Review or change the selected server and destination. | [Configure multi-server deployments](/core/infrastructure/scaling/multi-server-deployments) | | **Persistent Storage** | Manage the named volumes and mounts that keep database data across container recreation. | [Persistent storage](/databases/configuration/persistent-storage) | -| **Backups** | Schedule backups, and use **Import backup** to restore a PostgreSQL, MySQL, MariaDB, MongoDB, or SQLite backup while the database is running. Redis, Dragonfly, and KeyDB do not show this page. | [Database backups](/databases/backups), [Restore a database](/databases/restore) | +| **Backups** | Schedule backups, and select **Import backup** to restore a supported PostgreSQL, MySQL, MariaDB, MongoDB, or SQLite backup while the database is running. Redis, Dragonfly, and KeyDB do not show this page. | [Database backups](/databases/backups) and [Restore a database](/databases/restore) | | **Webhooks** | Create authenticated requests for database operations from external automation. | [Deploy webhooks](/core/automation/deploy-webhooks) | | **Healthcheck** | Configure the Docker readiness and liveness probe. | [Health checks](/databases/configuration/health-checks) | | **Resource Limits** | Set CPU and memory limits for the database container. | [Resource limits](/databases/configuration/resource-limits) | diff --git a/content/docs/databases/mariadb.mdx b/content/docs/databases/mariadb.mdx index 474290f8f..45eb70310 100644 --- a/content/docs/databases/mariadb.mdx +++ b/content/docs/databases/mariadb.mdx @@ -61,7 +61,7 @@ Select **Start** and follow the startup output. Wait until MariaDB is running an | Setting | Default or behavior | | :--- | :--- | | Internal port | `3306` | -| Default image | `mariadb:11` | +| Default image | `mariadb:12.3`. Existing databases keep their image. | | Normal user | `mariadb` | | Initial database | `default` | | Data mount | `/var/lib/mysql` | diff --git a/content/docs/databases/mongodb.mdx b/content/docs/databases/mongodb.mdx index 65f8971fa..e0fb39ffa 100644 --- a/content/docs/databases/mongodb.mdx +++ b/content/docs/databases/mongodb.mdx @@ -61,7 +61,7 @@ Select **Start** and follow the startup output. Wait until MongoDB is running an | Setting | Default or behavior | | :--- | :--- | | Internal port | `27017` | -| Default image | `mongo:7` | +| Default image | `mongo:9`. Existing databases keep their image. | | Root username | `root` | | Initial database | `default` | | Data mounts | `/data/db` and `/data/configdb` | diff --git a/content/docs/databases/mysql.mdx b/content/docs/databases/mysql.mdx index d25afefbb..cec0c0324 100644 --- a/content/docs/databases/mysql.mdx +++ b/content/docs/databases/mysql.mdx @@ -61,7 +61,7 @@ Select **Start** and follow the startup output. Wait until MySQL is running and | Setting | Default or behavior | | :--- | :--- | | Internal port | `3306` | -| Default image | `mysql:8` | +| Default image | `mysql:9.7`. Existing databases keep their image. | | Normal user | `mysql` | | Initial database | `default` | | Data mount | `/var/lib/mysql` | diff --git a/content/docs/databases/redis.mdx b/content/docs/databases/redis.mdx index 74c190ff7..80f7bc4d9 100644 --- a/content/docs/databases/redis.mdx +++ b/content/docs/databases/redis.mdx @@ -5,9 +5,9 @@ description: Deploy and operate Redis on Coolify with generated credentials, per # Redis -Coolify deploys Redis as a standalone in-memory datastore on the selected server and destination. A new resource gets a generated password, a persistent volume at `/data`, an internal connection URL, and a health check. +Coolify deploys Redis or Valkey as a standalone in-memory datastore on the selected server and destination. A new resource gets a generated password, a persistent volume at `/data`, an internal connection URL, and a health check. -Redis is a key-value datastore commonly used for caching, queues, streams, and short-lived application state. +Redis is a key-value datastore commonly used for caching, queues, streams, and short-lived application state. [Valkey](https://valkey.io) is an open-source fork of Redis that works with the same clients, commands, and configuration. Coolify offers both as images of the Redis database type. ## Create a Redis database @@ -23,7 +23,7 @@ Open the project and environment where the database should live, then select **N ### Select Redis -Under **Databases**, select **Redis**. You can also search for **Redis** by name. +Under **Databases**, select **Redis / Valkey**. You can also search for **Redis** or **Valkey** by name, or type `new redis` or `new valkey` in the global search. @@ -42,6 +42,13 @@ Select the Docker network destination that Redis should join. +### Select a Redis or Valkey image + +Select **Valkey 9** (`valkey/valkey:9-alpine`, the default) or **Redis 8** (`redis:8`). + + + + ### Review the generated configuration Coolify creates the resource and opens **General**. Review the image, username, generated password, SSL settings, and connection URLs. Keep the default private networking unless an external client requires access. @@ -61,7 +68,7 @@ Select **Start** and follow the startup output. Wait until Redis is running and | Setting | Default or behavior | | :--- | :--- | | Internal port | `6379`; TLS uses `6380` | -| Default image | `redis:7.2` | +| Default image | `valkey/valkey:9-alpine`. Existing databases keep their image. | | Username | `default` | | Data mount | `/data` | | Scheduled database backups | Not supported by Coolify | diff --git a/content/docs/databases/restore.mdx b/content/docs/databases/restore.mdx index c947e7458..ba7075d65 100644 --- a/content/docs/databases/restore.mdx +++ b/content/docs/databases/restore.mdx @@ -1,11 +1,13 @@ --- title: Restore a Database -description: Restore database backups from an upload, a server file, or S3-compatible storage. +description: Restore database backups from an upload, a server file, or a backup storage. --- # Restore a database -Open the **Backups** page of a running database and select **Import backup** to restore a backup from your computer, the database server, or S3 storage. For a service stack, select **Import backup** on the service's **Backups** page, then select the database component. +Open a running database's **Backups** page and select **Import backup** to restore a backup from your computer, the database server, or a [backup storage](/core/s3-storage/overview). The import opens in a dialog. Imports are also available for supported database components inside a service stack. + +Older links to the **Import Backup** page open the **Backups** page. Stop application writes and take a separate backup of the target before importing. Review the selected database, backup format, generated script, and replacement options. An import can overwrite data and credentials. @@ -19,7 +21,8 @@ Stop application writes and take a separate backup of the target before importin | MySQL and MariaDB | SQL dumps, including all-database backups; optional user and privilege restoration. | | MongoDB | Archives and dump directories. | | SQLite | Database files; choose the target file under **Restore into**. | -| Redis, Dragonfly, KeyDB, ClickHouse | No built-in import workflow; use an engine-specific restore process. | +| ClickHouse | **Import backup** reports that restore is not supported; use a ClickHouse client. | +| Redis, Dragonfly, KeyDB | No **Backups** page and no import; use an engine-specific restore process. | Coolify detects formats before changing data and supports gzip, bz2, xz, and zip compression as well as supported archives. Ensure the backup matches the target engine and version, and that the server has enough free space. @@ -37,14 +40,16 @@ PostgreSQL restores run in one transaction. Replace restores of SQL backups swap ## Select and import a backup -1. Open the **Backups** page of the running target database and select **Import backup**. -2. Select a source: - - Upload a backup from your computer. - - Enter the backup's absolute server path and select **Check file**. - - Select available team **S3 storage**, enter the file path within the bucket, and check the file. -3. Review file information, backup contents, restore options, and the generated import command. -4. Start the restore and complete its confirmation. -5. Follow **Database Restore Output** until the operation finishes. +1. Open the running target database and select **Backups**. +2. Select **Import backup**. For a service, open the service's **Backups** page, select **Import backup**, then select the **Database** if the service has more than one. +3. Under **Backup source**, select a source: + - **File**: upload a backup from your computer, or enter the absolute **File path on the server** and select **Check file**. + - **Storage**: select a team backup storage in **Storage**, enter the **File path** in the storage, and select **Check file**. +4. Review file information, backup contents, restore options, and the generated import command. +5. Start the restore and complete its confirmation. +6. Follow **Database Restore Output** until the operation finishes. + +If the database is not running, the dialog asks you to start it first. An SFTP storage needs a saved host key before Coolify can read a backup from it. See [SFTP, FTPS, and WebDAV storage](/core/s3-storage/sftp-ftps-webdav). Coolify uses the selected source; an earlier unused upload does not replace a checked server path. A second start, restart, or import is rejected while an import runs. Interrupted or stale imports are stopped and cleaned up so they do not indefinitely block later operations. @@ -73,7 +78,7 @@ curl --request POST "https://coolify.example.com/api/v1/databases/ Connect application** section, select an application on the same server, choose the container **Mount path**, and select **Mount volume**. Configure the application to open the database file at that path and redeploy it. The application must run as user `65532` or root to access the files. +Under the database's **General > Connect application** section, select an application on the same server, choose the container **Mount path**, and select **Mount volume**. Configure the application to open the database file at that path and redeploy it. The application can run as any user ID, because the database files are writable by every user. + +Keep the data in the Docker volume. If you mount the files with a bind mount instead, every user on the host can read and change them. + +A SQLite database created before Coolify v4.6.0 keeps its older image. With that image, the application must run as user `65532` or root to write the files. New databases use `peakimages/sqlite:3.54.1-v0.2.0`. For a Docker Compose application, Coolify shows the volume lines to add to the service that uses SQLite. Copy them into the application's Compose file and redeploy. Start the SQLite database first because Compose does not create the external volume. diff --git a/content/docs/deploy-your-first-app.mdx b/content/docs/deploy-your-first-app.mdx index f1c996a72..b1f2a604d 100644 --- a/content/docs/deploy-your-first-app.mdx +++ b/content/docs/deploy-your-first-app.mdx @@ -433,11 +433,11 @@ Coolify MCP can inspect and start existing resources, but its current tools cann -After [setting up Coolify MCP](/mcp/setup), create a `root` token for this end-to-end workflow, then give your MCP client the application UUID or its exact name. The prompts need to inspect the application, start it, and inspect it again. A `deploy` token cannot perform the read operations because selecting `deploy` creates a deploy-only token. +After [setting up Coolify MCP](/mcp/setup), create a `root` token for this end-to-end workflow, then give your MCP client the application UUID or its exact name. The prompts need to inspect the application, start it, and inspect it again. A token with only `deploy` cannot perform the read operations. -A `root` token bypasses the `read`, `write`, and `deploy` endpoint checks and can return supported sensitive data. It remains limited to the active team, but it grants more access than routine MCP use requires. Revoke it when you finish this first deployment. +A `root` token bypasses the `read`, `write`, `delete`, and `deploy` endpoint checks and can return supported sensitive data. It remains limited to the active team, but it grants more access than routine MCP use requires. Revoke it when you finish this first deployment. diff --git a/content/docs/deploy-your-first-database.mdx b/content/docs/deploy-your-first-database.mdx index d2c7caa39..35cdcb6e2 100644 --- a/content/docs/deploy-your-first-database.mdx +++ b/content/docs/deploy-your-first-database.mdx @@ -151,7 +151,10 @@ A resource is something Coolify will run for you, such as an app, database, or s In the resource list: - search for **Redis** -- click **Redis** +- click **Redis / Valkey** +- select **Redis 8** + +Valkey 9 is the default image. It is a fork of Redis and works with the same `redis-cli` commands, so you can also select it for this guide. Coolify will create a Redis database resource with generated settings and credentials. @@ -458,11 +461,11 @@ Coolify MCP can inspect and start existing resources, but its current tools cann -After [setting up Coolify MCP](/mcp/setup), create a `root` token for this end-to-end workflow, then give your client the Redis UUID or exact name. The prompts need to inspect Redis, start it, and read its sensitive connection values. A `deploy` token cannot perform read operations, and `read:sensitive` cannot start the database. +After [setting up Coolify MCP](/mcp/setup), create a `root` token for this end-to-end workflow, then give your client the Redis UUID or exact name. The prompts need to inspect Redis, start it, and read its sensitive connection values. A token without `deploy` cannot start the database, and a token without `read:sensitive` cannot read its connection values. -A `root` token bypasses the `read`, `write`, and `deploy` endpoint checks and can return supported sensitive data. It remains limited to the active team, but it grants more access than routine MCP use requires. Revoke it when you finish this first deployment. +A `root` token bypasses the `read`, `write`, `delete`, and `deploy` endpoint checks and can return supported sensitive data. It remains limited to the active team, but it grants more access than routine MCP use requires. Revoke it when you finish this first deployment. diff --git a/content/docs/deploy-your-first-service.mdx b/content/docs/deploy-your-first-service.mdx index 8e60f89e5..98f65ccef 100644 --- a/content/docs/deploy-your-first-service.mdx +++ b/content/docs/deploy-your-first-service.mdx @@ -420,11 +420,11 @@ Coolify MCP can inspect and start existing resources, but its current tools cann -After [setting up Coolify MCP](/mcp/setup), create a `root` token for this end-to-end workflow, then give your client the service UUID or exact name. The prompts need to inspect the service, start it, and inspect it again. A `deploy` token cannot perform the read operations because selecting `deploy` creates a deploy-only token. +After [setting up Coolify MCP](/mcp/setup), create a `root` token for this end-to-end workflow, then give your client the service UUID or exact name. The prompts need to inspect the service, start it, and inspect it again. A token with only `deploy` cannot perform the read operations. -A `root` token bypasses the `read`, `write`, and `deploy` endpoint checks and can return supported sensitive data. It remains limited to the active team, but it grants more access than routine MCP use requires. Revoke it when you finish this first deployment. +A `root` token bypasses the `read`, `write`, `delete`, and `deploy` endpoint checks and can return supported sensitive data. It remains limited to the active team, but it grants more access than routine MCP use requires. Revoke it when you finish this first deployment. diff --git a/content/docs/integrations/networking/cloudflare/tunnels/single-resource.mdx b/content/docs/integrations/networking/cloudflare/tunnels/single-resource.mdx index ed50587dc..1407590bc 100644 --- a/content/docs/integrations/networking/cloudflare/tunnels/single-resource.mdx +++ b/content/docs/integrations/networking/cloudflare/tunnels/single-resource.mdx @@ -186,7 +186,6 @@ Coolify uses the instance URL to generate the proxy routes for the dashboard: ```text /app/* -> coolify:6001 -/apps/* -> coolify:6001 /terminal/ws -> coolify:6002 /* -> coolify:8080 ``` diff --git a/content/docs/integrations/security/cloudflare/dns-management.mdx b/content/docs/integrations/security/cloudflare/dns-management.mdx index ca467ff1b..f9ab21ea7 100644 --- a/content/docs/integrations/security/cloudflare/dns-management.mdx +++ b/content/docs/integrations/security/cloudflare/dns-management.mdx @@ -12,21 +12,33 @@ Coolify can create DNS records for application and service domains using a team' 1. Create a Cloudflare API token with **Zone > DNS > Edit** and **Zone > Zone > Read** for the zones you want Coolify to manage. 2. In Coolify, open **Keys & Tokens > Integration Tokens** and select **New token**, then choose **Cloudflare** in **Provider**. 3. Enter a **Token name**, paste the **API token**, and select the **DNS** capability. -4. Optionally enable **Automatically configure DNS**. New domains are configured automatically when there is one unambiguous matching credential. +4. Optionally enable **Automatically configure DNS**. New and edited domains are configured automatically when there is one unambiguous matching credential. 5. Select **Validate and add**. Open the saved token's edit icon to review **Domains this token can manage**. Use **Refresh zones** after changing provider permissions, and **Validate and save** when editing credentials. Integration tokens belong to a team. Add the token to the team that owns the resource. This token workflow is separate from configuring a proxy's DNS challenge for certificate issuance. ## Manage a domain -Open an application's or service's **Domains** page and add the hostname. Coolify matches it to zones available through the team's tokens and offers DNS configuration for that server. +Open an application's or service's **Domains** page and add the hostname, or change an existing domain to it. Coolify matches it to zones available through the team's tokens. With automatic DNS, Coolify creates the record; otherwise it opens the **Configure DNS** dialog for that server. -If a record already points elsewhere, review the existing value before using the replace action. Records created through this workflow show **Managed by Coolify**. Removing a managed domain offers deletion of its DNS record after confirmation; review other uses of the hostname before approving deletion. +A clone of an application or service, and an application or service created through the API, also get a record for each domain in a zone with automatic DNS. A clone gets records only for the domains that the source does not use. + +If a record already points elsewhere, automatic DNS replaces it only when Coolify created it and no other resource uses it. Otherwise the domain shows the conflict and the **Configure DNS** dialog opens. Review the existing value before using the replace action. Records created through this workflow show **Managed by Coolify**. Removing a managed domain offers deletion of its DNS record after confirmation; review other uses of the hostname before approving deletion. Re-check DNS after changing a record. Coolify replaces the previous check result, including checks for preview domains. IPv6 addresses are compared by value rather than their written form. If no zone matches, check the token's zone scope and permissions, refresh accessible zones, or configure records manually using [DNS](/core/networking/dns). +A proxied record that points to a different server shows **DNS mismatch**. See [Configure Coolify DNS validation](/core/networking/dns#configure-coolify-dns-validation). + +## Use the API or MCP + +You can also manage DNS records and integration tokens through the [API](/api/overview) and the [MCP server](/mcp/overview): + +- `GET` and `POST /api/v1/{applications|services}/{uuid}/dns`, `POST .../dns/replace` and `DELETE .../dns/{hostname}` view, create, replace and release the Cloudflare records of a resource's domains. A release deletes the record at Cloudflare only when Coolify created it and nothing else uses it. The MCP tool is `manage_dns`. +- `PATCH /api/v1/applications/{uuid}` and `PATCH /api/v1/services/{uuid}` create the records of the domains they add, when exactly one zone with automatic DNS manages them, like the **Domains** page. +- `/api/v1/security/integration-tokens` lists, adds, updates, rotates and deletes integration tokens, and `POST .../{uuid}/sync-zones` reads the zones again. A new Cloudflare token can get the `dns` and `tunnel` capabilities. The MCP tool is `manage_integration_tokens`. + ## Use the token for SSH tunnels To let Coolify create and manage a server SSH tunnel, also grant **Account > Cloudflare Tunnel > Edit** in Cloudflare and select **Cloudflare Tunnel** alongside **DNS** in the token's Coolify capabilities. DNS-only tokens cannot manage tunnels. See [Server SSH tunnels](/integrations/networking/cloudflare/tunnels/server-ssh) for setup, DNS-conflict handling, and cleanup. diff --git a/content/docs/integrations/security/secret-managers.mdx b/content/docs/integrations/security/secret-managers.mdx index 34c2041d7..1bb12a488 100644 --- a/content/docs/integrations/security/secret-managers.mdx +++ b/content/docs/integrations/security/secret-managers.mdx @@ -16,6 +16,8 @@ Coolify supports Doppler, Infisical, and HashiCorp Vault. Add credentials under To change saved credentials, select the token's edit icon and use **Validate and save**. +You can also list, add, update, rotate and delete integration tokens through the [API](/api/overview) (`/api/v1/security/integration-tokens`) and the [MCP server](/mcp/overview) tool `manage_integration_tokens`. Coolify validates new credentials with the provider before it saves them. + ## Doppler Use either credential type: diff --git a/content/docs/integrations/security/using-secret-managers.mdx b/content/docs/integrations/security/using-secret-managers.mdx index 1adf37aa1..e50206956 100644 --- a/content/docs/integrations/security/using-secret-managers.mdx +++ b/content/docs/integrations/security/using-secret-managers.mdx @@ -32,4 +32,19 @@ Each resource can link one secret-manager source. A Service-level source applies +## Use the API or MCP + +You can also link a secret manager through the [API](/api/overview) and the [MCP server](/mcp/overview) tool `manage_secret_manager`. The routes start with the resource type, `applications`, `services` or `databases`: + +| Action | Request | +| :--- | :--- | +| View the source and the tokens you can link | `GET /api/v1/{type}/{uuid}/secret-manager` | +| Link a token or change its settings | `PATCH /api/v1/{type}/{uuid}/secret-manager` | +| Remove the source | `DELETE /api/v1/{type}/{uuid}/secret-manager` | +| List the key names | `GET /api/v1/{type}/{uuid}/secret-manager/keys` | +| Add a `{{vault.KEY}}` variable for one key | `POST /api/v1/{type}/{uuid}/secret-manager/references` | +| Add a variable for every key that has none yet | `POST /api/v1/{type}/{uuid}/secret-manager/import` | + +The API and MCP return key names only, never secret values. After you remove a source, existing `{{vault.*}}` variables fail the next deployment until you remove them. + If you have not created credentials yet, follow [Secret manager credentials](/integrations/security/secret-managers). diff --git a/content/docs/mcp/capabilities/applications.mdx b/content/docs/mcp/capabilities/applications.mdx index 22bd745a4..b76ab46c5 100644 --- a/content/docs/mcp/capabilities/applications.mdx +++ b/content/docs/mcp/capabilities/applications.mdx @@ -19,8 +19,12 @@ Application details can include configuration metadata. Environment values and o | Tool | Actions | | :--- | :--- | -| `create_application` | `public`, `github_app`, `deploy_key`, `dockerfile`, `docker_image` (`write`). `instant_deploy` also needs `deploy`. | -| `manage_application` | `update`, `clone`, `add_server` (`write`); `move` and `remove_server` (`write`, confirm); `delete` (`deploy`, confirm). | -| `manage_preview` | `create` (`deploy`); `update` (`write`); `delete` (`deploy`, confirm). | +| `create_application` | `public`, `github_app`, `gitea_app`, `deploy_key`, `dockerfile`, `docker_image` (`write`). `instant_deploy` also needs `deploy`. | +| `manage_application` | `update`, `clone`, `add_server` (`write`); `move` (`write`, confirm); `delete` and `remove_server` (`delete`, confirm). `instant_deploy` and `clone_volumes` also need `deploy`. | +| `manage_preview` | `create` (`deploy`); `update` (`write`); `delete` (`delete`, confirm). | -Actions marked **confirm** need `confirm=true`. Ask the user before your client sends it. To roll back an application, see [Deployments](/mcp/capabilities/deployments). +Actions marked **confirm** need `confirm=true`. Ask the user before your client sends it. + +`gitea_app` creates an application from a private repository through a connected Gitea App. Give `gitea_app_uuid` and `git_repository` as `owner/name`. See [Gitea](/applications/sources/gitea). + +`manage_preview` `create` opens a preview or redeploys an existing one. A `deploy` token can only redeploy an existing preview without changes. To open a preview, change its pull request URL, git type, or Docker tag, or choose a commit, the token also needs `write`. To roll back an application, see [Deployments](/mcp/capabilities/deployments). diff --git a/content/docs/mcp/capabilities/automation.mdx b/content/docs/mcp/capabilities/automation.mdx index 225e08db0..0663e6d61 100644 --- a/content/docs/mcp/capabilities/automation.mdx +++ b/content/docs/mcp/capabilities/automation.mdx @@ -18,6 +18,8 @@ Task command bodies and execution messages require `read:sensitive` and are best | Tool | Actions | | :--- | :--- | -| `manage_scheduled_task` | `create`, `update` (`write`); `delete` (`write`, confirm); `execute` (`deploy`, confirm). | +| `manage_scheduled_task` | `create`, `update` (`write`); `delete` (`delete`, confirm); `execute` (`deploy`, confirm). An enabled task also needs `deploy`. | Actions marked **confirm** need `confirm=true`. Ask the user before your client sends it. + +`create` and `update` accept `use_shell`, the **Run in a shell** setting. It defaults to `true`: the command runs with `sh -c` in the container. Set it to `false` for containers without a shell. The command then runs directly, without shell features such as variables, pipes, or redirects. diff --git a/content/docs/mcp/capabilities/databases.mdx b/content/docs/mcp/capabilities/databases.mdx index 857b0cc3b..d7698db9b 100644 --- a/content/docs/mcp/capabilities/databases.mdx +++ b/content/docs/mcp/capabilities/databases.mdx @@ -19,8 +19,8 @@ Backup execution messages require `read:sensitive` and are best-effort redacted. | Tool | Actions | | :--- | :--- | | `create_database` | The action is the database type: `postgresql`, `mysql`, `mariadb`, `mongodb`, `redis`, `keydb`, `dragonfly`, `clickhouse`, `sqlite` (`write`). | -| `manage_database` | `update` (`write`); `clone` and `move` (`write`, confirm); `delete` and `import` (`deploy`, confirm). | +| `manage_database` | `update` (`write`); `clone` and `move` (`write`, confirm); `import` (`write` and `deploy`, confirm); `delete` (`delete`, confirm). | | `get_database_import` | Check the progress of an import (`read`). The import output needs `read:sensitive`. | -| `manage_backup` | `create`, `update` (`write`); `delete` and `delete_execution` (`write`, confirm). `backup_now` needs `deploy`. | +| `manage_backup` | `create`, `update` (`write`); `delete` and `delete_execution` (`delete`, confirm). `backup_now` needs `deploy`. | Actions marked **confirm** need `confirm=true`. Ask the user before your client sends it. diff --git a/content/docs/mcp/capabilities/deployments.mdx b/content/docs/mcp/capabilities/deployments.mdx index 4a45e5eb9..563b1eda1 100644 --- a/content/docs/mcp/capabilities/deployments.mdx +++ b/content/docs/mcp/capabilities/deployments.mdx @@ -9,7 +9,7 @@ description: Use Coolify MCP to inspect, queue, control, cancel, and roll back d | :--- | :--- | :--- | | `list_deployments` | `read` | List queued, in-progress, or application deployment history. | | `get_deployment` | `read` | Inspect one deployment; build logs are not returned. | -| `deploy` | `deploy` | Queue a deployment by `uuid`, or deploy every resource with a `tag`. Give one of them. A `tag` deploy needs `confirm=true`. Supports `force` rebuild and preview IDs. | +| `deploy` | `deploy` | Queue a deployment by `uuid`, or deploy every resource with a `tag`. Give one of them. A `tag` deploy needs `confirm=true`. Supports `force` rebuild, preview IDs, and `cancel_previous`. | | `cancel_deployment` | `deploy` | Cancel a queued or in-progress deployment. | | `control` | `deploy` | Start, stop, or restart an application, database, service, or one service application or database (`service_uuid` with `uuid`). `stop` requires `confirm=true`. | | `list_rollback_images` | `read` | List the images that an application can roll back to. | @@ -17,4 +17,14 @@ description: Use Coolify MCP to inspect, queue, control, cancel, and roll back d Follow [Security](/mcp/security) before granting `deploy`. +`cancel_previous` cancels older webhook, API, and MCP deployments of the same application, pull request, and server: + +| Value | Effect | +| :--- | :--- | +| `none` | Cancel nothing. This is the default. | +| `queued` | Cancel queued deployments. | +| `building` | Cancel queued deployments and deployments that are still building. | + +A deployment that started to replace containers always finishes. Manual, restart, and rollback deployments are never cancelled. + Preview pull request IDs must be integers from `0` to `2147483647`. `0` means no preview. Invalid IDs produce a validation error. See [Preview deployments](/applications/deployments/preview-deployments#manage-previews-through-the-api) for the related API workflow. diff --git a/content/docs/mcp/capabilities/environment-and-storage.mdx b/content/docs/mcp/capabilities/environment-and-storage.mdx index 9a41ed489..5d3bd570d 100644 --- a/content/docs/mcp/capabilities/environment-and-storage.mdx +++ b/content/docs/mcp/capabilities/environment-and-storage.mdx @@ -9,16 +9,16 @@ description: Use Coolify MCP to inspect and change environment variables, shared | :--- | :--- | :--- | | `list_env_keys` | `read` | List environment-variable key names for an application, database, or service. Never returns values. | | `list_shared_env_keys` | `read` | List shared key names at project or environment scope. Never returns values. | -| `get_env_values` | `read:sensitive` | Return environment values. The token owner must be a team admin or owner. Values marked as shown once are never returned. | +| `get_env_values` | `read:sensitive` | Return the environment values of an application, database, or service, or the shared values of the team, a project, an environment, or a server. The token owner must be a team admin or owner. Values marked as shown once are never returned. | | `list_storages` | `read` | List persistent and file storage mounts. Never returns file contents. | ## Change variables and storage | Tool | Actions | | :--- | :--- | -| `manage_env` | `create`, `update`, `bulk_update` (`write`); `delete` (`write`, confirm). Values are returned only with `read:sensitive`. | -| `manage_shared_env` | `create`, `update` (`write`); `delete` (`write`, confirm). | -| `manage_storage` | `create`, `update`, `set_backup` (`write`); `delete` and `remove_backup` (`write`, confirm); `run_backup` (`deploy`, confirm). File content changes need `deploy`. | +| `manage_env` | `create`, `update`, `bulk_update` (`write`); `delete` (`delete`, confirm). Values are returned only with `read:sensitive`. | +| `manage_shared_env` | Shared variables of the team, a project, an environment, or a server. `create`, `update` (`write`); `delete` (`delete`, confirm). | +| `manage_storage` | `create`, `update`, `set_backup` (`write`); `delete` and `remove_backup` (`delete`, confirm); `run_backup` (`write` and `deploy`, confirm). File content, mounts outside the resource directory, and `stop_during_backup` also need `deploy`. | Actions marked **confirm** need `confirm=true`. Ask the user before your client sends it. diff --git a/content/docs/mcp/capabilities/image-scanning.mdx b/content/docs/mcp/capabilities/image-scanning.mdx new file mode 100644 index 000000000..ce2336623 --- /dev/null +++ b/content/docs/mcp/capabilities/image-scanning.mdx @@ -0,0 +1,20 @@ +--- +title: Image scanning +description: Use Coolify MCP to read image vulnerability scan results and turn image scanning on or off. +--- + +# Image scanning + +| Tool | Actions | +| :--- | :--- | +| `get_vulnerabilities` | `list` returns every application, service, and database of the team with its security status, worst first. `resource` returns the status, scanned images, and vulnerabilities of one application, service, or database (`read`). | +| `manage_image_scanning` | `get_server` (`read`) shows if a server scans images and the scanner state on the server. `update_server` turns scanning of a server on or off; turning it on gets the scanner on the server. `update_team` sets the default for servers that you add to the team later (`write`). Only team admins and owners. | + +`get_vulnerabilities` filters: + +| Action | Filters in `data` | +| :--- | :--- | +| `list` | `status`, comma-separated: `update_now`, `update_available`, `no_fix`, `check_needed`, `ok`, `not_checked`. | +| `resource` | `state` (`fixed`, `no_fix`, `ignored`) and `severity`, both comma-separated, plus `image`, `search`, `page`, and `per_page` (maximum `200`). | + +To turn scanning of one application on or off, call `manage_application` `update` with `is_image_scan_enabled`. The server must also scan images. diff --git a/content/docs/mcp/capabilities/integrations.mdx b/content/docs/mcp/capabilities/integrations.mdx index d7b0bc21f..28f381080 100644 --- a/content/docs/mcp/capabilities/integrations.mdx +++ b/content/docs/mcp/capabilities/integrations.mdx @@ -1,6 +1,6 @@ --- title: Integrations -description: Use Coolify MCP to manage Git sources and S3 storages, and browse repositories and branches. +description: Use Coolify MCP to manage Git sources, backup storages, integration tokens, DNS records, secret managers, and Cloudflare Tunnels. --- # Integrations @@ -13,11 +13,27 @@ description: Use Coolify MCP to manage Git sources and S3 storages, and browse r Repository and branch tools register only when a GitHub App exists on the instance. Call `list_github_apps` first. -## Manage Git sources and S3 storages +## Manage Git sources and backup storages | Tool | Actions | | :--- | :--- | -| `manage_git_source` | GitHub and GitLab apps. `list` (`read`); `create`, `update` (`write`); `delete` (`write`, confirm). | -| `manage_s3_storage` | `list`, `get` (`read`); `create`, `update`, `validate` (`write`); `delete` (`write`, confirm). Secrets are never returned. | +| `manage_git_source` | GitHub and GitLab apps: `list` (`read`); `create`, `update` (`write`); `delete` (`delete`, confirm). Gitea apps: `list` only. Add and connect Gitea apps in the dashboard. | +| `manage_s3_storage` | Backup storages of type S3, SFTP, FTPS, or WebDAV. `list`, `get` (`read`); `create`, `update`, `validate` (`write`); `delete` (`delete`, confirm). The type cannot change after `create`. Secrets are never returned. | + +To create an application from a Gitea App, use the `gitea_app` action of `create_application`. See [Applications](/mcp/capabilities/applications). + +## Manage integration tokens, DNS, and secret managers + +| Tool | Actions | +| :--- | :--- | +| `manage_integration_tokens` | Cloudflare (DNS and Tunnel), Doppler, Infisical, and Vault tokens of the team. `list`, `get`, `zones` (`read`); `create`, `update`, `sync_zones` (`write`); `delete` (`delete`, confirm). Only team admins and owners. The token secret is never returned. | +| `manage_dns` | Cloudflare DNS records of the domains of an application or service. `status` (`read`); `create` (`write`); `replace` (`write`, confirm); `release` (`delete`, confirm). | +| `manage_secret_manager` | Secret manager source (Doppler, Infisical, or Vault) of an application, service, or database. `get` (`read`); `set`, `keys`, `add_reference`, `import` (`write`); `remove` (`delete`, confirm). Secret values are never returned. | +| `manage_cloudflare_tunnel` | Cloudflare Tunnel setting of a server. `get` (`read`); `update`, `enable`, `disable` (`write`, confirm). | Actions marked **confirm** need `confirm=true`. Ask the user before your client sends it. + +- `manage_dns` records point only to the public addresses of the resource's server, and use only zones of the team. When `create` finds a conflicting record, it returns the record ID and its current value. Ask the user before your client calls `replace`. +- `manage_dns` `release` deletes the record at Cloudflare only when Coolify created it and nothing else uses it. Set `delete_record=false` to keep it. +- `manage_secret_manager` `keys` lists the key names of the remote secrets. `add_reference` adds a `{{vault.KEY}}` variable for one key, and `import` adds one for every key that has no variable yet. After `remove`, existing `{{vault.*}}` variables fail the next deployment. +- `manage_cloudflare_tunnel` does not install or remove `cloudflared` on the server. `enable` marks the tunnel as enabled after you set up `cloudflared` yourself. `disable` restores the previous server address when Coolify knows it. diff --git a/content/docs/mcp/capabilities/overview.mdx b/content/docs/mcp/capabilities/overview.mdx index 01db7430d..971b02dac 100644 --- a/content/docs/mcp/capabilities/overview.mdx +++ b/content/docs/mcp/capabilities/overview.mdx @@ -29,7 +29,8 @@ Coolify MCP exposes tools, resources, and prompts for the team associated with t | [Deployments](/mcp/capabilities/deployments) | Deployment history, deploy, cancel, rollback, start, stop, and restart operations. | | [Logs](/mcp/capabilities/logs) | Container logs and deployment log summaries. | | [Environment and storage](/mcp/capabilities/environment-and-storage) | Environment variables, shared variables, storage mounts, and volume backups. | -| [Integrations](/mcp/capabilities/integrations) | Git sources, repositories, branches, and S3 storages. | +| [Integrations](/mcp/capabilities/integrations) | Git sources, repositories, branches, backup storages, integration tokens, DNS records, secret managers, and Cloudflare Tunnels. | +| [Image scanning](/mcp/capabilities/image-scanning) | Image vulnerability scan results and scanning settings. | | [Automation](/mcp/capabilities/automation) | Scheduled tasks, executions, health hints, and unhealthy resources. | | [Prompts and resources](/mcp/capabilities/prompts-and-resources) | Read-only MCP resources and guided prompts. | | [Pagination](/mcp/capabilities/pagination) | Page arguments and continuation responses. | @@ -40,8 +41,9 @@ Coolify MCP exposes tools, resources, and prompts for the team associated with t | :--- | :--- | | `read` | `list_*` and `get_*` tools, and read actions of `manage_*` tools. | | `read:sensitive` | Logs, environment values, command bodies, and other sensitive fields. | -| `deploy` | `deploy`, `control`, `cancel_deployment`, `rollback_application`, and actions that run or delete workloads. | -| `write` | `create_*` and `manage_*` tools. They use the same REST API routes, validation, and permissions as the API. | +| `deploy` | `deploy`, `control`, `cancel_deployment`, `rollback_application`, and actions that run workloads. | +| `write` | `create_*` and `manage_*` tools that create or change resources. They use the same REST API routes, validation, and permissions as the API. | +| `delete` | Actions that delete or remove something, for example `delete`, `delete_token`, `remove_server`, `remove_backup`, and `detach`. `write` does not include `delete`. | Destructive actions need `confirm=true`. Your client must ask you before it sends it. diff --git a/content/docs/mcp/capabilities/projects.mdx b/content/docs/mcp/capabilities/projects.mdx index 7fcbc7339..b278b8e32 100644 --- a/content/docs/mcp/capabilities/projects.mdx +++ b/content/docs/mcp/capabilities/projects.mdx @@ -19,7 +19,7 @@ description: Use Coolify MCP to list projects, inspect environments, and search | Tool | Actions | | :--- | :--- | -| `manage_project` | `create`, `update`, `create_environment`, `update_environment` (`write`); `delete` and `delete_environment` (`write`, confirm). Only empty projects and environments can be deleted. | -| `manage_tags` | `create`, `update`, `attach`, `detach` (`write`); `delete` (`write`, confirm). | +| `manage_project` | `create`, `update`, `create_environment`, `update_environment` (`write`); `delete` and `delete_environment` (`delete`, confirm). Only empty projects and environments can be deleted. | +| `manage_tags` | `create`, `update`, `attach` (`write`); `detach` (`delete`); `delete` (`delete`, confirm). | Actions marked **confirm** need `confirm=true`. Ask the user before your client sends it. diff --git a/content/docs/mcp/capabilities/servers.mdx b/content/docs/mcp/capabilities/servers.mdx index b08f92d27..1ff2d2242 100644 --- a/content/docs/mcp/capabilities/servers.mdx +++ b/content/docs/mcp/capabilities/servers.mdx @@ -21,12 +21,12 @@ Use `get_infrastructure_overview` first for counts and server health hints. | Tool | Actions | | :--- | :--- | -| `manage_server` | `create`, `update`, `validate` (`write`); `delete` (`write`, confirm). | -| `manage_proxy` | `get` (`read`); `update` (`write`, confirm); `set_configuration` and `restart` (`deploy`, confirm). | -| `docker_cleanup` | `get` and `executions` (`read`); `update` (`write`); `run` (`deploy`, confirm). | -| `manage_destination` | `create`, `update` (`write`); `delete` (`write`, confirm). | -| `manage_private_key` | `list`, `get` (`read`); `create`, `update` (`write`); `delete` (`write`, confirm). Key material is never returned. | -| `manage_registry` | `list` (`read:sensitive`); `create` (`deploy`); `check` (`write`); `delete` (`write`, confirm). | -| `cloud_provider` | `list_tokens`, `get_token`, `catalog` (`read`); `create_token`, `update_token`, `validate_token` (`write`); `delete_token` and `provision_server` (`write`, confirm). | +| `manage_server` | `create`, `update`, `validate` (`write`); `delete` (`delete`, confirm). Changing `proxy_type`, deleting with `force` or `delete_from_provider`, and validating with `install` also need `deploy`. | +| `manage_proxy` | `get` (`read`); `update` (`write`, confirm); `set_configuration` (`write` and `deploy`, confirm); `restart` (`deploy`, confirm). | +| `docker_cleanup` | `get` and `executions` (`read`); `update` (`write`); `run` (`write` and `deploy`, confirm). | +| `manage_destination` | `create`, `update` (`write`); `delete` (`delete`, confirm). | +| `manage_private_key` | `list`, `get` (`read`); `create`, `update` (`write`); `delete` (`delete`, confirm). Key material is never returned. | +| `manage_registry` | `list` (`read:sensitive`); `create` (log in) and `check` (`write` and `deploy`); `delete` (log out, `delete`, confirm). | +| `cloud_provider` | `list_tokens`, `get_token`, `catalog` (`read`); `create_token`, `update_token`, `validate_token` (`write`); `provision_server` (`write`, confirm); `delete_token` (`delete`, confirm). | Actions marked **confirm** need `confirm=true`. Ask the user before your client sends it. `provision_server` creates a paid server at the provider. diff --git a/content/docs/mcp/capabilities/services.mdx b/content/docs/mcp/capabilities/services.mdx index bed94851e..872210600 100644 --- a/content/docs/mcp/capabilities/services.mdx +++ b/content/docs/mcp/capabilities/services.mdx @@ -22,6 +22,6 @@ Use `get_logs` with the appropriate child resource when a service has multiple c | :--- | :--- | | `list_service_templates` | List the one-click service templates (`read`). | | `create_service` | `template`, `compose` (`write`). | -| `manage_service` | `update`, `update_application`, `update_database` (`write`); `clone` and `move` (`write`, confirm); `delete` and `import_database` (`deploy`, confirm). | +| `manage_service` | `update`, `update_application`, `update_database` (`write`); `clone` and `move` (`write`, confirm); `import_database` (`write` and `deploy`, confirm); `delete` (`delete`, confirm). | Actions marked **confirm** need `confirm=true`. Ask the user before your client sends it. diff --git a/content/docs/mcp/clients/claude-code.mdx b/content/docs/mcp/clients/claude-code.mdx index 068d16656..47c7f487a 100644 --- a/content/docs/mcp/clients/claude-code.mdx +++ b/content/docs/mcp/clients/claude-code.mdx @@ -16,7 +16,7 @@ claude mcp add --transport http coolify https://app.coolify.io/mcp \ --header "Authorization: Bearer 67|abcthisisa123dummytoken" ``` -Use a token with `read` for inspection. Add `deploy` only when Claude Code must run deployment or lifecycle operations, and `write` only when it must create, update, or delete resources. +Use a token with `read` for inspection. Add `deploy` only when Claude Code must run deployment or lifecycle operations, `write` only when it must create or update resources, and `delete` only when it must delete them. ## Verify the connection diff --git a/content/docs/mcp/clients/cursor.mdx b/content/docs/mcp/clients/cursor.mdx index e8583c23b..90077ced2 100644 --- a/content/docs/mcp/clients/cursor.mdx +++ b/content/docs/mcp/clients/cursor.mdx @@ -16,7 +16,7 @@ Cursor supports remote MCP servers over Streamable HTTP. 5. Set the Authorization header to `Bearer 67|abcthisisa123dummytoken`. 6. Save the server and enable it. -Use a token with `read` for inspection. Add `deploy` only when Cursor must run deployment or lifecycle operations, and `write` only when it must create, update, or delete resources. +Use a token with `read` for inspection. Add `deploy` only when Cursor must run deployment or lifecycle operations, `write` only when it must create or update resources, and `delete` only when it must delete them. ## Verify the connection diff --git a/content/docs/mcp/how-mcp-works.mdx b/content/docs/mcp/how-mcp-works.mdx index 629e9ba38..d69330895 100644 --- a/content/docs/mcp/how-mcp-works.mdx +++ b/content/docs/mcp/how-mcp-works.mdx @@ -25,7 +25,9 @@ Authorization: Bearer 67|abcthisisa123dummytoken The token is bound to one Coolify team. MCP only returns resources owned by that team. Create one token per team when a client needs access to multiple teams. -The instance MCP setting must be enabled before `/mcp` responds. Team admins and owners can disable MCP for individual teams. A disabled instance returns `404`; a disabled team returns `403`. On self-hosted instances, the **Allowed IPs** list in **Settings > Advanced** also applies to `/mcp`. +A token limited to selected projects, environments, or resources sees only those resources. MCP does not list team-level tools for it, such as `get_current_team` and the server tools. A token can never do more than its owner can do in the team. + +The instance MCP setting must be enabled before `/mcp` responds. Team admins and owners can disable MCP for individual teams. A disabled instance returns `404`; a disabled team returns `403`. On self-hosted instances, the **Allowed IPs** list in **Settings > Advanced** also applies to `/mcp`. A team that requires [two-factor authentication](/core/security/authentication/2fa) does not block MCP tokens. On self-hosted instances, **Allowed IPs** applies to MCP requests. The **MCP server** switch controls `/mcp` independently of REST **API access**. @@ -34,7 +36,9 @@ On self-hosted instances, **Allowed IPs** applies to MCP requests. The **MCP ser -Tools perform Coolify queries and operations. Read tools need `read`. Deployment and lifecycle tools need `deploy`. Tools that create, update, or delete resources (`create_*` and `manage_*`) need `write`. MCP lists only the tools that the token's permissions allow. [MCP capabilities](/mcp/capabilities/overview) groups tools by task. +Tools perform Coolify queries and operations. Read tools need `read`. Deployment and lifecycle tools need `deploy`. `get_logs` needs `read:sensitive`. Each action of a `create_*` or `manage_*` tool has its own permission: create and update actions need `write`, delete actions need `delete`, and some list, get, or server actions need `read`, `read:sensitive`, or `deploy`. [MCP capabilities](/mcp/capabilities/overview) groups tools by task and shows the permission of each action. + +MCP hides the deployment and lifecycle tools, `get_logs`, and every `create_*` and `manage_*` action that the token cannot use. Most read tools are listed also for a token without `read`. They then return `Missing required permissions: read`. diff --git a/content/docs/mcp/meta.json b/content/docs/mcp/meta.json index a2d402ce9..df022c44c 100644 --- a/content/docs/mcp/meta.json +++ b/content/docs/mcp/meta.json @@ -24,6 +24,7 @@ "capabilities/logs", "capabilities/environment-and-storage", "capabilities/integrations", + "capabilities/image-scanning", "capabilities/automation", "capabilities/prompts-and-resources", "capabilities/pagination", diff --git a/content/docs/mcp/security.mdx b/content/docs/mcp/security.mdx index 64e5c93e3..15d03875e 100644 --- a/content/docs/mcp/security.mdx +++ b/content/docs/mcp/security.mdx @@ -14,10 +14,15 @@ MCP gives an AI client access to Coolify data and, when permitted, lifecycle ope | Inspect resources | `read` | | Read supported sensitive data or log summaries | `read:sensitive` | | Deploy, start, stop, restart, cancel, or roll back | `deploy` | -| Create, update, or delete resources (`create_*` and `manage_*` tools) | `write` | -| Change the instance MCP setting with the API | `write` or `root` token of the root team | +| Create or update resources (create and update actions of `create_*` and `manage_*` tools) | `write` | +| Delete resources, environment variables, storages, backups, scheduled tasks, or tags, or detach a tag | `delete` | +| Change the instance MCP setting with the API | `write` or `root` token of an instance admin, in the root team | -Only team admins and owners can use tokens with `read:sensitive`, `write`, `deploy`, or `root`. Destructive actions need `confirm=true`. Configure your client to ask you before it calls them. +`write` does not include `delete`. A `root` token has every permission. Each action of a `manage_*` tool has its own permission, and some list and get actions need only `read` or `read:sensitive`. Some actions need two permissions, for example a registry login needs `write` and `deploy`. The [capability pages](/mcp/capabilities/overview) show the permission of each action. + +MCP hides the deployment tools, `get_logs`, and the `create_*` and `manage_*` actions that the token's permissions do not allow. Most read tools are listed also for a token without `read`. They then return `Missing required permissions: read`. + +A token can never do more than its owner can do in the token's team. When the owner loses that access, the token stops working. Destructive actions need `confirm=true`. Configure your client to ask you before it calls them. Do not use a `root` token for normal MCP access. @@ -25,6 +30,8 @@ Do not use a `root` token for normal MCP access. A token belongs to one team. MCP cannot use that token to read another team's resources. Team admins and owners can disable MCP for their team without disabling the instance endpoint. +A token can also be limited to selected projects, environments, or resources. MCP then returns only those resources and hides the team-level tools, for example the server, private key, Git source, S3 storage, and notification tools. + ## Protect client configuration - Store tokens in the client's secret storage. @@ -39,6 +46,6 @@ MCP responses never return private keys, S3 secrets, tokens, passwords, or webho Management tools can delete resources and backup files, overwrite configuration, stop workloads, or purchase cloud servers. Review the target and effects before allowing a client to submit `confirm=true` for an action that requires confirmation. A confirmation flag does not grant missing token permissions. -Granting `write` also allows changes to environment variables, scheduled commands, proxy settings, and notification configuration. Use a read-only token when the client only needs to inspect resources. +Granting `write` also allows changes to environment variables, scheduled commands, proxy settings, and notification configuration. Granting `delete` allows the client to delete resources and their data. Use a read-only token when the client only needs to inspect resources. On self-hosted instances, MCP uses its own enable switch and the **Allowed IPs** allowlist. Disabling REST **API access** does not disable MCP; disable **MCP server** or revoke the token to remove MCP access. diff --git a/content/docs/mcp/setup.mdx b/content/docs/mcp/setup.mdx index c079c3dc2..3ee727436 100644 --- a/content/docs/mcp/setup.mdx +++ b/content/docs/mcp/setup.mdx @@ -50,7 +50,7 @@ Coolify Cloud already has instance MCP enabled. Skip the Dashboard and API tabs, -This step is required on self-hosted instances. Only an instance admin (a member of the root team) can change it. +This step is required on self-hosted instances. Only an instance admin (an admin or owner of the root team) can change it. 1. Open **Settings** in the sidebar. 2. Open **Advanced**. @@ -65,7 +65,7 @@ If you use **Allowed IPs** in **Settings > Advanced**, the list also applies to -On a self-hosted instance, use a `write` or `root` API token of the root team to enable or disable the instance endpoint. The source IP must match **Allowed IPs** when configured. Replace the example URL with your instance's domain: +On a self-hosted instance, an instance admin can enable or disable the instance endpoint with a `write` or `root` API token of the root team. The source IP must match **Allowed IPs** when configured. Replace the example URL with your instance's domain: ```sh export COOLIFY_URL="https://coolify.example.com" @@ -78,7 +78,7 @@ curl --fail-with-body --request POST \ The endpoint returns `MCP server enabled.`. Disable it with `POST /api/v1/mcp/disable`. -These endpoints require a token with `write` or `root` that belongs to the root team (team ID `0`). A token of any other team receives `403`. These endpoints remain available while REST **API access** is disabled. +These endpoints require a token with `write` or `root` that belongs to the root team (team ID `0`). The token owner must be an instance admin: an admin or owner of the root team. Any other token receives `403`. These endpoints remain available while REST **API access** is disabled. @@ -90,15 +90,16 @@ These endpoints require a token with `write` or `root` that belongs to the root Create a token from **Keys & Tokens > API Tokens** while the required team is active. -Coolify displays the complete token only once. Copy it into the client's secret configuration before leaving the API Tokens page. +Coolify displays the complete token only once. Copy it into the client's secret configuration before you close the **Copy your token** window. - Use `read` for inventory and inspection. - Add `read:sensitive` only for supported sensitive data or log summaries. - Add `deploy` for deploy, start, stop, restart, cancel, and rollback operations. -- Add `write` to create, update, or delete resources with the `create_*` and `manage_*` tools. +- Add `write` to create or update resources with the `create_*` and `manage_*` tools. +- Add `delete` to delete resources, environment variables, storages, backups, scheduled tasks, or tags. `write` does not include it. - Do not use `root` for normal MCP clients. -Only team admins and owners can use tokens with `read:sensitive`, `write`, `deploy`, or `root`. A team member can use only `read` tokens. MCP shows only the tools that the token's permissions allow. +A token can never do more than its owner can do in the team. MCP hides the deployment tools, `get_logs`, and the `create_*` and `manage_*` actions that the token's permissions do not allow. Most read tools are listed also for a token without `read`, but they need `read` to run. MCP endpoint URL: @@ -128,7 +129,7 @@ Follow a client guide: ### Verify access -Ask the client to call `get_current_team` or `get_infrastructure_overview`. The response should contain the team and resources associated with the token. +Ask the client to call `get_current_team` or `get_infrastructure_overview`. The response should contain the team and resources associated with the token. A token limited to selected projects, environments, or resources does not get `get_current_team`. Use `get_infrastructure_overview` for it. diff --git a/content/docs/mcp/troubleshooting.mdx b/content/docs/mcp/troubleshooting.mdx index aa1a30f6a..727514eb5 100644 --- a/content/docs/mcp/troubleshooting.mdx +++ b/content/docs/mcp/troubleshooting.mdx @@ -25,12 +25,12 @@ Read the message in the response: -Confirm the complete token appears after `Bearer`, has not expired or been revoked, and that its owner is still a member of the token's team. Confirm the client sends the header on every MCP request. Coolify returns `401` with `Invalid token.` in these cases. +Confirm the complete token appears after `Bearer`, has not expired, been paused, or been revoked, and that its owner is still a member of the token's team. Confirm the client sends the header on every MCP request. Coolify returns `401` with `Invalid token.` in these cases. - + -The token has `read:sensitive`, `write`, `deploy`, or `root`, but its owner is a team member. Only team admins and owners can use these permissions. Use a `read` token, or ask a team owner to change your role. +The token has more access than its owner has in the token's team. For example, the owner's access changed after the token was created. Revoke the token and create a new one with the access you have, or ask a team admin or owner to give you more access. @@ -40,7 +40,7 @@ Confirm the URL ends with `/mcp`, the instance is reachable from the client mach -Use `read` for inspection, `read:sensitive` for supported sensitive output, `deploy` for deployment or lifecycle operations, and `write` for `create_*` and `manage_*` tools. MCP hides tools that the token cannot use. Call `coolify_help` to see the tools that the token can use. +Use `read` for inspection, `read:sensitive` for supported sensitive output, `deploy` for deployment or lifecycle operations, `write` for `create_*` and `manage_*` tools, and `delete` for delete actions. `write` does not include `delete`. MCP hides tools that the token cannot use. A token limited to selected projects, environments, or resources also does not see team-level tools, such as the server tools. Call `coolify_help` to see the tools that the token can use. diff --git a/content/docs/services/all.mdx b/content/docs/services/all.mdx index 4ee910960..f2737aaf5 100644 --- a/content/docs/services/all.mdx +++ b/content/docs/services/all.mdx @@ -94,6 +94,7 @@ Complete directory of all one-click services available in Coolify, organized by - [Fider](/services/fider) - An open platform to collect and organize customer feedback. - [Freescout](/services/freescout) - Help desk and customer support application. - [GLPI (Gestionnaire Libre de Parc Informatique)](/services/glpi) - Free, open-source IT Service Management platform for asset management, helpdesk, and service desk operations. +- [Hi.Events](/services/hi-events) - Open-source event management and ticketing platform. - [Invoice Ninja](/services/invoice-ninja) - Invoice management system. - [Kimai](/services/kimai) - An open-source time-tracking solution for teams of all sizes. - [LimeSurvey](/services/limesurvey) - The most popular FOSS online survey tool on the web. diff --git a/content/docs/services/appflowy.mdx b/content/docs/services/appflowy.mdx index 114a9665c..fc5622f99 100644 --- a/content/docs/services/appflowy.mdx +++ b/content/docs/services/appflowy.mdx @@ -27,6 +27,21 @@ Perfect for individuals seeking Notion's functionality with enhanced data securi +## Troubleshooting + +### "Network error" when you sign in with email in AppFlowy Web + +Since Coolify v4.7.0, the template sets `GOTRUE_CORS_ALLOWED_HEADERS=redirect_to` on the `gotrue` service. To fix an existing service: + +1. Open **Configuration > General > Edit Compose File**. +2. Add this variable to the `environment` list of the `gotrue` service: + + ```yaml + - GOTRUE_CORS_ALLOWED_HEADERS=redirect_to + ``` + +3. Save the Compose file and restart the service. + ## Links - [The official website](https://www.appflowy.com/?utm_source=coolify.io) diff --git a/content/docs/services/bugsink.mdx b/content/docs/services/bugsink.mdx index 66b1cfb6a..816109568 100644 --- a/content/docs/services/bugsink.mdx +++ b/content/docs/services/bugsink.mdx @@ -22,6 +22,31 @@ full control through self-hosting. +## Database + +Since Coolify v4.7.0, a new Bugsink service uses Bugsink 2 with a PostgreSQL 17 database. + +### Stop the disk growth of an existing MySQL service + +An older Bugsink service uses MySQL. MySQL writes binary logs that can fill the disk until Bugsink stops. To stop this: + +1. Open the **Terminal** of the service, select the `mysql` container, and connect to MySQL as root with `mysql -u root -p`. The root password is in **Environment Variables**. +2. Delete the existing binary logs: + + ```sql + PURGE BINARY LOGS BEFORE NOW(); + ``` + +3. Open **Configuration > General > Edit Compose File** and add this line to the `mysql` service: + + ```yaml + command: ['--disable-log-bin'] + ``` + +4. Save the Compose file and restart the service. + +The service continues to use MySQL. Coolify does not move the data to PostgreSQL. + ## Links - [The official website](https://www.bugsink.com/?utm_source=coolify.io) diff --git a/content/docs/services/configuration/docker-compose.mdx b/content/docs/services/configuration/docker-compose.mdx index 056ede78a..df91b8603 100644 --- a/content/docs/services/configuration/docker-compose.mdx +++ b/content/docs/services/configuration/docker-compose.mdx @@ -32,6 +32,16 @@ When troubleshooting, confirm the intended setting exists in the source definiti Saving reparses the definition. Removing or renaming a Compose service changes how Coolify identifies its components, so back up its data and inspect storage names before the change. +### Removed Compose services + +When you remove a Compose service from the definition, Coolify keeps its component (application or database): + +- Its card shows **Not in Compose file**, and it does not count in the Service status. +- Coolify keeps its settings. When you add the Compose service back under the same name, Coolify uses these settings again. +- To remove the component, delete it in its settings. + +A component that was removed before Coolify v4.7.0 gets this mark at the next deployment or save of the Service. + ## Environment references Reference a value with Compose interpolation to manage it under **Configuration > Environment Variables**: diff --git a/content/docs/services/configuration/environment-variables.mdx b/content/docs/services/configuration/environment-variables.mdx index d7600f669..f2bc808ee 100644 --- a/content/docs/services/configuration/environment-variables.mdx +++ b/content/docs/services/configuration/environment-variables.mdx @@ -38,6 +38,15 @@ LOG_LEVEL=info Saving Developer view creates, updates, and removes managed variables to match the text. Locked secrets and multiline values cannot be changed from Developer view. +When a variable is empty and its Compose reference has a default, the deployment uses that default. Developer view shows the default in a comment line above the variable: + +```dotenv +# Compose default: info +LOG_LEVEL= +``` + +Coolify shows this line only to users who can change the Service, and not for a default with more than one line. + To set the `literal`, `buildtime`, or `runtime` flag in Developer view, put a `# coolify:` line directly above the variable line, for example `# coolify: literal`. Refer to [Set flags in Developer view](/applications/configuration/environment-variables#set-flags-in-developer-view). ## Required values and defaults diff --git a/content/docs/services/configuration/general.mdx b/content/docs/services/configuration/general.mdx index cb88b5ef1..694510d10 100644 --- a/content/docs/services/configuration/general.mdx +++ b/content/docs/services/configuration/general.mdx @@ -98,10 +98,10 @@ For example, use `https://app.example.com:3000` when the component listens on po The **Advanced** page can configure: -- **Enable Gzip Compression** -- **Strip Prefixes** -- **Exclude from service status** -- **Drain Logs**, when a log drain is enabled on the server +- **Gzip compression** +- **Path prefixes**: **Strip prefixes** or **Keep prefixes** +- **Service status**: **Include in status** or **Exclude from status** +- **Log drain**, when a log drain is enabled on the server @@ -118,7 +118,7 @@ Expose a database only when a client outside the Service networks must connect. ### Advanced and data operations -The **Advanced** page can exclude the component from the Service's aggregate status and enable a server log drain. Recognized database components can also show a **Backups** page, with **Import backup**, when the underlying engine is supported. +The **Advanced** page can exclude the component from the Service's aggregate status and enable a server log drain. Recognized database components can also show a **Backups** page when the underlying engine is supported. To restore a backup file, select **Import backup** on this page. The import opens in a dialog. Changing a database image tag is not a database upgrade procedure. Create and verify a compatible backup before changing a production image. diff --git a/content/docs/services/ente-photos.mdx b/content/docs/services/ente-photos.mdx index d651bcc18..adf6c3ba8 100644 --- a/content/docs/services/ente-photos.mdx +++ b/content/docs/services/ente-photos.mdx @@ -17,6 +17,13 @@ Ente is a service that provides a fully open-source, end-to-end encrypted platfo Learn more at [help.ente.io](https://help.ente.io/). +## Variants + +- **Ente Photos:** Uses an S3 bucket that you provide. Fill in the `S3_STORAGE_*` variables before you deploy. +- **Ente Photos with S3:** Includes a MinIO-compatible storage service. The template creates the buckets, allows all CORS origins, and uses the routed `MINIO_SERVER_URL` as the S3 endpoint. Browsers upload and download files from this URL directly, so it must be reachable from the browser. + +Both variants use the `ghcr.io/ente` images. The `albums` service has its own domain (`SERVICE_URL_ALBUMS_3002`) and serves the public album links. + ## Configuring Object Store - Once you have selected your service. You will need to set up of some environment variables for your S3 bucket or substitute like MinIO. @@ -67,11 +74,13 @@ minio/mc ls myminio ## Environment Variables +This table lists the variables of the **Ente Photos** variant. + | Variable Name | Service | Description | Default Value | Required | Prefilled | | ------------------------------------- | -------- | ------------------------------------------------------------------------------------------- | ------------------ | -------- | --------- | | `SERVICE_URL_MUSEUM_8080` | museum | URL for the museum service on port 8080 | - | Yes | Yes | | `ENTE_HTTP_USE_TLS` | museum | Enable/disable TLS for HTTP connections | `false` | No | Yes | -| `SERVICE_URL_WEB_3002` | museum | URL for the web albums service | - | Yes | Yes | +| `SERVICE_URL_ALBUMS` | museum | URL of the albums service, for public album links | - | Yes | Yes | | `SERVICE_URL_WEB_3004` | museum | URL for the web cast service | - | Yes | Yes | | `SERVICE_URL_WEB_3001` | museum | URL for the web accounts service | - | Yes | Yes | | `ENTE_DB_HOST` | museum | PostgreSQL database host | `postgres` | No | Yes | @@ -81,7 +90,7 @@ minio/mc ls myminio | `SERVICE_PASSWORD_POSTGRES` | museum | PostgreSQL database password | - | Yes | Yes | | `SERVICE_REALBASE64_ENCRYPTION` | museum | Base64 encoded encryption key | - | Yes | Yes | | `SERVICE_REALBASE64_64_HASH` | museum | Base64 encoded hash key | - | Yes | Yes | -| `SERVICE_REALBASE64_JWT` | museum | Base64 encoded JWT secret | - | Yes | Yes | +| `SERVICE_PASSWORD_64_JWT` | museum | JWT secret, URL-safe (letters and digits only) | - | Yes | Yes | | `ENTE_INTERNAL_ADMIN` | museum | Internal admin user ID | `1580559962386438` | No | Yes | | `ENTE_INTERNAL_DISABLE_REGISTRATION` | museum | Disable user registration | `false` | No | Yes | | `PRIMARY_STORAGE_ARE_LOCAL_BUCKETS` | museum | Use local buckets for primary storage (false unless you are connecting to bucket over http) | `false` | No | Yes | @@ -93,7 +102,8 @@ minio/mc ls myminio | `S3_STORAGE_BUCKET` | museum | S3 storage bucket name | - | Yes | No | | `SERVICE_URL_WEB_3000` | web | URL for the main web service | - | Yes | Yes | | `SERVICE_URL_MUSEUM` | web | URL for the museum service | - | Yes | Yes | -| `SERVICE_URL_WEB_3002` | web | URL for the albums service | - | Yes | Yes | +| `SERVICE_URL_ALBUMS` | web | URL of the albums service | - | Yes | Yes | +| `SERVICE_URL_ALBUMS_3002` | albums | URL of the albums service on port 3002, for public album links | - | Yes | Yes | | `SERVICE_USER_POSTGRES` | postgres | PostgreSQL username | `pguser` | No | Yes | | `SERVICE_PASSWORD_POSTGRES` | postgres | PostgreSQL password | - | Yes | Yes | | `SERVICE_DB_NAME` | postgres | PostgreSQL database name | `ente_db` | No | Yes | diff --git a/content/docs/services/getoutline.mdx b/content/docs/services/getoutline.mdx index 43e9d7c03..d128c90bb 100644 --- a/content/docs/services/getoutline.mdx +++ b/content/docs/services/getoutline.mdx @@ -13,37 +13,76 @@ icon: "/docs/images/services/getoutline-logo.jpeg" Outline is an open-source collaboration tool that allows you to create and share documents with your team. -## Upgrade from PostgreSQL 12 +## Upgrade PostgreSQL 12 of an existing service -New Outline versions need PostgreSQL 14 or later. Before, the template used `postgres:12-alpine`. On an Outline service that you added before this change, the Outline container can restart in a loop, and the PostgreSQL log shows `syntax error at or near "TRIGGER"`. +Since Coolify v4.7.0, a new Outline service uses PostgreSQL 16. An older service keeps `postgres:12-alpine`. Current Outline versions do not start on PostgreSQL 12: the `outline` container restarts in a loop with `syntax error at or near "TRIGGER"`. -A PostgreSQL 12 data directory does not start on PostgreSQL 16. Thus, you must dump the database before you change the image, and restore it after. In the commands below, replace `` with the UUID of the service. The container names show the UUID, for example `postgres-`. +Coolify does not upgrade the database for you. PostgreSQL 16 cannot read the data directory of PostgreSQL 12, so move the data with a dump and a restore. These steps keep the old volume, so you can go back to it if a step fails. -1. On the server, dump the database: +Run the commands on the server of the service, as a user that can run `docker`. Replace `` with the UUID of the service: it is in the URL of the service page in Coolify, after `/service/`. The container names are `postgres-` and `outline-`. - ```bash - docker exec postgres- sh -c 'pg_dump -U "$POSTGRES_USER" "$POSTGRES_DB"' > outline.sql - ``` + + -2. Make sure that `outline.sql` is not empty. -3. In Coolify, stop the service. -4. Remove the old database volume: +### Dump the PostgreSQL 12 database - ```bash - docker volume rm _database-data - ``` +```bash +docker exec postgres- sh -c 'pg_dump -U "$POSTGRES_USER" -d "$POSTGRES_DB"' > outline-pg12.sql +``` + +Make sure that `outline-pg12.sql` is not empty and ends with `PostgreSQL database dump complete`: + +```bash +tail -n 3 outline-pg12.sql +``` + + + -5. In Coolify, click **Edit Compose file**, change the `postgres` image to `postgres:16-alpine`, and save. -6. Deploy the service. -7. Stop the Outline container and replace the new empty database with the dump: +### Change the database image and volume - ```bash - docker stop outline- - docker exec postgres- sh -c 'dropdb -U "$POSTGRES_USER" "$POSTGRES_DB" && createdb -U "$POSTGRES_USER" "$POSTGRES_DB"' - docker exec -i postgres- sh -c 'psql -U "$POSTGRES_USER" -d "$POSTGRES_DB"' < outline.sql +1. In Coolify, stop the service. +2. Open **Configuration > General > Edit Compose File**. +3. In the `postgres` service, change the image to `postgres:16-alpine`, and give the data volume a new name, for example `database-data-16`: + + ```yaml + postgres: + image: postgres:16-alpine + volumes: + - database-data-16:/var/lib/postgresql/data ``` -8. In Coolify, restart the service. Outline runs its migrations on PostgreSQL 16. +4. Save the Compose file and start the service. + +PostgreSQL 16 creates an empty database in the new volume, with the same user and password. The old volume `_database-data` stays on the server and keeps the PostgreSQL 12 data. + + + + +### Restore the dump + +Outline creates its tables in the empty database when it starts. Stop Outline and create the database again, so that the dump goes into an empty database: + +```bash +docker stop outline- +docker exec postgres- sh -c 'dropdb -U "$POSTGRES_USER" "$POSTGRES_DB" && createdb -U "$POSTGRES_USER" "$POSTGRES_DB"' +docker exec -i postgres- sh -c 'psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d "$POSTGRES_DB"' < outline-pg12.sql +``` + + + + +### Restart and verify + +1. In Coolify, restart the service. +2. Sign in to Outline and make sure that your documents are there. + +After you verify the data, you can delete the old volume with `docker volume rm _database-data` and delete `outline-pg12.sql`. + + + + +If a step fails, stop the service, set the image back to `postgres:12-alpine` and the volume back to `database-data`, and start the service again. ## Screenshots diff --git a/content/docs/services/hi-events.mdx b/content/docs/services/hi-events.mdx new file mode 100644 index 000000000..367f4ae58 --- /dev/null +++ b/content/docs/services/hi-events.mdx @@ -0,0 +1,45 @@ +--- +title: "Hi.Events" +description: "Open-source event management and ticketing platform." +category: "Business" +icon: "/docs/images/services/hi-events-logo.svg" +--- + +# Hi.Events + + + +## What is Hi.Events? + +Hi.Events is an open-source platform to sell tickets and manage events, such as conferences, concerts, and festivals. Organizers keep control of their branding, checkout, and customer data. + +- Paid, free, donation, and tiered tickets, with add-ons and promo codes +- Payouts to your own Stripe account, with taxes, fees, invoices, and refunds +- Check-in with a phone camera or a USB scanner, and PDF tickets +- Team roles, more than one organizer, a REST API, and webhooks + +## Before you deploy + + + +Hi.Events always sets its login cookie as `Secure`. On a plain HTTP domain, sign-in fails. + + + +The Coolify template runs the all-in-one Hi.Events image with a PostgreSQL database and Redis. + +## Environment variables + +| Variable | Default | Description | +| :--- | :--- | :--- | +| `APP_DISABLE_REGISTRATION` | `false` | Set to `true` to stop new sign-ups, for example after you create your account. | +| `MAIL_MAILER` | `log` | With `log`, Hi.Events writes emails to the logs and does not send them. Set it to `smtp` and fill in the `MAIL_*` variables to send emails. | +| `MAIL_FROM_ADDRESS` | `noreply@example.com` | Sender address of the emails. | +| `STRIPE_PUBLIC_KEY`, `STRIPE_SECRET_KEY`, `STRIPE_WEBHOOK_SECRET` | Empty | Stripe keys. Fill them in to sell paid tickets. | +| `APP_SAAS_MODE_ENABLED` | `false` | Runs Hi.Events as a platform for other organizers, with Stripe application fees. | + +## Links + +- [The official website](https://hi.events/?utm_source=coolify.io) +- [Documentation](https://hi.events/docs?utm_source=coolify.io) +- [GitHub](https://github.com/HiEventsDev/Hi.Events?utm_source=coolify.io) diff --git a/content/docs/services/hoarder.mdx b/content/docs/services/hoarder.mdx index 6ef325f35..16923cc77 100644 --- a/content/docs/services/hoarder.mdx +++ b/content/docs/services/hoarder.mdx @@ -10,7 +10,7 @@ icon: "/docs/images/services/hoarder-logo.png" -This service is currently not available in Coolify's service catalog. +This service is currently not available in Coolify's service catalog. Hoarder is now called Karakeep: use the [Karakeep](/services/karakeep) service. diff --git a/content/docs/services/litellm.mdx b/content/docs/services/litellm.mdx index 69cd4d77d..5368d981a 100644 --- a/content/docs/services/litellm.mdx +++ b/content/docs/services/litellm.mdx @@ -13,15 +13,6 @@ icon: "/docs/images/services/litellm-logo.svg" LiteLLM is an open-source LLM Gateway to manage authentication, loadbalancing, and spend tracking across 100+ LLMs. All in the OpenAI format. -## Screenshots - -
- -
- -
- - ## Credentials Coolify generates these values when you create the service: @@ -36,6 +27,15 @@ Coolify generates these values when you create the service: Services that you created before this change use the master key without the `sk-` prefix, and use the master key as the salt key. To fix such a service, set `LITELLM_SALT_KEY` to the current master key, then add the `sk-` prefix to the master key. If you set a new salt key, add the stored models again.
+## Screenshots + +
+ +
+ +
+ + ## Links - [The official website](https://docs.litellm.ai?utm_source=coolify.io) diff --git a/content/docs/services/openblocks.mdx b/content/docs/services/openblocks.mdx index f80a0f714..0d31a93e4 100644 --- a/content/docs/services/openblocks.mdx +++ b/content/docs/services/openblocks.mdx @@ -10,7 +10,7 @@ icon: "/docs/images/services/openblocks-logo.svg" -This service is currently not available in Coolify's service catalog. +This service is currently not available in Coolify's service catalog. Lowcoder, a fork of OpenBlocks, replaces it: use the [Lowcoder](/services/lowcoder) service. diff --git a/content/docs/services/operations/overview.mdx b/content/docs/services/operations/overview.mdx index 4612520cc..bb6c643d2 100644 --- a/content/docs/services/operations/overview.mdx +++ b/content/docs/services/operations/overview.mdx @@ -84,4 +84,4 @@ Follow [Scheduled tasks](/services/operations/scheduled-tasks) for frequency, ti ## Show a maintenance page -Open **Domains > Maintenance mode** to return a maintenance page with HTTP `503` while the containers keep running. The change applies without redeployment on supported Traefik and Caddy servers. See [Maintenance and error pages](/core/networking/proxy/maintenance-and-error-pages). +Open **Maintenance Mode** and select **Enable maintenance** to return a maintenance page with HTTP `503` while the containers keep running. Confirm the change in the dialog. The change applies without redeployment on supported Traefik and Caddy servers. See [Maintenance and error pages](/core/networking/proxy/maintenance-and-error-pages). diff --git a/content/docs/services/rybbit.mdx b/content/docs/services/rybbit.mdx index 70ff11632..6373b9405 100644 --- a/content/docs/services/rybbit.mdx +++ b/content/docs/services/rybbit.mdx @@ -15,8 +15,17 @@ Rybbit is a next-gen, open source, lightweight, cookieless web & product analyti ## Configuration -- set frontend URL. -- set backend URL to `$frontend_URL/api` and uncheck the "Strip Prefixes" option. +Set the domain of the `rybbit` service. Since Coolify v4.7.0, the template routes `/api` on the same domain to the `rybbit_backend` service on port 3001 and keeps the `/api` prefix. You do not need to set a backend domain. + +### Fix sign-up and login in an existing service + +In an older Rybbit service, `/api` requests can get a 404 error, so sign-up and login fail. To fix it: + +1. Open **Configuration > General > Edit Compose File**. +2. Add `SERVICE_URL_RYBBIT_3001=/api` to the `environment` list of `rybbit_backend`. +3. Move the `rybbit_backend` service above the `rybbit` service in the Compose file, then save. +4. Open the settings of `rybbit_backend` and, in **Advanced**, set **Path prefixes** to **Keep prefixes**. +5. Redeploy the service. # Screenshots diff --git a/content/docs/services/supabase.mdx b/content/docs/services/supabase.mdx index 73fec940c..25c963939 100644 --- a/content/docs/services/supabase.mdx +++ b/content/docs/services/supabase.mdx @@ -79,6 +79,27 @@ This rule ensures traffic can reach your PostgreSQL database through the Docker If your server is hosted on Hetzner, you may not need ufw-docker. Instead, you can open the relevant database port (e.g., 5432) directly using [Hetzner's firewall UI](https://docs.hetzner.com/cloud/firewalls/overview). +## Studio shows the logs of another Supabase stack + +When two Supabase services run on one server, Supabase Studio of an older service can show the API logs of the other stack. Since Coolify v4.7.0, the Vector container of the template reads only the logs of its own stack. + +An existing service keeps its `vector.yml`. To fix it: + +1. On the server, open `/data/coolify/services//volumes/logs/vector.yml`. +2. Add `include_labels` under `sources.docker_host`: + + ```yaml + sources: + docker_host: + type: docker_logs + include_labels: + - 'com.docker.compose.project=${COOLIFY_RESOURCE_UUID}' + exclude_containers: + - supabase-vector + ``` + +3. Restart the service. + ## Links - [Official Website](https://supabase.io) diff --git a/content/docs/start-with-cloud.mdx b/content/docs/start-with-cloud.mdx index edbf0ce74..22e0a4a46 100644 --- a/content/docs/start-with-cloud.mdx +++ b/content/docs/start-with-cloud.mdx @@ -427,6 +427,12 @@ Your apps keep running on your own servers. Coolify dashboard access will be res + + +60 days. After that, Coolify Cloud can delete your team, its servers, resources, and projects, and the users that are in no other team. The containers on your servers keep running. + + + For some environments, yes. Allow `SSH` port access to the Cloud IPs: [IPv4](https://coolify.io/ipv4.txt) and [IPv6](https://coolify.io/ipv6.txt). diff --git a/content/docs/start-with-self-hosted.mdx b/content/docs/start-with-self-hosted.mdx index 3c5a162fe..f51a9751e 100644 --- a/content/docs/start-with-self-hosted.mdx +++ b/content/docs/start-with-self-hosted.mdx @@ -349,6 +349,17 @@ curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash View the [Script's Source Code](https://github.com/coollabsio/coolify/blob/v4.x/scripts/install.sh) + + + + Add `--preview` or `--nightly` to install the newest version of that channel. The installer also switches the [update channel](/core/instance-management/update#choose-an-update-channel) of the instance to that channel. + + ```sh + curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash -s -- --nightly + ``` + + Preview versions are betas and release candidates. Nightly builds get less testing and can include breaking changes. Use them only on an instance that you can rebuild. + @@ -371,6 +382,8 @@ Open `http://192.168.1.69:8000` in your browser (replace `192.168.1.69` with you **Create your admin account as soon as installation finishes. Anyone who reaches the registration page first can become the instance admin and gain root access to your server.** + + Coolify accepts the first account only in the first 10 minutes after Coolify starts. If the registration page shows **Setup window closed**, run `docker restart coolify` on the server, then reload the page. --- @@ -536,6 +549,8 @@ Open `http://192.168.1.69:8000` in your browser (replace `192.168.1.69` with you **Create your admin account as soon as installation finishes. Anyone who reaches the registration page first can become the instance admin and gain root access to your server.** + + Coolify accepts the first account only in the first 10 minutes after Coolify starts. If the registration page shows **Setup window closed**, run `docker restart coolify` on the server, then reload the page. That's it!, you can start using Coolify. @@ -921,19 +936,19 @@ Use this when you want Coolify images pulled from a different registry source. | Variable | Default | Allowed values | | :--- | :--- | :--- | -| `REGISTRY_URL` | `ghcr.io` | `ghcr.io`, `docker.io` | +| `REGISTRY_URL` | `docker.io` | `docker.io`, `ghcr.io` | ```sh -env REGISTRY_URL=docker.io bash -c 'curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash' +env REGISTRY_URL=ghcr.io bash -c 'curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash' ``` If you are not logged in as `root`: ```sh -sudo -E env REGISTRY_URL=docker.io bash -c 'curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash' +sudo -E env REGISTRY_URL=ghcr.io bash -c 'curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash' ``` @@ -949,7 +964,7 @@ nano /data/coolify/source/.env Add: ```sh -REGISTRY_URL=docker.io +REGISTRY_URL=ghcr.io ``` Then run: @@ -963,7 +978,7 @@ docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/dock - The registry can be changed after installing Coolify by following the steps above. + The registry can be changed after installing Coolify by following the steps above, or with **Docker registry** in **Settings > Updates**. diff --git a/content/docs/troubleshoot/applications/no-available-server.mdx b/content/docs/troubleshoot/applications/no-available-server.mdx index 66b785d77..5f8b0b1db 100644 --- a/content/docs/troubleshoot/applications/no-available-server.mdx +++ b/content/docs/troubleshoot/applications/no-available-server.mdx @@ -8,7 +8,7 @@ tags: ["No Available Server", "503"] If your deployed application or service shows a **"No Available Server"** error, this indicates that [Traefik](/core/networking/proxy/traefik/overview) (the reverse proxy) cannot find any (healthy) containers to route traffic to under the provided secured URL (`https`). -First check **Domains > Maintenance mode**. If enabled intentionally, turn it off when maintenance is complete. A [custom error page](/core/networking/proxy/maintenance-and-error-pages) can change the visible page while the HTTP status remains `503`. +First check the resource's **Maintenance Mode** page. If it shows **On** and you enabled it intentionally, select **Disable maintenance** when maintenance is complete. A [custom error page](/core/networking/proxy/maintenance-and-error-pages) can change the visible page while the HTTP status remains `503`. ## What Causes This Error? diff --git a/content/docs/troubleshoot/installation/install-script-failed.mdx b/content/docs/troubleshoot/installation/install-script-failed.mdx index 6cb7722d7..b6c61c5d4 100644 --- a/content/docs/troubleshoot/installation/install-script-failed.mdx +++ b/content/docs/troubleshoot/installation/install-script-failed.mdx @@ -304,24 +304,25 @@ Check if all required Docker images were pulled successfully: ```bash # List Coolify-related images -docker images | grep coolify -docker images | grep ghcr.io/coollabsio +docker images | grep coollabsio ``` You should see at least: -- `ghcr.io/coollabsio/coolify` (or your custom registry) -- `ghcr.io/coollabsio/coolify-helper` +- `coollabsio/coolify` +- `coollabsio/coolify-helper` + +Coolify pulls its images from Docker Hub by default. If you set `REGISTRY_URL=ghcr.io`, the image names start with `ghcr.io/`. If images are missing, there may have been a network issue during installation. Try pulling them manually: ```bash -# Pull the latest Coolify images -docker pull ghcr.io/coollabsio/coolify:latest -docker pull ghcr.io/coollabsio/coolify-helper:latest +# Pull the images that the Coolify Compose files use +cd /data/coolify/source +docker compose --env-file .env -f docker-compose.yml -f docker-compose.prod.yml pull +docker pull coollabsio/coolify-helper:latest # Then restart Coolify -cd /data/coolify/source docker compose --env-file .env -f docker-compose.yml -f docker-compose.prod.yml up -d --force-recreate ``` @@ -422,7 +423,7 @@ cat /data/coolify/source/upgrade-*.log # Look for errors in the log, then re-run upgrade cd /data/coolify/source -bash upgrade.sh latest latest ghcr.io false +bash upgrade.sh latest ``` @@ -459,19 +460,21 @@ See [Check Port Availability](#check-port-availability) above. **Solution:** ```bash -# Test network connectivity to GitHub Container Registry -curl -I https://ghcr.io +# Test network connectivity to Docker Hub (a 401 response means it is reachable) +curl -I https://registry-1.docker.io/v2/ # Check DNS resolution -nslookup ghcr.io +nslookup registry-1.docker.io # Try pulling images manually -docker pull ghcr.io/coollabsio/coolify:latest +docker pull coollabsio/coolify:latest # If using custom registry, login first docker login your-registry.com ``` +If Docker Hub rate limits the pulls, pull the images from GitHub Container Registry instead. Read [Custom registry source](/start-with-self-hosted#_3-custom-registry-source). + diff --git a/content/docs/troubleshoot/server/validation-issues.mdx b/content/docs/troubleshoot/server/validation-issues.mdx index 8fb4f1070..7f25cb8a5 100644 --- a/content/docs/troubleshoot/server/validation-issues.mdx +++ b/content/docs/troubleshoot/server/validation-issues.mdx @@ -1,6 +1,6 @@ --- title: Server Validation Issues -description: Resolve Coolify server validation errors by verifying SSH private key format includes BEGIN and END OPENSSH PRIVATE KEY headers to fix libcrypto errors. +description: Resolve Coolify server validation errors such as libcrypto errors, missing authorized keys, a changed SSH host key, and the maximum number of SSH sessions. --- # Server Validation Issues @@ -35,4 +35,34 @@ cat /data/coolify/ssh/keys/id.root@host.docker.internal.pub >> ~/.ssh/authorized + + +### Symptoms +- Validation or a deployment fails with: `The SSH host key of this server changed, so Coolify did not connect.` +- The server **General** page shows **The SSH host key of this server changed**. + +### Solution +Coolify refuses a changed host key in enforce mode. This is expected after you reinstall the server. Otherwise, another machine can answer at the server address. + +Compare the new key with the key on the server, then select **Trust new key** or **Reset** under **Servers > your server > Security**. See [SSH host key](/core/infrastructure/servers/security#ssh-host-key). + + + + + +### Symptoms +- The server refuses new SSH logins with `Maximum number of sessions (8192) reached`. +- The server becomes unreachable in Coolify, also when SSH settings did not change. + +### Solution +Coolify versions before v4.7.0 opened three SSH logins for each connection check. On some servers, these logins left stuck sessions. Update Coolify, then remove the stuck sessions on the server with the provider console or an open SSH session: + +```bash +systemctl restart systemd-logind +``` + +Then validate the server again. + + + diff --git a/nginx/redirects.conf b/nginx/redirects.conf index 6a4938843..a219cba11 100644 --- a/nginx/redirects.conf +++ b/nginx/redirects.conf @@ -211,6 +211,64 @@ location ~ ^(?:/docs)?/services/unsend/?$ { return 301 "/docs/services/usesend"; # Redirects part of a service to the correct service location ~ ^(?:/docs)?/services/beszel-agent/?$ { return 301 "/docs/services/beszel"; } +location ~ ^(?:/docs)?/services/calibre-web-automated-book-downloader/?$ { return 301 "/docs/services/calibre-web-automated-with-downloader"; } +location ~ ^(?:/docs)?/services/classicpress-with-mariadb/?$ { return 301 "/docs/services/classicpress"; } +location ~ ^(?:/docs)?/services/classicpress-with-mysql/?$ { return 301 "/docs/services/classicpress"; } +location ~ ^(?:/docs)?/services/classicpress-without-database/?$ { return 301 "/docs/services/classicpress"; } +location ~ ^(?:/docs)?/services/deno-kv/?$ { return 301 "/docs/services/denokv"; } +location ~ ^(?:/docs)?/services/directus-with-postgresql/?$ { return 301 "/docs/services/directus"; } +location ~ ^(?:/docs)?/services/docuseal-with-postgres/?$ { return 301 "/docs/services/docuseal"; } +location ~ ^(?:/docs)?/services/dozzle-with-auth/?$ { return 301 "/docs/services/dozzle"; } +location ~ ^(?:/docs)?/services/drupal-with-postgresql/?$ { return 301 "/docs/services/drupal"; } +location ~ ^(?:/docs)?/services/elasticsearch-with-kibana/?$ { return 301 "/docs/services/elasticsearch"; } +location ~ ^(?:/docs)?/services/ente-photos-with-s3/?$ { return 301 "/docs/services/ente-photos"; } +location ~ ^(?:/docs)?/services/flowise-with-databases/?$ { return 301 "/docs/services/flowise"; } +location ~ ^(?:/docs)?/services/forgejo-with-mariadb/?$ { return 301 "/docs/services/forgejo"; } +location ~ ^(?:/docs)?/services/forgejo-with-mysql/?$ { return 301 "/docs/services/forgejo"; } +location ~ ^(?:/docs)?/services/forgejo-with-postgresql/?$ { return 301 "/docs/services/forgejo"; } +location ~ ^(?:/docs)?/services/forgejo-with-runner/?$ { return 301 "/docs/services/forgejo"; } +location ~ ^(?:/docs)?/services/forgejo-with-runner-with-mariadb/?$ { return 301 "/docs/services/forgejo"; } +location ~ ^(?:/docs)?/services/forgejo-with-runner-with-mysql/?$ { return 301 "/docs/services/forgejo"; } +location ~ ^(?:/docs)?/services/forgejo-with-runner-with-postgresql/?$ { return 301 "/docs/services/forgejo"; } +location ~ ^(?:/docs)?/services/freshrss-with-mariadb/?$ { return 301 "/docs/services/freshrss"; } +location ~ ^(?:/docs)?/services/freshrss-with-mysql/?$ { return 301 "/docs/services/freshrss"; } +location ~ ^(?:/docs)?/services/freshrss-with-postgresql/?$ { return 301 "/docs/services/freshrss"; } +location ~ ^(?:/docs)?/services/gitea-runner/?$ { return 301 "/docs/services/gitea"; } +location ~ ^(?:/docs)?/services/gitea-with-mariadb/?$ { return 301 "/docs/services/gitea"; } +location ~ ^(?:/docs)?/services/gitea-with-mysql/?$ { return 301 "/docs/services/gitea"; } +location ~ ^(?:/docs)?/services/gitea-with-postgresql/?$ { return 301 "/docs/services/gitea"; } +location ~ ^(?:/docs)?/services/grafana-with-postgresql/?$ { return 301 "/docs/services/grafana"; } +location ~ ^(?:/docs)?/services/hermes-agent-with-webui/?$ { return 301 "/docs/services/hermes-agent"; } +location ~ ^(?:/docs)?/services/joomla-with-mariadb/?$ { return 301 "/docs/services/joomla"; } +location ~ ^(?:/docs)?/services/keycloak-with-postgres/?$ { return 301 "/docs/services/keycloak"; } +location ~ ^(?:/docs)?/services/linkding-plus/?$ { return 301 "/docs/services/linkding"; } +location ~ ^(?:/docs)?/services/matrix-synapse-with-postgresql/?$ { return 301 "/docs/services/matrix"; } +location ~ ^(?:/docs)?/services/matrix-synapse-with-sqlite/?$ { return 301 "/docs/services/matrix"; } +location ~ ^(?:/docs)?/services/n8n-with-postgres-and-worker/?$ { return 301 "/docs/services/n8n"; } +location ~ ^(?:/docs)?/services/n8n-with-postgresql/?$ { return 301 "/docs/services/n8n"; } +location ~ ^(?:/docs)?/services/nextcloud-with-mariadb/?$ { return 301 "/docs/services/nextcloud"; } +location ~ ^(?:/docs)?/services/nextcloud-with-mysql/?$ { return 301 "/docs/services/nextcloud"; } +location ~ ^(?:/docs)?/services/nextcloud-with-postgres/?$ { return 301 "/docs/services/nextcloud"; } +location ~ ^(?:/docs)?/services/nexus-arm/?$ { return 301 "/docs/services/nexus"; } +location ~ ^(?:/docs)?/services/nitropage-with-postgresql/?$ { return 301 "/docs/services/nitropage"; } +location ~ ^(?:/docs)?/services/ollama-with-open-webui/?$ { return 301 "/docs/services/ollama"; } +location ~ ^(?:/docs)?/services/openwa-with-postgresql-and-redis/?$ { return 301 "/docs/services/openwa"; } +location ~ ^(?:/docs)?/services/penpot-with-s3/?$ { return 301 "/docs/services/penpot"; } +location ~ ^(?:/docs)?/services/pocket-id-with-postgresql/?$ { return 301 "/docs/services/pocket-id"; } +location ~ ^(?:/docs)?/services/pterodactyl-panel/?$ { return 301 "/docs/services/pterodactyl"; } +location ~ ^(?:/docs)?/services/pterodactyl-with-wings/?$ { return 301 "/docs/services/pterodactyl"; } +location ~ ^(?:/docs)?/services/superset-with-postgresql/?$ { return 301 "/docs/services/superset"; } +location ~ ^(?:/docs)?/services/supertokens-with-mysql/?$ { return 301 "/docs/services/supertokens"; } +location ~ ^(?:/docs)?/services/supertokens-with-postgresql/?$ { return 301 "/docs/services/supertokens"; } +location ~ ^(?:/docs)?/services/unleash-with-postgresql/?$ { return 301 "/docs/services/unleash"; } +location ~ ^(?:/docs)?/services/unleash-without-database/?$ { return 301 "/docs/services/unleash"; } +location ~ ^(?:/docs)?/services/uptime-kuma-with-mariadb/?$ { return 301 "/docs/services/uptime-kuma"; } +location ~ ^(?:/docs)?/services/uptime-kuma-with-mysql/?$ { return 301 "/docs/services/uptime-kuma"; } +location ~ ^(?:/docs)?/services/vikunja-with-postgresql/?$ { return 301 "/docs/services/vikunja"; } +location ~ ^(?:/docs)?/services/wordpress-with-mariadb/?$ { return 301 "/docs/services/wordpress"; } +location ~ ^(?:/docs)?/services/wordpress-with-mysql/?$ { return 301 "/docs/services/wordpress"; } +location ~ ^(?:/docs)?/services/wordpress-without-database/?$ { return 301 "/docs/services/wordpress"; } +location ~ ^(?:/docs)?/services/yamtrack-with-postgresql/?$ { return 301 "/docs/services/yamtrack"; } # Redirects for Contribution -> New Paths location ~ ^(?:/docs)?/knowledge-base/contribute/coolify/?$ { return 301 "/docs/contribute/coolify"; } diff --git a/public/images/services/hi-events-logo.svg b/public/images/services/hi-events-logo.svg new file mode 100644 index 000000000..6af4872f9 --- /dev/null +++ b/public/images/services/hi-events-logo.svg @@ -0,0 +1,20 @@ + + + Hi.Events Icon - Light + + + + + + + + + + + + + + + diff --git a/src/generated/services.json b/src/generated/services.json index 7e7cc0c9f..dd94db06c 100644 --- a/src/generated/services.json +++ b/src/generated/services.json @@ -875,6 +875,13 @@ "description": "Open-source form builder for conversational forms.", "category": "Development" }, + { + "name": "Hi.Events", + "slug": "hi-events", + "icon": "/docs/images/services/hi-events-logo.svg", + "description": "Open-source event management and ticketing platform.", + "category": "Business" + }, { "name": "Hoarder", "slug": "hoarder",