Skip to content

Global Properties

These properties define the foundational identity and behavior of your Nanokit project.

Property Reference

PropertyTypeDefaultDescription
namestringRequired. Project identifier. Used to prefix all Docker resources (nk-<name>-<env>-<service>).
versionstringConfiguration schema version (e.g., 1.0).
gatewayPortnumber80Host port for the integrated Caddy gateway (HTTP).
gatewayHttpsPortnumber443Host port for the integrated Caddy gateway (HTTPS).
gateway.httpsbooleantrueEnable/disable HTTPS on the gateway. Set to false if you handle TLS externally.
gateway.adminEmailstringadmin@<host>Email for ACME (Let's Encrypt) registration.
gateway.persistenceModeproject | globalproject (local) / global (remote)Where to store SSL data. global uses /var/lib/nanokit/gateway.
yaml
name: my-awesome-app
version: "1.0"
gatewayPort: 8080
gatewayHttpsPort: 8443
gateway:
  adminEmail: admin@example.com
  persistenceMode: global

Naming Conventions

Nanokit uses the name to ensure resource isolation. All containers, volumes, and networks follow the pattern:

nk-[project]-[env]-[service]

For example, with name: nanokit:

ResourceName
Local docs servicenk-nanokit-local-docs
Stage website servicenk-nanokit-stage-website
Local gatewaynk-nanokit-local-gateway
Shared volumenk-nanokit-local-shared

Environment-Level Overrides

gatewayPort and gatewayHttpsPort can be overridden per environment to allow multiple gateways on different ports:

yaml
name: my-app
gatewayPort: 80

environments:
  stage:
    gatewayPort: 8080
    gatewayHttpsPort: 8443

Tip. This lets you run local and stage environments simultaneously on the same Docker host without port conflicts.