{
  "manifest_version": "1.0.0",
  "template": {
    "id": "9b478bbf-c15d-4516-bf44-c51102030f5e",
    "slug": "deploy-k7-media-server",
    "name": "K7",
    "description": "Self-host movies, music and TV with K7 and private Postgres.",
    "url": "https://railway.com/deploy/deploy-k7-media-server",
    "upstream": {
      "image": "ghcr.io/onepush-dev/k7:1.17.2"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "postgres:18-alpine@sha256:10a5c69a83035ab5239f5620d708520e8b28f5aa1f2b20143e6024532edadfb5"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql",
      "http": false
    },
    {
      "name": "K7",
      "source": {
        "image": "ghcr.io/onepush-dev/k7:1.17.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Postgres data directory, a subfolder of the attached volume",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Password for the postgres superuser (generated, 32 chars)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "Database__Server",
      "service": "K7",
      "description": "Private hostname of the bundled Postgres service",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "K7_ADMIN_PASSWORD",
      "service": "K7",
      "description": "Password of the first admin user (admin), set up automatically on first boot",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "Database__Password",
      "service": "K7",
      "description": "Password K7 uses to connect to Postgres (from the Postgres service)",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MEDIA_UPLOAD_PASSWORD",
      "service": "K7",
      "description": "Password (user admin) for the optional media uploader on port 5000; remove to disable",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "Security__ApiKeys__HashSecret",
      "service": "K7",
      "description": "Secret mixed into API key hashes (generated, 64 chars); changing it invalidates API keys",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "deploy-k7-media-server"
      }
    },
    "cli": "railway deploy --template deploy-k7-media-server",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "9b478bbf-c15d-4516-bf44-c51102030f5e",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "49a03a51-26cf-4016-8805-1115633d4974": {
                  "icon": null,
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:18-alpine@sha256:10a5c69a83035ab5239f5620d708520e8b28f5aa1f2b20143e6024532edadfb5"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Postgres data directory, a subfolder of the attached volume",
                      "defaultValue": "${{RAILWAY_VOLUME_MOUNT_PATH}}/18/docker"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the postgres superuser (generated, 32 chars)",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "49a03a51-26cf-4016-8805-1115633d4974": {
                      "mountPath": "/var/lib/postgresql"
                    }
                  }
                },
                "f5416426-89d3-472f-919f-bd4532d097ed": {
                  "icon": null,
                  "name": "K7",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/onepush-dev/k7:1.17.2"
                  },
                  "variables": {
                    "Database__Server": {
                      "isOptional": false,
                      "description": "Private hostname of the bundled Postgres service",
                      "defaultValue": "${{Postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "K7_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Password of the first admin user (admin), set up automatically on first boot",
                      "defaultValue": "{{K7_ADMIN_PASSWORD}}"
                    },
                    "Database__Password": {
                      "isOptional": false,
                      "description": "Password K7 uses to connect to Postgres (from the Postgres service)",
                      "defaultValue": "${{Postgres.POSTGRES_PASSWORD}}"
                    },
                    "MEDIA_UPLOAD_PASSWORD": {
                      "isOptional": false,
                      "description": "Password (user admin) for the optional media uploader on port 5000; remove to disable",
                      "defaultValue": "{{MEDIA_UPLOAD_PASSWORD}}"
                    },
                    "Security__ApiKeys__HashSecret": {
                      "isOptional": false,
                      "description": "Secret mixed into API key hashes (generated, 64 chars); changing it invalidates API keys",
                      "defaultValue": "{{Security__ApiKeys__HashSecret}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:7080": {
                        "port": 7080
                      }
                    }
                  },
                  "volumeMounts": {
                    "f5416426-89d3-472f-919f-bd4532d097ed": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "K7",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-11-07T10:15:08.645Z",
  "generator_version": "0.1.0"
}
