{
  "manifest_version": "1.0.0",
  "template": {
    "id": "005af959-0389-4825-8ce7-534bc694312d",
    "slug": "mattermost-team",
    "name": "Mattermost | Self-Hosted Slack Alternative for Team Chat",
    "description": "Team chat on Postgres 17, system admin created on first boot",
    "url": "https://railway.com/deploy/mattermost-team",
    "upstream": {
      "repo_url": "https://github.com/two-workspaces/mattermost"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Mattermost",
      "source": {
        "repo": "https://github.com/two-workspaces/mattermost"
      },
      "needs_volume": true,
      "volume_mount_path": "/mattermost/data",
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "postgres:17.11-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Mattermost",
      "description": "HTTP port Mattermost listens on - leave as is.",
      "secret": false,
      "strategy": "default",
      "default": "8065"
    },
    {
      "key": "MM_CONFIG",
      "service": "Mattermost",
      "description": "Keeps Mattermost's configuration in Postgres, so System Console changes survive redeploys.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MM_ADMIN_EMAIL",
      "service": "Mattermost",
      "description": "Email of the system admin created on the first boot.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "MM_ADMIN_PASSWORD",
      "service": "Mattermost",
      "description": "System admin password, generated at deploy time and used on the first boot only. Change it in Mattermost afterwards (Profile > Security).",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MM_ADMIN_USERNAME",
      "service": "Mattermost",
      "description": "Username of the system admin created on the first boot.",
      "secret": false,
      "strategy": "default",
      "default": "sysadmin"
    },
    {
      "key": "MM_SQLSETTINGS_DATASOURCE",
      "service": "Mattermost",
      "description": "Postgres connection (private network)",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MM_SQLSETTINGS_DRIVERNAME",
      "service": "Mattermost",
      "description": "Database driver - leave as is.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "MM_SERVICESETTINGS_SITEURL",
      "service": "Mattermost",
      "description": "Public URL Mattermost builds links with. Change it if you add a custom domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database name",
      "secret": false,
      "strategy": "default",
      "default": "mattermost"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Database user",
      "secret": false,
      "strategy": "default",
      "default": "mattermost"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Auto-generated database password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Time for Postgres to shut down cleanly on redeploy",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "mattermost-team"
      }
    },
    "cli": "railway deploy --template mattermost-team",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "005af959-0389-4825-8ce7-534bc694312d",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "83907118-216e-40c4-9a49-796dfbb654ad": {
                  "icon": "https://raw.githubusercontent.com/two-workspaces/mattermost/main/icon.svg",
                  "name": "Mattermost",
                  "build": {
                    "dockerfilePath": "Dockerfile"
                  },
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/v4/system/ping",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/two-workspaces/mattermost",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port Mattermost listens on - leave as is.",
                      "defaultValue": "8065"
                    },
                    "MM_CONFIG": {
                      "isOptional": false,
                      "description": "Keeps Mattermost's configuration in Postgres, so System Console changes survive redeploys.",
                      "defaultValue": "postgres://${{Postgres.POSTGRES_USER}}:${{Postgres.POSTGRES_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/${{Postgres.POSTGRES_DB}}?sslmode=disable&connect_timeout=10"
                    },
                    "MM_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "Email of the system admin created on the first boot.",
                      "defaultValue": "{{MM_ADMIN_EMAIL}}"
                    },
                    "MM_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "System admin password, generated at deploy time and used on the first boot only. Change it in Mattermost afterwards (Profile > Security).",
                      "defaultValue": "{{MM_ADMIN_PASSWORD}}"
                    },
                    "MM_ADMIN_USERNAME": {
                      "isOptional": false,
                      "description": "Username of the system admin created on the first boot.",
                      "defaultValue": "sysadmin"
                    },
                    "MM_SQLSETTINGS_DATASOURCE": {
                      "isOptional": false,
                      "description": "Postgres connection (private network)",
                      "defaultValue": "postgres://${{Postgres.POSTGRES_USER}}:${{Postgres.POSTGRES_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/${{Postgres.POSTGRES_DB}}?sslmode=disable&connect_timeout=10"
                    },
                    "MM_SQLSETTINGS_DRIVERNAME": {
                      "isOptional": false,
                      "description": "Database driver - leave as is.",
                      "defaultValue": "postgres"
                    },
                    "MM_SERVICESETTINGS_SITEURL": {
                      "isOptional": false,
                      "description": "Public URL Mattermost builds links with. Change it if you add a custom domain.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "92f68b5e-6fee-462e-98ae-dd52ce3b2c0e": {
                      "mountPath": "/mattermost/data"
                    }
                  }
                },
                "c0d6a6fb-d7ea-4248-9ddf-c2cab56fc2a7": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:17.11-alpine"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Data subdirectory - keeps Postgres happy on Railway volumes",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database name",
                      "defaultValue": "mattermost"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database user",
                      "defaultValue": "mattermost"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated database password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Time for Postgres to shut down cleanly on redeploy",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "e18fbbf0-6608-4981-8e31-85b66fbce912": {
                      "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-10-27T04:14:46.034Z",
  "generator_version": "0.1.0"
}
