> ## Documentation Index
> Fetch the complete documentation index at: https://help.onetsolutions.net/llms.txt
> Use this file to discover all available pages before exploring further.

# [One Click Apps] Deploy a custom application from a repository or an image

> Deploy the customer's own code on the instance platform: a public or private git repository (nixpacks, static, dockerfile or dockercompose build pack) or a Docker image. The platform must be ready, the name must be free on the instance and the RAM budget must allow one more application (custom applications are budgeted at the default RAM). The optional custom domain follows the same managed-zone rules as catalog applications. Initial environment variables are pushed before the first build. A private repository is cloned with the platform deploy key (see `GET …/platform/deploy-key`). The deployment runs asynchronously as an instance task; the task fails with the last build log lines when the build does not finish.



## OpenAPI

````yaml https://api.onetsolutions.net/schema post /v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/one-click/apps/custom
openapi: 3.0.3
info:
  title: OnetSolutions API
  version: v1 (v1)
  description: >

    ## Overview


    The OnetSolutions API provides programmatic access to manage your cloud
    infrastructure, domains, and web hosting services.


    ## Authentication


    All API requests require authentication using one of the following methods:


    - **JWT Token**: Obtain a token via login endpoints and include it in the
    `Authorization: Bearer <token>` header

    - **API Key**: Generate an API key from your account settings and use it as
    `Authorization: Bearer sk-onetsolutions-...`


    ## Rate Limiting


    API requests are rate-limited to ensure fair usage:

    - **Standard**: 1000 requests per minute

    - **Burst**: 100 requests per second


    ## Pagination


    List endpoints return paginated results. Use `page` and `page_size` query
    parameters.


    ## Error Handling


    The API uses standard HTTP status codes:

    - `200` Success

    - `201` Created

    - `400` Bad Request

    - `401` Unauthorized

    - `403` Forbidden

    - `404` Not Found

    - `429` Too Many Requests
servers:
  - url: https://api.onetsolutions.net
    description: Production
security: []
tags:
  - name: Authentication
    description: >-
      Login, passwordless authentication, MFA, OAuth providers, and token
      management.
  - name: Organizations
    description: >-
      Organization management, members, roles, modules, audit logs, and
      notification settings.
  - name: Projects
    description: Project management, team members, and project-scoped resources.
  - name: Compute
    description: >-
      Cloud instances, volumes, snapshots, backups, VPCs, firewalls, SSH keys,
      uptime monitors, and instance tasks.
  - name: Billing
    description: >-
      Shopping cart, orders, invoices, payments, payment methods, gateways,
      promo codes, and balance management.
  - name: Domains
    description: >-
      Domain availability, registration, transfers, DNS zones, DNS records, and
      TLD information.
  - name: Web Hosting
    description: >-
      cPanel-based web hosting, emails, databases, subdomains, FTP accounts,
      addon domains, and SSL certificates.
paths:
  /v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/one-click/apps/custom:
    post:
      tags:
        - Compute
      summary: >-
        [One Click Apps] Deploy a custom application from a repository or an
        image
      description: >-
        Deploy the customer's own code on the instance platform: a public or
        private git repository (nixpacks, static, dockerfile or dockercompose
        build pack) or a Docker image. The platform must be ready, the name must
        be free on the instance and the RAM budget must allow one more
        application (custom applications are budgeted at the default RAM). The
        optional custom domain follows the same managed-zone rules as catalog
        applications. Initial environment variables are pushed before the first
        build. A private repository is cloned with the platform deploy key (see
        `GET …/platform/deploy-key`). The deployment runs asynchronously as an
        instance task; the task fails with the last build log lines when the
        build does not finish.
      operationId: one_click_apps_deploy_custom
      parameters:
        - in: path
          name: instance_id
          schema:
            type: string
          description: Unique identifier of the compute instance.
          required: true
        - in: path
          name: organization_id
          schema:
            type: string
          description: Unique identifier of the organization that owns the resource.
          required: true
        - in: path
          name: project_id
          schema:
            type: string
          description: Unique identifier of the project containing the resource.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomAppDeploy'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppDeployResponse'
          description: ''
        '400':
          description: Invalid source, requirements or quota not met, or name already taken
        '401':
          description: Authentication credentials missing or invalid
        '403':
          description: Insufficient permissions on this instance
        '404':
          description: Instance not found
        '409':
          description: Another task is already in progress on this instance
      security:
        - BearerAuth: []
components:
  schemas:
    CustomAppDeploy:
      type: object
      properties:
        name:
          type: string
          maxLength: 100
          pattern: ^[-a-zA-Z0-9_]+$
        source:
          description: Application source (git or image), validated by the API
        custom_domain:
          type: string
          nullable: true
          maxLength: 253
        envs:
          type: array
          items:
            $ref: '#/components/schemas/AppEnvVarInput'
          description: Initial environment variables, pushed before the first build
          maxItems: 200
      required:
        - source
    AppDeployResponse:
      type: object
      properties:
        task_id:
          type: string
          format: uuid
          readOnly: true
        app_id:
          type: string
          format: uuid
          readOnly: true
      required:
        - app_id
        - task_id
    AppEnvVarInput:
      type: object
      properties:
        key:
          type: string
          maxLength: 100
          pattern: ^[A-Za-z_][A-Za-z0-9_]*$
        value:
          type: string
          maxLength: 10000
        is_secret:
          type: boolean
          default: false
      required:
        - key
        - value
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or API Key
      description: >-
        Use `Authorization: Bearer <token>` header. Token can be a JWT token or
        an API key (format: `sk-onetsolutions-...`).

````