dokploy_web_server_settings (Resource)
The settings of the Dokploy host: the dashboard domain, the server IP, the Docker and access-log cleanup, the number of concurrent builds, and the telemetry providers of the Vector agent. Use dokploy_server for a remote server.
~> Each Dokploy installation has one settings record. Declare this resource once. terraform destroy removes the resource from the state only: the server keeps the current values. Dokploy Cloud has no web server settings.
Example Usage
# Serve the Dokploy dashboard on a domain with a Let's Encrypt certificate,
# and allow two builds at the same time on the Dokploy host. Declare this
# resource once for each Dokploy installation.
resource "dokploy_web_server_settings" "this" {
host = "dokploy.example.com"
https = true
certificate_type = "letsencrypt"
lets_encrypt_email = "[email protected]"
builds_concurrency = 2
log_cleanup_cron = "0 3 * * *"
}Schema
Optional
builds_concurrency(Number) Number of builds that run at the same time on the Dokploy host, from 1 to 100. Defaults to1.certificate_type(String) Certificate of the dashboard domain:letsencrypt,custom, ornone. Defaults tonone.enable_docker_cleanup(Boolean) Remove unused Docker images, containers, and build cache on the Dokploy host every day. Defaults totrue.host(String) Domain of the Dokploy dashboard, for exampledokploy.example.com. A change rewrites the Traefik route of the dashboard. Omit it to serve the dashboard on the IP only.https(Boolean) Serve the dashboard domain over HTTPS. Defaults tofalse.lets_encrypt_email(String) Email address for the Let’s Encrypt account of the dashboard certificate.log_cleanup_cron(String) Cron expression of the Traefik access-log cleanup, which keeps the last 1000 lines. Defaults to0 0 * * *. Set""to stop the cleanup. Dokploy does not validate the expression.server_ip(String) Public IP of the Dokploy host. Dokploy uses it for the generatedtraefik.medomains. If you omit it, the server keeps the IP that the installer detected.telemetry_provider_ids(Set of String) Ids of thedokploy_telemetry_providerrecords that the Vector agent on the Dokploy host sends data to. A change starts or updates the agent, which can take a minute while Docker pulls the image. An empty set stops the agent. Defaults to an empty set. Each provider must haveenabled = true. Dokploy v0.31.0 added this attribute.
Read-Only
id(String) Id of the settings record.
Import
Import is supported using the following syntax:
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
import {
to = dokploy_web_server_settings.this
id = "63e946a9-516d-47fb-b863-32bf308592c6"
}The terraform import command can be used, for example:
# The id is the id of the settings record. Read it from the Dokploy API with
# settings.getWebServerSettings.
terraform import dokploy_web_server_settings.this 63e946a9-516d-47fb-b863-32bf308592c6