{
  "manifest_version": "1.0.0",
  "template": {
    "id": "fd5daa44-e58e-4645-a823-8f659665a2bc",
    "slug": "lemmy",
    "name": "Lemmy",
    "description": "Federated Lemmy community with persistent media and PostgreSQL.",
    "url": "https://railway.com/deploy/lemmy",
    "upstream": {
      "image": "ghcr.io/monotykamary/railway-template-lemmy-proxy:0.19.20-r2"
    }
  },
  "services": [
    {
      "name": "Lemmy UI",
      "source": {
        "image": "dessalines/lemmy-ui:0.19.20"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "Lemmy",
      "source": {
        "image": "ghcr.io/monotykamary/railway-template-lemmy-lemmy:0.19.20-r2"
      },
      "needs_volume": false,
      "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": "Pict-rs",
      "source": {
        "image": "asonix/pictrs:0.5.24"
      },
      "needs_volume": true,
      "volume_mount_path": "/mnt",
      "http": false
    },
    {
      "name": "Proxy",
      "source": {
        "image": "ghcr.io/monotykamary/railway-template-lemmy-proxy:0.19.20-r2"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Lemmy UI",
      "description": "Internal port for the Lemmy UI server.",
      "secret": false,
      "strategy": "default",
      "default": "1234"
    },
    {
      "key": "LEMMY_UI_HOST",
      "service": "Lemmy UI",
      "description": "Listen address for the Lemmy UI server.",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0:1234"
    },
    {
      "key": "LEMMY_UI_DEBUG",
      "service": "Lemmy UI",
      "description": "Disables browser debugging tools in production.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "LEMMY_UI_HTTPS",
      "service": "Lemmy UI",
      "description": "Uses HTTPS for the public Lemmy origin.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "LEMMY_UI_LEMMY_EXTERNAL_HOST",
      "service": "Lemmy UI",
      "description": "Public Lemmy hostname used by browsers.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "LEMMY_UI_LEMMY_INTERNAL_HOST",
      "service": "Lemmy UI",
      "description": "Private Lemmy API hostname used for server-side rendering.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PORT",
      "service": "Lemmy",
      "description": "Internal port for the Lemmy API and federation server.",
      "secret": false,
      "strategy": "default",
      "default": "8536"
    },
    {
      "key": "NO_COLOR",
      "service": "Lemmy",
      "description": "Disables ANSI color codes in Railway logs.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "RUST_LOG",
      "service": "Lemmy",
      "description": "Lemmy log level.",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "PICTRS_URL",
      "service": "Lemmy",
      "description": "Private URL used to store and retrieve media from Pict-rs.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "LEMMY_HOSTNAME",
      "service": "Lemmy",
      "description": "Public hostname used for Lemmy and ActivityPub identities.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PICTRS_API_KEY",
      "service": "Lemmy",
      "description": "Shared API key used to manage media in Pict-rs.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LEMMY_SITE_NAME",
      "service": "Lemmy",
      "description": "Initial site name; it can be changed later in the administration panel.",
      "secret": false,
      "strategy": "default",
      "default": "My Lemmy"
    },
    {
      "key": "LEMMY_DATABASE_URL",
      "service": "Lemmy",
      "description": "Private PostgreSQL connection URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "LEMMY_ADMIN_PASSWORD",
      "service": "Lemmy",
      "description": "Generated password for the initial administrator account.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "LEMMY_ADMIN_USERNAME",
      "service": "Lemmy",
      "description": "Username for the initial administrator account.",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "PostgreSQL data directory on the persistent volume.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Private PostgreSQL hostname.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "PostgreSQL port.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "PostgreSQL application user.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "PostgreSQL application database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "PostgreSQL application password.",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created for Lemmy.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private PostgreSQL connection URL used by Lemmy.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "PostgreSQL administrator user.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Validity period for the generated database TLS certificate.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Generated PostgreSQL password.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Grace period for database deployment shutdown.",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "Pict-rs",
      "description": "Internal port for the Pict-rs media server.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Pict-rs",
      "description": "Runs Pict-rs with access to the Railway volume.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "PICTRS__MEDIA__FORMAT",
      "service": "Pict-rs",
      "description": "Preferred output format for processed media.",
      "secret": false,
      "strategy": "default",
      "default": "webp"
    },
    {
      "key": "PICTRS__SERVER__ADDRESS",
      "service": "Pict-rs",
      "description": "Listen address for the Pict-rs media server.",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0:8080"
    },
    {
      "key": "PICTRS__SERVER__API_KEY",
      "service": "Pict-rs",
      "description": "Generated API key shared with Lemmy for media management.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PORT",
      "service": "Proxy",
      "description": "Internal HTTP port used by the public edge proxy.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "LEMMY_PRIVATE_DOMAIN",
      "service": "Proxy",
      "description": "Private Railway hostname for the Lemmy API service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "LEMMY_UI_PRIVATE_DOMAIN",
      "service": "Proxy",
      "description": "Private Railway hostname for the Lemmy UI service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "lemmy"
      }
    },
    "cli": "railway deploy --template lemmy",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "fd5daa44-e58e-4645-a823-8f659665a2bc",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "1d83bf46-5ac5-4dbe-beb0-0734bfd56954": {
                  "icon": "https://raw.githubusercontent.com/LemmyNet/lemmy-ui/main/src/assets/icons/favicon.svg",
                  "name": "Lemmy UI",
                  "deploy": {
                    "healthcheckPath": "/",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "dessalines/lemmy-ui:0.19.20"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Internal port for the Lemmy UI server.",
                      "defaultValue": "1234"
                    },
                    "LEMMY_UI_HOST": {
                      "isOptional": false,
                      "description": "Listen address for the Lemmy UI server.",
                      "defaultValue": "0.0.0.0:1234"
                    },
                    "LEMMY_UI_DEBUG": {
                      "isOptional": false,
                      "description": "Disables browser debugging tools in production.",
                      "defaultValue": "false"
                    },
                    "LEMMY_UI_HTTPS": {
                      "isOptional": false,
                      "description": "Uses HTTPS for the public Lemmy origin.",
                      "defaultValue": "true"
                    },
                    "LEMMY_UI_LEMMY_EXTERNAL_HOST": {
                      "isOptional": false,
                      "description": "Public Lemmy hostname used by browsers.",
                      "defaultValue": "${{Proxy.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "LEMMY_UI_LEMMY_INTERNAL_HOST": {
                      "isOptional": false,
                      "description": "Private Lemmy API hostname used for server-side rendering.",
                      "defaultValue": "${{Lemmy.RAILWAY_PRIVATE_DOMAIN}}:8536"
                    }
                  }
                },
                "2242c2b5-389d-45e9-92c2-8ef9e6372450": {
                  "icon": "https://raw.githubusercontent.com/LemmyNet/lemmy-ui/main/src/assets/icons/favicon.svg",
                  "name": "Lemmy",
                  "deploy": {
                    "healthcheckPath": "/api/v3/site",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/monotykamary/railway-template-lemmy-lemmy:0.19.20-r2"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Internal port for the Lemmy API and federation server.",
                      "defaultValue": "8536"
                    },
                    "NO_COLOR": {
                      "isOptional": false,
                      "description": "Disables ANSI color codes in Railway logs.",
                      "defaultValue": "1"
                    },
                    "RUST_LOG": {
                      "isOptional": false,
                      "description": "Lemmy log level.",
                      "defaultValue": "info"
                    },
                    "PICTRS_URL": {
                      "isOptional": false,
                      "description": "Private URL used to store and retrieve media from Pict-rs.",
                      "defaultValue": "http://${{Pict-rs.RAILWAY_PRIVATE_DOMAIN}}:8080/"
                    },
                    "LEMMY_HOSTNAME": {
                      "isOptional": false,
                      "description": "Public hostname used for Lemmy and ActivityPub identities.",
                      "defaultValue": "${{Proxy.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "PICTRS_API_KEY": {
                      "isOptional": false,
                      "description": "Shared API key used to manage media in Pict-rs.",
                      "defaultValue": "${{Pict-rs.PICTRS__SERVER__API_KEY}}"
                    },
                    "LEMMY_SITE_NAME": {
                      "isOptional": false,
                      "description": "Initial site name; it can be changed later in the administration panel.",
                      "defaultValue": "My Lemmy"
                    },
                    "LEMMY_DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private PostgreSQL connection URL.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "LEMMY_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password for the initial administrator account.",
                      "defaultValue": "{{LEMMY_ADMIN_PASSWORD}}"
                    },
                    "LEMMY_ADMIN_USERNAME": {
                      "isOptional": false,
                      "description": "Username for the initial administrator account.",
                      "defaultValue": "admin"
                    }
                  }
                },
                "837dd051-85e7-4f96-8f58-c833a033ee1a": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "PostgreSQL data directory on the persistent volume.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private PostgreSQL hostname.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "PostgreSQL port.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "PostgreSQL application user.",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "PostgreSQL application database.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "PostgreSQL application password.",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created for Lemmy.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private PostgreSQL connection URL used by Lemmy.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "PostgreSQL administrator user.",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Validity period for the generated database TLS certificate.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated PostgreSQL password.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Grace period for database deployment shutdown.",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "837dd051-85e7-4f96-8f58-c833a033ee1a": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                },
                "a96a13ff-ba56-4f20-af31-9f199f5cf069": {
                  "icon": "https://avatars.githubusercontent.com/u/15111623?v=4",
                  "name": "Pict-rs",
                  "deploy": {
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "asonix/pictrs:0.5.24"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Internal port for the Pict-rs media server.",
                      "defaultValue": "8080"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Runs Pict-rs with access to the Railway volume.",
                      "defaultValue": "0"
                    },
                    "PICTRS__MEDIA__FORMAT": {
                      "isOptional": false,
                      "description": "Preferred output format for processed media.",
                      "defaultValue": "webp"
                    },
                    "PICTRS__SERVER__ADDRESS": {
                      "isOptional": false,
                      "description": "Listen address for the Pict-rs media server.",
                      "defaultValue": "0.0.0.0:8080"
                    },
                    "PICTRS__SERVER__API_KEY": {
                      "isOptional": false,
                      "description": "Generated API key shared with Lemmy for media management.",
                      "defaultValue": "{{PICTRS__SERVER__API_KEY}}"
                    }
                  },
                  "volumeMounts": {
                    "a96a13ff-ba56-4f20-af31-9f199f5cf069": {
                      "mountPath": "/mnt"
                    }
                  }
                },
                "dae74eff-5fc5-4c42-a353-3049c75a7f70": {
                  "icon": "https://devicons.railway.app/i/caddy.svg",
                  "name": "Proxy",
                  "deploy": {
                    "healthcheckPath": "/api/v3/site",
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/monotykamary/railway-template-lemmy-proxy:0.19.20-r2"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Internal HTTP port used by the public edge proxy.",
                      "defaultValue": "8080"
                    },
                    "LEMMY_PRIVATE_DOMAIN": {
                      "isOptional": false,
                      "description": "Private Railway hostname for the Lemmy API service.",
                      "defaultValue": "${{Lemmy.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "LEMMY_UI_PRIVATE_DOMAIN": {
                      "isOptional": false,
                      "description": "Private Railway hostname for the Lemmy UI service.",
                      "defaultValue": "${{Lemmy UI.RAILWAY_PRIVATE_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Proxy",
      "method": "GET",
      "path": "/api/v3/site",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 5,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T22:14:43.398Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-08T23:45:35.070Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_4daf7256e491405e95d6",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 123,
    "typical_build_seconds": 0,
    "typical_start_seconds": 31,
    "slowest_service": "Proxy"
  }
}
