{
  "manifest_version": "1.0.0",
  "template": {
    "id": "088345a6-3f57-474b-a52b-99a17c4afbca",
    "slug": "onedev-git",
    "name": "OneDev",
    "description": "Git server with built-in CI/CD, issue tracking and code review",
    "url": "https://railway.com/deploy/onedev-git",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/onedev-railway"
    }
  },
  "services": [
    {
      "name": "onedev-agent",
      "source": {
        "repo": "https://github.com/gridalpha/onedev-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/agent/work",
      "http": false
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "onedev",
      "source": {
        "repo": "https://github.com/gridalpha/onedev-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/opt/onedev",
      "tcp_ports": [
        6611
      ],
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "onedev-agent",
      "description": "Liveness endpoint port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "serverUrl",
      "service": "onedev-agent",
      "description": "Private OneDev server address",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ONEDEV_ADMIN_USER",
      "service": "onedev-agent",
      "description": "Used once to create the agent token",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ONEDEV_ADMIN_PASSWORD",
      "service": "onedev-agent",
      "description": "Used once to create the agent token",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "onedev-agent",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "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"
    },
    {
      "key": "PORT",
      "service": "onedev",
      "description": "Port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "6610"
    },
    {
      "key": "ssh_port",
      "service": "onedev",
      "description": "Git over SSH listener port",
      "secret": false,
      "strategy": "default",
      "default": "6611"
    },
    {
      "key": "http_host",
      "service": "onedev",
      "description": "Dual-stack bind address",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "http_port",
      "service": "onedev",
      "description": "HTTP listener port",
      "secret": false,
      "strategy": "default",
      "default": "6610"
    },
    {
      "key": "cluster_ip",
      "service": "onedev",
      "description": "Cluster address; skips auto-discovery",
      "secret": false,
      "strategy": "default",
      "default": "127.0.0.1"
    },
    {
      "key": "initial_user",
      "service": "onedev",
      "description": "First administrator login name",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "initial_email",
      "service": "onedev",
      "description": "First administrator email address",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "initial_password",
      "service": "onedev",
      "description": "First administrator password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "hibernate_dialect",
      "service": "onedev",
      "description": "OneDev's Postgres dialect",
      "secret": false,
      "strategy": "default",
      "default": "io.onedev.server.persistence.PostgreSQLDialect"
    },
    {
      "key": "initial_server_url",
      "service": "onedev",
      "description": "Public URL used in clone links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "hibernate_connection_url",
      "service": "onedev",
      "description": "Database JDBC URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "hibernate_connection_password",
      "service": "onedev",
      "description": "Database password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "hibernate_connection_username",
      "service": "onedev",
      "description": "Database user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "hibernate_connection_driver_class",
      "service": "onedev",
      "description": "JDBC driver class",
      "secret": false,
      "strategy": "default",
      "default": "org.postgresql.Driver"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "onedev",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "30"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "onedev-git"
      }
    },
    "cli": "railway deploy --template onedev-git",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "088345a6-3f57-474b-a52b-99a17c4afbca",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "1e059ea2-094a-48cc-93e9-ed40d1fb7696": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/onedev-light.svg",
                  "name": "onedev-agent",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/onedev-railway",
                    "rootDirectory": "agent"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Liveness endpoint port",
                      "defaultValue": "8080"
                    },
                    "serverUrl": {
                      "isOptional": false,
                      "description": "Private OneDev server address",
                      "defaultValue": "http://${{onedev.RAILWAY_PRIVATE_DOMAIN}}:6610"
                    },
                    "ONEDEV_ADMIN_USER": {
                      "isOptional": false,
                      "description": "Used once to create the agent token",
                      "defaultValue": "${{onedev.initial_user}}"
                    },
                    "ONEDEV_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Used once to create the agent token",
                      "defaultValue": "${{onedev.initial_password}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "30"
                    }
                  },
                  "volumeMounts": {
                    "1e059ea2-094a-48cc-93e9-ed40d1fb7696": {
                      "mountPath": "/agent/work"
                    }
                  }
                },
                "3798b1a0-6421-4758-9225-83bbce1f3579": {
                  "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": {
                    "3798b1a0-6421-4758-9225-83bbce1f3579": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "c9926149-0258-4625-806d-7f7871c5c097": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/onedev-light.svg",
                  "name": "onedev",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/onedev-railway",
                    "rootDirectory": "server"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway health-checks",
                      "defaultValue": "6610"
                    },
                    "ssh_port": {
                      "isOptional": false,
                      "description": "Git over SSH listener port",
                      "defaultValue": "6611"
                    },
                    "http_host": {
                      "isOptional": false,
                      "description": "Dual-stack bind address",
                      "defaultValue": "::"
                    },
                    "http_port": {
                      "isOptional": false,
                      "description": "HTTP listener port",
                      "defaultValue": "6610"
                    },
                    "cluster_ip": {
                      "isOptional": false,
                      "description": "Cluster address; skips auto-discovery",
                      "defaultValue": "127.0.0.1"
                    },
                    "initial_user": {
                      "isOptional": false,
                      "description": "First administrator login name",
                      "defaultValue": "admin"
                    },
                    "initial_email": {
                      "isOptional": false,
                      "description": "First administrator email address",
                      "defaultValue": "admin@example.com"
                    },
                    "initial_password": {
                      "isOptional": false,
                      "description": "First administrator password",
                      "defaultValue": "{{initial_password}}"
                    },
                    "hibernate_dialect": {
                      "isOptional": false,
                      "description": "OneDev's Postgres dialect",
                      "defaultValue": "io.onedev.server.persistence.PostgreSQLDialect"
                    },
                    "initial_server_url": {
                      "isOptional": false,
                      "description": "Public URL used in clone links",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "hibernate_connection_url": {
                      "isOptional": false,
                      "description": "Database JDBC URL",
                      "defaultValue": "jdbc:postgresql://${{Postgres.PGHOST}}:${{Postgres.PGPORT}}/${{Postgres.PGDATABASE}}"
                    },
                    "hibernate_connection_password": {
                      "isOptional": false,
                      "description": "Database password",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "hibernate_connection_username": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "hibernate_connection_driver_class": {
                      "isOptional": false,
                      "description": "JDBC driver class",
                      "defaultValue": "org.postgresql.Driver"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "30"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "6611": {}
                    },
                    "serviceDomains": {
                      "<hasDomain>:6610": {
                        "port": 6610
                      }
                    }
                  },
                  "volumeMounts": {
                    "c9926149-0258-4625-806d-7f7871c5c097": {
                      "mountPath": "/opt/onedev"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T13:22:12.971Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_3efad5419281478c90b6",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 147,
    "typical_build_seconds": 41,
    "typical_start_seconds": 10,
    "slowest_service": "onedev-agent"
  }
}
