{
  "manifest_version": "1.0.0",
  "template": {
    "id": "7d2c3258-548d-4c8e-82e9-7cbad77c1783",
    "slug": "tuwunel",
    "name": "Tuwunel",
    "description": "Chat server for private, federated team and community messaging",
    "url": "https://railway.com/deploy/tuwunel",
    "upstream": {
      "image": "ghcr.io/matrix-construct/tuwunel:latest"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "tuwunel",
      "source": {
        "image": "ghcr.io/matrix-construct/tuwunel:latest"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    },
    {
      "name": "element-web",
      "source": {
        "repo": "https://github.com/gridalpha/element-web-railway"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "tuwunel",
      "description": "Port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "8008"
    },
    {
      "key": "TUWUNEL_LOG",
      "service": "tuwunel",
      "description": "Log level",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "TUWUNEL_PORT",
      "service": "tuwunel",
      "description": "HTTP listener port",
      "secret": false,
      "strategy": "default",
      "default": "8008"
    },
    {
      "key": "TUWUNEL_ADDRESS",
      "service": "tuwunel",
      "description": "Bind address; image default is loopback only",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "TUWUNEL_SERVER_NAME",
      "service": "tuwunel",
      "description": "Suffix of every user ID, permanent",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "TUWUNEL_DATABASE_PATH",
      "service": "tuwunel",
      "description": "RocksDB location on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/data"
    },
    {
      "key": "TUWUNEL_SENDER_WORKERS",
      "service": "tuwunel",
      "description": "Federation sender parallelism",
      "secret": false,
      "strategy": "default",
      "default": "4"
    },
    {
      "key": "TUWUNEL_DB_POOL_WORKERS",
      "service": "tuwunel",
      "description": "Fallback when queue detection fails",
      "secret": false,
      "strategy": "default",
      "default": "8"
    },
    {
      "key": "TUWUNEL_TRUSTED_SERVERS",
      "service": "tuwunel",
      "description": "Notary servers for signing keys",
      "secret": false,
      "strategy": "default",
      "default": "[\"matrix.org\"]"
    },
    {
      "key": "TUWUNEL_ALLOW_FEDERATION",
      "service": "tuwunel",
      "description": "Talk to the wider Matrix network",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "TUWUNEL_MAX_REQUEST_SIZE",
      "service": "tuwunel",
      "description": "100 MB upload ceiling",
      "secret": false,
      "strategy": "default",
      "default": "104857600"
    },
    {
      "key": "TUWUNEL_ALLOW_REGISTRATION",
      "service": "tuwunel",
      "description": "Allow signup with a token",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "TUWUNEL_REGISTRATION_TOKEN",
      "service": "tuwunel",
      "description": "Token new users must supply",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "TUWUNEL_WELL_KNOWN__CLIENT",
      "service": "tuwunel",
      "description": "Client discovery base URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "TUWUNEL_WELL_KNOWN__SERVER",
      "service": "tuwunel",
      "description": "Federation delegation to port 443",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "TUWUNEL_DB_POOL_MAX_WORKERS",
      "service": "tuwunel",
      "description": "Ceiling on database pool threads",
      "secret": false,
      "strategy": "default",
      "default": "128"
    },
    {
      "key": "TUWUNEL_DB_CACHE_CAPACITY_MB",
      "service": "tuwunel",
      "description": "RocksDB read cache size",
      "secret": false,
      "strategy": "default",
      "default": "512"
    },
    {
      "key": "TUWUNEL_DB_POOL_WORKERS_LIMIT",
      "service": "tuwunel",
      "description": "Threads per storage queue; uncapped exhausts threads",
      "secret": false,
      "strategy": "default",
      "default": "2"
    },
    {
      "key": "TUWUNEL_CACHE_CAPACITY_MODIFIER",
      "service": "tuwunel",
      "description": "Scales every in-memory LRU cache",
      "secret": false,
      "strategy": "default",
      "default": "0.2"
    },
    {
      "key": "TUWUNEL_MEDIA_STORAGE_PROVIDERS",
      "service": "tuwunel",
      "description": "Read media from bucket, disk fallback",
      "secret": false,
      "strategy": "default",
      "default": "[\"media\",\"s3\"]"
    },
    {
      "key": "TUWUNEL_STORE_MEDIA_ON_PROVIDERS",
      "service": "tuwunel",
      "description": "Write new media to the bucket",
      "secret": false,
      "strategy": "default",
      "default": "[\"s3\"]"
    },
    {
      "key": "TUWUNEL_DB_WRITE_BUFFER_CAPACITY_MB",
      "service": "tuwunel",
      "description": "RocksDB write buffer size",
      "secret": false,
      "strategy": "default",
      "default": "96"
    },
    {
      "key": "TUWUNEL_NEW_USER_DISPLAYNAME_SUFFIX",
      "service": "tuwunel",
      "description": "No emoji appended to display names",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "TUWUNEL_ROCKSDB_PARALLELISM_THREADS",
      "service": "tuwunel",
      "description": "RocksDB background threads",
      "secret": false,
      "strategy": "default",
      "default": "8"
    },
    {
      "key": "TUWUNEL_STORAGE_PROVIDER__S3__S3__KEY",
      "service": "tuwunel",
      "description": "Media bucket access key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TUWUNEL_STORAGE_PROVIDER__S3__S3__BUCKET",
      "service": "tuwunel",
      "description": "Media bucket name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TUWUNEL_STORAGE_PROVIDER__S3__S3__REGION",
      "service": "tuwunel",
      "description": "Media bucket region",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TUWUNEL_STORAGE_PROVIDER__S3__S3__SECRET",
      "service": "tuwunel",
      "description": "Media bucket secret key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TUWUNEL_STORAGE_PROVIDER__S3__S3__ENDPOINT",
      "service": "tuwunel",
      "description": "Media bucket endpoint URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TUWUNEL_STORAGE_PROVIDER__S3__S3__USE_VHOST_REQUEST",
      "service": "tuwunel",
      "description": "Path-style addressing",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "PORT",
      "service": "element-web",
      "description": "Port Railway health-checks",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "ELEMENT_WEB_PORT",
      "service": "element-web",
      "description": "nginx listen port; default 80 cannot bind",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "MATRIX_SERVER_NAME",
      "service": "element-web",
      "description": "Matrix server name shown at login",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "MATRIX_HOMESERVER_URL",
      "service": "element-web",
      "description": "Homeserver this client signs in to",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "ELEMENT_ALLOW_OTHER_HOMESERVERS",
      "service": "element-web",
      "description": "Lock the client to this homeserver",
      "secret": false,
      "strategy": "default",
      "default": "false"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "tuwunel"
      }
    },
    "cli": "railway deploy --template tuwunel",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "7d2c3258-548d-4c8e-82e9-7cbad77c1783",
            "serializedConfig": {
              "buckets": {
                "e670ea91-1cad-431d-ab73-622b0659b318": {
                  "name": "matrix-media"
                }
              },
              "services": {
                "2db262a2-9d6d-4deb-8351-31882126ade8": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/matrix-light.svg",
                  "name": "tuwunel",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/_matrix/client/versions",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/matrix-construct/tuwunel:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway health-checks",
                      "defaultValue": "8008"
                    },
                    "TUWUNEL_LOG": {
                      "isOptional": false,
                      "description": "Log level",
                      "defaultValue": "info"
                    },
                    "TUWUNEL_PORT": {
                      "isOptional": false,
                      "description": "HTTP listener port",
                      "defaultValue": "8008"
                    },
                    "TUWUNEL_ADDRESS": {
                      "isOptional": false,
                      "description": "Bind address; image default is loopback only",
                      "defaultValue": "0.0.0.0"
                    },
                    "TUWUNEL_SERVER_NAME": {
                      "isOptional": false,
                      "description": "Suffix of every user ID, permanent",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "TUWUNEL_DATABASE_PATH": {
                      "isOptional": false,
                      "description": "RocksDB location on the volume",
                      "defaultValue": "/data"
                    },
                    "TUWUNEL_SENDER_WORKERS": {
                      "isOptional": false,
                      "description": "Federation sender parallelism",
                      "defaultValue": "4"
                    },
                    "TUWUNEL_DB_POOL_WORKERS": {
                      "isOptional": false,
                      "description": "Fallback when queue detection fails",
                      "defaultValue": "8"
                    },
                    "TUWUNEL_TRUSTED_SERVERS": {
                      "isOptional": false,
                      "description": "Notary servers for signing keys",
                      "defaultValue": "[\"matrix.org\"]"
                    },
                    "TUWUNEL_ALLOW_FEDERATION": {
                      "isOptional": false,
                      "description": "Talk to the wider Matrix network",
                      "defaultValue": "true"
                    },
                    "TUWUNEL_MAX_REQUEST_SIZE": {
                      "isOptional": false,
                      "description": "100 MB upload ceiling",
                      "defaultValue": "104857600"
                    },
                    "TUWUNEL_ALLOW_REGISTRATION": {
                      "isOptional": false,
                      "description": "Allow signup with a token",
                      "defaultValue": "true"
                    },
                    "TUWUNEL_REGISTRATION_TOKEN": {
                      "isOptional": false,
                      "description": "Token new users must supply",
                      "defaultValue": "{{TUWUNEL_REGISTRATION_TOKEN}}"
                    },
                    "TUWUNEL_WELL_KNOWN__CLIENT": {
                      "isOptional": false,
                      "description": "Client discovery base URL",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "TUWUNEL_WELL_KNOWN__SERVER": {
                      "isOptional": false,
                      "description": "Federation delegation to port 443",
                      "defaultValue": "${{RAILWAY_PUBLIC_DOMAIN}}:443"
                    },
                    "TUWUNEL_DB_POOL_MAX_WORKERS": {
                      "isOptional": false,
                      "description": "Ceiling on database pool threads",
                      "defaultValue": "128"
                    },
                    "TUWUNEL_DB_CACHE_CAPACITY_MB": {
                      "isOptional": false,
                      "description": "RocksDB read cache size",
                      "defaultValue": "512"
                    },
                    "TUWUNEL_DB_POOL_WORKERS_LIMIT": {
                      "isOptional": false,
                      "description": "Threads per storage queue; uncapped exhausts threads",
                      "defaultValue": "2"
                    },
                    "TUWUNEL_CACHE_CAPACITY_MODIFIER": {
                      "isOptional": false,
                      "description": "Scales every in-memory LRU cache",
                      "defaultValue": "0.2"
                    },
                    "TUWUNEL_MEDIA_STORAGE_PROVIDERS": {
                      "isOptional": false,
                      "description": "Read media from bucket, disk fallback",
                      "defaultValue": "[\"media\",\"s3\"]"
                    },
                    "TUWUNEL_STORE_MEDIA_ON_PROVIDERS": {
                      "isOptional": false,
                      "description": "Write new media to the bucket",
                      "defaultValue": "[\"s3\"]"
                    },
                    "TUWUNEL_DB_WRITE_BUFFER_CAPACITY_MB": {
                      "isOptional": false,
                      "description": "RocksDB write buffer size",
                      "defaultValue": "96"
                    },
                    "TUWUNEL_NEW_USER_DISPLAYNAME_SUFFIX": {
                      "isOptional": false,
                      "description": "No emoji appended to display names",
                      "defaultValue": "{{TUWUNEL_NEW_USER_DISPLAYNAME_SUFFIX}}"
                    },
                    "TUWUNEL_ROCKSDB_PARALLELISM_THREADS": {
                      "isOptional": false,
                      "description": "RocksDB background threads",
                      "defaultValue": "8"
                    },
                    "TUWUNEL_STORAGE_PROVIDER__S3__S3__KEY": {
                      "isOptional": false,
                      "description": "Media bucket access key",
                      "defaultValue": "${{matrix-media.ACCESS_KEY_ID}}"
                    },
                    "TUWUNEL_STORAGE_PROVIDER__S3__S3__BUCKET": {
                      "isOptional": false,
                      "description": "Media bucket name",
                      "defaultValue": "${{matrix-media.BUCKET}}"
                    },
                    "TUWUNEL_STORAGE_PROVIDER__S3__S3__REGION": {
                      "isOptional": false,
                      "description": "Media bucket region",
                      "defaultValue": "${{matrix-media.REGION}}"
                    },
                    "TUWUNEL_STORAGE_PROVIDER__S3__S3__SECRET": {
                      "isOptional": false,
                      "description": "Media bucket secret key",
                      "defaultValue": "${{matrix-media.SECRET_ACCESS_KEY}}"
                    },
                    "TUWUNEL_STORAGE_PROVIDER__S3__S3__ENDPOINT": {
                      "isOptional": false,
                      "description": "Media bucket endpoint URL",
                      "defaultValue": "${{matrix-media.ENDPOINT}}"
                    },
                    "TUWUNEL_STORAGE_PROVIDER__S3__S3__USE_VHOST_REQUEST": {
                      "isOptional": false,
                      "description": "Path-style addressing",
                      "defaultValue": "false"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8008": {
                        "port": 8008
                      }
                    }
                  },
                  "volumeMounts": {
                    "2db262a2-9d6d-4deb-8351-31882126ade8": {
                      "mountPath": "/data"
                    }
                  }
                },
                "eb86c7e5-af83-4089-a88d-8571472fcfe5": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/element.svg",
                  "name": "element-web",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/element-web-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port Railway health-checks",
                      "defaultValue": "8080"
                    },
                    "ELEMENT_WEB_PORT": {
                      "isOptional": false,
                      "description": "nginx listen port; default 80 cannot bind",
                      "defaultValue": "8080"
                    },
                    "MATRIX_SERVER_NAME": {
                      "isOptional": false,
                      "description": "Matrix server name shown at login",
                      "defaultValue": "${{tuwunel.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "MATRIX_HOMESERVER_URL": {
                      "isOptional": false,
                      "description": "Homeserver this client signs in to",
                      "defaultValue": "https://${{tuwunel.RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "ELEMENT_ALLOW_OTHER_HOMESERVERS": {
                      "isOptional": false,
                      "description": "Lock the client to this homeserver",
                      "defaultValue": "false"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "tuwunel",
      "method": "GET",
      "path": "/_matrix/client/versions",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0"
}
