{
  "manifest_version": "1.0.0",
  "template": {
    "id": "62b0a38f-8fc2-4a44-a545-585cfe4b179e",
    "slug": "baikal",
    "name": "Baikal",
    "description": "Open-source Google Calendar and Contacts alternative",
    "url": "https://railway.com/deploy/baikal",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/baikal-railway"
    }
  },
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "baikal",
      "source": {
        "repo": "https://github.com/gridalpha/baikal-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "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, read by the server",
      "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": "baikal",
      "description": "HTTP listening port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "DATABASE_URL",
      "service": "baikal",
      "description": "Admin connection used to provision the role",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BAIKAL_DB_NAME",
      "service": "baikal",
      "description": "Database provisioned for the app",
      "secret": false,
      "strategy": "default",
      "default": "baikal"
    },
    {
      "key": "BAIKAL_DB_USER",
      "service": "baikal",
      "description": "Non-superuser role provisioned for the app",
      "secret": false,
      "strategy": "default",
      "default": "baikal"
    },
    {
      "key": "BAIKAL_TIMEZONE",
      "service": "baikal",
      "description": "Server timezone on first boot",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "BAIKAL_DB_HARDEN",
      "service": "baikal",
      "description": "Revoke PUBLIC connect after provisioning",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "PHP_MEMORY_LIMIT",
      "service": "baikal",
      "description": "PHP memory limit",
      "secret": false,
      "strategy": "default",
      "default": "256M"
    },
    {
      "key": "BAIKAL_DB_BACKEND",
      "service": "baikal",
      "description": "Database driver; sqlite uses the volume",
      "secret": false,
      "strategy": "default",
      "default": "pgsql"
    },
    {
      "key": "BAIKAL_MAX_WORKERS",
      "service": "baikal",
      "description": "Apache MaxRequestWorkers",
      "secret": false,
      "strategy": "default",
      "default": "32"
    },
    {
      "key": "BAIKAL_DAV_AUTH_TYPE",
      "service": "baikal",
      "description": "DAV auth: Digest, Basic or Apache",
      "secret": false,
      "strategy": "default",
      "default": "Digest"
    },
    {
      "key": "BAIKAL_ADMIN_PASSWORD",
      "service": "baikal",
      "description": "Password for the admin account",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "BAIKAL_CALDAV_ENABLED",
      "service": "baikal",
      "description": "Serve the CalDAV endpoint",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "BAIKAL_CARDDAV_ENABLED",
      "service": "baikal",
      "description": "Serve the CardDAV endpoint",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "BAIKAL_ADMIN_PASSWORD_FORCE_RESET",
      "service": "baikal",
      "description": "True for one deploy resets admin password",
      "secret": true,
      "strategy": "default",
      "default": "false"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "baikal"
      }
    },
    "cli": "railway deploy --template baikal",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "62b0a38f-8fc2-4a44-a545-585cfe4b179e",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "4b5473e6-9123-40b6-ac40-0749a5ada8d5": {
                  "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, read by the server",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "4b5473e6-9123-40b6-ac40-0749a5ada8d5": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "93f4ecb5-6a04-4328-b595-e6559c7b15c3": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/baikal.svg",
                  "name": "baikal",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/baikal-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP listening port",
                      "defaultValue": "8080"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Admin connection used to provision the role",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "BAIKAL_DB_NAME": {
                      "description": "Database provisioned for the app",
                      "defaultValue": "baikal"
                    },
                    "BAIKAL_DB_USER": {
                      "description": "Non-superuser role provisioned for the app",
                      "defaultValue": "baikal"
                    },
                    "BAIKAL_TIMEZONE": {
                      "isOptional": false,
                      "description": "Server timezone on first boot",
                      "defaultValue": "UTC"
                    },
                    "BAIKAL_DB_HARDEN": {
                      "description": "Revoke PUBLIC connect after provisioning",
                      "defaultValue": "true"
                    },
                    "PHP_MEMORY_LIMIT": {
                      "description": "PHP memory limit",
                      "defaultValue": "256M"
                    },
                    "BAIKAL_DB_BACKEND": {
                      "description": "Database driver; sqlite uses the volume",
                      "defaultValue": "pgsql"
                    },
                    "BAIKAL_MAX_WORKERS": {
                      "description": "Apache MaxRequestWorkers",
                      "defaultValue": "32"
                    },
                    "BAIKAL_DAV_AUTH_TYPE": {
                      "description": "DAV auth: Digest, Basic or Apache",
                      "defaultValue": "Digest"
                    },
                    "BAIKAL_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the admin account",
                      "defaultValue": "{{BAIKAL_ADMIN_PASSWORD}}"
                    },
                    "BAIKAL_CALDAV_ENABLED": {
                      "description": "Serve the CalDAV endpoint",
                      "defaultValue": "true"
                    },
                    "BAIKAL_CARDDAV_ENABLED": {
                      "description": "Serve the CardDAV endpoint",
                      "defaultValue": "true"
                    },
                    "BAIKAL_ADMIN_PASSWORD_FORCE_RESET": {
                      "description": "True for one deploy resets admin password",
                      "defaultValue": "false"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "93f4ecb5-6a04-4328-b595-e6559c7b15c3": {
                      "mountPath": "/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-19T16:54:24.628Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_390bee2cf56d451d8093",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 134,
    "typical_build_seconds": 82,
    "typical_start_seconds": 10,
    "slowest_service": "baikal"
  }
}
