{
  "manifest_version": "1.0.0",
  "template": {
    "id": "00bc266c-c2e5-449e-b605-7d9c69abb96d",
    "slug": "koel",
    "name": "koel",
    "description": "Personal music streaming server",
    "url": "https://railway.com/deploy/koel",
    "upstream": {
      "repo_url": "https://github.com/osbytes/template-koel"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "app",
      "source": {
        "repo": "https://github.com/osbytes/template-koel"
      },
      "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
    }
  ],
  "required_inputs": [
    {
      "key": "APP_ENV",
      "service": "app",
      "description": "Laravel environment",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "APP_KEY",
      "service": "app",
      "description": "Optional; empty auto-generates on first boot and persists under the /data volume — do not rotate after first deploy if set",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "APP_URL",
      "service": "app",
      "description": "Public HTTPS origin Koel should generate links for",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DB_HOST",
      "service": "app",
      "description": "Postgres private DNS — not the public URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DB_PORT",
      "service": "app",
      "description": "Postgres port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "APP_NAME",
      "service": "app",
      "description": "Display name",
      "secret": false,
      "strategy": "default",
      "default": "Koel"
    },
    {
      "key": "APP_DEBUG",
      "service": "app",
      "description": "Keep false on public Internet",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "MEDIA_PATH",
      "service": "app",
      "description": "Music library path inside the consolidated /data volume",
      "secret": false,
      "strategy": "default",
      "default": "/data/music"
    },
    {
      "key": "DB_DATABASE",
      "service": "app",
      "description": "Database name from postgres service",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PASSWORD",
      "service": "app",
      "description": "Database password from postgres service",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_USERNAME",
      "service": "app",
      "description": "Database user from postgres service",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "FORCE_HTTPS",
      "service": "app",
      "description": "Trust Railway TLS termination",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "MEMORY_LIMIT",
      "service": "app",
      "description": "Optional scan memory limit in MB; leave empty for PHP default",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "DB_CONNECTION",
      "service": "app",
      "description": "Must be pgsql for this template's Postgres service",
      "secret": false,
      "strategy": "default",
      "default": "pgsql"
    },
    {
      "key": "LASTFM_API_KEY",
      "service": "app",
      "description": "Optional Last.fm API key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "STREAMING_METHOD",
      "service": "app",
      "description": "Apache x-sendfile; keep for efficient streaming",
      "secret": false,
      "strategy": "default",
      "default": "x-sendfile"
    },
    {
      "key": "LASTFM_API_SECRET",
      "service": "app",
      "description": "Optional Last.fm API secret",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "SPOTIFY_CLIENT_ID",
      "service": "app",
      "description": "Optional Spotify client id for artwork",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "SPOTIFY_CLIENT_SECRET",
      "service": "app",
      "description": "Optional Spotify client secret",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PGDATA",
      "service": "postgres",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "postgres",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "postgres",
      "description": "Port to connect to Postgres.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "postgres",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "postgres",
      "description": "Required variable for the data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "postgres",
      "description": "Required variable for Data panel",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "postgres",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "koel"
    },
    {
      "key": "DATABASE_URL",
      "service": "postgres",
      "description": "URL to connect to Postgres database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "postgres",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "koel"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "postgres",
      "description": "SSL certificate expiry in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Password to connect to DB",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "postgres",
      "description": "Allow Postgres to cleanly shut down",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "koel"
      }
    },
    "cli": "railway deploy --template koel",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "00bc266c-c2e5-449e-b605-7d9c69abb96d",
            "serializedConfig": {
              "services": {
                "054f5995-dcb0-42f0-b3e7-28bdd255aa75": {
                  "icon": "https://raw.githubusercontent.com/osbytes/template-koel/refs/heads/main/assets/logo.svg",
                  "name": "app",
                  "deploy": {
                    "healthcheckPath": "/sw.js"
                  },
                  "source": {
                    "repo": "osbytes/template-koel",
                    "branch": null,
                    "rootDirectory": "/services/app"
                  },
                  "variables": {
                    "APP_ENV": {
                      "description": "Laravel environment",
                      "defaultValue": "production"
                    },
                    "APP_KEY": {
                      "description": "Optional; empty auto-generates on first boot and persists under the /data volume — do not rotate after first deploy if set",
                      "defaultValue": "{{APP_KEY}}"
                    },
                    "APP_URL": {
                      "description": "Public HTTPS origin Koel should generate links for",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DB_HOST": {
                      "description": "Postgres private DNS — not the public URL",
                      "defaultValue": "${{postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DB_PORT": {
                      "description": "Postgres port",
                      "defaultValue": "5432"
                    },
                    "APP_NAME": {
                      "description": "Display name",
                      "defaultValue": "Koel"
                    },
                    "APP_DEBUG": {
                      "description": "Keep false on public Internet",
                      "defaultValue": "false"
                    },
                    "MEDIA_PATH": {
                      "description": "Music library path inside the consolidated /data volume",
                      "defaultValue": "/data/music"
                    },
                    "DB_DATABASE": {
                      "description": "Database name from postgres service",
                      "defaultValue": "${{postgres.POSTGRES_DB}}"
                    },
                    "DB_PASSWORD": {
                      "description": "Database password from postgres service",
                      "defaultValue": "${{postgres.POSTGRES_PASSWORD}}"
                    },
                    "DB_USERNAME": {
                      "description": "Database user from postgres service",
                      "defaultValue": "${{postgres.POSTGRES_USER}}"
                    },
                    "FORCE_HTTPS": {
                      "description": "Trust Railway TLS termination",
                      "defaultValue": "true"
                    },
                    "MEMORY_LIMIT": {
                      "description": "Optional scan memory limit in MB; leave empty for PHP default",
                      "defaultValue": "{{MEMORY_LIMIT}}"
                    },
                    "DB_CONNECTION": {
                      "description": "Must be pgsql for this template's Postgres service",
                      "defaultValue": "pgsql"
                    },
                    "LASTFM_API_KEY": {
                      "description": "Optional Last.fm API key",
                      "defaultValue": "{{LASTFM_API_KEY}}"
                    },
                    "STREAMING_METHOD": {
                      "description": "Apache x-sendfile; keep for efficient streaming",
                      "defaultValue": "x-sendfile"
                    },
                    "LASTFM_API_SECRET": {
                      "description": "Optional Last.fm API secret",
                      "defaultValue": "{{LASTFM_API_SECRET}}"
                    },
                    "SPOTIFY_CLIENT_ID": {
                      "description": "Optional Spotify client id for artwork",
                      "defaultValue": "{{SPOTIFY_CLIENT_ID}}"
                    },
                    "SPOTIFY_CLIENT_SECRET": {
                      "description": "Optional Spotify client secret",
                      "defaultValue": "{{SPOTIFY_CLIENT_SECRET}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:80": {
                        "port": 80
                      }
                    }
                  },
                  "volumeMounts": {
                    "054f5995-dcb0-42f0-b3e7-28bdd255aa75": {
                      "mountPath": "/data"
                    }
                  }
                },
                "3439929b-9e3c-4854-8ed7-116d12660122": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "postgres",
                  "build": {},
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data"
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Postgres.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Required variable for the data panel.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when image is started.",
                      "defaultValue": "koel"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "koel"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to DB",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allow Postgres to cleanly shut down",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {},
                  "volumeMounts": {
                    "3439929b-9e3c-4854-8ed7-116d12660122": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "app",
      "method": "GET",
      "path": "/sw.js",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-08T05:54:19.399Z",
  "generator_version": "0.1.0"
}
