{
  "manifest_version": "1.0.0",
  "template": {
    "id": "24941ada-bf26-435b-bed2-dbb4a13ae6da",
    "slug": "erpnext-16",
    "name": "ERPNext 16 | Open-Source ERP with Nightly Backups",
    "description": "ERPNext v16: accounting, stock, HR, realtime updates and nightly backups",
    "url": "https://railway.com/deploy/erpnext-16",
    "upstream": {
      "repo_url": "https://github.com/nomideusz/erpnext-railway"
    }
  },
  "services": [
    {
      "name": "ERPNext",
      "source": {
        "repo": "https://github.com/nomideusz/erpnext-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/frappe/frappe-bench/sites",
      "http": true
    },
    {
      "name": "MariaDB",
      "source": {
        "image": "mariadb:11.8.9"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "ERPNext",
      "description": "Port nginx listens on in front of ERPNext - leave as is",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "DB_HOST",
      "service": "ERPNext",
      "description": "MariaDB host - private network only, leave as is",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DB_PORT",
      "service": "ERPNext",
      "description": "MariaDB port",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "S3_BUCKET",
      "service": "ERPNext",
      "description": "Backup bucket name. Empty = no nightly backups",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_REGION",
      "service": "ERPNext",
      "description": "Backup bucket region",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ERPNEXT_URL",
      "service": "ERPNext",
      "description": "Public URL for links in emails and PDFs - set it to your custom domain when you add one",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "S3_ENDPOINT",
      "service": "ERPNext",
      "description": "Nightly backups go to the bundled bucket - leave as is",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_ROOT_PASSWORD",
      "service": "ERPNext",
      "description": "MariaDB root password, used to create the site's database - leave as is",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_ACCESS_KEY_ID",
      "service": "ERPNext",
      "description": "Backup bucket credentials",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_SECRET_ACCESS_KEY",
      "service": "ERPNext",
      "description": "Backup bucket credentials",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ERPNEXT_ADMIN_PASSWORD",
      "service": "ERPNext",
      "description": "Password for the 'Administrator' login, set on first boot only - change it in ERPNext afterwards",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "ERPNext",
      "description": "First boot creates the site before the health check can pass",
      "secret": false,
      "strategy": "default",
      "default": "600"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "ERPNext",
      "description": "Time to finish running jobs and save the job queue on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "MARIADB_ROOT_PASSWORD",
      "service": "MariaDB",
      "description": "Auto-generated root password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "MariaDB",
      "description": "Time for MariaDB to shut down cleanly on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "erpnext-16"
      }
    },
    "cli": "railway deploy --template erpnext-16",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "24941ada-bf26-435b-bed2-dbb4a13ae6da",
            "serializedConfig": {
              "buckets": {
                "596c1c26-e969-453c-9cf7-40eb45aa612b": {
                  "name": "Backups"
                }
              },
              "services": {
                "044aa209-d741-4395-95ec-1c6a45667935": {
                  "icon": "https://raw.githubusercontent.com/frappe/erpnext/version-16/erpnext/public/images/erpnext-logo.svg",
                  "name": "ERPNext",
                  "build": {
                    "dockerfilePath": "Dockerfile"
                  },
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/method/ping",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/erpnext-railway",
                    "rootDirectory": "/"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port nginx listens on in front of ERPNext - leave as is",
                      "defaultValue": "8080"
                    },
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "MariaDB host - private network only, leave as is",
                      "defaultValue": "${{MariaDB.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "MariaDB port",
                      "defaultValue": "3306"
                    },
                    "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}}"
                    },
                    "ERPNEXT_URL": {
                      "isOptional": false,
                      "description": "Public URL for links in emails and PDFs - set it to your custom domain when you add one",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "S3_ENDPOINT": {
                      "isOptional": true,
                      "description": "Nightly backups go to the bundled bucket - leave as is",
                      "defaultValue": "${{Backups.ENDPOINT}}"
                    },
                    "DB_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "MariaDB root password, used to create the site's database - leave as is",
                      "defaultValue": "${{MariaDB.MARIADB_ROOT_PASSWORD}}"
                    },
                    "S3_ACCESS_KEY_ID": {
                      "isOptional": true,
                      "description": "Backup bucket credentials",
                      "defaultValue": "${{Backups.ACCESS_KEY_ID}}"
                    },
                    "ERPNEXT_BG_WORKERS": {
                      "isOptional": true,
                      "description": "Background job workers. Empty = auto: 2, or 1 on plans under 2 GB RAM",
                      "defaultValue": ""
                    },
                    "ERPNEXT_WEB_WORKERS": {
                      "isOptional": true,
                      "description": "Web worker processes (4 threads each). Empty = auto: 2, or 1 on plans under 2 GB RAM",
                      "defaultValue": ""
                    },
                    "S3_SECRET_ACCESS_KEY": {
                      "isOptional": true,
                      "description": "Backup bucket credentials",
                      "defaultValue": "${{Backups.SECRET_ACCESS_KEY}}"
                    },
                    "ERPNEXT_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the 'Administrator' login, set on first boot only - change it in ERPNext afterwards",
                      "defaultValue": "{{ERPNEXT_ADMIN_PASSWORD}}"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "First boot creates the site before the health check can pass",
                      "defaultValue": "600"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Time to finish running jobs and save the job queue on redeploy",
                      "defaultValue": "30"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "044aa209-d741-4395-95ec-1c6a45667935": {
                      "mountPath": "/home/frappe/frappe-bench/sites"
                    }
                  }
                },
                "80f37c84-e8cf-4fbe-b43c-f2dde103b46d": {
                  "icon": "https://raw.githubusercontent.com/devicons/devicon/master/icons/mariadb/mariadb-original.svg",
                  "name": "MariaDB",
                  "build": {},
                  "deploy": {
                    "startCommand": "docker-entrypoint.sh mariadbd --datadir=/var/lib/mysql/data --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --skip-character-set-client-handshake",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mariadb:11.8.9"
                  },
                  "variables": {
                    "MARIADB_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated root password",
                      "defaultValue": "{{MARIADB_ROOT_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Time for MariaDB to shut down cleanly on redeploy",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "80f37c84-e8cf-4fbe-b43c-f2dde103b46d": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "ERPNext",
      "method": "GET",
      "path": "/api/method/ping",
      "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-05T21:03:24.054Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_773f23bffbda4af2bffb",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": false,
        "detail": "Your workspace has been restricted. Please contact support to resolve this."
      }
    ]
  }
}
