CockroachDB — a distributed SQL database that speaks the PostgreSQL wire protocol, with strong consistency and horizontal scale. Deployed here as a single-node, insecure instance for dev/homelab, host-networked with a data volume and the built-in DB Console.
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "cockroachdb"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The CockroachDB container image. Pin a tag in production.
image = "cockroachdb/cockroach:latest"
# Host port for the SQL / PostgreSQL wire protocol.
sql_port = 26257
# Host port for the DB Console (web UI).
http_port = 8085
# Named volume for the database store (/cockroach/cockroach-data).
data_volume = "cockroachdb_data"
# Placement constraints. Pin to the node holding the volume. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []
# The task resources.
resources = {
cpu = 1000
memory = 1024
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "cockroachdb" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "cockroachdb/cockroach:latest" | The CockroachDB container image. Pin a tag in production. |
| sql_port | number | 26257 | Host port for the SQL / PostgreSQL wire protocol. |
| http_port | number | 8085 | Host port for the DB Console (web UI). |
| data_volume | string | "cockroachdb_data" | Named volume for the database store (/cockroach/cockroach-data). |
| constraints | list | [] | Placement constraints. Pin to the node holding the volume. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true". |
| resources | object | {
cpu = 1000
memory = 1024
} | The task resources. |
No variables match.
CockroachDB — a distributed SQL database that speaks the PostgreSQL wire protocol, with strong consistency and horizontal scale.
This pack runs a single-node, insecure instance (great for dev/homelab), host-networked with a data volume and the built-in DB Console.
nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run cockroachdb --registry=nomploy
| Variable | Default | Description |
|---|---|---|
sql_port |
26257 |
SQL / Postgres wire port. |
http_port |
8085 |
DB Console (web UI) port. |
data_volume |
cockroachdb_data |
/cockroach/cockroach-data — the store. |
image |
cockroachdb/cockroach:latest |
Container image. Pin a tag in production. |
resources |
{ cpu = 1000, memory = 1024 } |
Task resources. |
# any Postgres client, user "root", no password (insecure mode)
psql "postgresql://root@<node-ip>:26257/defaultdb?sslmode=disable"
--insecuremeans no authentication and no TLS — use only on a trusted network. For production, run a secure multi-node cluster with certificates. Pin the job to the node holding the volume withconstraints.