{
  "manifest_version": "1.0.0",
  "template": {
    "id": "d3c86250-5d57-457a-b7bb-02f0105c264e",
    "slug": "countly",
    "name": "Countly",
    "description": "Product analytics for mobile, web and desktop apps",
    "url": "https://railway.com/deploy/countly",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/countly-railway"
    }
  },
  "services": [
    {
      "name": "countly",
      "source": {
        "repo": "https://github.com/gridalpha/countly-railway"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "countly-api",
      "source": {
        "image": "countly/api:latest"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "countly-frontend",
      "source": {
        "image": "countly/frontend:latest"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "MongoDB",
      "source": {
        "image": "mongo:8.0"
      },
      "needs_volume": true,
      "volume_mount_path": "/data/db",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "countly",
      "description": "Caddy HTTP listening port",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "COUNTLY_API_HOST",
      "service": "countly",
      "description": "API upstream",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "COUNTLY_FRONTEND_HOST",
      "service": "countly",
      "description": "Dashboard upstream",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PORT",
      "service": "countly-api",
      "description": "Port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "3001"
    },
    {
      "key": "NODE_OPTIONS",
      "service": "countly-api",
      "description": "Node heap ceiling per process",
      "secret": false,
      "strategy": "default",
      "default": "--max-old-space-size=1024"
    },
    {
      "key": "COUNTLY_PLUGINS",
      "service": "countly-api",
      "description": "Plugins loaded at boot",
      "secret": false,
      "strategy": "default",
      "default": "mobile,web,desktop,plugins,density,locale,browser,sources,views,logger,systemlogs,populator,reports,crashes,push,star-rating,slipping-away-users,compare,server-stats,dbviewer,times-of-day,compliance-hub,alerts,onboarding,consolidate,remote-config,hooks,dashboards,sdk,data-manager,guides"
    },
    {
      "key": "COUNTLY_CONFIG_HOSTNAME",
      "service": "countly-api",
      "description": "Public hostname for links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "COUNTLY_CONFIG__MONGODB",
      "service": "countly-api",
      "description": "MongoDB connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "COUNTLY_CONFIG_API_API_HOST",
      "service": "countly-api",
      "description": "Dual-stack bind for private callers",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "COUNTLY_CONFIG_API_API_PORT",
      "service": "countly-api",
      "description": "API listening port",
      "secret": false,
      "strategy": "default",
      "default": "3001"
    },
    {
      "key": "COUNTLY_CONFIG__FILESTORAGE",
      "service": "countly-api",
      "description": "Store uploaded files in MongoDB",
      "secret": false,
      "strategy": "default",
      "default": "gridfs"
    },
    {
      "key": "COUNTLY_CONFIG_API_API_WORKERS",
      "service": "countly-api",
      "description": "Worker processes, else one per core",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "PORT",
      "service": "countly-frontend",
      "description": "Port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "6001"
    },
    {
      "key": "NODE_OPTIONS",
      "service": "countly-frontend",
      "description": "Node heap ceiling per process",
      "secret": false,
      "strategy": "default",
      "default": "--max-old-space-size=1024"
    },
    {
      "key": "COUNTLY_PLUGINS",
      "service": "countly-frontend",
      "description": "Must match countly-api",
      "secret": false,
      "strategy": "default",
      "default": "mobile,web,desktop,plugins,density,locale,browser,sources,views,logger,systemlogs,populator,reports,crashes,push,star-rating,slipping-away-users,compare,server-stats,dbviewer,times-of-day,compliance-hub,alerts,onboarding,consolidate,remote-config,hooks,dashboards,sdk,data-manager,guides"
    },
    {
      "key": "COUNTLY_CONFIG_HOSTNAME",
      "service": "countly-frontend",
      "description": "Public hostname for links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "COUNTLY_CONFIG__MONGODB",
      "service": "countly-frontend",
      "description": "MongoDB connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "COUNTLY_CONFIG__FILESTORAGE",
      "service": "countly-frontend",
      "description": "Store uploaded files in MongoDB",
      "secret": false,
      "strategy": "default",
      "default": "gridfs"
    },
    {
      "key": "COUNTLY_CONFIG_FRONTEND_WEB_HOST",
      "service": "countly-frontend",
      "description": "Dual-stack bind for the router",
      "secret": false,
      "strategy": "default",
      "default": "::"
    },
    {
      "key": "COUNTLY_CONFIG_FRONTEND_WEB_PORT",
      "service": "countly-frontend",
      "description": "Dashboard listening port",
      "secret": false,
      "strategy": "default",
      "default": "6001"
    },
    {
      "key": "COUNTLY_CONFIG_FRONTEND_COOKIE_SECURE",
      "service": "countly-frontend",
      "description": "Secure flag on the session cookie",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "COUNTLY_CONFIG_FRONTEND_WEB_USE_INTERCOM",
      "service": "countly-frontend",
      "description": "No third-party widget in the dashboard",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "COUNTLY_CONFIG_FRONTEND_WEB_SECURE_COOKIES",
      "service": "countly-frontend",
      "description": "Treat requests as HTTPS",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "COUNTLY_CONFIG_FRONTEND_WEB_SESSION_SECRET",
      "service": "countly-frontend",
      "description": "Signs the session cookie",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MONGOHOST",
      "service": "MongoDB",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MONGOPORT",
      "service": "MongoDB",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "27017"
    },
    {
      "key": "MONGOUSER",
      "service": "MongoDB",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MONGO_URL",
      "service": "MongoDB",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MONGOPASSWORD",
      "service": "MongoDB",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MONGO_INITDB_ROOT_PASSWORD",
      "service": "MongoDB",
      "description": "Root password, read by the entrypoint",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MONGO_INITDB_ROOT_USERNAME",
      "service": "MongoDB",
      "description": "Root user, read by the entrypoint on first boot",
      "secret": false,
      "strategy": "default",
      "default": "mongo"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "countly"
      }
    },
    "cli": "railway deploy --template countly",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "d3c86250-5d57-457a-b7bb-02f0105c264e",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "1f2d8b85-96b2-48ed-8f03-50148801ad2f": {
                  "icon": "https://cdn.prod.website-files.com/61c1b7c3e2f3805325be4594/66c4642cdfcb2cef7128aec9_webclip.svg",
                  "name": "countly",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/countly-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Caddy HTTP listening port",
                      "defaultValue": "8080"
                    },
                    "COUNTLY_API_HOST": {
                      "isOptional": false,
                      "description": "API upstream",
                      "defaultValue": "${{countly-api.RAILWAY_PRIVATE_DOMAIN}}:3001"
                    },
                    "COUNTLY_FRONTEND_HOST": {
                      "isOptional": false,
                      "description": "Dashboard upstream",
                      "defaultValue": "${{countly-frontend.RAILWAY_PRIVATE_DOMAIN}}:6001"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "9a5f7850-afda-4626-9d74-cbd6ba5e19db": {
                  "icon": "https://cdn.prod.website-files.com/61c1b7c3e2f3805325be4594/66c4642cdfcb2cef7128aec9_webclip.svg",
                  "name": "countly-api",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/o/ping",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "countly/api:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway health-checks",
                      "defaultValue": "3001"
                    },
                    "NODE_OPTIONS": {
                      "isOptional": false,
                      "description": "Node heap ceiling per process",
                      "defaultValue": "--max-old-space-size=1024"
                    },
                    "COUNTLY_PLUGINS": {
                      "isOptional": false,
                      "description": "Plugins loaded at boot",
                      "defaultValue": "mobile,web,desktop,plugins,density,locale,browser,sources,views,logger,systemlogs,populator,reports,crashes,push,star-rating,slipping-away-users,compare,server-stats,dbviewer,times-of-day,compliance-hub,alerts,onboarding,consolidate,remote-config,hooks,dashboards,sdk,data-manager,guides"
                    },
                    "COUNTLY_CONFIG_HOSTNAME": {
                      "isOptional": false,
                      "description": "Public hostname for links",
                      "defaultValue": "${{countly.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "COUNTLY_CONFIG__MONGODB": {
                      "isOptional": false,
                      "description": "MongoDB connection string",
                      "defaultValue": "${{MongoDB.MONGO_URL}}/?authSource=admin"
                    },
                    "COUNTLY_CONFIG_API_API_HOST": {
                      "isOptional": false,
                      "description": "Dual-stack bind for private callers",
                      "defaultValue": "::"
                    },
                    "COUNTLY_CONFIG_API_API_PORT": {
                      "isOptional": false,
                      "description": "API listening port",
                      "defaultValue": "3001"
                    },
                    "COUNTLY_CONFIG__FILESTORAGE": {
                      "isOptional": false,
                      "description": "Store uploaded files in MongoDB",
                      "defaultValue": "gridfs"
                    },
                    "COUNTLY_CONFIG_API_API_WORKERS": {
                      "isOptional": false,
                      "description": "Worker processes, else one per core",
                      "defaultValue": "2"
                    }
                  }
                },
                "e8007973-9aab-421f-854b-4fb1347dbcac": {
                  "icon": "https://cdn.prod.website-files.com/61c1b7c3e2f3805325be4594/66c4642cdfcb2cef7128aec9_webclip.svg",
                  "name": "countly-frontend",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/ping",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "countly/frontend:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway health-checks",
                      "defaultValue": "6001"
                    },
                    "NODE_OPTIONS": {
                      "isOptional": false,
                      "description": "Node heap ceiling per process",
                      "defaultValue": "--max-old-space-size=1024"
                    },
                    "COUNTLY_PLUGINS": {
                      "isOptional": false,
                      "description": "Must match countly-api",
                      "defaultValue": "mobile,web,desktop,plugins,density,locale,browser,sources,views,logger,systemlogs,populator,reports,crashes,push,star-rating,slipping-away-users,compare,server-stats,dbviewer,times-of-day,compliance-hub,alerts,onboarding,consolidate,remote-config,hooks,dashboards,sdk,data-manager,guides"
                    },
                    "COUNTLY_CONFIG_HOSTNAME": {
                      "isOptional": false,
                      "description": "Public hostname for links",
                      "defaultValue": "${{countly.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "COUNTLY_CONFIG__MONGODB": {
                      "isOptional": false,
                      "description": "MongoDB connection string",
                      "defaultValue": "${{MongoDB.MONGO_URL}}/?authSource=admin"
                    },
                    "COUNTLY_CONFIG__FILESTORAGE": {
                      "isOptional": false,
                      "description": "Store uploaded files in MongoDB",
                      "defaultValue": "gridfs"
                    },
                    "COUNTLY_CONFIG_FRONTEND_WEB_HOST": {
                      "isOptional": false,
                      "description": "Dual-stack bind for the router",
                      "defaultValue": "::"
                    },
                    "COUNTLY_CONFIG_FRONTEND_WEB_PORT": {
                      "isOptional": false,
                      "description": "Dashboard listening port",
                      "defaultValue": "6001"
                    },
                    "COUNTLY_CONFIG_FRONTEND_COOKIE_SECURE": {
                      "isOptional": false,
                      "description": "Secure flag on the session cookie",
                      "defaultValue": "true"
                    },
                    "COUNTLY_CONFIG_FRONTEND_WEB_USE_INTERCOM": {
                      "isOptional": false,
                      "description": "No third-party widget in the dashboard",
                      "defaultValue": "false"
                    },
                    "COUNTLY_CONFIG_FRONTEND_WEB_SECURE_COOKIES": {
                      "isOptional": false,
                      "description": "Treat requests as HTTPS",
                      "defaultValue": "true"
                    },
                    "COUNTLY_CONFIG_FRONTEND_WEB_SESSION_SECRET": {
                      "isOptional": false,
                      "description": "Signs the session cookie",
                      "defaultValue": "{{COUNTLY_CONFIG_FRONTEND_WEB_SESSION_SECRET}}"
                    }
                  }
                },
                "f8059c9e-47c4-40b5-b2f3-80d9ad8d1a66": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mongodb.svg",
                  "name": "MongoDB",
                  "deploy": {
                    "startCommand": "docker-entrypoint.sh mongod --ipv6 --bind_ip ::,0.0.0.0 --setParameter diagnosticDataCollectionEnabled=false",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mongo:8.0"
                  },
                  "variables": {
                    "MONGOHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MONGOPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "27017"
                    },
                    "MONGOUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{MONGO_INITDB_ROOT_USERNAME}}"
                    },
                    "MONGO_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "mongodb://${{MONGO_INITDB_ROOT_USERNAME}}:${{MONGO_INITDB_ROOT_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:27017"
                    },
                    "MONGOPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{MONGO_INITDB_ROOT_PASSWORD}}"
                    },
                    "MONGO_INITDB_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Root password, read by the entrypoint",
                      "defaultValue": "{{MONGO_INITDB_ROOT_PASSWORD}}"
                    },
                    "MONGO_INITDB_ROOT_USERNAME": {
                      "isOptional": false,
                      "description": "Root user, read by the entrypoint on first boot",
                      "defaultValue": "mongo"
                    }
                  },
                  "volumeMounts": {
                    "f8059c9e-47c4-40b5-b2f3-80d9ad8d1a66": {
                      "mountPath": "/data/db"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T13:16:32.678Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_2bea5f48f1e34fbcbaa4",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 106,
    "typical_build_seconds": 0,
    "typical_start_seconds": 20,
    "slowest_service": "countly-frontend"
  }
}
