{
  "manifest_version": "1.0.0",
  "template": {
    "id": "fdbe6048-acf2-43d6-95dc-1396e908dd97",
    "slug": "hedgedoc-notes",
    "name": "Hedgedoc",
    "description": "HackMD Alternative. Collaborative markdown notes: live preview, slides",
    "url": "https://railway.com/deploy/hedgedoc-notes",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/hedgedoc-railway"
    }
  },
  "services": [
    {
      "name": "hedgedoc",
      "source": {
        "repo": "https://github.com/gridalpha/hedgedoc-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/hedgedoc/public/uploads",
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "hedgedoc",
      "description": "HTTP listening port",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "CMD_DB_URL",
      "service": "hedgedoc",
      "description": "PostgreSQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "CMD_DOMAIN",
      "service": "hedgedoc",
      "description": "Public hostname, no scheme",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "CMD_LOGLEVEL",
      "service": "hedgedoc",
      "description": "Application log verbosity",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "CMD_URL_ADDPORT",
      "service": "hedgedoc",
      "description": "Never append a port to URLs",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "CMD_ALLOW_FREEURL",
      "service": "hedgedoc",
      "description": "Allow custom note URLs",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "CMD_SESSION_SECRET",
      "service": "hedgedoc",
      "description": "Signs login cookies",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "CMD_ALLOW_ANONYMOUS",
      "service": "hedgedoc",
      "description": "Guests cannot create notes",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "CMD_PROTOCOL_USESSL",
      "service": "hedgedoc",
      "description": "Build https URLs behind Railway TLS",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "CMD_ENABLE_STATS_API",
      "service": "hedgedoc",
      "description": "Keep /status and /metrics closed",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "HEDGEDOC_ADMIN_EMAIL",
      "service": "hedgedoc",
      "description": "Login address of the first account",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "CMD_IMAGE_UPLOAD_TYPE",
      "service": "hedgedoc",
      "description": "Store uploads on the volume",
      "secret": false,
      "strategy": "default",
      "default": "filesystem"
    },
    {
      "key": "HEDGEDOC_ADMIN_PASSWORD",
      "service": "hedgedoc",
      "description": "Password of the first account",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "CMD_ALLOW_EMAIL_REGISTER",
      "service": "hedgedoc",
      "description": "Public sign-up disabled",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "CMD_ALLOW_ANONYMOUS_EDITS",
      "service": "hedgedoc",
      "description": "No freely editable permission",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "HEDGEDOC_ADMIN_RESET_PASSWORD",
      "service": "hedgedoc",
      "description": "Set true once to reset that password",
      "secret": true,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "CMD_REQUIRE_FREEURL_AUTHENTICATION",
      "service": "hedgedoc",
      "description": "Custom URLs need an account",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Cluster location on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "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 string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate expiry in days",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Superuser password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "hedgedoc-notes"
      }
    },
    "cli": "railway deploy --template hedgedoc-notes",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "fdbe6048-acf2-43d6-95dc-1396e908dd97",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "788d6982-7263-4644-bbe3-691b5fbfdd9f": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/hedgedoc.svg",
                  "name": "hedgedoc",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/hedgedoc-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP listening port",
                      "defaultValue": "3000"
                    },
                    "CMD_DB_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "CMD_DOMAIN": {
                      "isOptional": false,
                      "description": "Public hostname, no scheme",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "CMD_LOGLEVEL": {
                      "isOptional": false,
                      "description": "Application log verbosity",
                      "defaultValue": "info"
                    },
                    "CMD_URL_ADDPORT": {
                      "isOptional": false,
                      "description": "Never append a port to URLs",
                      "defaultValue": "false"
                    },
                    "CMD_ALLOW_FREEURL": {
                      "isOptional": false,
                      "description": "Allow custom note URLs",
                      "defaultValue": "true"
                    },
                    "CMD_SESSION_SECRET": {
                      "isOptional": false,
                      "description": "Signs login cookies",
                      "defaultValue": "{{CMD_SESSION_SECRET}}"
                    },
                    "CMD_ALLOW_ANONYMOUS": {
                      "isOptional": false,
                      "description": "Guests cannot create notes",
                      "defaultValue": "false"
                    },
                    "CMD_PROTOCOL_USESSL": {
                      "isOptional": false,
                      "description": "Build https URLs behind Railway TLS",
                      "defaultValue": "true"
                    },
                    "CMD_ENABLE_STATS_API": {
                      "isOptional": false,
                      "description": "Keep /status and /metrics closed",
                      "defaultValue": "false"
                    },
                    "HEDGEDOC_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Login address of the first account",
                      "defaultValue": "admin@example.com"
                    },
                    "CMD_IMAGE_UPLOAD_TYPE": {
                      "isOptional": false,
                      "description": "Store uploads on the volume",
                      "defaultValue": "filesystem"
                    },
                    "HEDGEDOC_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Password of the first account",
                      "defaultValue": "{{HEDGEDOC_ADMIN_PASSWORD}}"
                    },
                    "CMD_ALLOW_EMAIL_REGISTER": {
                      "isOptional": false,
                      "description": "Public sign-up disabled",
                      "defaultValue": "false"
                    },
                    "CMD_ALLOW_ANONYMOUS_EDITS": {
                      "isOptional": false,
                      "description": "No freely editable permission",
                      "defaultValue": "false"
                    },
                    "HEDGEDOC_ADMIN_RESET_PASSWORD": {
                      "isOptional": false,
                      "description": "Set true once to reset that password",
                      "defaultValue": "false"
                    },
                    "CMD_REQUIRE_FREEURL_AUTHENTICATION": {
                      "isOptional": false,
                      "description": "Custom URLs need an account",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  },
                  "volumeMounts": {
                    "788d6982-7263-4644-bbe3-691b5fbfdd9f": {
                      "mountPath": "/hedgedoc/public/uploads"
                    }
                  }
                },
                "f03c39bc-bc54-4c06-905f-de40389c2f19": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Cluster location on the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first boot",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate expiry in days",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "f03c39bc-bc54-4c06-905f-de40389c2f19": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T17:22:44.025Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_a7e6b41a5c3f4a3585f2",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 159,
    "typical_build_seconds": 42,
    "typical_start_seconds": 11,
    "slowest_service": "hedgedoc"
  }
}
