{
  "manifest_version": "1.0.0",
  "template": {
    "id": "701a9ec7-bd39-4aea-8b6a-d1bc4f98b3c5",
    "slug": "lychee-photos",
    "name": "Lychee",
    "description": "Flickr Alternative. Photo gallery app for organising & sharing your images",
    "url": "https://railway.com/deploy/lychee-photos",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/lychee-railway"
    }
  },
  "services": [
    {
      "name": "lychee",
      "source": {
        "repo": "https://github.com/gridalpha/lychee-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/app/public/uploads",
      "http": true
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "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": "PORT",
      "service": "lychee",
      "description": "HTTP server listening port",
      "secret": false,
      "strategy": "default",
      "default": "8000"
    },
    {
      "key": "APP_ENV",
      "service": "lychee",
      "description": "Laravel environment",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "APP_URL",
      "service": "lychee",
      "description": "Public base URL for image and share links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DB_HOST",
      "service": "lychee",
      "description": "Postgres private hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PORT",
      "service": "lychee",
      "description": "Postgres port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "APP_NAME",
      "service": "lychee",
      "description": "Site name shown in the interface",
      "secret": false,
      "strategy": "default",
      "default": "Lychee"
    },
    {
      "key": "APP_DEBUG",
      "service": "lychee",
      "description": "Keep debug output off in production",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "ADMIN_USER",
      "service": "lychee",
      "description": "First administrator username",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "REDIS_HOST",
      "service": "lychee",
      "description": "Redis private hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PORT",
      "service": "lychee",
      "description": "Redis port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_DATABASE",
      "service": "lychee",
      "description": "Postgres database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PASSWORD",
      "service": "lychee",
      "description": "Postgres password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_USERNAME",
      "service": "lychee",
      "description": "Postgres username",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "APP_TIMEZONE",
      "service": "lychee",
      "description": "Application timezone",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "CACHE_DRIVER",
      "service": "lychee",
      "description": "Lychee reads CACHE_DRIVER, not CACHE_STORE",
      "secret": false,
      "strategy": "default",
      "default": "redis"
    },
    {
      "key": "DB_CONNECTION",
      "service": "lychee",
      "description": "Database driver",
      "secret": false,
      "strategy": "default",
      "default": "pgsql"
    },
    {
      "key": "ADMIN_PASSWORD",
      "service": "lychee",
      "description": "First administrator password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "lychee",
      "description": "Redis auth password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "SESSION_DRIVER",
      "service": "lychee",
      "description": "Sessions survive container recreation",
      "secret": false,
      "strategy": "default",
      "default": "redis"
    },
    {
      "key": "APP_FORCE_HTTPS",
      "service": "lychee",
      "description": "Generate https URLs behind the proxy",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "TRUSTED_PROXIES",
      "service": "lychee",
      "description": "Read the real client IP behind the edge",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0/0,::/0"
    },
    {
      "key": "QUEUE_CONNECTION",
      "service": "lychee",
      "description": "Background job queue backend",
      "secret": false,
      "strategy": "default",
      "default": "database"
    },
    {
      "key": "SESSION_LIFETIME",
      "service": "lychee",
      "description": "Session lifetime in minutes",
      "secret": false,
      "strategy": "default",
      "default": "120"
    },
    {
      "key": "LYCHEE_APP_SECRET",
      "service": "lychee",
      "description": "Source of the derived encryption key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LYCHEE_INLINE_WORKER",
      "service": "lychee",
      "description": "Run the queue worker beside the web server",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "SESSION_SECURE_COOKIE",
      "service": "lychee",
      "description": "Send the session cookie over HTTPS only",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "lychee",
      "description": "Dockerfile location in the repo",
      "secret": false,
      "strategy": "default",
      "default": "Dockerfile"
    },
    {
      "key": "SKIP_PERMISSIONS_CHECKS",
      "service": "lychee",
      "description": "Skip the slow boot-time ownership pass",
      "secret": false,
      "strategy": "default",
      "default": "yes"
    },
    {
      "key": "SECURITY_HEADER_HSTS_ENABLE",
      "service": "lychee",
      "description": "Send Strict-Transport-Security",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Auth password, read by the server",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "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"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "lychee-photos"
      }
    },
    "cli": "railway deploy --template lychee-photos",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "701a9ec7-bd39-4aea-8b6a-d1bc4f98b3c5",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "37da91f3-81d6-4432-a06b-d173f93e1597": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/lychee.png",
                  "name": "lychee",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/lychee-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP server listening port",
                      "defaultValue": "8000"
                    },
                    "APP_ENV": {
                      "isOptional": false,
                      "description": "Laravel environment",
                      "defaultValue": "production"
                    },
                    "APP_URL": {
                      "isOptional": false,
                      "description": "Public base URL for image and share links",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "Postgres private hostname",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "Postgres port",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "APP_NAME": {
                      "isOptional": false,
                      "description": "Site name shown in the interface",
                      "defaultValue": "Lychee"
                    },
                    "APP_DEBUG": {
                      "isOptional": false,
                      "description": "Keep debug output off in production",
                      "defaultValue": "false"
                    },
                    "ADMIN_USER": {
                      "isOptional": false,
                      "description": "First administrator username",
                      "defaultValue": "admin"
                    },
                    "REDIS_HOST": {
                      "isOptional": false,
                      "description": "Redis private hostname",
                      "defaultValue": "${{Redis.REDISHOST}}"
                    },
                    "REDIS_PORT": {
                      "isOptional": false,
                      "description": "Redis port",
                      "defaultValue": "${{Redis.REDISPORT}}"
                    },
                    "DB_DATABASE": {
                      "isOptional": false,
                      "description": "Postgres database name",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "DB_PASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "DB_USERNAME": {
                      "isOptional": false,
                      "description": "Postgres username",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "APP_TIMEZONE": {
                      "isOptional": false,
                      "description": "Application timezone",
                      "defaultValue": "UTC"
                    },
                    "CACHE_DRIVER": {
                      "isOptional": false,
                      "description": "Lychee reads CACHE_DRIVER, not CACHE_STORE",
                      "defaultValue": "redis"
                    },
                    "DB_CONNECTION": {
                      "isOptional": false,
                      "description": "Database driver",
                      "defaultValue": "pgsql"
                    },
                    "ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "First administrator password",
                      "defaultValue": "{{ADMIN_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Redis auth password",
                      "defaultValue": "${{Redis.REDISPASSWORD}}"
                    },
                    "SESSION_DRIVER": {
                      "isOptional": false,
                      "description": "Sessions survive container recreation",
                      "defaultValue": "redis"
                    },
                    "APP_FORCE_HTTPS": {
                      "isOptional": false,
                      "description": "Generate https URLs behind the proxy",
                      "defaultValue": "true"
                    },
                    "TRUSTED_PROXIES": {
                      "isOptional": false,
                      "description": "Read the real client IP behind the edge",
                      "defaultValue": "0.0.0.0/0,::/0"
                    },
                    "QUEUE_CONNECTION": {
                      "isOptional": false,
                      "description": "Background job queue backend",
                      "defaultValue": "database"
                    },
                    "SESSION_LIFETIME": {
                      "isOptional": false,
                      "description": "Session lifetime in minutes",
                      "defaultValue": "120"
                    },
                    "LYCHEE_APP_SECRET": {
                      "isOptional": false,
                      "description": "Source of the derived encryption key",
                      "defaultValue": "{{LYCHEE_APP_SECRET}}"
                    },
                    "LYCHEE_INLINE_WORKER": {
                      "isOptional": false,
                      "description": "Run the queue worker beside the web server",
                      "defaultValue": "true"
                    },
                    "SESSION_SECURE_COOKIE": {
                      "isOptional": false,
                      "description": "Send the session cookie over HTTPS only",
                      "defaultValue": "true"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Dockerfile location in the repo",
                      "defaultValue": "Dockerfile"
                    },
                    "SKIP_PERMISSIONS_CHECKS": {
                      "isOptional": false,
                      "description": "Skip the slow boot-time ownership pass",
                      "defaultValue": "yes"
                    },
                    "SECURITY_HEADER_HSTS_ENABLE": {
                      "isOptional": false,
                      "description": "Send Strict-Transport-Security",
                      "defaultValue": "true"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8000": {
                        "port": 8000
                      }
                    }
                  },
                  "volumeMounts": {
                    "37da91f3-81d6-4432-a06b-d173f93e1597": {
                      "mountPath": "/app/public/uploads"
                    }
                  }
                },
                "52c269e1-8a10-4b01-a811-f58cd73a6c09": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/redis.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Auth password, read by the server",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "52c269e1-8a10-4b01-a811-f58cd73a6c09": {
                      "mountPath": "/data"
                    }
                  }
                },
                "c6f075e7-7c9f-475e-b712-e05d5346779d": {
                  "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": {
                    "c6f075e7-7c9f-475e-b712-e05d5346779d": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T16:20:01.653Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_4762defa106e48acb9af",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 159,
    "typical_build_seconds": 72,
    "typical_start_seconds": 15,
    "slowest_service": "lychee"
  }
}
