{
  "manifest_version": "1.0.0",
  "template": {
    "id": "83bedef1-0b73-4360-b6e9-cf65a3d8a37a",
    "slug": "libretranslate-server",
    "name": "LibreTranslate",
    "description": "Translates text and documents between about 50 languages",
    "url": "https://railway.com/deploy/libretranslate-server",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/libretranslate-railway"
    }
  },
  "services": [
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "libretranslate",
      "source": {
        "repo": "https://github.com/gridalpha/libretranslate-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/libretranslate",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "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": "PORT",
      "service": "libretranslate",
      "description": "Port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "5000"
    },
    {
      "key": "LT_PORT",
      "service": "libretranslate",
      "description": "Port Gunicorn binds",
      "secret": false,
      "strategy": "default",
      "default": "5000"
    },
    {
      "key": "LT_METRICS",
      "service": "libretranslate",
      "description": "Expose Prometheus metrics",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LT_THREADS",
      "service": "libretranslate",
      "description": "Gunicorn worker processes",
      "secret": false,
      "strategy": "default",
      "default": "4"
    },
    {
      "key": "LT_API_KEYS",
      "service": "libretranslate",
      "description": "Enable the API key database",
      "secret": true,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LT_LOAD_ONLY",
      "service": "libretranslate",
      "description": "Languages installed on boot",
      "secret": false,
      "strategy": "default",
      "default": "en,es,fr,de,it,pt,ru,zh,ar,ja,ko,hi"
    },
    {
      "key": "LT_REQ_LIMIT",
      "service": "libretranslate",
      "description": "Requests per minute per client",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "LT_CHAR_LIMIT",
      "service": "libretranslate",
      "description": "Maximum characters per request",
      "secret": false,
      "strategy": "default",
      "default": "5000"
    },
    {
      "key": "LT_BATCH_LIMIT",
      "service": "libretranslate",
      "description": "Maximum texts per batch request",
      "secret": false,
      "strategy": "default",
      "default": "32"
    },
    {
      "key": "LT_UPDATE_MODELS",
      "service": "libretranslate",
      "description": "Download missing models at startup",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LT_SHARED_STORAGE",
      "service": "libretranslate",
      "description": "Shared cache and ban list",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LT_DAILY_REQ_LIMIT",
      "service": "libretranslate",
      "description": "Requests per day per client",
      "secret": false,
      "strategy": "default",
      "default": "10000"
    },
    {
      "key": "FORWARDED_ALLOW_IPS",
      "service": "libretranslate",
      "description": "Gunicorn honours X-Forwarded-Proto",
      "secret": false,
      "strategy": "default",
      "default": "*"
    },
    {
      "key": "LT_API_KEYS_DB_PATH",
      "service": "libretranslate",
      "description": "Key database on the volume",
      "secret": true,
      "strategy": "default",
      "default": "/home/libretranslate/db/api_keys.db"
    },
    {
      "key": "LT_HOURLY_REQ_LIMIT",
      "service": "libretranslate",
      "description": "Requests per hour per client",
      "secret": false,
      "strategy": "default",
      "default": "1200"
    },
    {
      "key": "LT_BOOTSTRAP_API_KEY",
      "service": "libretranslate",
      "description": "API key seeded on first boot",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LT_REQ_LIMIT_STORAGE",
      "service": "libretranslate",
      "description": "Rate limit counter storage",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LT_TRANSLATION_CACHE",
      "service": "libretranslate",
      "description": "Cache every translation for 7 days",
      "secret": false,
      "strategy": "default",
      "default": "all"
    },
    {
      "key": "LT_METRICS_AUTH_TOKEN",
      "service": "libretranslate",
      "description": "Bearer token for /metrics",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "LT_REQ_FLOOD_THRESHOLD",
      "service": "libretranslate",
      "description": "Limit violations before a ban",
      "secret": false,
      "strategy": "default",
      "default": "20"
    },
    {
      "key": "LT_TRUST_FORWARDED_FOR",
      "service": "libretranslate",
      "description": "Read client IP from X-Forwarded-For",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LT_REQUIRE_API_KEY_ORIGIN",
      "service": "libretranslate",
      "description": "Origin allowed without a key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "LT_BOOTSTRAP_API_KEY_REQ_LIMIT",
      "service": "libretranslate",
      "description": "Requests per minute for that key",
      "secret": true,
      "strategy": "default",
      "default": "600"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "libretranslate-server"
      }
    },
    "cli": "railway deploy --template libretranslate-server",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "83bedef1-0b73-4360-b6e9-cf65a3d8a37a",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "0ffe1483-a7c3-4cf0-bf81-9398d646f3c1": {
                  "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": {
                    "0ffe1483-a7c3-4cf0-bf81-9398d646f3c1": {
                      "mountPath": "/data"
                    }
                  }
                },
                "533a69c4-2d55-4723-b3ec-b3ed12774215": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/libretranslate-dark.svg",
                  "name": "libretranslate",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/libretranslate-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway health-checks",
                      "defaultValue": "5000"
                    },
                    "LT_PORT": {
                      "isOptional": false,
                      "description": "Port Gunicorn binds",
                      "defaultValue": "5000"
                    },
                    "LT_METRICS": {
                      "isOptional": false,
                      "description": "Expose Prometheus metrics",
                      "defaultValue": "true"
                    },
                    "LT_THREADS": {
                      "isOptional": false,
                      "description": "Gunicorn worker processes",
                      "defaultValue": "4"
                    },
                    "LT_API_KEYS": {
                      "isOptional": false,
                      "description": "Enable the API key database",
                      "defaultValue": "true"
                    },
                    "LT_LOAD_ONLY": {
                      "isOptional": false,
                      "description": "Languages installed on boot",
                      "defaultValue": "en,es,fr,de,it,pt,ru,zh,ar,ja,ko,hi"
                    },
                    "LT_REQ_LIMIT": {
                      "isOptional": false,
                      "description": "Requests per minute per client",
                      "defaultValue": "60"
                    },
                    "LT_CHAR_LIMIT": {
                      "isOptional": false,
                      "description": "Maximum characters per request",
                      "defaultValue": "5000"
                    },
                    "LT_BATCH_LIMIT": {
                      "isOptional": false,
                      "description": "Maximum texts per batch request",
                      "defaultValue": "32"
                    },
                    "LT_UPDATE_MODELS": {
                      "isOptional": false,
                      "description": "Download missing models at startup",
                      "defaultValue": "true"
                    },
                    "LT_SHARED_STORAGE": {
                      "isOptional": false,
                      "description": "Shared cache and ban list",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "LT_DAILY_REQ_LIMIT": {
                      "isOptional": false,
                      "description": "Requests per day per client",
                      "defaultValue": "10000"
                    },
                    "FORWARDED_ALLOW_IPS": {
                      "isOptional": false,
                      "description": "Gunicorn honours X-Forwarded-Proto",
                      "defaultValue": "*"
                    },
                    "LT_API_KEYS_DB_PATH": {
                      "isOptional": false,
                      "description": "Key database on the volume",
                      "defaultValue": "/home/libretranslate/db/api_keys.db"
                    },
                    "LT_HOURLY_REQ_LIMIT": {
                      "isOptional": false,
                      "description": "Requests per hour per client",
                      "defaultValue": "1200"
                    },
                    "LT_BOOTSTRAP_API_KEY": {
                      "isOptional": false,
                      "description": "API key seeded on first boot",
                      "defaultValue": "{{LT_BOOTSTRAP_API_KEY}}"
                    },
                    "LT_REQ_LIMIT_STORAGE": {
                      "isOptional": false,
                      "description": "Rate limit counter storage",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "LT_TRANSLATION_CACHE": {
                      "isOptional": false,
                      "description": "Cache every translation for 7 days",
                      "defaultValue": "all"
                    },
                    "LT_METRICS_AUTH_TOKEN": {
                      "isOptional": false,
                      "description": "Bearer token for /metrics",
                      "defaultValue": "{{LT_METRICS_AUTH_TOKEN}}"
                    },
                    "LT_REQ_FLOOD_THRESHOLD": {
                      "isOptional": false,
                      "description": "Limit violations before a ban",
                      "defaultValue": "20"
                    },
                    "LT_TRUST_FORWARDED_FOR": {
                      "isOptional": false,
                      "description": "Read client IP from X-Forwarded-For",
                      "defaultValue": "true"
                    },
                    "LT_REQUIRE_API_KEY_ORIGIN": {
                      "isOptional": false,
                      "description": "Origin allowed without a key",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}$"
                    },
                    "LT_BOOTSTRAP_API_KEY_REQ_LIMIT": {
                      "isOptional": false,
                      "description": "Requests per minute for that key",
                      "defaultValue": "600"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:5000": {
                        "port": 5000
                      }
                    }
                  },
                  "volumeMounts": {
                    "533a69c4-2d55-4723-b3ec-b3ed12774215": {
                      "mountPath": "/home/libretranslate"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "libretranslate",
      "method": "GET",
      "path": "/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T14:54:24.959Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_2540013bc36042abb59e",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 179,
    "typical_build_seconds": 32,
    "typical_start_seconds": 92,
    "slowest_service": "libretranslate"
  }
}
