{
  "manifest_version": "1.0.0",
  "template": {
    "id": "987f15e0-f352-41c1-b817-c267651b9dc4",
    "slug": "medusa-1",
    "name": "Medusa",
    "description": "MedusaJS 2 commerce with admin and Next.js storefront, Postgres and Redis",
    "url": "https://railway.com/deploy/medusa-1",
    "upstream": {
      "repo_url": "https://github.com/dektionstudio/railway-template-images"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Redis",
      "source": {
        "image": "redis:7.4"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Medusa",
      "source": {
        "repo": "https://github.com/dektionstudio/railway-template-images"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/apps/backend/.medusa/server/static",
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Storefront",
      "source": {
        "repo": "https://github.com/dektionstudio/railway-template-images"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Redis password (generated)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "Medusa",
      "description": "Port Railway routes to",
      "secret": false,
      "strategy": "default",
      "default": "9000"
    },
    {
      "key": "AUTH_CORS",
      "service": "Medusa",
      "description": "Origins allowed to call the auth API",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "REDIS_URL",
      "service": "Medusa",
      "description": "Redis over the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ADMIN_CORS",
      "service": "Medusa",
      "description": "Origins allowed to call the admin API",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "JWT_SECRET",
      "service": "Medusa",
      "description": "Signs auth tokens (generated)",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "STORE_CORS",
      "service": "Medusa",
      "description": "Origins allowed to call the store API (add your storefront's custom domain)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "Medusa",
      "description": "Postgres over the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "NODE_OPTIONS",
      "service": "Medusa",
      "description": "Heap cap so Medusa fits a 1 GB service; raise it on bigger plans",
      "secret": false,
      "strategy": "default",
      "default": "--max-old-space-size=512"
    },
    {
      "key": "COOKIE_SECRET",
      "service": "Medusa",
      "description": "Signs session cookies (generated)",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MEDUSA_ADMIN_URL",
      "service": "Medusa",
      "description": "Medusa admin",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "MEDUSA_ADMIN_EMAIL",
      "service": "Medusa",
      "description": "Email of the admin account, created on first start. Sign in at MEDUSA_ADMIN_URL with it and MEDUSA_ADMIN_PASSWORD",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "MEDUSA_BACKEND_URL",
      "service": "Medusa",
      "description": "Public URL of the backend (store API, admin, uploaded files)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "MEDUSA_WORKER_MODE",
      "service": "Medusa",
      "description": "One process serves the API and runs background jobs",
      "secret": false,
      "strategy": "default",
      "default": "shared"
    },
    {
      "key": "MEDUSA_ADMIN_PASSWORD",
      "service": "Medusa",
      "description": "Password of the admin account (generated)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MEDUSA_PUBLISHABLE_KEY",
      "service": "Medusa",
      "description": "The storefront's publishable API key (generated, not secret); set on the store's key at every start",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "AUTH_MFA_ENCRYPTION_KEY",
      "service": "Medusa",
      "description": "Encrypts admin MFA secrets (generated)",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data directory inside the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database name",
      "secret": false,
      "strategy": "default",
      "default": "medusa"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Database superuser",
      "secret": false,
      "strategy": "default",
      "default": "medusa"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Database password (generated)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "Storefront",
      "description": "Port Railway routes to",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "STOREFRONT_URL",
      "service": "Storefront",
      "description": "Your shop",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_BASE_URL",
      "service": "Storefront",
      "description": "The storefront's own URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_DEFAULT_REGION",
      "service": "Storefront",
      "description": "Country code used when a visitor's country isn't in a region (the starter store's region covers gb, de, dk, se, fr, es, it)",
      "secret": false,
      "strategy": "default",
      "default": "dk"
    },
    {
      "key": "NEXT_PUBLIC_MEDUSA_BACKEND_URL",
      "service": "Storefront",
      "description": "Backend URL, built into the storefront",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY",
      "service": "Storefront",
      "description": "Publishable API key, built into the storefront",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "medusa-1"
      }
    },
    "cli": "railway deploy --template medusa-1",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "987f15e0-f352-41c1-b817-c267651b9dc4",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "53b18071-b869-4b94-964a-03a55ceaa802": {
                  "icon": "https://devicons.railway.com/i/redis.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'exec redis-server --requirepass \"$REDIS_PASSWORD\" --save \"\" --appendonly no'",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:7.4"
                  },
                  "variables": {
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis password (generated)",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  }
                },
                "981fba23-2026-4f2b-abdb-cbcbfdb0a4f7": {
                  "icon": "https://raw.githubusercontent.com/dektionstudio/railway-template-images/82d937f29aeefc2ef2e1a64a833971b9aa39b1a8/medusa/icon.jpg",
                  "name": "Medusa",
                  "deploy": {
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "dektionstudio/railway-template-images",
                    "rootDirectory": "/medusa"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway routes to",
                      "defaultValue": "9000"
                    },
                    "AUTH_CORS": {
                      "isOptional": false,
                      "description": "Origins allowed to call the auth API",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}},https://${{Storefront.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis over the private network",
                      "defaultValue": "redis://default:${{Redis.REDIS_PASSWORD}}@${{Redis.RAILWAY_PRIVATE_DOMAIN}}:6379?family=0"
                    },
                    "ADMIN_CORS": {
                      "isOptional": false,
                      "description": "Origins allowed to call the admin API",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "JWT_SECRET": {
                      "isOptional": false,
                      "description": "Signs auth tokens (generated)",
                      "defaultValue": "{{JWT_SECRET}}"
                    },
                    "STORE_CORS": {
                      "isOptional": false,
                      "description": "Origins allowed to call the store API (add your storefront's custom domain)",
                      "defaultValue": "https://${{Storefront.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres over the private network",
                      "defaultValue": "postgres://${{Postgres.POSTGRES_USER}}:${{Postgres.POSTGRES_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/${{Postgres.POSTGRES_DB}}"
                    },
                    "NODE_OPTIONS": {
                      "isOptional": false,
                      "description": "Heap cap so Medusa fits a 1 GB service; raise it on bigger plans",
                      "defaultValue": "--max-old-space-size=512"
                    },
                    "COOKIE_SECRET": {
                      "isOptional": false,
                      "description": "Signs session cookies (generated)",
                      "defaultValue": "{{COOKIE_SECRET}}"
                    },
                    "MEDUSA_ADMIN_URL": {
                      "isOptional": false,
                      "description": "Medusa admin",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}/app"
                    },
                    "MEDUSA_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Email of the admin account, created on first start. Sign in at MEDUSA_ADMIN_URL with it and MEDUSA_ADMIN_PASSWORD",
                      "defaultValue": "{{MEDUSA_ADMIN_EMAIL}}"
                    },
                    "MEDUSA_BACKEND_URL": {
                      "isOptional": false,
                      "description": "Public URL of the backend (store API, admin, uploaded files)",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "MEDUSA_WORKER_MODE": {
                      "isOptional": false,
                      "description": "One process serves the API and runs background jobs",
                      "defaultValue": "shared"
                    },
                    "MEDUSA_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Password of the admin account (generated)",
                      "defaultValue": "{{MEDUSA_ADMIN_PASSWORD}}"
                    },
                    "MEDUSA_PUBLISHABLE_KEY": {
                      "isOptional": false,
                      "description": "The storefront's publishable API key (generated, not secret); set on the store's key at every start",
                      "defaultValue": "{{MEDUSA_PUBLISHABLE_KEY}}"
                    },
                    "AUTH_MFA_ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "Encrypts admin MFA secrets (generated)",
                      "defaultValue": "{{AUTH_MFA_ENCRYPTION_KEY}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>:9000": {
                        "port": 9000
                      }
                    }
                  },
                  "volumeMounts": {
                    "87abb762-c680-401c-b369-22b4fcf0e98a": {
                      "mountPath": "/app/apps/backend/.medusa/server/static"
                    }
                  }
                },
                "ac38a17d-eaca-4945-a1d5-842c81fea635": {
                  "icon": "https://devicons.railway.com/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:17"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data directory inside the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "medusa"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database superuser",
                      "defaultValue": "medusa"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password (generated)",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "90cd5c5e-2640-444a-9402-ae78400ff0a2": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "aed4834d-aa80-4269-b53c-48c95a0a1800": {
                  "icon": "https://raw.githubusercontent.com/dektionstudio/railway-template-images/82d937f29aeefc2ef2e1a64a833971b9aa39b1a8/medusa/icon.jpg",
                  "name": "Storefront",
                  "deploy": {
                    "healthcheckPath": "/dk",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "dektionstudio/railway-template-images",
                    "rootDirectory": "/medusa-storefront"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway routes to",
                      "defaultValue": "8000"
                    },
                    "STOREFRONT_URL": {
                      "isOptional": false,
                      "description": "Your shop",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXT_PUBLIC_BASE_URL": {
                      "isOptional": false,
                      "description": "The storefront's own URL",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXT_PUBLIC_DEFAULT_REGION": {
                      "isOptional": false,
                      "description": "Country code used when a visitor's country isn't in a region (the starter store's region covers gb, de, dk, se, fr, es, it)",
                      "defaultValue": "dk"
                    },
                    "NEXT_PUBLIC_MEDUSA_BACKEND_URL": {
                      "isOptional": false,
                      "description": "Backend URL, built into the storefront",
                      "defaultValue": "https://${{Medusa.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY": {
                      "isOptional": false,
                      "description": "Publishable API key, built into the storefront",
                      "defaultValue": "${{Medusa.MEDUSA_PUBLISHABLE_KEY}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>:8000": {
                        "port": 8000
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Medusa",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-10-05T16:14:45.410Z",
  "generator_version": "0.1.0"
}
