{
  "manifest_version": "1.0.0",
  "template": {
    "id": "7c7c7fdd-57c8-40ea-a062-7392f2969b16",
    "slug": "victoria-metrics",
    "name": "VictoriaMetrics",
    "description": "Time-series database for storing and querying metrics",
    "url": "https://railway.com/deploy/victoria-metrics",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/victoriametrics-railway"
    }
  },
  "services": [
    {
      "name": "vminsert",
      "source": {
        "image": "victoriametrics/vminsert:v1.151.0-cluster"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "vmstorage",
      "source": {
        "image": "victoriametrics/vmstorage:v1.151.0-cluster"
      },
      "needs_volume": true,
      "volume_mount_path": "/storage",
      "http": false
    },
    {
      "name": "alertmanager",
      "source": {
        "repo": "https://github.com/gridalpha/victoriametrics-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/alertmanager",
      "http": false
    },
    {
      "name": "vmalert",
      "source": {
        "repo": "https://github.com/gridalpha/victoriametrics-railway"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "vmagent",
      "source": {
        "repo": "https://github.com/gridalpha/victoriametrics-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/vmagentdata",
      "http": false
    },
    {
      "name": "vmselect",
      "source": {
        "image": "victoriametrics/vmselect:v1.151.0-cluster"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "vmauth",
      "source": {
        "repo": "https://github.com/gridalpha/victoriametrics-railway"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "vminsert",
      "description": "HTTP listening port",
      "secret": false,
      "strategy": "default",
      "default": "8480"
    },
    {
      "key": "VMSTORAGE_HOST",
      "service": "vminsert",
      "description": "Storage node private hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PORT",
      "service": "vmstorage",
      "description": "HTTP port used by the health check",
      "secret": false,
      "strategy": "default",
      "default": "8482"
    },
    {
      "key": "VM_RETENTION_PERIOD",
      "service": "vmstorage",
      "description": "Retention in months unless suffixed",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "PORT",
      "service": "alertmanager",
      "description": "HTTP listening port",
      "secret": false,
      "strategy": "default",
      "default": "9093"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "alertmanager",
      "description": "Build file for this service",
      "secret": false,
      "strategy": "default",
      "default": "alertmanager/Dockerfile"
    },
    {
      "key": "PORT",
      "service": "vmalert",
      "description": "HTTP listening port",
      "secret": false,
      "strategy": "default",
      "default": "8880"
    },
    {
      "key": "EXTERNAL_URL",
      "service": "vmalert",
      "description": "Public URL used in alert links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "VMINSERT_HOST",
      "service": "vmalert",
      "description": "Destination for recording rules",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "VMSELECT_HOST",
      "service": "vmalert",
      "description": "Datasource for rule evaluation",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ALERTMANAGER_HOST",
      "service": "vmalert",
      "description": "Notification target",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "vmalert",
      "description": "Build file for this service",
      "secret": false,
      "strategy": "default",
      "default": "vmalert/Dockerfile"
    },
    {
      "key": "VMALERT_EVALUATION_INTERVAL",
      "service": "vmalert",
      "description": "How often rules are evaluated",
      "secret": false,
      "strategy": "default",
      "default": "30s"
    },
    {
      "key": "PORT",
      "service": "vmagent",
      "description": "HTTP listening port",
      "secret": false,
      "strategy": "default",
      "default": "8429"
    },
    {
      "key": "VMAUTH_HOST",
      "service": "vmagent",
      "description": "Scrape target",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "VMALERT_HOST",
      "service": "vmagent",
      "description": "Scrape target",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "VMINSERT_HOST",
      "service": "vmagent",
      "description": "Scrape target and remote-write destination",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "VMSELECT_HOST",
      "service": "vmagent",
      "description": "Scrape target",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "VMSTORAGE_HOST",
      "service": "vmagent",
      "description": "Scrape target",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ALERTMANAGER_HOST",
      "service": "vmagent",
      "description": "Scrape target",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "VMAUTH_METRICS_KEY",
      "service": "vmagent",
      "description": "Key for the gateway's metrics endpoint",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "vmagent",
      "description": "Build file for this service",
      "secret": false,
      "strategy": "default",
      "default": "vmagent/Dockerfile"
    },
    {
      "key": "PORT",
      "service": "vmselect",
      "description": "HTTP listening port",
      "secret": false,
      "strategy": "default",
      "default": "8481"
    },
    {
      "key": "VMALERT_HOST",
      "service": "vmselect",
      "description": "Puts the rule browser inside VMUI",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "VMSTORAGE_HOST",
      "service": "vmselect",
      "description": "Storage node private hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PORT",
      "service": "vmauth",
      "description": "HTTP listening port for the gateway",
      "secret": false,
      "strategy": "default",
      "default": "8427"
    },
    {
      "key": "VM_PASSWORD",
      "service": "vmauth",
      "description": "Password for every public route",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "VM_USERNAME",
      "service": "vmauth",
      "description": "Username for every public route",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "VMINSERT_HOST",
      "service": "vmauth",
      "description": "Ingestion tier private hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "VMSELECT_HOST",
      "service": "vmauth",
      "description": "Query tier private hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "VM_INTERNAL_AUTH_KEY",
      "service": "vmauth",
      "description": "Guards /metrics, /flags and pprof on the gateway",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "vmauth",
      "description": "Build file for this service",
      "secret": false,
      "strategy": "default",
      "default": "vmauth/Dockerfile"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "victoria-metrics"
      }
    },
    "cli": "railway deploy --template victoria-metrics",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "7c7c7fdd-57c8-40ea-a062-7392f2969b16",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "11a5f7cf-b0af-4164-8741-bfdaee1d56c9": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/victoriametrics-light.svg",
                  "name": "vminsert",
                  "deploy": {
                    "startCommand": "/bin/sh -c '[ -n \"$VMSTORAGE_HOST\" ] || VMSTORAGE_HOST=vmstorage.railway.internal; exec /vminsert-prod -enableTCP6 -httpListenAddr=:$PORT -storageNode=$VMSTORAGE_HOST:8400'",
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "victoriametrics/vminsert:v1.151.0-cluster"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP listening port",
                      "defaultValue": "8480"
                    },
                    "VMSTORAGE_HOST": {
                      "isOptional": false,
                      "description": "Storage node private hostname",
                      "defaultValue": "${{vmstorage.RAILWAY_PRIVATE_DOMAIN}}"
                    }
                  }
                },
                "4e738138-6381-4a75-baf9-9287276f33d2": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/victoriametrics-light.svg",
                  "name": "vmstorage",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'exec /vmstorage-prod -enableTCP6 -httpListenAddr=:$PORT -storageDataPath=/storage/data -retentionPeriod=$VM_RETENTION_PERIOD -vminsertAddr=:8400 -vmselectAddr=:8401'",
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "victoriametrics/vmstorage:v1.151.0-cluster"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port used by the health check",
                      "defaultValue": "8482"
                    },
                    "VM_RETENTION_PERIOD": {
                      "isOptional": false,
                      "description": "Retention in months unless suffixed",
                      "defaultValue": "1"
                    }
                  },
                  "volumeMounts": {
                    "4e738138-6381-4a75-baf9-9287276f33d2": {
                      "mountPath": "/storage"
                    }
                  }
                },
                "5c9a5748-6541-4a1c-8d49-88e7c27291c3": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/alertmanager-dark.svg",
                  "name": "alertmanager",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/v2/status",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/victoriametrics-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP listening port",
                      "defaultValue": "9093"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Build file for this service",
                      "defaultValue": "alertmanager/Dockerfile"
                    }
                  },
                  "volumeMounts": {
                    "5c9a5748-6541-4a1c-8d49-88e7c27291c3": {
                      "mountPath": "/alertmanager"
                    }
                  }
                },
                "8fe932db-e7a6-49b7-85cc-5763dd9f4cf7": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/victoriametrics-light.svg",
                  "name": "vmalert",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/victoriametrics-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP listening port",
                      "defaultValue": "8880"
                    },
                    "EXTERNAL_URL": {
                      "isOptional": false,
                      "description": "Public URL used in alert links",
                      "defaultValue": "https://${{vmauth.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "VMINSERT_HOST": {
                      "isOptional": false,
                      "description": "Destination for recording rules",
                      "defaultValue": "${{vminsert.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "VMSELECT_HOST": {
                      "isOptional": false,
                      "description": "Datasource for rule evaluation",
                      "defaultValue": "${{vmselect.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "ALERTMANAGER_HOST": {
                      "isOptional": false,
                      "description": "Notification target",
                      "defaultValue": "${{alertmanager.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Build file for this service",
                      "defaultValue": "vmalert/Dockerfile"
                    },
                    "VMALERT_EVALUATION_INTERVAL": {
                      "isOptional": false,
                      "description": "How often rules are evaluated",
                      "defaultValue": "30s"
                    }
                  }
                },
                "e2f5df5c-8c0b-429a-b5b2-0a636064e5bd": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/victoriametrics-light.svg",
                  "name": "vmagent",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/victoriametrics-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP listening port",
                      "defaultValue": "8429"
                    },
                    "VMAUTH_HOST": {
                      "isOptional": false,
                      "description": "Scrape target",
                      "defaultValue": "${{vmauth.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "VMALERT_HOST": {
                      "isOptional": false,
                      "description": "Scrape target",
                      "defaultValue": "${{vmalert.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "VMINSERT_HOST": {
                      "isOptional": false,
                      "description": "Scrape target and remote-write destination",
                      "defaultValue": "${{vminsert.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "VMSELECT_HOST": {
                      "isOptional": false,
                      "description": "Scrape target",
                      "defaultValue": "${{vmselect.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "VMSTORAGE_HOST": {
                      "isOptional": false,
                      "description": "Scrape target",
                      "defaultValue": "${{vmstorage.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "ALERTMANAGER_HOST": {
                      "isOptional": false,
                      "description": "Scrape target",
                      "defaultValue": "${{alertmanager.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "VMAUTH_METRICS_KEY": {
                      "isOptional": false,
                      "description": "Key for the gateway's metrics endpoint",
                      "defaultValue": "${{vmauth.VM_INTERNAL_AUTH_KEY}}"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Build file for this service",
                      "defaultValue": "vmagent/Dockerfile"
                    }
                  },
                  "volumeMounts": {
                    "e2f5df5c-8c0b-429a-b5b2-0a636064e5bd": {
                      "mountPath": "/vmagentdata"
                    }
                  }
                },
                "f21691f3-6a29-4f09-87ee-0e9812e8d2aa": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/victoriametrics-light.svg",
                  "name": "vmselect",
                  "deploy": {
                    "startCommand": "/bin/sh -c '[ -n \"$VMSTORAGE_HOST\" ] || VMSTORAGE_HOST=vmstorage.railway.internal; [ -n \"$VMALERT_HOST\" ] || VMALERT_HOST=vmalert.railway.internal; exec /vmselect-prod -enableTCP6 -httpListenAddr=:$PORT -storageNode=$VMSTORAGE_HOST:8401 -vmalert.proxyURL=http://$VMALERT_HOST:8880'",
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "victoriametrics/vmselect:v1.151.0-cluster"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP listening port",
                      "defaultValue": "8481"
                    },
                    "VMALERT_HOST": {
                      "isOptional": false,
                      "description": "Puts the rule browser inside VMUI",
                      "defaultValue": "${{vmalert.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "VMSTORAGE_HOST": {
                      "isOptional": false,
                      "description": "Storage node private hostname",
                      "defaultValue": "${{vmstorage.RAILWAY_PRIVATE_DOMAIN}}"
                    }
                  }
                },
                "fd615319-4512-44f8-a00f-154dcc23c5ed": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/victoriametrics-light.svg",
                  "name": "vmauth",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/victoriametrics-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP listening port for the gateway",
                      "defaultValue": "8427"
                    },
                    "VM_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for every public route",
                      "defaultValue": "{{VM_PASSWORD}}"
                    },
                    "VM_USERNAME": {
                      "isOptional": false,
                      "description": "Username for every public route",
                      "defaultValue": "admin"
                    },
                    "VMINSERT_HOST": {
                      "isOptional": false,
                      "description": "Ingestion tier private hostname",
                      "defaultValue": "${{vminsert.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "VMSELECT_HOST": {
                      "isOptional": false,
                      "description": "Query tier private hostname",
                      "defaultValue": "${{vmselect.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "VM_INTERNAL_AUTH_KEY": {
                      "isOptional": false,
                      "description": "Guards /metrics, /flags and pprof on the gateway",
                      "defaultValue": "{{VM_INTERNAL_AUTH_KEY}}"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Build file for this service",
                      "defaultValue": "vmauth/Dockerfile"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "vmauth",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 7,
    "needs_volume": true
  },
  "generated_at": "2026-09-23T10:14:44.639Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-21T20:22:43.855Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_a8444456e2c1431c8b67",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 111,
    "typical_build_seconds": 21,
    "typical_start_seconds": 10,
    "slowest_service": "vmagent"
  }
}
