{
  "manifest_version": "1.0.0",
  "template": {
    "id": "bd3daab9-c8f5-4e15-9d59-fd6ec09c856e",
    "slug": "librephotos",
    "name": "LibrePhotos",
    "description": "Self-hosted Google Photos alternative with face recognition and search",
    "url": "https://railway.com/deploy/librephotos",
    "upstream": {
      "image": "reallibrephotos/librephotos-unified:1.4.0"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "librephotos-unified",
      "source": {
        "image": "reallibrephotos/librephotos-unified:1.4.0"
      },
      "needs_volume": true,
      "volume_mount_path": "/librephotos",
      "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": "DB_HOST",
      "service": "librephotos-unified",
      "description": "Postgres host on Railway's private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_NAME",
      "service": "librephotos-unified",
      "description": "Database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PASS",
      "service": "librephotos-unified",
      "description": "Database password",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PORT",
      "service": "librephotos-unified",
      "description": "Postgres port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_USER",
      "service": "librephotos-unified",
      "description": "Database user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BASE_DATA",
      "service": "librephotos-unified",
      "description": "Photos go to /librephotos/data and thumbnails to /librephotos/protected_media",
      "secret": false,
      "strategy": "default",
      "default": "/librephotos"
    },
    {
      "key": "BASE_LOGS",
      "service": "librephotos-unified",
      "description": "Log files on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/librephotos/logs"
    },
    {
      "key": "DB_BACKEND",
      "service": "librephotos-unified",
      "description": "Use the Railway Postgres service",
      "secret": false,
      "strategy": "default",
      "default": "postgresql"
    },
    {
      "key": "SECRET_KEY",
      "service": "librephotos-unified",
      "description": "Django secret key, generated randomly per deploy",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ADMIN_EMAIL",
      "service": "librephotos-unified",
      "description": "Optional admin email",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "ALLOW_UPLOAD",
      "service": "librephotos-unified",
      "description": "Lets users upload photos from the browser",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ADMIN_PASSWORD",
      "service": "librephotos-unified",
      "description": "Admin password, also reset to this value on every start",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "ADMIN_USERNAME",
      "service": "librephotos-unified",
      "description": "Admin account created on first start",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "SERVE_FRONTEND",
      "service": "librephotos-unified",
      "description": "Serve the web app from Django, required for the single-container image",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "XDG_CACHE_HOME",
      "service": "librephotos-unified",
      "description": "Keeps downloaded model caches on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/librephotos/cache"
    },
    {
      "key": "FRONTEND_BASE_URL",
      "service": "librephotos-unified",
      "description": "Public URL used in links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "WORKER_CONCURRENCY",
      "service": "librephotos-unified",
      "description": "Background workers for scanning and ML jobs; the default is one per CPU core, which uses a lot of memory on Railway",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "CSRF_TRUSTED_ORIGINS",
      "service": "librephotos-unified",
      "description": "Required for logins and forms over HTTPS",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data directory inside the volume; Postgres needs a subfolder, not the volume root",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Host on Railway's private network, used by other services in the project",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Port Postgres listens on",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Username for connecting, mirrors POSTGRES_USER",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Database name for connecting, mirrors POSTGRES_DB",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Password for connecting, mirrors POSTGRES_PASSWORD",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first start",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Full connection string over the private network",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first start",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Validity in days of the self-signed SSL certificate Postgres generates",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Superuser password, 32 random letters generated per deploy",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Seconds Railway waits after stopping the old deployment, so Postgres can shut down cleanly",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "librephotos"
      }
    },
    "cli": "railway deploy --template librephotos",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "bd3daab9-c8f5-4e15-9d59-fd6ec09c856e",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "3bfb77a2-5984-4c0e-9d05-772cad7e7620": {
                  "icon": null,
                  "name": "librephotos-unified",
                  "deploy": {
                    "startCommand": "sh -c \"mkdir -p /librephotos/data && exec /entrypoint.sh\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "reallibrephotos/librephotos-unified:1.4.0"
                  },
                  "variables": {
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "Postgres host on Railway's private network",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "DB_NAME": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "DB_PASS": {
                      "isOptional": false,
                      "description": "Database password",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "Postgres port",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "DB_USER": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "BASE_DATA": {
                      "isOptional": false,
                      "description": "Photos go to /librephotos/data and thumbnails to /librephotos/protected_media",
                      "defaultValue": "/librephotos"
                    },
                    "BASE_LOGS": {
                      "isOptional": false,
                      "description": "Log files on the volume",
                      "defaultValue": "/librephotos/logs"
                    },
                    "DB_BACKEND": {
                      "isOptional": false,
                      "description": "Use the Railway Postgres service",
                      "defaultValue": "postgresql"
                    },
                    "SECRET_KEY": {
                      "isOptional": false,
                      "description": "Django secret key, generated randomly per deploy",
                      "defaultValue": "{{SECRET_KEY}}"
                    },
                    "ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Optional admin email",
                      "defaultValue": "{{ADMIN_EMAIL}}"
                    },
                    "ALLOW_UPLOAD": {
                      "isOptional": false,
                      "description": "Lets users upload photos from the browser",
                      "defaultValue": "true"
                    },
                    "ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Admin password, also reset to this value on every start",
                      "defaultValue": "{{ADMIN_PASSWORD}}"
                    },
                    "ADMIN_USERNAME": {
                      "isOptional": false,
                      "description": "Admin account created on first start",
                      "defaultValue": "admin"
                    },
                    "SERVE_FRONTEND": {
                      "isOptional": false,
                      "description": "Serve the web app from Django, required for the single-container image",
                      "defaultValue": "true"
                    },
                    "XDG_CACHE_HOME": {
                      "isOptional": false,
                      "description": "Keeps downloaded model caches on the volume",
                      "defaultValue": "/librephotos/cache"
                    },
                    "FRONTEND_BASE_URL": {
                      "isOptional": false,
                      "description": "Public URL used in links",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "WORKER_CONCURRENCY": {
                      "isOptional": false,
                      "description": "Background workers for scanning and ML jobs; the default is one per CPU core, which uses a lot of memory on Railway",
                      "defaultValue": "2"
                    },
                    "CSRF_TRUSTED_ORIGINS": {
                      "isOptional": false,
                      "description": "Required for logins and forms over HTTPS",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8001": {
                        "port": 8001
                      }
                    }
                  },
                  "volumeMounts": {
                    "3bfb77a2-5984-4c0e-9d05-772cad7e7620": {
                      "mountPath": "/librephotos"
                    }
                  }
                },
                "fb4e67b4-9787-48f0-8547-df182b4782ca": {
                  "icon": "https://devicons.railway.app/i/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": "Data directory inside the volume; Postgres needs a subfolder, not the volume root",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Host on Railway's private network, used by other services in the project",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port Postgres listens on",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Username for connecting, mirrors POSTGRES_USER",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Database name for connecting, mirrors POSTGRES_DB",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Password for connecting, mirrors POSTGRES_PASSWORD",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first start",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Full connection string over the private network",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first start",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Validity in days of the self-signed SSL certificate Postgres generates",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password, 32 random letters generated per deploy",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Seconds Railway waits after stopping the old deployment, so Postgres can shut down cleanly",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "fb4e67b4-9787-48f0-8547-df182b4782ca": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-10-24T16:14:47.264Z",
  "generator_version": "0.1.0"
}
