{
  "manifest_version": "1.0.0",
  "template": {
    "id": "e6f2eae7-b66a-44b2-a942-93dd3ea167a2",
    "slug": "deploy-twenty-crm-on-railway",
    "name": "Twenty",
    "description": "Open-source CRM and Salesforce alternative with worker, Postgres",
    "url": "https://railway.com/deploy/deploy-twenty-crm-on-railway",
    "upstream": {
      "image": "twentycrm/twenty:v2.48.0@sha256:43fab4bffacdcd63ff3c9257b7f8985a4424d81e9eb43982b9c16a841d555e52"
    }
  },
  "services": [
    {
      "name": "twenty",
      "source": {
        "image": "twentycrm/twenty:v2.48.0@sha256:43fab4bffacdcd63ff3c9257b7f8985a4424d81e9eb43982b9c16a841d555e52"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/packages/twenty-server/.local-storage",
      "http": true
    },
    {
      "name": "twenty-worker",
      "source": {
        "image": "twentycrm/twenty:v2.48.0@sha256:43fab4bffacdcd63ff3c9257b7f8985a4424d81e9eb43982b9c16a841d555e52"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.10@sha256:47670742d7924adbcdb404d1288b6327815b23141969c0939b8e5d61f78c2634"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:16.15@sha256:34c3e49e7ed2aaef6c575fb23bb37b878007e97752d3bf27ccb550046f893ca7"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "twenty",
      "description": "Port Railway routes the public domain to (3000).",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "NODE_PORT",
      "service": "twenty",
      "description": "Port the Twenty server listens on (3000).",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "REDIS_URL",
      "service": "twenty",
      "description": "Redis connection for cache and job queues.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "APP_SECRET",
      "service": "twenty",
      "description": "Signs logins and sessions, generated per deploy; keep it stable.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "SERVER_URL",
      "service": "twenty",
      "description": "Public HTTPS URL of Twenty; used in links, OAuth callbacks and the web app.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "STORAGE_TYPE",
      "service": "twenty",
      "description": "File storage backend; local keeps files on the server volume.",
      "secret": false,
      "strategy": "default",
      "default": "local"
    },
    {
      "key": "ENCRYPTION_KEY",
      "service": "twenty",
      "description": "Encrypts stored credentials at rest, generated per deploy; never change it.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PG_DATABASE_URL",
      "service": "twenty",
      "description": "Postgres connection from the Postgres service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "twenty",
      "description": "Runs as root so the root-owned storage volume is writable.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "DISABLE_DB_MIGRATIONS",
      "service": "twenty",
      "description": "false: the server creates and upgrades the database on boot.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "DISABLE_CRON_JOBS_REGISTRATION",
      "service": "twenty",
      "description": "false: the server registers background cron jobs on boot.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "REDIS_URL",
      "service": "twenty-worker",
      "description": "Redis connection; the worker pulls jobs from these queues.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "APP_SECRET",
      "service": "twenty-worker",
      "description": "Same signing secret as the server (reference).",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SERVER_URL",
      "service": "twenty-worker",
      "description": "Public URL of the Twenty server, used in emails and links.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "STORAGE_TYPE",
      "service": "twenty-worker",
      "description": "File storage backend (local).",
      "secret": false,
      "strategy": "default",
      "default": "local"
    },
    {
      "key": "ENCRYPTION_KEY",
      "service": "twenty-worker",
      "description": "Same encryption key as the server (reference).",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PG_DATABASE_URL",
      "service": "twenty-worker",
      "description": "Postgres connection from the Postgres service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DISABLE_DB_MIGRATIONS",
      "service": "twenty-worker",
      "description": "true: migrations run on the server, not the worker.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "DISABLE_CRON_JOBS_REGISTRATION",
      "service": "twenty-worker",
      "description": "true: crons are registered by the server.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Private host of Redis.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Redis port.",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Redis user.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Private connection URL used by Twenty.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Redis password.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Redis password, generated per deploy.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data directory on the volume.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Private host of Postgres.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Postgres port.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Postgres user.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Default database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Postgres password.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first boot.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection URL used by Twenty.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser name.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Validity of the self-signed SSL cert in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Superuser password, generated per deploy.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Seconds the old deployment drains before stopping.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "deploy-twenty-crm-on-railway"
      }
    },
    "cli": "railway deploy --template deploy-twenty-crm-on-railway",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "e6f2eae7-b66a-44b2-a942-93dd3ea167a2",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "56da1370-7166-4f7d-b8e6-157a399701da": {
                  "icon": null,
                  "name": "twenty",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "twentycrm/twenty:v2.48.0@sha256:43fab4bffacdcd63ff3c9257b7f8985a4424d81e9eb43982b9c16a841d555e52"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway routes the public domain to (3000).",
                      "defaultValue": "3000"
                    },
                    "NODE_PORT": {
                      "isOptional": false,
                      "description": "Port the Twenty server listens on (3000).",
                      "defaultValue": "3000"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis connection for cache and job queues.",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "APP_SECRET": {
                      "isOptional": false,
                      "description": "Signs logins and sessions, generated per deploy; keep it stable.",
                      "defaultValue": "{{APP_SECRET}}"
                    },
                    "SERVER_URL": {
                      "isOptional": false,
                      "description": "Public HTTPS URL of Twenty; used in links, OAuth callbacks and the web app.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "STORAGE_TYPE": {
                      "isOptional": false,
                      "description": "File storage backend; local keeps files on the server volume.",
                      "defaultValue": "local"
                    },
                    "ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Encrypts stored credentials at rest, generated per deploy; never change it.",
                      "defaultValue": "{{ENCRYPTION_KEY}}"
                    },
                    "PG_DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection from the Postgres service.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Runs as root so the root-owned storage volume is writable.",
                      "defaultValue": "0"
                    },
                    "DISABLE_DB_MIGRATIONS": {
                      "isOptional": false,
                      "description": "false: the server creates and upgrades the database on boot.",
                      "defaultValue": "false"
                    },
                    "DISABLE_CRON_JOBS_REGISTRATION": {
                      "isOptional": false,
                      "description": "false: the server registers background cron jobs on boot.",
                      "defaultValue": "false"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  },
                  "volumeMounts": {
                    "56da1370-7166-4f7d-b8e6-157a399701da": {
                      "mountPath": "/app/packages/twenty-server/.local-storage"
                    }
                  }
                },
                "7e7ccca0-9bd6-4c66-b10f-a283aa388aa8": {
                  "icon": null,
                  "name": "twenty-worker",
                  "deploy": {
                    "startCommand": "/app/entrypoint.sh yarn worker:prod",
                    "healthcheckPath": null,
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "twentycrm/twenty:v2.48.0@sha256:43fab4bffacdcd63ff3c9257b7f8985a4424d81e9eb43982b9c16a841d555e52"
                  },
                  "variables": {
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis connection; the worker pulls jobs from these queues.",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "APP_SECRET": {
                      "isOptional": false,
                      "description": "Same signing secret as the server (reference).",
                      "defaultValue": "${{twenty.APP_SECRET}}"
                    },
                    "SERVER_URL": {
                      "isOptional": false,
                      "description": "Public URL of the Twenty server, used in emails and links.",
                      "defaultValue": "https://${{twenty.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "STORAGE_TYPE": {
                      "isOptional": false,
                      "description": "File storage backend (local).",
                      "defaultValue": "local"
                    },
                    "ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Same encryption key as the server (reference).",
                      "defaultValue": "${{twenty.ENCRYPTION_KEY}}"
                    },
                    "PG_DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection from the Postgres service.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "DISABLE_DB_MIGRATIONS": {
                      "isOptional": false,
                      "description": "true: migrations run on the server, not the worker.",
                      "defaultValue": "true"
                    },
                    "DISABLE_CRON_JOBS_REGISTRATION": {
                      "isOptional": false,
                      "description": "true: crons are registered by the server.",
                      "defaultValue": "true"
                    }
                  }
                },
                "bd6fa087-8336-4968-bdc3-63714f4e7010": {
                  "icon": null,
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH --maxmemory-policy noeviction --bind '* -::*'\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2.10@sha256:47670742d7924adbcdb404d1288b6327815b23141969c0939b8e5d61f78c2634"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Private host of Redis.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Redis port.",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Redis user.",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Private connection URL used by Twenty.",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Redis password.",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis password, generated per deploy.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "bd6fa087-8336-4968-bdc3-63714f4e7010": {
                      "mountPath": "/data"
                    }
                  }
                },
                "fb7ae28e-fdb7-464a-84d4-0669433b0385": {
                  "icon": null,
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:16.15@sha256:34c3e49e7ed2aaef6c575fb23bb37b878007e97752d3bf27ccb550046f893ca7"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data directory on the volume.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private host of Postgres.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Postgres port.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Postgres user.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Default database.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection URL used by Twenty.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser name.",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Validity of the self-signed SSL cert in days.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password, generated per deploy.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Seconds the old deployment drains before stopping.",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "fb7ae28e-fdb7-464a-84d4-0669433b0385": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "twenty",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-10-17T16:14:42.276Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-17T12:19:11.199Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_667a001c50d143949d7b",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 160,
    "typical_build_seconds": 0,
    "typical_start_seconds": 20,
    "slowest_service": "twenty-worker"
  }
}
