{
  "manifest_version": "1.0.0",
  "template": {
    "id": "ec11f25f-5ed3-42c5-8e70-d65705a5c76d",
    "slug": "libredesk-self-hosted",
    "name": "Libredesk [Updated Sep '26]",
    "description": "Libredesk [Sep '26] (Self-Hosted Zendesk/Intercom Alternative)",
    "url": "https://railway.com/deploy/libredesk-self-hosted",
    "upstream": {
      "image": "libredesk/libredesk:latest"
    }
  },
  "services": [
    {
      "name": "postgres",
      "source": {
        "image": "postgres:17-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "libredesk",
      "source": {
        "image": "libredesk/libredesk:latest"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "postgres",
      "description": "Data directory — a subdirectory of the mount, not the mount root, or initdb fails on the lost+found artifact Railway volumes ship with.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "postgres",
      "description": "Database name.",
      "secret": false,
      "strategy": "default",
      "default": "libredesk"
    },
    {
      "key": "POSTGRES_USER",
      "service": "postgres",
      "description": "Database user Libredesk connects as.",
      "secret": false,
      "strategy": "default",
      "default": "libredesk"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Database password. Auto-generated per deploy.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "libredesk",
      "description": "HTTP port the app listens on. Matches the service's public domain target port.",
      "secret": false,
      "strategy": "default",
      "default": "9000"
    },
    {
      "key": "LIBREDESK_APP__ENV",
      "service": "libredesk",
      "description": "Environment mode — prod disables the dev-only color logging.",
      "secret": false,
      "strategy": "default",
      "default": "prod"
    },
    {
      "key": "LIBREDESK_DB__HOST",
      "service": "libredesk",
      "description": "Postgres private hostname.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "LIBREDESK_DB__PORT",
      "service": "libredesk",
      "description": "Postgres port.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "LIBREDESK_DB__USER",
      "service": "libredesk",
      "description": "Postgres user.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LIBREDESK_REDIS__URL",
      "service": "libredesk",
      "description": "Redis connection DSN. Overrides all other Redis config keys — do not also set LIBREDESK_REDIS__ADDRESS/LIBREDESK_REDIS__PASSWORD, they're a red herring from config.sample.toml that this build initially (wrongly) used.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LIBREDESK_DB__DATABASE",
      "service": "libredesk",
      "description": "Postgres database name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LIBREDESK_DB__PASSWORD",
      "service": "libredesk",
      "description": "Postgres password.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LIBREDESK_DB__SSL_MODE",
      "service": "libredesk",
      "description": "SSL mode for the DB connection — Railway's private network doesn't need Postgres SSL.",
      "secret": false,
      "strategy": "default",
      "default": "disable"
    },
    {
      "key": "LIBREDESK_APP__ENCRYPTION_KEY",
      "service": "libredesk",
      "description": "32-character hex encryption key for stored secrets. Auto-generate — never leave the image's baked-in placeholder (your-32-char-random-string-here!) in place.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LIBREDESK_SYSTEM_USER_PASSWORD",
      "service": "libredesk",
      "description": "Login password for the initial admin (System) account. Confirmed live: a password missing a special character makes install fail silently, and the app then logs a misleading database tables are missing error on the next boot, not a password-complexity warning. Save it — it isn't recoverable from the dashboard.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDISHOST",
      "service": "redis",
      "description": "Redis's private network hostname, for services that need it directly instead of the full URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "redis",
      "description": "Redis port.",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "redis",
      "description": "Redis username — default, since this is a plain --requirepass setup, not Redis ACLs.",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "redis",
      "description": "Full connection DSN — this is what libredesk's LIBREDESK_REDIS__URL references.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "redis",
      "description": "Same password, exposed under Railway's conventional Redis variable naming for services that expect it.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "redis",
      "description": "Auth password Redis is started with (--requirepass). Auto-generated.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "libredesk-self-hosted"
      }
    },
    "cli": "railway deploy --template libredesk-self-hosted",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "ec11f25f-5ed3-42c5-8e70-d65705a5c76d",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "4a0f6a3f-6250-476f-a0f2-f5289b1043de": {
                  "icon": "https://devicons.railway.com/i/postgresql.svg",
                  "name": "postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:17-alpine"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data directory — a subdirectory of the mount, not the mount root, or initdb fails on the lost+found artifact Railway volumes ship with.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database name.",
                      "defaultValue": "libredesk"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database user Libredesk connects as.",
                      "defaultValue": "libredesk"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Database password. Auto-generated per deploy.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "4a0f6a3f-6250-476f-a0f2-f5289b1043de": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "d755d28b-8459-4fb8-b375-bae127351f19": {
                  "icon": "https://libredesk.io/favicon.ico",
                  "name": "libredesk",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"(./libredesk --install --idempotent-install --yes || true) && (./libredesk --upgrade --yes || true) && exec ./libredesk\"",
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "libredesk/libredesk:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port the app listens on. Matches the service's public domain target port.",
                      "defaultValue": "9000"
                    },
                    "LIBREDESK_APP__ENV": {
                      "isOptional": false,
                      "description": "Environment mode — prod disables the dev-only color logging.",
                      "defaultValue": "prod"
                    },
                    "LIBREDESK_DB__HOST": {
                      "isOptional": false,
                      "description": "Postgres private hostname.",
                      "defaultValue": "${{postgres.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "LIBREDESK_DB__PORT": {
                      "isOptional": false,
                      "description": "Postgres port.",
                      "defaultValue": "5432"
                    },
                    "LIBREDESK_DB__USER": {
                      "isOptional": false,
                      "description": "Postgres user.",
                      "defaultValue": "${{postgres.POSTGRES_USER}}"
                    },
                    "LIBREDESK_REDIS__URL": {
                      "isOptional": false,
                      "description": "Redis connection DSN. Overrides all other Redis config keys — do not also set LIBREDESK_REDIS__ADDRESS/LIBREDESK_REDIS__PASSWORD, they're a red herring from config.sample.toml that this build initially (wrongly) used.",
                      "defaultValue": "${{redis.REDIS_URL}}"
                    },
                    "LIBREDESK_DB__DATABASE": {
                      "isOptional": false,
                      "description": "Postgres database name.",
                      "defaultValue": "${{postgres.POSTGRES_DB}}"
                    },
                    "LIBREDESK_DB__PASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password.",
                      "defaultValue": "${{postgres.POSTGRES_PASSWORD}}"
                    },
                    "LIBREDESK_DB__SSL_MODE": {
                      "isOptional": false,
                      "description": "SSL mode for the DB connection — Railway's private network doesn't need Postgres SSL.",
                      "defaultValue": "disable"
                    },
                    "LIBREDESK_APP__ENCRYPTION_KEY": {
                      "isOptional": false,
                      "description": "32-character hex encryption key for stored secrets. Auto-generate — never leave the image's baked-in placeholder (your-32-char-random-string-here!) in place.",
                      "defaultValue": "{{LIBREDESK_APP__ENCRYPTION_KEY}}"
                    },
                    "LIBREDESK_SYSTEM_USER_PASSWORD": {
                      "isOptional": false,
                      "description": "Login password for the initial admin (System) account. Confirmed live: a password missing a special character makes install fail silently, and the app then logs a misleading database tables are missing error on the next boot, not a password-complexity warning. Save it — it isn't recoverable from the dashboard.",
                      "defaultValue": "{{LIBREDESK_SYSTEM_USER_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:9000": {
                        "port": 9000
                      }
                    }
                  }
                },
                "d85886b9-1ed0-464a-9081-d01318a7fb66": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "redis",
                  "deploy": {
                    "startCommand": "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.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Redis's private network hostname, for services that need it directly instead of the full URL.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Redis port.",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Redis username — default, since this is a plain --requirepass setup, not Redis ACLs.",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Full connection DSN — this is what libredesk's LIBREDESK_REDIS__URL references.",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Same password, exposed under Railway's conventional Redis variable naming for services that expect it.",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Auth password Redis is started with (--requirepass). Auto-generated.",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "d85886b9-1ed0-464a-9081-d01318a7fb66": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "libredesk",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-08T18:46:46.960Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-08T18:00:26.937Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_1a4343f0af6447088600",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "SUCCESS,SUCCESS,FAILED"
      }
    ]
  }
}
