# terraform-provider-dokploy

> Terraform provider for the Dokploy PaaS. Projects, environments, applications, compose stacks, databases, domains, backups.

- status: maintained
- language: Go
- version: v0.10.0
- license: MIT
- registry: vanillauys/dokploy
- repo: https://github.com/vanillauys/terraform-provider-dokploy

Dokploy is a self-hosted PaaS. This provider manages it with Terraform:
projects, environments, applications, compose stacks, databases,
domains, ports, redirects, mounts, backups, and cron schedules. It
works with Terraform >= 1.5 and with OpenTofu.

CI runs the acceptance suite against a real Dokploy instance on every
PR. The stack behind this site is declared through this provider, so
every release runs in production here.

## Usage

```hcl
terraform {
  required_providers {
    dokploy = {
      source  = "vanillauys/dokploy"
      version = "~> 0.10"
    }
  }
}

provider "dokploy" {
  endpoint = "https://dokploy.example.com"
  # api_key falls back to the DOKPLOY_API_KEY environment variable
}

resource "dokploy_project" "main" {
  name = "wihan-dev"
}
```

The full reference is at [/docs/dokploy](/docs/dokploy): every
resource, data source, and guide.

## For agents

- Install from the Terraform registry: source `vanillauys/dokploy`.
  The provider is pre-1.0; pin an exact version if you need stability.
- Configure `endpoint` and `api_key`, or set the `DOKPLOY_ENDPOINT`
  and `DOKPLOY_API_KEY` environment variables.
- Read the reference at `https://wihan.dev/docs/dokploy`. Append `.md`
  to any docs URL for raw markdown, for example
  `https://wihan.dev/docs/dokploy/resources/application.md`.
- Read the guides first:
  [getting started](/docs/dokploy/guides/getting-started),
  [adopting an existing instance](/docs/dokploy/guides/adopting-an-existing-instance),
  [deploy semantics](/docs/dokploy/guides/deploy-semantics), and
  [secrets](/docs/dokploy/guides/secrets).
- Known traps: an exhausted API-key rate limit returns `401`, not
  `429`; `dokploy_application` and `dokploy_compose` own the whole
  service, so manage a service in Terraform or in the UI, not both.
- Source and issues:
  [github.com/vanillauys/terraform-provider-dokploy](https://github.com/vanillauys/terraform-provider-dokploy).