{
  "manifest_version": "1.0.0",
  "template": {
    "id": "c0d2f921-9cc0-44b0-acc3-74fb2e6370d8",
    "slug": "libredesk-helpdesk",
    "name": "LibreDesk",
    "description": "Customer support desk with live chat, email and a shared inbox",
    "url": "https://railway.com/deploy/libredesk-helpdesk",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/libredesk-railway"
    }
  },
  "services": [
    {
      "name": "libredesk-web",
      "source": {
        "repo": "https://github.com/gridalpha/libredesk-railway"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "libredesk",
      "source": {
        "repo": "https://github.com/gridalpha/libredesk-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/libredesk/uploads",
      "http": false
    },
    {
      "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
    },
    {
      "name": "mailpit",
      "source": {
        "image": "axllent/mailpit:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "libredesk-web",
      "description": "Public HTTP port for the edge",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "APP_UPSTREAM",
      "service": "libredesk-web",
      "description": "Private app address proxied to",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "libredesk-web",
      "description": "Selects the Caddy image in the repo",
      "secret": false,
      "strategy": "default",
      "default": "gateway/Dockerfile"
    },
    {
      "key": "PORT",
      "service": "libredesk",
      "description": "HTTP port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "9000"
    },
    {
      "key": "SMTP_HOST",
      "service": "libredesk",
      "description": "Notification mail host, seeded once",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "SMTP_PORT",
      "service": "libredesk",
      "description": "Mailpit plain SMTP listener",
      "secret": false,
      "strategy": "default",
      "default": "1025"
    },
    {
      "key": "APP_ROOT_URL",
      "service": "libredesk",
      "description": "Public base URL seeded at boot",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "DATABASE_URL",
      "service": "libredesk",
      "description": "Used by the boot script only",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LIBREDESK_app__env",
      "service": "libredesk",
      "description": "Disables dev colour logging",
      "secret": false,
      "strategy": "default",
      "default": "prod"
    },
    {
      "key": "LIBREDESK_db__host",
      "service": "libredesk",
      "description": "Postgres private host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LIBREDESK_db__port",
      "service": "libredesk",
      "description": "Postgres port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "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": "Sessions and rate-limit counters",
      "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": "Encrypts without chain verification",
      "secret": false,
      "strategy": "default",
      "default": "require"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "libredesk",
      "description": "Selects the app image in the repo",
      "secret": false,
      "strategy": "default",
      "default": "app/Dockerfile"
    },
    {
      "key": "LIBREDESK_app__log_level",
      "service": "libredesk",
      "description": "Log verbosity",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "LIBREDESK_app__encryption_key",
      "service": "libredesk",
      "description": "32-char key encrypting stored secrets",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LIBREDESK_SYSTEM_USER_PASSWORD",
      "service": "libredesk",
      "description": "Owner password, 10-72 chars with symbol; required",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "libredesk",
      "description": "Clean shutdown window for workers",
      "secret": false,
      "strategy": "default",
      "default": "15"
    },
    {
      "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"
    },
    {
      "key": "PORT",
      "service": "mailpit",
      "description": "Web inbox port",
      "secret": false,
      "strategy": "default",
      "default": "8025"
    },
    {
      "key": "MP_UI_AUTH",
      "service": "mailpit",
      "description": "user:password guarding the inbox",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MP_DATABASE",
      "service": "mailpit",
      "description": "Message store on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/data/mailpit.db"
    },
    {
      "key": "MP_MAX_MESSAGES",
      "service": "mailpit",
      "description": "Messages retained before rotation",
      "secret": false,
      "strategy": "default",
      "default": "5000"
    },
    {
      "key": "MP_UI_BIND_ADDR",
      "service": "mailpit",
      "description": "Web listener, dual-stack",
      "secret": false,
      "strategy": "default",
      "default": "[::]:8025"
    },
    {
      "key": "MP_SMTP_BIND_ADDR",
      "service": "mailpit",
      "description": "SMTP listener, dual-stack",
      "secret": false,
      "strategy": "default",
      "default": "[::]:1025"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "libredesk-helpdesk"
      }
    },
    "cli": "railway deploy --template libredesk-helpdesk",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "c0d2f921-9cc0-44b0-acc3-74fb2e6370d8",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "3f27d4f8-25b3-43f5-9689-4f4b50160d0d": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/caddy.svg",
                  "name": "libredesk-web",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/libredesk-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Public HTTP port for the edge",
                      "defaultValue": "8080"
                    },
                    "APP_UPSTREAM": {
                      "isOptional": false,
                      "description": "Private app address proxied to",
                      "defaultValue": "${{libredesk.RAILWAY_PRIVATE_DOMAIN}}:9000"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Selects the Caddy image in the repo",
                      "defaultValue": "gateway/Dockerfile"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                },
                "7ed0d8fe-1750-4bd0-8a9c-0441ed19d053": {
                  "icon": "https://raw.githubusercontent.com/abhinavxd/libredesk/main/static/public/launcher-logo.png",
                  "name": "libredesk",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/libredesk-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port Railway health-checks",
                      "defaultValue": "9000"
                    },
                    "SMTP_FROM": {
                      "isOptional": true,
                      "description": "Optional From address; defaults from APP_ROOT_URL",
                      "defaultValue": ""
                    },
                    "SMTP_HOST": {
                      "isOptional": false,
                      "description": "Notification mail host, seeded once",
                      "defaultValue": "${{mailpit.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "SMTP_PORT": {
                      "isOptional": false,
                      "description": "Mailpit plain SMTP listener",
                      "defaultValue": "1025"
                    },
                    "APP_ROOT_URL": {
                      "isOptional": false,
                      "description": "Public base URL seeded at boot",
                      "defaultValue": "https://${{libredesk-web.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Used by the boot script only",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "LIBREDESK_app__env": {
                      "isOptional": false,
                      "description": "Disables dev colour logging",
                      "defaultValue": "prod"
                    },
                    "LIBREDESK_db__host": {
                      "isOptional": false,
                      "description": "Postgres private host",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "LIBREDESK_db__port": {
                      "isOptional": false,
                      "description": "Postgres port",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "LIBREDESK_db__user": {
                      "isOptional": false,
                      "description": "Postgres user",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "LIBREDESK_redis__url": {
                      "isOptional": false,
                      "description": "Sessions and rate-limit counters",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "LIBREDESK_db__database": {
                      "isOptional": false,
                      "description": "Postgres database name",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "LIBREDESK_db__password": {
                      "isOptional": false,
                      "description": "Postgres password",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "LIBREDESK_db__ssl_mode": {
                      "isOptional": false,
                      "description": "Encrypts without chain verification",
                      "defaultValue": "require"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Selects the app image in the repo",
                      "defaultValue": "app/Dockerfile"
                    },
                    "LIBREDESK_app__log_level": {
                      "isOptional": false,
                      "description": "Log verbosity",
                      "defaultValue": "info"
                    },
                    "LIBREDESK_app__encryption_key": {
                      "isOptional": false,
                      "description": "32-char key encrypting stored secrets",
                      "defaultValue": "{{LIBREDESK_app__encryption_key}}"
                    },
                    "LIBREDESK_SYSTEM_USER_PASSWORD": {
                      "isOptional": false,
                      "description": "Owner password, 10-72 chars with symbol; required",
                      "defaultValue": "{{LIBREDESK_SYSTEM_USER_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window for workers",
                      "defaultValue": "15"
                    }
                  },
                  "volumeMounts": {
                    "7ed0d8fe-1750-4bd0-8a9c-0441ed19d053": {
                      "mountPath": "/libredesk/uploads"
                    }
                  }
                },
                "e4ab8170-e95d-4783-8c86-6644275f85f8": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.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": {
                    "e4ab8170-e95d-4783-8c86-6644275f85f8": {
                      "mountPath": "/data"
                    }
                  }
                },
                "f60d6791-6f60-4487-9ca1-71e3a7d00c8b": {
                  "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": "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": {
                    "f60d6791-6f60-4487-9ca1-71e3a7d00c8b": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "f8349902-e3c6-4c8f-9327-96ea06bf4318": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mailpit.svg",
                  "name": "mailpit",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/livez",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "axllent/mailpit:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Web inbox port",
                      "defaultValue": "8025"
                    },
                    "MP_UI_AUTH": {
                      "isOptional": false,
                      "description": "user:password guarding the inbox",
                      "defaultValue": "{{MP_UI_AUTH}}"
                    },
                    "MP_DATABASE": {
                      "isOptional": false,
                      "description": "Message store on the volume",
                      "defaultValue": "/data/mailpit.db"
                    },
                    "MP_MAX_MESSAGES": {
                      "isOptional": false,
                      "description": "Messages retained before rotation",
                      "defaultValue": "5000"
                    },
                    "MP_UI_BIND_ADDR": {
                      "isOptional": false,
                      "description": "Web listener, dual-stack",
                      "defaultValue": "[::]:8025"
                    },
                    "MP_SMTP_BIND_ADDR": {
                      "isOptional": false,
                      "description": "SMTP listener, dual-stack",
                      "defaultValue": "[::]:1025"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8025": {
                        "port": 8025
                      }
                    }
                  },
                  "volumeMounts": {
                    "f8349902-e3c6-4c8f-9327-96ea06bf4318": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "libredesk-web",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 5,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-19T14:59:10.524Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_5b4147ff23eb4dc685bd",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "FAILED,SUCCESS,SUCCESS,SUCCESS,SUCCESS"
      }
    ]
  }
}
