{
  "manifest_version": "1.0.0",
  "template": {
    "id": "7e9083c3-7059-4b9e-a941-d9d3df70bc87",
    "slug": "immich-with-machine-learning",
    "name": "Immich with Machine Learning",
    "description": "Photo backup with matching CPU machine learning and persistent storage.",
    "url": "https://railway.com/deploy/immich-with-machine-learning",
    "upstream": {
      "repo_url": "https://github.com/orenaksakal/railway-templates"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "immich",
      "source": {
        "repo": "https://github.com/orenaksakal/railway-templates"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "redis",
      "source": {
        "image": "redis:7.4@sha256:71da9275c5f3fcb97d0fa0c8c5b36cc995327265420f17a04bfd544f458059f7"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "machine-learning",
      "source": {
        "image": "ghcr.io/immich-app/immich-machine-learning:v3.1.0@sha256:5a0839dc5303cd7215bcd2180a26aed3af41675aefb3e75e5157e9f10ad16e6e"
      },
      "needs_volume": true,
      "volume_mount_path": "/cache",
      "http": false
    },
    {
      "name": "postgres",
      "source": {
        "image": "ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "immich",
      "description": "HTTP port inside this service. Keep the default to match its Railway public port and health check.",
      "secret": false,
      "strategy": "default",
      "default": "2283"
    },
    {
      "key": "DB_PORT",
      "service": "immich",
      "description": "Db port for immich. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "REDIS_PORT",
      "service": "immich",
      "description": "Private Redis/Valkey port. Keep 6379.",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "DB_HOSTNAME",
      "service": "immich",
      "description": "Db hostname resolved automatically from the linked service. Keep this reference when using the included topology.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DB_PASSWORD",
      "service": "immich",
      "description": "Db password resolved automatically from the linked service. Keep this reference when using the included topology.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_USERNAME",
      "service": "immich",
      "description": "Db username for immich. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "immich"
    },
    {
      "key": "REDIS_HOSTNAME",
      "service": "immich",
      "description": "Redis hostname resolved automatically from the linked service. Keep this reference when using the included topology.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "immich",
      "description": "Generated private Redis/Valkey password, or a reference to that password. Keep secret.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_DATABASE_NAME",
      "service": "immich",
      "description": "Db database name for immich. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "immich"
    },
    {
      "key": "IMMICH_CONFIG_FILE",
      "service": "immich",
      "description": "Generated at startup to configure the private machine-learning service.",
      "secret": false,
      "strategy": "default",
      "default": "/tmp/immich-config.json"
    },
    {
      "key": "MACHINE_LEARNING_URL",
      "service": "immich",
      "description": "Machine learning url resolved automatically from the linked service. Keep this reference when using the included topology.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "immich",
      "description": "Repository-relative Dockerfile used to build this service. Keep the supplied path.",
      "secret": false,
      "strategy": "default",
      "default": "templates/immich/Dockerfile"
    },
    {
      "key": "IMMICH_TELEMETRY_INCLUDE",
      "service": "immich",
      "description": "Empty selection disables telemetry collection.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "REDIS_URL",
      "service": "redis",
      "description": "Private authenticated Redis/Valkey connection URL. Automatically assembled from service references.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "redis",
      "description": "Generated private Redis/Valkey password, or a reference to that password. Keep secret.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MACHINE_LEARNING_WORKERS",
      "service": "machine-learning",
      "description": "One CPU inference worker initially. No GPU is configured.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "PGDATA",
      "service": "postgres",
      "description": "PostgreSQL data directory within the persistent volume. Do not change on an existing database.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "postgres",
      "description": "Initial PostgreSQL database name, or the matching database selected by the application.",
      "secret": false,
      "strategy": "default",
      "default": "immich"
    },
    {
      "key": "DATABASE_URL",
      "service": "postgres",
      "description": "Private PostgreSQL connection URL assembled from generated credentials and service references. No manual value is needed.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "postgres",
      "description": "PostgreSQL initialization user, or the matching connection user for the private database.",
      "secret": false,
      "strategy": "default",
      "default": "immich"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "PostgreSQL password. Generated for the database and referenced by dependent services; keep private.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "POSTGRES_INITDB_ARGS",
      "service": "postgres",
      "description": "Initialization options applied only to an empty database volume. Keep locale and encoding compatible with the application.",
      "secret": false,
      "strategy": "default",
      "default": "--data-checksums"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "immich-with-machine-learning"
      }
    },
    "cli": "railway deploy --template immich-with-machine-learning",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "7e9083c3-7059-4b9e-a941-d9d3df70bc87",
            "serializedConfig": {
              "services": {
                "06c143b7-cf95-5e8c-a03d-45a0a425985a": {
                  "name": "immich",
                  "build": {
                    "builder": "RAILPACK",
                    "dockerfilePath": "templates/immich/Dockerfile"
                  },
                  "deploy": {
                    "healthcheckPath": "/api/server/ping",
                    "requiredMountPath": "/data",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 600,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "orenaksakal/railway-templates",
                    "branch": "codex/remaining-template-drafts"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port inside this service. Keep the default to match its Railway public port and health check.",
                      "defaultValue": "2283"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "Db port for immich. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "5432"
                    },
                    "REDIS_PORT": {
                      "isOptional": false,
                      "description": "Private Redis/Valkey port. Keep 6379.",
                      "defaultValue": "6379"
                    },
                    "DB_HOSTNAME": {
                      "isOptional": false,
                      "description": "Db hostname resolved automatically from the linked service. Keep this reference when using the included topology.",
                      "defaultValue": "${{postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "DB_PASSWORD": {
                      "isOptional": false,
                      "description": "Db password resolved automatically from the linked service. Keep this reference when using the included topology.",
                      "defaultValue": "${{postgres.POSTGRES_PASSWORD}}"
                    },
                    "DB_USERNAME": {
                      "isOptional": false,
                      "description": "Db username for immich. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "immich"
                    },
                    "REDIS_HOSTNAME": {
                      "isOptional": false,
                      "description": "Redis hostname resolved automatically from the linked service. Keep this reference when using the included topology.",
                      "defaultValue": "${{redis.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated private Redis/Valkey password, or a reference to that password. Keep secret.",
                      "defaultValue": "${{redis.REDIS_PASSWORD}}"
                    },
                    "DB_DATABASE_NAME": {
                      "isOptional": false,
                      "description": "Db database name for immich. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "immich"
                    },
                    "IMMICH_CONFIG_FILE": {
                      "isOptional": false,
                      "description": "Generated at startup to configure the private machine-learning service.",
                      "defaultValue": "/tmp/immich-config.json"
                    },
                    "MACHINE_LEARNING_URL": {
                      "isOptional": false,
                      "description": "Machine learning url resolved automatically from the linked service. Keep this reference when using the included topology.",
                      "defaultValue": "http://${{machine-learning.RAILWAY_PRIVATE_DOMAIN}}:3003"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Repository-relative Dockerfile used to build this service. Keep the supplied path.",
                      "defaultValue": "templates/immich/Dockerfile"
                    },
                    "IMMICH_TELEMETRY_INCLUDE": {
                      "isOptional": false,
                      "description": "Empty selection disables telemetry collection.",
                      "defaultValue": "{{IMMICH_TELEMETRY_INCLUDE}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:2283": {
                        "port": 2283
                      }
                    }
                  },
                  "volumeMounts": {
                    "9cd8664a-cb42-50cd-9c9a-e4db995d3070": {
                      "mountPath": "/data"
                    }
                  }
                },
                "26d70d8e-32c2-53bf-9377-90a767d8eb8d": {
                  "name": "redis",
                  "deploy": {
                    "startCommand": "sh -c 'exec redis-server --bind 0.0.0.0 :: --appendonly yes --maxmemory-policy noeviction --requirepass \"$REDIS_PASSWORD\"'",
                    "requiredMountPath": "/data",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:7.4@sha256:71da9275c5f3fcb97d0fa0c8c5b36cc995327265420f17a04bfd544f458059f7"
                  },
                  "variables": {
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Private authenticated Redis/Valkey connection URL. Automatically assembled from service references.",
                      "defaultValue": "redis://:${{redis.REDIS_PASSWORD}}@${{redis.RAILWAY_PRIVATE_DOMAIN}}:6379"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated private Redis/Valkey password, or a reference to that password. Keep secret.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "623ea7a2-1826-5278-87cc-fb0123bbac1d": {
                      "mountPath": "/data"
                    }
                  }
                },
                "a0926b65-597e-558b-a828-e46ed9260fab": {
                  "name": "machine-learning",
                  "deploy": {
                    "requiredMountPath": "/cache",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/immich-app/immich-machine-learning:v3.1.0@sha256:5a0839dc5303cd7215bcd2180a26aed3af41675aefb3e75e5157e9f10ad16e6e"
                  },
                  "variables": {
                    "MACHINE_LEARNING_WORKERS": {
                      "isOptional": false,
                      "description": "One CPU inference worker initially. No GPU is configured.",
                      "defaultValue": "1"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "467259e6-981d-5632-9bbc-2d64e12dd3cf": {
                      "mountPath": "/cache"
                    }
                  }
                },
                "e9ceba82-d4e9-526d-bb11-601b3c438620": {
                  "name": "postgres",
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "PostgreSQL data directory within the persistent volume. Do not change on an existing database.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Initial PostgreSQL database name, or the matching database selected by the application.",
                      "defaultValue": "immich"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private PostgreSQL connection URL assembled from generated credentials and service references. No manual value is needed.",
                      "defaultValue": "postgresql://immich:${{postgres.POSTGRES_PASSWORD}}@${{postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/immich"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "PostgreSQL initialization user, or the matching connection user for the private database.",
                      "defaultValue": "immich"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "PostgreSQL password. Generated for the database and referenced by dependent services; keep private.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_INITDB_ARGS": {
                      "isOptional": false,
                      "description": "Initialization options applied only to an empty database volume. Keep locale and encoding compatible with the application.",
                      "defaultValue": "--data-checksums"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "fce22db3-b075-5a94-ba1f-d1525bbeaff1": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "immich",
      "method": "GET",
      "path": "/api/server/ping",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-08T05:54:19.399Z",
  "generator_version": "0.1.0"
}
