{
  "manifest_version": "1.0.0",
  "template": {
    "id": "06551023-f663-4a2d-b17c-2685b8d0f89e",
    "slug": "erp",
    "name": "ERPNext | Full ERP Stack | Open Source Odoo Alternative",
    "description": "Self Host ERPNext on Railway: accounting, inventory, HR, CRM",
    "url": "https://railway.com/deploy/erp",
    "upstream": {
      "repo_url": "https://github.com/praveen-ks-2001/erpnext-railway"
    }
  },
  "services": [
    {
      "name": "MariaDB",
      "source": {
        "image": "mariadb:10.6"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    },
    {
      "name": "RedisCache",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "ERPNext",
      "source": {
        "repo": "https://github.com/praveen-ks-2001/erpnext-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/frappe/bench/sites",
      "http": true
    },
    {
      "name": "RedisQueue",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "MYSQLHOST",
      "service": "MariaDB",
      "description": "MariaDB internal hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLPORT",
      "service": "MariaDB",
      "description": "MariaDB service port",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "MYSQLUSER",
      "service": "MariaDB",
      "description": "Default MariaDB root username",
      "secret": false,
      "strategy": "default",
      "default": "root"
    },
    {
      "key": "MYSQL_URL",
      "service": "MariaDB",
      "description": "Internal MariaDB connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLDATABASE",
      "service": "MariaDB",
      "description": "Database name reference variable",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQLPASSWORD",
      "service": "MariaDB",
      "description": "MariaDB password reference",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "MariaDB",
      "description": "Default database name created",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "MYSQL_PUBLIC_URL",
      "service": "MariaDB",
      "description": "Public MariaDB connection URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "MariaDB",
      "description": "Root user password credential",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDISHOST",
      "service": "RedisCache",
      "description": "Redis internal hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "RedisCache",
      "description": "Redis service port",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "RedisCache",
      "description": "Redis default username",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "RedisCache",
      "description": "Internal Redis connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "RedisCache",
      "description": "Redis password reference",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "RedisCache",
      "description": "Redis authentication password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "RedisCache",
      "description": "Public Redis connection URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "ERPNext",
      "description": "HTTP port nginx listens on",
      "secret": false,
      "strategy": "default",
      "default": "80"
    },
    {
      "key": "RFP_DB_HOST",
      "service": "ERPNext",
      "description": "MariaDB private hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RFP_DB_PORT",
      "service": "ERPNext",
      "description": "MariaDB port",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "RFP_DOMAIN_NAME",
      "service": "ERPNext",
      "description": "Pinned Frappe site name",
      "secret": false,
      "strategy": "default",
      "default": "frontend"
    },
    {
      "key": "RFP_REDIS_CACHE_URL",
      "service": "ERPNext",
      "description": "Frappe cache backend",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RFP_REDIS_QUEUE_URL",
      "service": "ERPNext",
      "description": "RQ worker queue",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RFP_DB_ROOT_PASSWORD",
      "service": "ERPNext",
      "description": "MariaDB root password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RFP_REDIS_SOCKETIO_URL",
      "service": "ERPNext",
      "description": "Socketio pub/sub (shares queue)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RFP_SITE_ADMIN_PASSWORD",
      "service": "ERPNext",
      "description": "Bootstrap admin password (first boot)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDISHOST",
      "service": "RedisQueue",
      "description": "Redis internal hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "RedisQueue",
      "description": "Redis service port",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "RedisQueue",
      "description": "Redis default username",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "RedisQueue",
      "description": "Internal Redis connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "RedisQueue",
      "description": "Redis password reference",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "RedisQueue",
      "description": "Redis authentication password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "RedisQueue",
      "description": "Public Redis connection URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "erp"
      }
    },
    "cli": "railway deploy --template erp",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "06551023-f663-4a2d-b17c-2685b8d0f89e",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "4625e4cc-7978-40db-8379-156aabdc8000": {
                  "icon": "https://devicons.railway.app/i/mysql.svg",
                  "name": "MariaDB",
                  "deploy": {
                    "startCommand": "docker-entrypoint.sh mariadbd --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb-file-per-table=1 --innodb-default-row-format=dynamic --skip-character-set-client-handshake",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mariadb:10.6"
                  },
                  "variables": {
                    "MYSQLHOST": {
                      "isOptional": false,
                      "description": "MariaDB internal hostname",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQLPORT": {
                      "isOptional": false,
                      "description": "MariaDB service port",
                      "defaultValue": "3306"
                    },
                    "MYSQLUSER": {
                      "isOptional": false,
                      "description": "Default MariaDB root username",
                      "defaultValue": "root"
                    },
                    "MYSQL_URL": {
                      "isOptional": false,
                      "description": "Internal MariaDB connection string",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:3306/${{MYSQL_DATABASE}}"
                    },
                    "MYSQLDATABASE": {
                      "isOptional": false,
                      "description": "Database name reference variable",
                      "defaultValue": "${{MYSQL_DATABASE}}"
                    },
                    "MYSQLPASSWORD": {
                      "isOptional": false,
                      "description": "MariaDB password reference",
                      "defaultValue": "${{MYSQL_ROOT_PASSWORD}}"
                    },
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "description": "Default database name created",
                      "defaultValue": "railway"
                    },
                    "MYSQL_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public MariaDB connection URL",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{MYSQL_DATABASE}}"
                    },
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Root user password credential",
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "4625e4cc-7978-40db-8379-156aabdc8000": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                },
                "cf8be9ab-8dce-44b2-b8f0-12262ac8dd8d": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "RedisCache",
                  "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\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Redis internal hostname",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Redis service port",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Redis default username",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Internal Redis connection string",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Redis password reference",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis authentication password",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public Redis connection URL",
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    }
                  },
                  "volumeMounts": {
                    "cf8be9ab-8dce-44b2-b8f0-12262ac8dd8d": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                },
                "db460bb0-b8be-448d-be06-f08669c09826": {
                  "icon": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/frappe-erpnext.svg",
                  "name": "ERPNext",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/praveen-ks-2001/erpnext-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port nginx listens on",
                      "defaultValue": "80"
                    },
                    "RFP_DB_HOST": {
                      "isOptional": false,
                      "description": "MariaDB private hostname",
                      "defaultValue": "${{MariaDB.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "RFP_DB_PORT": {
                      "isOptional": false,
                      "description": "MariaDB port",
                      "defaultValue": "3306"
                    },
                    "RFP_DOMAIN_NAME": {
                      "isOptional": false,
                      "description": "Pinned Frappe site name",
                      "defaultValue": "frontend"
                    },
                    "RFP_REDIS_CACHE_URL": {
                      "isOptional": false,
                      "description": "Frappe cache backend",
                      "defaultValue": "redis://default:${{RedisCache.REDIS_PASSWORD}}@${{RedisCache.RAILWAY_PRIVATE_DOMAIN}}:6379"
                    },
                    "RFP_REDIS_QUEUE_URL": {
                      "isOptional": false,
                      "description": "RQ worker queue",
                      "defaultValue": "redis://default:${{RedisQueue.REDIS_PASSWORD}}@${{RedisQueue.RAILWAY_PRIVATE_DOMAIN}}:6379"
                    },
                    "RFP_DB_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "MariaDB root password",
                      "defaultValue": "${{MariaDB.MYSQL_ROOT_PASSWORD}}"
                    },
                    "RFP_REDIS_SOCKETIO_URL": {
                      "isOptional": false,
                      "description": "Socketio pub/sub (shares queue)",
                      "defaultValue": "redis://default:${{RedisQueue.REDIS_PASSWORD}}@${{RedisQueue.RAILWAY_PRIVATE_DOMAIN}}:6379"
                    },
                    "RFP_SITE_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Bootstrap admin password (first boot)",
                      "defaultValue": "{{RFP_SITE_ADMIN_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "db460bb0-b8be-448d-be06-f08669c09826": {
                      "mountPath": "/home/frappe/bench/sites"
                    }
                  }
                },
                "dd28c5d5-9e2f-44f9-8ddc-5fc824c1377b": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "RedisQueue",
                  "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\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Redis internal hostname",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Redis service port",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Redis default username",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Internal Redis connection string",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Redis password reference",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis authentication password",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public Redis connection URL",
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    }
                  },
                  "volumeMounts": {
                    "dd28c5d5-9e2f-44f9-8ddc-5fc824c1377b": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-23T10:14:44.639Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-22T22:12:40.907Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_849f9799ef344b9e9ac0",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 253,
    "typical_build_seconds": 142,
    "typical_start_seconds": 20,
    "slowest_service": "ERPNext"
  }
}
