# Dokploy Starter > A static web app that generates Terraform files for the `vanillauys/dokploy` provider, which manages a Dokploy server. The user configures the server in the browser, and the app gives the `.tf` files to copy or download as a `.zip`. All generation runs in the browser. There is no backend and no API. The app has one page, `/`. The full config lives in the `c` search param, so a URL is a complete, shareable config. An unknown path shows a "not found" page. The site is unofficial: it is not affiliated with Dokploy or HashiCorp. License: MIT. ### Use the app as an agent - The page is a builder. The main area has one tile for each part of the build: `project`, `services`, `databases`, `backups`, `notifications`, `resources`. Each tile is a tab with `data-testid="tile-"`. A click opens the panel of that part. Only one panel shows at a time. - To open a preset, click `data-testid="preset-open"`, then the preset button. Each preset button has the id `preset-`. - The side column has the Files list and a live preview. Each file in the list is a button with `data-testid="file-tab-"`. A click shows the file in the code view. Read the code in the region with `data-testid="code-region"`. The download button is `data-testid="download-zip"`. The copy link button is `data-testid="copy-link"`. - On a small screen, the button `data-testid="open-files"` opens the file list in a sheet. - Each form field has a stable `id` and the same `data-testid`. A text field also has the same `name`. The id starts with the list and the item index: for example `project-name`, `applications-0-name`, `databases-1-engine`. A field is in the DOM after its part was open one time. - The Resources part adds any resource or data source of the provider. The button `data-testid="resources-add"` (or the `r` key) opens the picker, a dialog with the combobox `resource-picker-input`. Type to filter, then press Enter to add from the example, or Shift+Enter to start empty. Each option has the id `picker-`, or `picker-data-` for a data source. - A resource card has the id `resources-`. Its Terraform name is `resources--name`. Each attribute field is `resources--attr-`, where the path joins the attribute names and the item indexes with `-`, for example `resources-0-attr-published_port` or `resources-0-attr-health_check-0-test`. The value source menu of a field is `-source`. - Each preset item has a collapsed "More settings" section for the arguments that its form does not show. Its toggle is `-extra-toggle`, for example `applications-0-extra-toggle`, and its fields are `-extra-`. - Each panel section has the id `section-`: `project`, `services` (with `applications` and `composes` inside), `databases`, `backups`, `notifications`, `resources`. - The shortcuts work when the focus is not in a field: `s` downloads the `.zip`, `l` copies the link, `c` copies the current file, `[` and `]` show the previous and next file, `1` to `9` show a file, `j` and `k` open the next and previous part, `u` switches the main area between UI and Code, `v` switches the side column between Files and Preview, `p` opens the presets, `r` adds a resource, `e` goes to the open part, `f` goes to the file contents, `d` switches the theme, `?` shows the shortcut list. - The layout (open part, modes, width, file) is in `localStorage` under `dokploy-starter:ui`. The share link does not hold it. ### The URL format `/?c=1.`. The `1.` prefix is the encoding version. `` is `base64url(deflate(JSON))`, without padding, of the config with each default value removed. A `type` key always stays. A missing, damaged, or unknown value gives the default config. Each field has a fallback, so a value that is not valid becomes its default. To make a link without the page: write the JSON of the fields that you change, compress it with raw deflate (zlib level 9 is fine, without a zlib header), encode it as base64url without `=`, and add the `1.` prefix. Example: `{"project":{"name":"shop"}}`. ### The config model - `version`: the provider version. Now only `"1.13.0"`. - `project`: `name`, `description`, `dev` (true adds a `dev` environment beside `production`). - `github`: `providerName`, the name of the GitHub App in Dokploy. The files look it up with a data source. - `gitlab`: `name`, `url` (empty means gitlab.com), `groupName`. - `applications[]` (max 20): `name`, `environment` (`production` or `dev`), `source` (`{type:"github",owner,repository,branch}`, `{type:"gitlab",owner,repository,branch,projectId,pathNamespace}`, or `{type:"docker",image}`), `buildType` (`nixpacks`, `dockerfile`, `railpack`, `heroku_buildpacks`, `paketo_buildpacks`, `static`), `domain` (`null` or `{host,port,https}`), `env[]` (`{key,value}`). - `composes[]` (max 20): `name`, `environment`, `source` (`{type:"raw",composeFile}`, github, or gitlab), `composePath`, `domain` (`null` or `{host,port,https,serviceName}`). - `databases[]` (max 20): `name`, `engine` (`postgres`, `mysql`, `mariadb`, `mongo`, `redis`, `libsql`), `environment`, `databaseName`, `user`, `dockerImage` (empty keeps the provider default), `backup`. - `backups`: `enabled`, `destinationName`, `providerName`, `endpoint`, `bucket`, `region`, `schedule` (cron), `keepLatestCount`. Redis has no backups. - `notifications[]` (max 20): `{type:"discord",name,events}`, `{type:"slack",name,channel,events}`, or `{type:"email",name,smtpServer,smtpPort,username,fromAddress,toAddresses,events}`. `events` has the booleans `appDeploy`, `appBuildError`, `databaseBackup`, `volumeBackup`, `dokployBackup`, `dokployRestart`, `dockerCleanup`, `serverThreshold`. - `resources[]` (max 100): any resource or data source of the provider. Each item is `{key,type,mode?,name,attributes}`. `key` is a stable id that references use. `type` is the provider type, for example `dokploy_port`. `mode` is `"data"` for a data source. `name` is the Terraform name. `attributes` maps each attribute name to an `AttrValue`. - `extra`: more attributes for a block that a preset part writes, as a map of `AttrValue`. It is on each application, compose service, domain, database, and notification, and as `project.extra`, `project.devExtra`, `backups.destinationExtra`, and `backups.backupExtra`. An attribute that the preset form controls loses to the form. - `AttrValue` is one of: `{kind:"string",value}`, `{kind:"number",value}`, `{kind:"bool",value}`, `{kind:"list",items}`, `{kind:"map",entries:[{key,value}]}`, `{kind:"object",attributes}`, `{kind:"objects",items:[attributes]}`, `{kind:"ref",target,attribute}`, `{kind:"secret"}`, `{kind:"variable",description?,example?}`, or `{kind:"expr",value}`. A `secret` becomes a sensitive variable, so the link never holds the value. - A reference `target` is `{kind:"resource",key}`, `{kind:"project"}`, `{kind:"environment",environment:"production"|"dev"}`, `{kind:"application"|"compose"|"database"|"notification",index}`, `{kind:"destination"}`, `{kind:"github"}`, or `{kind:"gitlab"}`. The `production` environment resolves to `dokploy_project.main.production_environment_id`. ### Presets `project`, `github-app`, `gitlab-app`, `docker-app`, `compose`, `databases`, `notifications`, `app-extras`, `infrastructure`, `full-stack`. ### The output files - `versions.tf`: `required_version = ">= 1.11"` and the provider pin `~> .`. - `provider.tf`: the provider block with the `dokploy_endpoint` and `dokploy_api_key` variables. - `variables.tf`: each input. Each secret is `sensitive`. When the argument has a write-only form, the secret is also `ephemeral` and feeds the `*_wo` argument with a `*_wo_version`. A few extra resources have a secret argument with no write-only form: the state keeps that value, and the README lists it. - `project.tf`: the project, the `dev` environment, the GitHub App data source, and the GitLab provider. - `services.tf`: the applications first, then the compose services, each with its domain. - `databases.tf`, `backups.tf`, `notifications.tf`. - `resources.tf`: the extra resources and data sources, in the order of the list. The page writes it after the provider schema loads. - A file other than the first four is there only when the config has that part. - `terraform.tfvars.example` and `README.md`. ## Docs - [llms-full.txt](llms-full.txt): this file, plus a share link for each preset, the list of resource types and data sources, and the JSON Schema of the config. - [Provider docs](https://registry.terraform.io/providers/vanillauys/dokploy/latest/docs): each resource and attribute of `vanillauys/dokploy`. - [Provider source](https://github.com/vanillauys/terraform-provider-dokploy): examples for each resource in `examples/resources/`. - [Provider schema](schemas/schema-v1.13.0.json): the output of `terraform providers schema -json` for version 1.13.0. ## Optional - [Source code](https://github.com/vanillauys/terraform-dokploy-starter): the app, under the MIT license.