{
  "manifest_version": "1.0.0",
  "template": {
    "id": "266f281f-8ffd-4127-a428-45e7c0d7b5d6",
    "slug": "mattermost-team-chat",
    "name": "Mattermost",
    "description": "Slack Alternative. Chat, channels, threads, file sharing, search & more",
    "url": "https://railway.com/deploy/mattermost-team-chat",
    "upstream": {
      "image": "mattermost/mattermost-team-edition:11.9"
    }
  },
  "services": [
    {
      "name": "Mattermost",
      "source": {
        "image": "mattermost/mattermost-team-edition:11.9"
      },
      "needs_volume": false,
      "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
    }
  ],
  "required_inputs": [
    {
      "key": "TZ",
      "service": "Mattermost",
      "description": "Container timezone",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "PORT",
      "service": "Mattermost",
      "description": "HTTP port for health checks",
      "secret": false,
      "strategy": "default",
      "default": "8065"
    },
    {
      "key": "MM_CONFIG",
      "service": "Mattermost",
      "description": "Stores server config in Postgres",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MM_SQLSETTINGS_DATASOURCE",
      "service": "Mattermost",
      "description": "Application database connection",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MM_SQLSETTINGS_DRIVERNAME",
      "service": "Mattermost",
      "description": "Database driver name",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "MM_FILESETTINGS_DRIVERNAME",
      "service": "Mattermost",
      "description": "Use object storage for files",
      "secret": false,
      "strategy": "default",
      "default": "amazons3"
    },
    {
      "key": "MM_SERVICESETTINGS_SITEURL",
      "service": "Mattermost",
      "description": "Public-facing site URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "MM_FILESETTINGS_AMAZONS3SSL",
      "service": "Mattermost",
      "description": "Use HTTPS to reach storage",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "MM_FILESETTINGS_AMAZONS3BUCKET",
      "service": "Mattermost",
      "description": "Bucket name for uploads",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MM_FILESETTINGS_AMAZONS3REGION",
      "service": "Mattermost",
      "description": "Bucket region",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MM_FILESETTINGS_AMAZONS3ENDPOINT",
      "service": "Mattermost",
      "description": "Storage host, no URL scheme",
      "secret": false,
      "strategy": "default",
      "default": "t3.storageapi.dev"
    },
    {
      "key": "MM_SERVICESETTINGS_LISTENADDRESS",
      "service": "Mattermost",
      "description": "Server listen address",
      "secret": false,
      "strategy": "default",
      "default": ":8065"
    },
    {
      "key": "MM_FILESETTINGS_AMAZONS3ACCESSKEYID",
      "service": "Mattermost",
      "description": "Bucket access key id",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MM_FILESETTINGS_AMAZONS3SECRETACCESSKEY",
      "service": "Mattermost",
      "description": "Bucket secret access key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MM_SERVICESETTINGS_TRUSTEDPROXYIPHEADER",
      "service": "Mattermost",
      "description": "Read real client IP headers",
      "secret": false,
      "strategy": "default",
      "default": "X-Forwarded-For X-Real-IP"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data directory, a subdirectory of the volume mount",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Private hostname, reachable only inside the project",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Standard PostgreSQL port",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "libpq alias of the superuser name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "libpq alias of the default database",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "libpq alias of the superuser password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Default database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "rRAILWAY_PRIVATE_DOMAINailway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string, use this from other services",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Validity window of the generated self-signed TLS certificate",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Generated superuser password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Public connection string over the TCP proxy, for external tools",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Grace period for in-flight connections on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "mattermost-team-chat"
      }
    },
    "cli": "railway deploy --template mattermost-team-chat",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "266f281f-8ffd-4127-a428-45e7c0d7b5d6",
            "serializedConfig": {
              "buckets": {
                "67c20462-6e34-4fb7-bef0-c26d9458e8f7": {
                  "name": "mattermost-files"
                }
              },
              "services": {
                "54307598-e998-4b52-93c6-b7dd76e1fdd6": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mattermost.svg",
                  "name": "Mattermost",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/v4/system/ping",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mattermost/mattermost-team-edition:11.9"
                  },
                  "variables": {
                    "TZ": {
                      "isOptional": false,
                      "description": "Container timezone",
                      "defaultValue": "UTC"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port for health checks",
                      "defaultValue": "8065"
                    },
                    "MM_CONFIG": {
                      "isOptional": false,
                      "description": "Stores server config in Postgres",
                      "defaultValue": "postgres://${{Postgres.PGUSER}}:${{Postgres.PGPASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/${{Postgres.PGDATABASE}}?sslmode=disable&connect_timeout=10"
                    },
                    "MM_SQLSETTINGS_DATASOURCE": {
                      "isOptional": false,
                      "description": "Application database connection",
                      "defaultValue": "postgres://${{Postgres.PGUSER}}:${{Postgres.PGPASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/${{Postgres.PGDATABASE}}?sslmode=disable&connect_timeout=10"
                    },
                    "MM_SQLSETTINGS_DRIVERNAME": {
                      "isOptional": false,
                      "description": "Database driver name",
                      "defaultValue": "postgres"
                    },
                    "MM_FILESETTINGS_DRIVERNAME": {
                      "isOptional": false,
                      "description": "Use object storage for files",
                      "defaultValue": "amazons3"
                    },
                    "MM_SERVICESETTINGS_SITEURL": {
                      "isOptional": false,
                      "description": "Public-facing site URL",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "MM_FILESETTINGS_AMAZONS3SSL": {
                      "isOptional": false,
                      "description": "Use HTTPS to reach storage",
                      "defaultValue": "true"
                    },
                    "MM_FILESETTINGS_AMAZONS3BUCKET": {
                      "isOptional": false,
                      "description": "Bucket name for uploads",
                      "defaultValue": "${{mattermost-files.BUCKET}}"
                    },
                    "MM_FILESETTINGS_AMAZONS3REGION": {
                      "isOptional": false,
                      "description": "Bucket region",
                      "defaultValue": "${{mattermost-files.REGION}}"
                    },
                    "MM_FILESETTINGS_AMAZONS3ENDPOINT": {
                      "isOptional": false,
                      "description": "Storage host, no URL scheme",
                      "defaultValue": "t3.storageapi.dev"
                    },
                    "MM_SERVICESETTINGS_LISTENADDRESS": {
                      "isOptional": false,
                      "description": "Server listen address",
                      "defaultValue": ":8065"
                    },
                    "MM_FILESETTINGS_AMAZONS3ACCESSKEYID": {
                      "isOptional": false,
                      "description": "Bucket access key id",
                      "defaultValue": "${{mattermost-files.ACCESS_KEY_ID}}"
                    },
                    "MM_FILESETTINGS_AMAZONS3SECRETACCESSKEY": {
                      "isOptional": false,
                      "description": "Bucket secret access key",
                      "defaultValue": "${{mattermost-files.SECRET_ACCESS_KEY}}"
                    },
                    "MM_SERVICESETTINGS_TRUSTEDPROXYIPHEADER": {
                      "isOptional": false,
                      "description": "Read real client IP headers",
                      "defaultValue": "X-Forwarded-For X-Real-IP"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8065": {
                        "port": 8065
                      }
                    }
                  }
                },
                "77c5710f-0cd3-4f7b-b507-ccd663c56f3c": {
                  "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": "Data directory, a subdirectory of the volume mount",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Private hostname, reachable only inside the project",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Standard PostgreSQL port",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "libpq alias of the superuser name",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "libpq alias of the default database",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "libpq alias of the superuser password",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created on first boot",
                      "defaultValue": "rRAILWAY_PRIVATE_DOMAINailway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string, use this from other services",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first boot",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Validity window of the generated self-signed TLS certificate",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated superuser password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "description": "Public connection string over the TCP proxy, for external tools",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Grace period for in-flight connections on redeploy",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "77c5710f-0cd3-4f7b-b507-ccd663c56f3c": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Mattermost",
      "method": "GET",
      "path": "/api/v4/system/ping",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-10T17:52:47.031Z",
  "success_rate_30d": 0.5,
  "validation": {
    "last_run_id": "run_9d011f24ca814eca809d",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": false,
        "detail": "Your workspace has been restricted. Please contact support to resolve this."
      }
    ],
    "typical_ready_seconds": 113,
    "typical_build_seconds": 0,
    "typical_start_seconds": 41,
    "slowest_service": "Mattermost"
  }
}
