{
  "manifest_version": "1.0.0",
  "template": {
    "id": "602aeeef-0e28-43cb-b5b6-8d3e50d21ca9",
    "slug": "mastodon",
    "name": "Mastodon | Open Source Twitter Alternative on Railway",
    "description": "Self-host Mastodon. Your own federated social network.",
    "url": "https://railway.com/deploy/mastodon",
    "upstream": {
      "image": "ghcr.io/mastodon/mastodon:v4.5.9"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2.1"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "Mastodon",
      "source": {
        "image": "ghcr.io/mastodon/mastodon:v4.5.9"
      },
      "needs_volume": true,
      "volume_mount_path": "/mastodon/public/system",
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Mastodon-Streaming",
      "source": {
        "image": "ghcr.io/mastodon/mastodon-streaming:v4.5.9"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Internal Redis service hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Redis server listening port",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Redis default authentication user",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Internal Redis connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Redis password environment reference",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Password for Redis authentication",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDIS_PUBLIC_URL",
      "service": "Redis",
      "description": "Public Redis connection URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PORT",
      "service": "Mastodon",
      "description": "HTTP port Puma listens on",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "DB_HOST",
      "service": "Mastodon",
      "description": "PostgreSQL host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_NAME",
      "service": "Mastodon",
      "description": "PostgreSQL database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PASS",
      "service": "Mastodon",
      "description": "PostgreSQL password",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_POOL",
      "service": "Mastodon",
      "description": "Shared pool (Puma + Sidekiq in one container)",
      "secret": false,
      "strategy": "default",
      "default": "25"
    },
    {
      "key": "DB_PORT",
      "service": "Mastodon",
      "description": "PostgreSQL port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_USER",
      "service": "Mastodon",
      "description": "PostgreSQL user",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILS_ENV",
      "service": "Mastodon",
      "description": "Rails environment",
      "secret": false,
      "strategy": "default",
      "default": "production"
    },
    {
      "key": "REDIS_URL",
      "service": "Mastodon",
      "description": "Redis connection URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "OTP_SECRET",
      "service": "Mastodon",
      "description": "Two-factor auth HMAC key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ADMIN_EMAIL",
      "service": "Mastodon",
      "description": "Admin email — use a real domain for MX-validated flows",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "LOCAL_DOMAIN",
      "service": "Mastodon",
      "description": "Public federation domain for this instance",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "ADMIN_PASSWORD",
      "service": "Mastodon",
      "description": "Admin login password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "ADMIN_USERNAME",
      "service": "Mastodon",
      "description": "Admin handle (shown as @admin)",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "RAILS_LOG_LEVEL",
      "service": "Mastodon",
      "description": "Log verbosity",
      "secret": false,
      "strategy": "default",
      "default": "warn"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "Mastodon",
      "description": "Run as root so the volume (root-owned) is writable",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "SECRET_KEY_BASE",
      "service": "Mastodon",
      "description": "Rails session signing key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MALLOC_ARENA_MAX",
      "service": "Mastodon",
      "description": "Limit glibc memory arenas (Ruby memory tuning)",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "SINGLE_USER_MODE",
      "service": "Mastodon",
      "description": "Redirect landing page to admin profile",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "TRUSTED_PROXY_IP",
      "service": "Mastodon",
      "description": "Railway CGNAT proxy range (prevents IpSpoofAttackError)",
      "secret": false,
      "strategy": "default",
      "default": "100.64.0.0/10"
    },
    {
      "key": "VAPID_PUBLIC_KEY",
      "service": "Mastodon",
      "description": "Web Push ECDSA P-256 public key (base64url)",
      "secret": true,
      "strategy": "default",
      "default": "BC0vbsfDM5JPVTEL9qUIx6mFxkgf3WA8d2PeTV4LedfAWVac57vw7mHP8iNCyAvKsvECmNggOiaFDOKvFV2G2Zo"
    },
    {
      "key": "VAPID_PRIVATE_KEY",
      "service": "Mastodon",
      "description": "Web Push ECDSA P-256 private key (base64url)",
      "secret": true,
      "strategy": "default",
      "default": "kJ2s4Bc5YiLgJGQKQ4q4ACLPKCuSbC7Gnsyx1H_CEAY"
    },
    {
      "key": "RAILS_LOG_TO_STDOUT",
      "service": "Mastodon",
      "description": "Stream logs to Railway",
      "secret": false,
      "strategy": "default",
      "default": "enabled"
    },
    {
      "key": "ADMIN_BOOTSTRAP_RUBY",
      "service": "Mastodon",
      "description": "# Ruby script that creates the admin user on first boot; idempotent",
      "secret": false,
      "strategy": "default",
      "default": "email=ENV[\"ADMIN_EMAIL\"].to_s.strip;username=ENV[\"ADMIN_USERNAME\"].to_s.strip;password=ENV[\"ADMIN_PASSWORD\"].to_s;if email.empty?||password.empty?||username.empty?;puts \"[admin-bootstrap] env vars missing; skipping\";elsif User.exists?(email:email);puts \"[admin-bootstrap] admin already exists: #{email}\";else;begin;user=User.new(email:email,password:password,password_confirmation:password,confirmed_at:Time.now.utc,approved:true,agreement:true,account_attributes:{username:username});owner_role=UserRole.find_by(name:\"Owner\");user.role=owner_role if owner_role;user.save(validate:false);puts \"[admin-bootstrap] created admin: #{email} (username: #{username})\";rescue => e;puts \"[admin-bootstrap] failed: #{e.class}: #{e.message}\";end;end"
    },
    {
      "key": "RAILS_SERVE_STATIC_FILES",
      "service": "Mastodon",
      "description": "Serve /assets from Puma (no separate Nginx)",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY",
      "service": "Mastodon",
      "description": "ActiveRecord encryption primary key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY",
      "service": "Mastodon",
      "description": "ActiveRecord deterministic key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT",
      "service": "Mastodon",
      "description": "ActiveRecord key derivation salt",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Postgres data storage directory",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Internal Postgres host address",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Postgres server listening port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Default Postgres username",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Default database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Password for Postgres user",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Initial database created on startup",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Internal Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Default database superuser name",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Self-signed SSL certificate validity",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Postgres database user password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Graceful shutdown draining duration",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "PORT",
      "service": "Mastodon-Streaming",
      "description": "Streaming server port",
      "secret": false,
      "strategy": "default",
      "default": "4000"
    },
    {
      "key": "DB_HOST",
      "service": "Mastodon-Streaming",
      "description": "PostgreSQL host",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_NAME",
      "service": "Mastodon-Streaming",
      "description": "PostgreSQL database name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PASS",
      "service": "Mastodon-Streaming",
      "description": "PostgreSQL password",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_PORT",
      "service": "Mastodon-Streaming",
      "description": "PostgreSQL port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DB_USER",
      "service": "Mastodon-Streaming",
      "description": "PostgreSQL username",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_URL",
      "service": "Mastodon-Streaming",
      "description": "Redis connection URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "mastodon"
      }
    },
    "cli": "railway deploy --template mastodon",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "602aeeef-0e28-43cb-b5b6-8d3e50d21ca9",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "3b81a3ee-8502-496d-8f3e-000ce6ff01ba": {
                  "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.1"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Internal Redis service hostname",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Redis server listening port",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Redis default authentication user",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Internal Redis connection string",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Redis password environment reference",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for Redis authentication",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    },
                    "REDIS_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public Redis connection URL",
                      "defaultValue": "redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
                    }
                  },
                  "volumeMounts": {
                    "3b81a3ee-8502-496d-8f3e-000ce6ff01ba": {
                      "mountPath": "/data"
                    }
                  },
                  "haTemplateCode": "redis-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "Redis Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "Redis",
                      "description": "Nodes running Redis + colocated Sentinel",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your Redis instance to an HA cluster with Sentinel failover and HAProxy routing to the primary."
                  }
                },
                "4a728078-4903-43c0-bf9f-8aa099793283": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mastodon.svg",
                  "name": "Mastodon",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'bundle exec rails db:migrate 2>&1 && bundle exec rails db:seed 2>&1 && bundle exec rails runner \"$ADMIN_BOOTSTRAP_RUBY\" 2>&1 && (bundle exec sidekiq &) && bundle exec puma -C config/puma.rb'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/mastodon/mastodon:v4.5.9"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port Puma listens on",
                      "defaultValue": "3000"
                    },
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "PostgreSQL host",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "DB_NAME": {
                      "isOptional": false,
                      "description": "PostgreSQL database name",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "DB_PASS": {
                      "isOptional": false,
                      "description": "PostgreSQL password",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "DB_POOL": {
                      "isOptional": false,
                      "description": "Shared pool (Puma + Sidekiq in one container)",
                      "defaultValue": "25"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "PostgreSQL port",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "DB_USER": {
                      "isOptional": false,
                      "description": "PostgreSQL user",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "RAILS_ENV": {
                      "isOptional": false,
                      "description": "Rails environment",
                      "defaultValue": "production"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis connection URL",
                      "defaultValue": "redis://default:${{Redis.REDIS_PASSWORD}}@${{Redis.RAILWAY_PRIVATE_DOMAIN}}:6379"
                    },
                    "OTP_SECRET": {
                      "isOptional": false,
                      "description": "Two-factor auth HMAC key",
                      "defaultValue": "{{OTP_SECRET}}"
                    },
                    "ADMIN_EMAIL": {
                      "description": "Admin email — use a real domain for MX-validated flows",
                      "defaultValue": "{{ADMIN_EMAIL}}"
                    },
                    "LOCAL_DOMAIN": {
                      "isOptional": false,
                      "description": "Public federation domain for this instance",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "ADMIN_PASSWORD": {
                      "description": "Admin login password",
                      "defaultValue": "{{ADMIN_PASSWORD}}"
                    },
                    "ADMIN_USERNAME": {
                      "description": "Admin handle (shown as @admin)",
                      "defaultValue": "{{ADMIN_USERNAME}}"
                    },
                    "RAILS_LOG_LEVEL": {
                      "isOptional": false,
                      "description": "Log verbosity",
                      "defaultValue": "warn"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Run as root so the volume (root-owned) is writable",
                      "defaultValue": "0"
                    },
                    "SECRET_KEY_BASE": {
                      "isOptional": false,
                      "description": "Rails session signing key",
                      "defaultValue": "{{SECRET_KEY_BASE}}"
                    },
                    "MALLOC_ARENA_MAX": {
                      "isOptional": false,
                      "description": "Limit glibc memory arenas (Ruby memory tuning)",
                      "defaultValue": "2"
                    },
                    "SINGLE_USER_MODE": {
                      "isOptional": false,
                      "description": "Redirect landing page to admin profile",
                      "defaultValue": "true"
                    },
                    "TRUSTED_PROXY_IP": {
                      "isOptional": false,
                      "description": "Railway CGNAT proxy range (prevents IpSpoofAttackError)",
                      "defaultValue": "100.64.0.0/10"
                    },
                    "VAPID_PUBLIC_KEY": {
                      "isOptional": false,
                      "description": "Web Push ECDSA P-256 public key (base64url)",
                      "defaultValue": "BC0vbsfDM5JPVTEL9qUIx6mFxkgf3WA8d2PeTV4LedfAWVac57vw7mHP8iNCyAvKsvECmNggOiaFDOKvFV2G2Zo"
                    },
                    "VAPID_PRIVATE_KEY": {
                      "isOptional": false,
                      "description": "Web Push ECDSA P-256 private key (base64url)",
                      "defaultValue": "kJ2s4Bc5YiLgJGQKQ4q4ACLPKCuSbC7Gnsyx1H_CEAY"
                    },
                    "RAILS_LOG_TO_STDOUT": {
                      "isOptional": false,
                      "description": "Stream logs to Railway",
                      "defaultValue": "enabled"
                    },
                    "ADMIN_BOOTSTRAP_RUBY": {
                      "description": "# Ruby script that creates the admin user on first boot; idempotent",
                      "defaultValue": "email=ENV[\"ADMIN_EMAIL\"].to_s.strip;username=ENV[\"ADMIN_USERNAME\"].to_s.strip;password=ENV[\"ADMIN_PASSWORD\"].to_s;if email.empty?||password.empty?||username.empty?;puts \"[admin-bootstrap] env vars missing; skipping\";elsif User.exists?(email:email);puts \"[admin-bootstrap] admin already exists: #{email}\";else;begin;user=User.new(email:email,password:password,password_confirmation:password,confirmed_at:Time.now.utc,approved:true,agreement:true,account_attributes:{username:username});owner_role=UserRole.find_by(name:\"Owner\");user.role=owner_role if owner_role;user.save(validate:false);puts \"[admin-bootstrap] created admin: #{email} (username: #{username})\";rescue => e;puts \"[admin-bootstrap] failed: #{e.class}: #{e.message}\";end;end"
                    },
                    "RAILS_SERVE_STATIC_FILES": {
                      "isOptional": false,
                      "description": "Serve /assets from Puma (no separate Nginx)",
                      "defaultValue": "true"
                    },
                    "ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY": {
                      "isOptional": false,
                      "description": "ActiveRecord encryption primary key",
                      "defaultValue": "{{ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY}}"
                    },
                    "ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY": {
                      "isOptional": false,
                      "description": "ActiveRecord deterministic key",
                      "defaultValue": "{{ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY}}"
                    },
                    "ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT": {
                      "isOptional": false,
                      "description": "ActiveRecord key derivation salt",
                      "defaultValue": "{{ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  },
                  "volumeMounts": {
                    "4a728078-4903-43c0-bf9f-8aa099793283": {
                      "mountPath": "/mastodon/public/system"
                    }
                  }
                },
                "4ce1cc83-bd0c-4307-9c9a-ccc3834940a7": {
                  "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": "Postgres data storage directory",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Internal Postgres host address",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Postgres server listening port",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Default Postgres username",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Default database name",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Password for Postgres user",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Initial database created on startup",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Internal Postgres connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Default database superuser name",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Self-signed SSL certificate validity",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Postgres database user password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public Postgres connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Graceful shutdown draining duration",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "4ce1cc83-bd0c-4307-9c9a-ccc3834940a7": {
                      "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."
                  }
                },
                "99300d5d-edcb-4b30-87dc-dc2cfb72b435": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mastodon.svg",
                  "name": "Mastodon-Streaming",
                  "deploy": {
                    "startCommand": "node ./streaming/index.js",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/mastodon/mastodon-streaming:v4.5.9"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Streaming server port",
                      "defaultValue": "4000"
                    },
                    "DB_HOST": {
                      "isOptional": false,
                      "description": "PostgreSQL host",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "DB_NAME": {
                      "isOptional": false,
                      "description": "PostgreSQL database name",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "DB_PASS": {
                      "isOptional": false,
                      "description": "PostgreSQL password",
                      "defaultValue": "${{Postgres.PGPASSWORD}}"
                    },
                    "DB_PORT": {
                      "isOptional": false,
                      "description": "PostgreSQL port",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "DB_USER": {
                      "isOptional": false,
                      "description": "PostgreSQL username",
                      "defaultValue": "${{Postgres.PGUSER}}"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis connection URL",
                      "defaultValue": "redis://default:${{Redis.REDISPASSWORD}}@${{Redis.REDISHOST}}:${{Redis.REDISPORT}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:4000": {
                        "port": 4000
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 4,
    "needs_volume": true
  },
  "generated_at": "2026-09-08T05:54:19.399Z",
  "generator_version": "0.1.0"
}
