{
  "manifest_version": "1.0.0",
  "template": {
    "id": "363369e4-ba5a-4dbe-b168-70a3a9efad88",
    "slug": "odoo-19",
    "name": "Odoo 19 | ERP & CRM with Nightly Backups",
    "description": "Odoo 19 ERP & CRM: multi-worker, nightly backups, locked DB manager",
    "url": "https://railway.com/deploy/odoo-19",
    "upstream": {
      "repo_url": "https://github.com/nomideusz/odoo-railway"
    }
  },
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Odoo",
      "source": {
        "repo": "https://github.com/nomideusz/odoo-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/odoo",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database name",
      "secret": false,
      "strategy": "default",
      "default": "odoo"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Database superuser - Odoo refuses to run as 'postgres'",
      "secret": false,
      "strategy": "default",
      "default": "odoo"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Auto-generated database password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Time for Postgres to shut down cleanly on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "Odoo",
      "description": "Port Caddy listens on in front of Odoo - leave as is",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "PGHOST",
      "service": "Odoo",
      "description": "Postgres host - private network only, leave as is",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Odoo",
      "description": "Postgres port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Odoo",
      "description": "Postgres user - wired to the bundled database, leave as is",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ODOO_DB",
      "service": "Odoo",
      "description": "Database name - wired to the bundled Postgres, leave as is",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_BUCKET",
      "service": "Odoo",
      "description": "Backup bucket name. Empty = no nightly backups",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_REGION",
      "service": "Odoo",
      "description": "Backup bucket region",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Odoo",
      "description": "Postgres password - wired to the bundled database, leave as is",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_ENDPOINT",
      "service": "Odoo",
      "description": "Nightly backups go to the bundled bucket - leave as is",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ODOO_DB_MANAGER",
      "service": "Odoo",
      "description": "Set to true to open /web/database/manager for a restore or copy, then set back to false",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "S3_ACCESS_KEY_ID",
      "service": "Odoo",
      "description": "Backup bucket credentials",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ODOO_ADMIN_PASSWORD",
      "service": "Odoo",
      "description": "Password for the 'admin' login, set on first boot only - change it in Odoo afterwards",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "ODOO_MASTER_PASSWORD",
      "service": "Odoo",
      "description": "Master password for the database manager (off unless ODOO_DB_MANAGER=true)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "S3_SECRET_ACCESS_KEY",
      "service": "Odoo",
      "description": "Backup bucket credentials",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "Odoo",
      "description": "First boot builds the database before the health check can pass",
      "secret": false,
      "strategy": "default",
      "default": "600"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "odoo-19"
      }
    },
    "cli": "railway deploy --template odoo-19",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "363369e4-ba5a-4dbe-b168-70a3a9efad88",
            "serializedConfig": {
              "buckets": {
                "75937d7d-8fc2-40c5-8d31-1bce6c9fcd9f": {
                  "name": "Backups"
                }
              },
              "services": {
                "3a8846b3-1586-450b-847e-1e545e256a84": {
                  "icon": "https://devicons.railway.com/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "odoo"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database superuser - Odoo refuses to run as 'postgres'",
                      "defaultValue": "odoo"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated database password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Time for Postgres to shut down cleanly on redeploy",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "3a8846b3-1586-450b-847e-1e545e256a84": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "abbb1cd7-9566-4b70-b86e-d96423b7981b": {
                  "icon": "https://raw.githubusercontent.com/odoo/odoo/19.0/addons/web/static/img/odoo-icon.svg",
                  "name": "Odoo",
                  "build": {
                    "dockerfilePath": "Dockerfile"
                  },
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/web/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/odoo-railway",
                    "rootDirectory": "/"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Caddy listens on in front of Odoo - leave as is",
                      "defaultValue": "8080"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Postgres host - private network only, leave as is",
                      "defaultValue": "${{Postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Postgres port",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Postgres user - wired to the bundled database, leave as is",
                      "defaultValue": "${{Postgres.POSTGRES_USER}}"
                    },
                    "ODOO_DB": {
                      "isOptional": false,
                      "description": "Database name - wired to the bundled Postgres, leave as is",
                      "defaultValue": "${{Postgres.POSTGRES_DB}}"
                    },
                    "S3_BUCKET": {
                      "isOptional": true,
                      "description": "Backup bucket name. Empty = no nightly backups",
                      "defaultValue": "${{Backups.BUCKET}}"
                    },
                    "S3_REGION": {
                      "isOptional": true,
                      "description": "Backup bucket region",
                      "defaultValue": "${{Backups.REGION}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password - wired to the bundled database, leave as is",
                      "defaultValue": "${{Postgres.POSTGRES_PASSWORD}}"
                    },
                    "S3_ENDPOINT": {
                      "isOptional": true,
                      "description": "Nightly backups go to the bundled bucket - leave as is",
                      "defaultValue": "${{Backups.ENDPOINT}}"
                    },
                    "ODOO_WORKERS": {
                      "isOptional": true,
                      "description": "HTTP worker processes. Empty = auto: 2, or single-process mode (0) on plans under 1 GB RAM",
                      "defaultValue": ""
                    },
                    "ODOO_DB_MANAGER": {
                      "isOptional": false,
                      "description": "Set to true to open /web/database/manager for a restore or copy, then set back to false",
                      "defaultValue": "false"
                    },
                    "S3_ACCESS_KEY_ID": {
                      "isOptional": true,
                      "description": "Backup bucket credentials",
                      "defaultValue": "${{Backups.ACCESS_KEY_ID}}"
                    },
                    "ODOO_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the 'admin' login, set on first boot only - change it in Odoo afterwards",
                      "defaultValue": "{{ODOO_ADMIN_PASSWORD}}"
                    },
                    "ODOO_MASTER_PASSWORD": {
                      "isOptional": false,
                      "description": "Master password for the database manager (off unless ODOO_DB_MANAGER=true)",
                      "defaultValue": "{{ODOO_MASTER_PASSWORD}}"
                    },
                    "S3_SECRET_ACCESS_KEY": {
                      "isOptional": true,
                      "description": "Backup bucket credentials",
                      "defaultValue": "${{Backups.SECRET_ACCESS_KEY}}"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "First boot builds the database before the health check can pass",
                      "defaultValue": "600"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "abbb1cd7-9566-4b70-b86e-d96423b7981b": {
                      "mountPath": "/var/lib/odoo"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Odoo",
      "method": "GET",
      "path": "/web/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-10-06T04:14:42.626Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-10-05T14:39:48.876Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_d01921dad4b0400bbdcc",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": false,
        "detail": "Your workspace has been restricted. Please contact support to resolve this."
      }
    ]
  }
}
