---
title: "Create (Private - Gitea App)"
method: POST
path: "/applications/private-gitea-app"
tags: ["Applications"]
---

# Create (Private - Gitea App)

`POST /applications/private-gitea-app`

## Request

- Base URL: `https://app.coolify.io/api/v1`
- URL: `https://app.coolify.io/api/v1/applications/private-gitea-app`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/coollabsio/apis/coolify/docs/applications/private-gitea-app/post.ts> (a function with typed inputs; its response is checked against the schema)

Create new application based on a private repository through a Gitea App.

## Request body

- object
  - `project_uuid` string, required: The project UUID.
  - `server_uuid` string, required: The server UUID.
  - `environment_name` string: The environment name. You need to provide at least one of environment_name or environment_uuid.
  - `environment_uuid` string: The environment UUID. You need to provide at least one of environment_name or environment_uuid.
  - `gitea_app_uuid` string, required: The Gitea App UUID. The source must be connected.
  - `git_repository` string, required: The repository as owner/name, or its URL on the Gitea instance.
  - `git_branch` string, required: The git branch.
  - `ports_exposes` string: The ports to expose.
  - `destination_uuid` string: The destination UUID.
  - `build_pack` 'nixpacks' | 'railpack' | 'static' | 'dockerfile' | 'dockercompose', required: The build pack type.
  - `name` string: The application name.
  - `description` string: The application description.
  - `domains` string: The application URLs in a comma-separated list.
  - `noindex_domains` string[]: 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` string: The git commit SHA.
  - `docker_registry_image_name` string: The docker registry image name.
  - `docker_registry_image_tag` string: The docker registry image tag.
  - `is_static` boolean: The flag to indicate if the application is static.
  - `is_spa` boolean: The flag to indicate if the application is a single-page application (SPA). Only relevant when is_static is true.
  - `is_auto_deploy_enabled` boolean: The flag to indicate if auto-deploy is enabled on git push. Defaults to true.
  - `is_force_https_enabled` boolean: The flag to indicate if HTTPS is forced. Defaults to true.
  - `is_preview_deployments_enabled` boolean: Enable preview deployments for pull requests.
  - `static_image` 'nginx:alpine': The static image.
  - `install_command` string: The install command.
  - `build_command` string: The build command.
  - `start_command` string: The start command.
  - `ports_mappings` string: The ports mappings.
  - `base_directory` string: The base directory for all commands.
  - `publish_directory` string: The publish directory.
  - `health_check_enabled` boolean: Health check enabled.
  - `health_check_path` string: Health check path.
  - `health_check_port` string, nullable: Health check port.
  - `health_check_host` string, nullable: Health check host.
  - `health_check_method` string: Health check method.
  - `health_check_return_code` integer: Health check return code.
  - `health_check_scheme` string: Health check scheme.
  - `health_check_response_text` string, nullable: Health check response text.
  - `health_check_interval` integer: Health check interval in seconds.
  - `health_check_timeout` integer: Health check timeout in seconds.
  - `health_check_retries` integer: Health check retries count.
  - `health_check_start_period` integer: Health check start period in seconds.
  - `limits_memory` string: Memory limit.
  - `limits_memory_swap` string: Memory swap limit.
  - `limits_memory_swappiness` integer: Memory swappiness.
  - `limits_memory_reservation` string: Memory reservation.
  - `limits_cpus` string: CPU limit.
  - `limits_cpuset` string, nullable: CPU set.
  - `limits_cpu_shares` integer: CPU shares.
  - `custom_labels` string: Custom labels.
  - `custom_docker_run_options` string: Custom docker run options.
  - `post_deployment_command` string: Post deployment command.
  - `post_deployment_command_container` string: Post deployment command container.
  - `pre_deployment_command` string: Pre deployment command.
  - `pre_deployment_command_container` string: Pre deployment command container.
  - `manual_webhook_secret_github` string: Manual webhook secret for Github. Needs the deploy ability.
  - `manual_webhook_secret_gitlab` string: Manual webhook secret for Gitlab. Needs the deploy ability.
  - `manual_webhook_secret_bitbucket` string: Manual webhook secret for Bitbucket. Needs the deploy ability.
  - `manual_webhook_secret_gitea` string: Manual webhook secret for Gitea. Needs the deploy ability.
  - `redirect` 'www' | 'non-www' | 'both', nullable: How to set redirect with Traefik / Caddy. www<->non-www.
  - `instant_deploy` boolean: The flag to indicate if the application should be deployed instantly.
  - `dockerfile` string: The Dockerfile content.
  - `dockerfile_location` string: The Dockerfile location in the repository
  - `dockerfile_target_build` string, nullable: The Docker build target (stage) in the Dockerfile.
  - `docker_compose_location` string: The Docker Compose location.
  - `docker_compose_custom_start_command` string: The Docker Compose custom start command.
  - `docker_compose_custom_build_command` string: The Docker Compose custom build command.
  - `docker_compose_domains` object[]: Array of URLs to be applied to containers of a dockercompose application.
    - `name` string: The service name as defined in docker-compose.
    - `domain` string: Comma-separated list of URLs (e.g. "https://app.coolify.io,https://app2.coolify.io")
    - `redirect` 'www' | 'non-www' | 'both', nullable: Per-service www/non-www redirect for this compose service.
  - `watch_paths` string: Watch path patterns, one per line (newline-separated). Commas do not separate patterns.
  - `use_build_server` boolean, nullable: Use build server.
  - `use_build_secrets` boolean: Use Docker Build Secrets for build-time environment variables.
  - `is_git_submodules_enabled` boolean: Clone Git submodules.
  - `is_git_lfs_enabled` boolean: Enable Git LFS.
  - `is_git_shallow_clone_enabled` boolean: Use a shallow Git clone.
  - `is_auto_cancel_queued_deployments_enabled` boolean: Cancel older queued webhook deployments when a newer push arrives. Default: true.
  - `is_auto_cancel_building_deployments_enabled` boolean: 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` boolean: Disable the build cache.
  - `inject_build_args_to_dockerfile` boolean: Inject build arguments into the Dockerfile build.
  - `include_source_commit_in_build` boolean: Include the source commit in the build.
  - `include_network_hosts_in_build` boolean: Add the containers of the destination network as build hosts.
  - `is_env_sorting_enabled` boolean: Sort environment variables.
  - `redact_all_env_values_in_logs` boolean: 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: 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: Make pull request deployments public.
  - `stop_grace_period` integer, nullable: Container stop grace period in seconds.
  - `rolling_update_drain_seconds` integer: 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: Number of Docker images to retain.
  - `is_gzip_enabled` boolean: Enable gzip compression.
  - `is_stripprefix_enabled` boolean: Enable path prefix stripping.
  - `is_permanent_redirect_enabled` boolean: 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, nullable: Traefik certificate resolver for this application. Null uses the server setting, "none" uses no resolver.
  - `is_container_label_readonly_enabled` boolean: 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: Deploy the raw Docker Compose definition.
  - `is_log_drain_enabled` boolean: Enable log drain for the application.
  - `is_gpu_enabled` boolean: Enable GPU support.
  - `gpu_driver` string, nullable: GPU driver name.
  - `gpu_count` string, nullable: Number of GPUs to allocate.
  - `gpu_device_ids` string, nullable: Comma-separated GPU device IDs.
  - `gpu_options` string, nullable: Additional GPU options.
  - `is_consistent_container_name_enabled` boolean: Use a consistent container name across deployments.
  - `is_image_scan_enabled` boolean: Scan the images of the application for vulnerabilities. Needs image scanning on the server. Default true.
  - `custom_internal_name` string, nullable: 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, nullable: Prefix for generated container names (prefix-20260908T141530). Slugified and unique across the instance.
  - `preview_url_template` string: Preview URL template.
  - `max_restart_count` integer: Maximum container restart count before stopping.
  - `is_http_basic_auth_enabled` boolean: HTTP Basic Authentication enabled.
  - `http_basic_auth_username` string, nullable: Username for HTTP Basic Authentication
  - `http_basic_auth_password` string, nullable: Password for HTTP Basic Authentication
  - `http_basic_auth_hash_algorithm` 'bcrypt' | 'argon2id': Hash algorithm for the HTTP Basic Authentication password. Argon2id needs the Caddy proxy, version 2.11 or newer.
  - `http_basic_auth_bcrypt_cost` integer: Bcrypt cost for the HTTP Basic Authentication password.
  - `http_basic_auth_argon2id_memory_cost` integer: Argon2id memory cost in KiB for the HTTP Basic Authentication password.
  - `http_basic_auth_argon2id_time_cost` integer: Argon2id time cost (iterations) for the HTTP Basic Authentication password.
  - `connect_to_docker_network` boolean: The flag to connect the service to the predefined Docker network.
  - `force_domain_override` boolean: Force domain usage even if conflicts are detected. Default is false.
  - `autogenerate_domain` boolean: 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: 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` string[]: Tags to assign to the application.
  - `is_preserve_repository_enabled` boolean: Preserve repository during deployment.

## Response `201`

Application created successfully.

- object
  - `uuid` string

## Other responses

- `400`: Invalid token.
- `401`: Unauthenticated.
- `403`: The token needs the deploy ability to set a manual webhook secret.
- `409`: Domain conflicts detected.

## Changes

> 220 revisions in range; 2 not diffed.

- **2026-11-06** `6ff98652e8ad`: 1 info
  - added the new optional request property `is_image_scan_enabled`
- **2026-11-05** `6c1e43530ed0`: 1 info
  - added the new optional request property `include_network_hosts_in_build`
- **2026-11-05** `a15d50b71208`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/coollabsio/apis/coolify/changes/applications/private-gitea-app/post.md)

---

[API](https://skmtc.dev/coollabsio/apis/coolify.md) - [All operations](https://skmtc.dev/coollabsio/apis/coolify/llms.txt) - [OpenAPI document](https://skmtc.dev/coollabsio/apis/coolify/revisions/6ff98652e8ad?raw)
