The official Pulumi provider for Dokploy, with SDKs for TypeScript/JavaScript, Python, Go and .NET. Manage your projects, applications, databases, domains and backups as code, on a self-hosted Dokploy or on Dokploy Cloud.
It is bridged from the Terraform provider, which is the single source of truth for resource behavior.
- Projects and Environments: Projects, environments and their shared variables (
${{project.X}}references included). - Applications: Deploy from a Docker image, Git, GitHub, GitLab, Bitbucket or Gitea, with env, build args, build secrets, ports and mounts.
- Docker Compose: Raw compose files or from Git, GitHub, GitLab, Bitbucket or Gitea, with isolated deployments and per-service domains.
- Databases: PostgreSQL, MySQL, MariaDB, MongoDB and Redis, with password rotation.
- Domains: Routing through Traefik for applications and compose services, with HTTPS and certificates.
- Backups: Database and volume backups to any S3-compatible destination.
- Schedules: Cron jobs on applications, compose services, servers or Dokploy itself.
- Infrastructure: Remote servers, SSH keys and Docker registries.
- Deployments: Deploy on change, wait for the result, and redeploy on demand with
Deploymenttriggers. - Import: Every resource except
Deploymentcan be imported from an existing Dokploy instance.
| Language | Package |
|---|---|
| TypeScript / JavaScript | npm install @dokploy/pulumi |
| Python | pip install dokploy-pulumi |
| Go | go get github.com/Dokploy/pulumi-dokploy/sdk/go/dokploy |
| .NET | dotnet add package Dokploy.Pulumi |
The provider plugin is downloaded automatically from this repository's GitHub releases. To install it by hand: pulumi plugin install resource dokploy <version> --server github://api.github.com/Dokploy/pulumi-dokploy.
Create an API key in Dokploy (Settings > Profile > API/CLI Keys) and configure the stack:
pulumi config set dokploy:url https://dokploy.example.com
pulumi config set --secret dokploy:apiKey <key>| Key | Environment variable | |
|---|---|---|
dokploy:url |
DOKPLOY_URL |
Dokploy URL, for example https://dokploy.example.com |
dokploy:apiKey |
DOKPLOY_API_KEY |
API key; an owner or admin key is recommended |
dokploy:maxRequestsPerMinute |
Client-side rate limit (240 by default on Dokploy Cloud) |
One provider configuration manages one organization: the one the API key belongs to.
import * as pulumi from "@pulumi/pulumi";
import * as dokploy from "@dokploy/pulumi";
const config = new pulumi.Config();
const shop = new dokploy.Project("shop", { name: "shop" });
const db = new dokploy.Postgres("db", {
name: "shop-db",
environmentId: shop.defaultEnvironmentId,
databaseName: "shop",
databaseUser: "shop",
databasePassword: config.requireSecret("dbPassword"),
dockerImage: "postgres:18.1",
});
const web = new dokploy.Application("web", {
name: "shop-web",
environmentId: shop.defaultEnvironmentId,
docker: { image: "traefik/whoami:v1.10.3" },
env: { DATABASE_URL: db.internalConnectionUrl },
});
new dokploy.Domain("web", {
applicationId: web.id,
host: "shop.example.com",
port: 80,
https: true,
});import pulumi
import dokploy_pulumi as dokploy
config = pulumi.Config()
shop = dokploy.Project("shop", name="shop")
db = dokploy.Postgres(
"db",
name="shop-db",
environment_id=shop.default_environment_id,
database_name="shop",
database_user="shop",
database_password=config.require_secret("dbPassword"),
docker_image="postgres:18.1",
)
web = dokploy.Application(
"web",
name="shop-web",
environment_id=shop.default_environment_id,
docker={"image": "traefik/whoami:v1.10.3"},
env={"DATABASE_URL": db.internal_connection_url},
)
dokploy.Domain("web", application_id=web.id, host="shop.example.com", port=80, https=True)Dokploy references such as ${{project.X}} are plain strings in Pulumi: no escaping needed.
- The state contains secrets (env variables, passwords, keys). Use a backend with encryption, such as Pulumi Cloud or a self-managed backend with a KMS or passphrase secrets provider.
- Write-only attributes (
*Wo) are still stored in the state, encrypted as secrets (pulumi-terraform-bridge#3201), and changes to them show no diff: bump the matching*WoVersionto apply a new value. customTimeoutshas no effect on bridged Plugin Framework providers (pulumi-terraform-bridge#827). Use thedeployTimeoutattribute of the resources that deploy.
Resource behavior lives in the Terraform provider: fix it there and regenerate this repository.
Requirements: Go, Node.js, Python 3.10+, the Pulumi CLI and, to compile the .NET SDK, the .NET 8 SDK.
make build # schema, provider binary and every SDK
make install_plugin # install bin/pulumi-resource-dokploy into PULUMI_HOME
make test # smoke tests in examples/ (needs DOKPLOY_URL and DOKPLOY_API_KEY)
scripts/regen.sh # resync from ../terraform-provider-dokploy and regenerate everything
scripts/regen.sh 1.2.3 # pin terraform-provider-dokploy v1.2.3 and regenerateprovider/go.mod may point at a local checkout of the Terraform provider with a replace directive
(scripts/regen.sh without arguments sets it). CI refuses that state: before pushing, pin a released
version with scripts/regen.sh X.Y.Z, which drops the replace and runs go get github.com/Dokploy/terraform-provider-dokploy@vX.Y.Z.
Package names for each registry live in the constants at the top of
provider/resources.go. Renaming the Pulumi package itself also means renaming
the provider/cmd/* directories and PACK in the Makefile.
- A Terraform provider release runs
gh workflow run upgrade-provider.yml -R Dokploy/pulumi-dokploy -f version=X.Y.Z(needs thePULUMI_REPO_TOKENsecret in that repository); running it by hand without a version takes the latest release, and does nothing if there is none. The workflow opens a PR with the regenerated schema and SDKs, labeledrelease/major|minor|patchafter the upstream bump. - Merging a PR with a
release/*label tags the next version and runs the release. Pushing avX.Y.Ztag by hand does the same. - The release attaches the plugin binaries to the GitHub release and publishes npm, PyPI, NuGet and the
sdk/vX.Y.ZGo module tag.
Repository secrets: NUGET_API_KEY, UPGRADE_PR_TOKEN (PAT or app token so upgrade PRs trigger CI).
npm and PyPI use trusted publishing (OIDC). release.yml runs through workflow_call from
release-on-merge.yml, and the OIDC token names the caller, so register release-on-merge.yml as the
publisher: on npmjs.com for @dokploy/pulumi with environment npm, and on PyPI for dokploy-pulumi
with environment pypi. Optionally also register release.yml (environment pypi) on PyPI so tags
pushed by hand publish there; npm keeps a single trusted publisher, so hand-pushed tags do not publish
npm. The npm, pypi and nuget environments must allow deployments from refs/heads/main, the ref of
a merged pull_request_target run.