# Create (Dockerfile without git)

Source: https://coolify.io/docs/api/endpoints/applications/create-dockerfile-application

## POST /applications/dockerfile

Create (Dockerfile without git)

Create new application based on a simple Dockerfile (without git).

**Authentication:** Bearer token (`bearerAuth`)

### Request body

Application object that needs to be created.

`application/json`, required.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| project_uuid | string | yes | The project UUID. |
| server_uuid | string | yes | The server UUID. |
| environment_name | string | no | The environment name. You need to provide at least one of environment_name or environment_uuid. |
| environment_uuid | string | no | The environment UUID. You need to provide at least one of environment_name or environment_uuid. |
| dockerfile | string | yes | The Dockerfile content. |
| build_pack | string enum "dockerfile" | no | The build pack type. |
| ports_exposes | string | no | The ports to expose. |
| destination_uuid | string | no | The destination UUID. |
| name | string | no | The application name. |
| description | string | no | The application description. |
| domains | string | no | The application URLs in a comma-separated list. |
| noindex_domains | array of string | no | 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 | string | no | The docker registry image name. |
| docker_registry_image_tag | string | no | The docker registry image tag. |
| ports_mappings | string | no | The ports mappings. |
| base_directory | string | no | The base directory for all commands. |
| health_check_enabled | boolean | no | Health check enabled. |
| health_check_path | string | no | Health check path. |
| health_check_port | string or null | no | Health check port. |
| health_check_host | string or null | no | Health check host. |
| health_check_method | string | no | Health check method. |
| health_check_return_code | integer | no | Health check return code. |
| health_check_scheme | string | no | Health check scheme. |
| health_check_response_text | string or null | no | Health check response text. |
| health_check_interval | integer | no | Health check interval in seconds. |
| health_check_timeout | integer | no | Health check timeout in seconds. |
| health_check_retries | integer | no | Health check retries count. |
| health_check_start_period | integer | no | Health check start period in seconds. |
| limits_memory | string | no | Memory limit. |
| limits_memory_swap | string | no | Memory swap limit. |
| limits_memory_swappiness | integer | no | Memory swappiness. |
| limits_memory_reservation | string | no | Memory reservation. |
| limits_cpus | string | no | CPU limit. |
| limits_cpuset | string or null | no | CPU set. |
| limits_cpu_shares | integer | no | CPU shares. |
| custom_labels | string | no | Custom labels. |
| custom_docker_run_options | string | no | Custom docker run options. |
| post_deployment_command | string | no | Post deployment command. |
| post_deployment_command_container | string | no | Post deployment command container. |
| pre_deployment_command | string | no | Pre deployment command. |
| pre_deployment_command_container | string | no | Pre deployment command container. |
| manual_webhook_secret_github | string | no | Manual webhook secret for Github. Needs the deploy ability. |
| manual_webhook_secret_gitlab | string | no | Manual webhook secret for Gitlab. Needs the deploy ability. |
| manual_webhook_secret_bitbucket | string | no | Manual webhook secret for Bitbucket. Needs the deploy ability. |
| manual_webhook_secret_gitea | string | no | Manual webhook secret for Gitea. Needs the deploy ability. |
| redirect | string or null enum "www", "non-www", "both" | no | How to set redirect with Traefik / Caddy. www<->non-www. |
| instant_deploy | boolean | no | The flag to indicate if the application should be deployed instantly. |
| is_force_https_enabled | boolean | no | The flag to indicate if HTTPS is forced. Defaults to true. |
| is_preview_deployments_enabled | boolean | no | Enable preview deployments for pull requests. |
| use_build_server | boolean or null | no | Use build server. |
| use_build_secrets | boolean | no | Use Docker Build Secrets for build-time environment variables. |
| is_git_submodules_enabled | boolean | no | Clone Git submodules. |
| is_git_lfs_enabled | boolean | no | Enable Git LFS. |
| is_git_shallow_clone_enabled | boolean | no | Use a shallow Git clone. |
| disable_build_cache | boolean | no | Disable the build cache. |
| inject_build_args_to_dockerfile | boolean | no | Inject build arguments into the Dockerfile build. |
| include_source_commit_in_build | boolean | no | Include the source commit in the build. |
| is_env_sorting_enabled | boolean | no | Sort environment variables. |
| redact_all_env_values_in_logs | boolean | no | Redact all environment variable values in logs. When false, only locked (shown once) values are redacted. Requires team admin permissions. |
| include_coolify_default_variables | boolean | no | 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 | boolean | no | Make pull request deployments public. |
| stop_grace_period | integer or null | no | Container stop grace period in seconds. |
| rolling_update_drain_seconds | integer | no | 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 | integer | no | Number of Docker images to retain. |
| is_gzip_enabled | boolean | no | Enable gzip compression. |
| is_stripprefix_enabled | boolean | no | Enable path prefix stripping. |
| is_permanent_redirect_enabled | boolean | no | Use permanent redirects (301/308) instead of temporary (302/307) for the HTTP to HTTPS and www redirects. Defaults to false. |
| traefik_certificate_resolver | string or null | no | Traefik certificate resolver for this application. Null uses the server setting, "none" uses no resolver. |
| is_container_label_readonly_enabled | boolean | no | 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 | boolean | no | Deploy the raw Docker Compose definition. |
| is_log_drain_enabled | boolean | no | Enable log drain for the application. |
| is_gpu_enabled | boolean | no | Enable GPU support. |
| gpu_driver | string or null | no | GPU driver name. |
| gpu_count | string or null | no | Number of GPUs to allocate. |
| gpu_device_ids | string or null | no | Comma-separated GPU device IDs. |
| gpu_options | string or null | no | Additional GPU options. |
| is_consistent_container_name_enabled | boolean | no | Use a consistent container name across deployments. |
| custom_internal_name | string or null | no | 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 | string or null | no | Prefix for generated container names (prefix-20260908T141530). Slugified and unique across the instance. |
| preview_url_template | string | no | Preview URL template. |
| max_restart_count | integer | no | Maximum container restart count before stopping. |
| is_http_basic_auth_enabled | boolean | no | HTTP Basic Authentication enabled. |
| http_basic_auth_username | string or null | no | Username for HTTP Basic Authentication |
| http_basic_auth_password | string or null | no | Password for HTTP Basic Authentication |
| http_basic_auth_hash_algorithm | string enum "bcrypt", "argon2id" | no | Hash algorithm for the HTTP Basic Authentication password. Argon2id needs the Caddy proxy, version 2.11 or newer. |
| http_basic_auth_bcrypt_cost | integer | no | Bcrypt cost for the HTTP Basic Authentication password. |
| http_basic_auth_argon2id_memory_cost | integer | no | Argon2id memory cost in KiB for the HTTP Basic Authentication password. |
| http_basic_auth_argon2id_time_cost | integer | no | Argon2id time cost (iterations) for the HTTP Basic Authentication password. |
| connect_to_docker_network | boolean | no | The flag to connect the service to the predefined Docker network. |
| force_domain_override | boolean | no | Force domain usage even if conflicts are detected. Default is false. |
| autogenerate_domain | boolean | no | 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 | boolean | no | 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. |
| tags | array of string | no | Tags to assign to the application. |

### Responses

#### 201

Application created successfully.

`application/json`: object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| uuid | string | no |  |

#### 400

Invalid token.

`application/json`: object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | no |  |

#### 401

Unauthenticated.

`application/json`: object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | no |  |

#### 403

The token needs the deploy ability to set a manual webhook secret.

#### 409

Domain conflicts detected.

`application/json`: object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | no |  |
| warning | string | no |  |
| conflicts | array of object | no |  |

Fields of `conflicts`:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| domain | string | no |  |
| resource_name | string | no |  |
| resource_uuid | string or null | no |  |
| resource_type | string enum "application", "service", "instance" | no |  |
| message | string | no |  |
