Twenty — a modern open-source CRM (a Salesforce / HubSpot alternative) with customizable objects, kanban and table views, and a clean UI. Deployed as an all-in-one host-networked Nomad job (PostgreSQL + Redis + server + worker).
Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.
Source ↗ Project ↗ ★ 57.6k ⚑ Report an issue
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "twenty"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The Twenty container image (used for both server and worker). Pin a tag in production.
image = "twentycrm/twenty:latest"
# The PostgreSQL image for the bundled database.
postgres_image = "postgres:16"
# The Redis image for the bundled cache/queue.
redis_image = "redis:7-alpine"
# Host port for the Twenty web UI / API.
port = 3000
# Host port for the bundled PostgreSQL.
db_port = 5432
# Host port for the bundled Redis.
redis_port = 6379
# Password for the bundled PostgreSQL. CHANGE THIS.
db_password = "twenty_change_me"
# Secret used to sign tokens (openssl rand -base64 32). CHANGE THIS and keep it stable.
app_secret = "change_me_app_secret_to_a_long_random_value_00000000"
# Public URL of this Twenty instance (used for links and API).
server_url = "http://localhost:3000"
# Named volume for PostgreSQL data.
db_data_volume = "twenty_db_data"
# Named volume for local file storage, shared by server and worker.
storage_volume = "twenty_storage"
# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []
# Resources for the Twenty server task.
resources = {
cpu = 1000
memory = 2048
}
# Resources for the Twenty worker task.
worker_resources = {
cpu = 500
memory = 1024
}
# Resources for the bundled PostgreSQL task.
db_resources = {
cpu = 500
memory = 512
}
# Resources for the bundled Redis task.
redis_resources = {
cpu = 200
memory = 128
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "twenty" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "twentycrm/twenty:latest" | The Twenty container image (used for both server and worker). Pin a tag in production. |
| postgres_image | string | "postgres:16" | The PostgreSQL image for the bundled database. |
| redis_image | string | "redis:7-alpine" | The Redis image for the bundled cache/queue. |
| port | number | 3000 | Host port for the Twenty web UI / API. |
| db_port | number | 5432 | Host port for the bundled PostgreSQL. |
| redis_port | number | 6379 | Host port for the bundled Redis. |
| db_password set me | string | "twenty_change_me" | Password for the bundled PostgreSQL. CHANGE THIS. |
| app_secret set me | string | "change_me_app_secret_to_a_long_random_value_00000000" | Secret used to sign tokens (openssl rand -base64 32). CHANGE THIS and keep it stable. |
| server_url | string | "http://localhost:3000" | Public URL of this Twenty instance (used for links and API). |
| db_data_volume | string | "twenty_db_data" | Named volume for PostgreSQL data. |
| storage_volume | string | "twenty_storage" | Named volume for local file storage, shared by server and worker. |
| constraints | list | [] | Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true". |
| resources | object | {
cpu = 1000
memory = 2048
} | Resources for the Twenty server task. |
| worker_resources | object | {
cpu = 500
memory = 1024
} | Resources for the Twenty worker task. |
| db_resources | object | {
cpu = 500
memory = 512
} | Resources for the bundled PostgreSQL task. |
| redis_resources | object | {
cpu = 200
memory = 128
} | Resources for the bundled Redis task. |
No variables match.
This pack stores data in 2 Docker named volumes:
twenty_db_datatwenty_storage
⚠ This pack bundles a database. A cold copy of the volume can be inconsistent — for a reliable backup, dump the DB (pg_dump / mysqldump) or stop the job while backing up.
restic
# Run on the node hosting this pack. Point restic at your repo first: # export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>" # export RESTIC_PASSWORD="<repo-password>" # export AWS_ACCESS_KEY_ID=<key> AWS_SECRET_ACCESS_KEY=<secret> restic backup \ /var/lib/docker/volumes/twenty_db_data/_data \ /var/lib/docker/volumes/twenty_storage/_data
rclone (sync to S3/R2)
rclone sync /var/lib/docker/volumes/twenty_db_data/_data backup:<bucket>/twenty_db_data rclone sync /var/lib/docker/volumes/twenty_storage/_data backup:<bucket>/twenty_storage
Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.
Twenty is a modern, open-source CRM — a self-hosted alternative to Salesforce and HubSpot. It offers fully customizable objects and fields, table and kanban views, rich filtering, a keyboard-driven UI, timeline and notes, email/calendar sync and a GraphQL/REST API, all under an open license.
This pack deploys Twenty all-in-one as a single host-networked Nomad job:
All four share one allocation and talk over 127.0.0.1.
nomad-pack run twenty --registry=nomploy \
--var db_password=$(openssl rand -hex 16) \
--var app_secret=$(openssl rand -base64 32) \
--var server_url=https://crm.example.com
Open http://<node-ip>:3000 and create the first workspace.
| Variable | Default | Description |
|---|---|---|
image |
twentycrm/twenty:latest |
Server + worker image (pin a tag in production). |
postgres_image |
postgres:16 |
Bundled PostgreSQL image. |
redis_image |
redis:7-alpine |
Bundled Redis image. |
port |
3000 |
Host port for the web UI / API. |
db_password |
twenty_change_me |
PostgreSQL password — change this. |
app_secret |
placeholder | Token-signing secret — change & keep stable. |
server_url |
http://localhost:3000 |
Public URL of the instance. |
resources |
1000 MHz / 2048 MB | Server task resources. |
worker_resources |
500 MHz / 1024 MB | Worker task resources. |
Data persists in separate volumes for PostgreSQL and local file storage (shared by server and worker).