{
  "manifest_version": "1.0.0",
  "template": {
    "id": "45c887f5-02fe-4da6-9159-629477933664",
    "slug": "wakapi",
    "name": "Wakapi",
    "description": "Track coding time per project, language & editor w/ WakaTime-compatible API",
    "url": "https://railway.com/deploy/wakapi",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/wakapi-railway"
    }
  },
  "services": [
    {
      "name": "wakapi",
      "source": {
        "repo": "https://github.com/gridalpha/wakapi-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "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
    },
    {
      "name": "mailpit",
      "source": {
        "image": "axllent/mailpit:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "wakapi",
      "description": "HTTP port Railway probes and routes",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "WAKAPI_DB_SSL",
      "service": "wakapi",
      "description": "Private network, no TLS needed",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "WAKAPI_DB_HOST",
      "service": "wakapi",
      "description": "Private Postgres hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WAKAPI_DB_NAME",
      "service": "wakapi",
      "description": "Postgres database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WAKAPI_DB_PORT",
      "service": "wakapi",
      "description": "Postgres port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WAKAPI_DB_TYPE",
      "service": "wakapi",
      "description": "Database dialect",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "WAKAPI_DB_USER",
      "service": "wakapi",
      "description": "Postgres role",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WAKAPI_COOKIE_KEY",
      "service": "wakapi",
      "description": "Base64 session signing key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "WAKAPI_PUBLIC_URL",
      "service": "wakapi",
      "description": "Public base URL, must be a domain",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "WAKAPI_DB_PASSWORD",
      "service": "wakapi",
      "description": "Postgres password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "WAKAPI_MAIL_SENDER",
      "service": "wakapi",
      "description": "Envelope sender address",
      "secret": false,
      "strategy": "default",
      "default": "Wakapi <wakapi@example.org>"
    },
    {
      "key": "WAKAPI_ALLOW_SIGNUP",
      "service": "wakapi",
      "description": "Public registration closed by default",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "WAKAPI_INVITE_CODES",
      "service": "wakapi",
      "description": "Admin can invite users instead",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "WAKAPI_MAIL_ENABLED",
      "service": "wakapi",
      "description": "Password resets and weekly reports",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "WAKAPI_MAIL_SMTP_TLS",
      "service": "wakapi",
      "description": "Plain SMTP on the private network",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "WAKAPI_PASSWORD_SALT",
      "service": "wakapi",
      "description": "Password hashing salt, keep stable",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "WAKAPI_ADMIN_PASSWORD",
      "service": "wakapi",
      "description": "First administrator password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "WAKAPI_ADMIN_USERNAME",
      "service": "wakapi",
      "description": "First administrator, seeded at boot",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "WAKAPI_MAIL_SMTP_HOST",
      "service": "wakapi",
      "description": "Private SMTP hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "WAKAPI_MAIL_SMTP_PORT",
      "service": "wakapi",
      "description": "Mailpit SMTP port",
      "secret": false,
      "strategy": "default",
      "default": "1025"
    },
    {
      "key": "WAKAPI_INSECURE_COOKIES",
      "service": "wakapi",
      "description": "Keep the Secure cookie flag",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "WAKAPI_MAX_INACTIVE_MONTHS",
      "service": "wakapi",
      "description": "Never delete idle accounts",
      "secret": false,
      "strategy": "default",
      "default": "-1"
    },
    {
      "key": "WAKAPI_TRUST_REVERSE_PROXY_IPS",
      "service": "wakapi",
      "description": "Railway edge ranges",
      "secret": false,
      "strategy": "default",
      "default": "152.233.0.0/17,100.64.0.0/10,fd00::/8"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "wakapi",
      "description": "First boot migrates and seeds the admin",
      "secret": false,
      "strategy": "default",
      "default": "600"
    },
    {
      "key": "WAKAPI_LEADERBOARD_REQUIRE_AUTH",
      "service": "wakapi",
      "description": "Leaderboard not public",
      "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"
    },
    {
      "key": "PORT",
      "service": "mailpit",
      "description": "Web inbox port Railway probes and routes",
      "secret": false,
      "strategy": "default",
      "default": "8025"
    },
    {
      "key": "MP_UI_AUTH",
      "service": "mailpit",
      "description": "Basic auth guarding the inbox",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MP_DATABASE",
      "service": "mailpit",
      "description": "Message store on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/data/mailpit.db"
    },
    {
      "key": "MP_MAX_MESSAGES",
      "service": "mailpit",
      "description": "Messages retained before rotation",
      "secret": false,
      "strategy": "default",
      "default": "5000"
    },
    {
      "key": "MP_UI_BIND_ADDR",
      "service": "mailpit",
      "description": "Web inbox listen address",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0:8025"
    },
    {
      "key": "MP_SMTP_BIND_ADDR",
      "service": "mailpit",
      "description": "IPv6 SMTP listener for private peers",
      "secret": false,
      "strategy": "default",
      "default": "[::]:1025"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "mailpit",
      "description": "Startup window",
      "secret": false,
      "strategy": "default",
      "default": "300"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "wakapi"
      }
    },
    "cli": "railway deploy --template wakapi",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "45c887f5-02fe-4da6-9159-629477933664",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "1d1d10bf-ada8-4e58-8e22-388886b41b0a": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/wakapi.svg",
                  "name": "wakapi",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/health",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/wakapi-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port Railway probes and routes",
                      "defaultValue": "3000"
                    },
                    "WAKAPI_DB_SSL": {
                      "isOptional": false,
                      "description": "Private network, no TLS needed",
                      "defaultValue": "false"
                    },
                    "WAKAPI_DB_HOST": {
                      "isOptional": false,
                      "description": "Private Postgres hostname",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "WAKAPI_DB_NAME": {
                      "isOptional": false,
                      "description": "Postgres database name",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "WAKAPI_DB_PORT": {
                      "isOptional": false,
                      "description": "Postgres port",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "WAKAPI_DB_TYPE": {
                      "isOptional": false,
                      "description": "Database dialect",
                      "defaultValue": "postgres"
                    },
                    "WAKAPI_DB_USER": {
                      "isOptional": false,
                      "description": "Postgres role",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "WAKAPI_COOKIE_KEY": {
                      "isOptional": false,
                      "description": "Base64 session signing key",
                      "defaultValue": "{{WAKAPI_COOKIE_KEY}}"
                    },
                    "WAKAPI_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public base URL, must be a domain",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "WAKAPI_ADMIN_EMAIL": {
                      "isOptional": true,
                      "description": "Optional admin e-mail, needs a real MX record",
                      "defaultValue": ""
                    },
                    "WAKAPI_DB_PASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "WAKAPI_MAIL_SENDER": {
                      "isOptional": true,
                      "description": "Envelope sender address",
                      "defaultValue": "Wakapi <wakapi@example.org>"
                    },
                    "WAKAPI_ALLOW_SIGNUP": {
                      "isOptional": true,
                      "description": "Public registration closed by default",
                      "defaultValue": "false"
                    },
                    "WAKAPI_INVITE_CODES": {
                      "isOptional": true,
                      "description": "Admin can invite users instead",
                      "defaultValue": "true"
                    },
                    "WAKAPI_MAIL_ENABLED": {
                      "isOptional": true,
                      "description": "Password resets and weekly reports",
                      "defaultValue": "true"
                    },
                    "WAKAPI_MAIL_SMTP_TLS": {
                      "isOptional": false,
                      "description": "Plain SMTP on the private network",
                      "defaultValue": "false"
                    },
                    "WAKAPI_PASSWORD_SALT": {
                      "isOptional": false,
                      "description": "Password hashing salt, keep stable",
                      "defaultValue": "{{WAKAPI_PASSWORD_SALT}}"
                    },
                    "WAKAPI_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "First administrator password",
                      "defaultValue": "{{WAKAPI_ADMIN_PASSWORD}}"
                    },
                    "WAKAPI_ADMIN_USERNAME": {
                      "isOptional": false,
                      "description": "First administrator, seeded at boot",
                      "defaultValue": "admin"
                    },
                    "WAKAPI_MAIL_SMTP_HOST": {
                      "isOptional": false,
                      "description": "Private SMTP hostname",
                      "defaultValue": "${{mailpit.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "WAKAPI_MAIL_SMTP_PORT": {
                      "isOptional": false,
                      "description": "Mailpit SMTP port",
                      "defaultValue": "1025"
                    },
                    "WAKAPI_INSECURE_COOKIES": {
                      "isOptional": false,
                      "description": "Keep the Secure cookie flag",
                      "defaultValue": "false"
                    },
                    "WAKAPI_MAX_INACTIVE_MONTHS": {
                      "isOptional": true,
                      "description": "Never delete idle accounts",
                      "defaultValue": "-1"
                    },
                    "WAKAPI_TRUST_REVERSE_PROXY_IPS": {
                      "isOptional": true,
                      "description": "Railway edge ranges",
                      "defaultValue": "152.233.0.0/17,100.64.0.0/10,fd00::/8"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": true,
                      "description": "First boot migrates and seeds the admin",
                      "defaultValue": "600"
                    },
                    "WAKAPI_LEADERBOARD_REQUIRE_AUTH": {
                      "isOptional": true,
                      "description": "Leaderboard not public",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  },
                  "volumeMounts": {
                    "1d1d10bf-ada8-4e58-8e22-388886b41b0a": {
                      "mountPath": "/data"
                    }
                  }
                },
                "2848e3a2-2cc2-44b3-a879-f76a50b0ba50": {
                  "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": {
                    "2848e3a2-2cc2-44b3-a879-f76a50b0ba50": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "e0efaaf0-d1a4-48fb-aee9-17cb378a8450": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mailpit.svg",
                  "name": "mailpit",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/livez",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "axllent/mailpit:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Web inbox port Railway probes and routes",
                      "defaultValue": "8025"
                    },
                    "MP_UI_AUTH": {
                      "isOptional": false,
                      "description": "Basic auth guarding the inbox",
                      "defaultValue": "{{MP_UI_AUTH}}"
                    },
                    "MP_DATABASE": {
                      "isOptional": false,
                      "description": "Message store on the volume",
                      "defaultValue": "/data/mailpit.db"
                    },
                    "MP_MAX_MESSAGES": {
                      "isOptional": true,
                      "description": "Messages retained before rotation",
                      "defaultValue": "5000"
                    },
                    "MP_UI_BIND_ADDR": {
                      "isOptional": false,
                      "description": "Web inbox listen address",
                      "defaultValue": "0.0.0.0:8025"
                    },
                    "MP_SMTP_BIND_ADDR": {
                      "isOptional": false,
                      "description": "IPv6 SMTP listener for private peers",
                      "defaultValue": "[::]:1025"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": true,
                      "description": "Startup window",
                      "defaultValue": "300"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8025": {
                        "port": 8025
                      }
                    }
                  },
                  "volumeMounts": {
                    "e0efaaf0-d1a4-48fb-aee9-17cb378a8450": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "wakapi",
      "method": "GET",
      "path": "/api/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-16T22:14:52.145Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-16T19:51:32.592Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_37e616f6c0a64d8391f6",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 212,
    "typical_build_seconds": 154,
    "typical_start_seconds": 10,
    "slowest_service": "wakapi"
  }
}
