Skip to main content

Overview

Projects in Dokploy serve as organizational units for your deployments. Each project can contain multiple environments, applications, databases, and compose services.

Endpoints

Create Project

curl -X POST https://your-dokploy-instance.com/api/project.create \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-project",
    "description": "Production project for main application",
    "env": "production"
  }'

Request Body

name
string
required
Project name. Must be at least 1 character long.
description
string
Optional project description.
env
string
Environment identifier for the project (e.g., “production”, “staging”, “development”).

Response

Returns the created project object including the default environment.
project
object
The created project details.
environment
object
The default environment created with the project.

Get Project

curl -X GET "https://your-dokploy-instance.com/api/project.one?projectId=proj_abc123" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Query Parameters

projectId
string
required
The unique identifier of the project to retrieve.

Response

Returns the project with all its environments and services.
projectId
string
Unique project identifier.
name
string
Project name.
description
string
Project description.
organizationId
string
Organization this project belongs to.
environments
array
List of environments in this project.

List All Projects

curl -X GET "https://your-dokploy-instance.com/api/project.all" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response

Returns an array of all projects in your organization with their environments and services.

Update Project

curl -X POST https://your-dokploy-instance.com/api/project.update \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "projectId": "proj_abc123",
    "name": "updated-project-name",
    "description": "Updated description",
    "env": "production"
  }'

Request Body

projectId
string
required
The ID of the project to update.
name
string
New project name. Must be at least 1 character long.
description
string
New project description.
env
string
Updated environment identifier.
organizationId
string
Organization ID (typically not changed).
createdAt
string
Creation timestamp (typically not changed).

Delete Project

curl -X POST https://your-dokploy-instance.com/api/project.remove \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "projectId": "proj_abc123"
  }'

Request Body

projectId
string
required
The ID of the project to delete. This will also remove all associated environments, applications, and services.
Deleting a project is permanent and will remove all associated resources including applications, databases, and deployments.

Duplicate Project

curl -X POST https://your-dokploy-instance.com/api/project.duplicate \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "sourceEnvironmentId": "env_xyz789",
    "name": "duplicated-project",
    "description": "Copy of production environment",
    "includeServices": true,
    "selectedServices": [
      {
        "id": "app_123",
        "type": "application"
      },
      {
        "id": "pg_456",
        "type": "postgres"
      }
    ],
    "duplicateInSameProject": false
  }'

Request Body

sourceEnvironmentId
string
required
The environment ID to duplicate from.
name
string
required
Name for the new duplicated project or environment.
description
string
Optional description for the duplicated project.
includeServices
boolean
default:"true"
Whether to include services in the duplication.
selectedServices
array
Array of services to duplicate. Each service object must include:
duplicateInSameProject
boolean
default:"false"
If true, creates a new environment in the same project. If false, creates a new project.

Response

Returns the newly created project or environment with duplicated services.
When duplicating services, configurations like domains, ports, mounts, and environment variables are copied. Secrets and sensitive data should be reviewed after duplication.