forked from ROOH/openclaw-mattermost
Initial commit: OpenClaw Mattermost Installer Wizard
This commit is contained in:
93
README.md
Normal file
93
README.md
Normal file
@@ -0,0 +1,93 @@
|
||||
# 🦞 OpenClaw Mattermost Installer
|
||||
|
||||
One-command deployment of **Mattermost Team Edition** on Ubuntu/Debian, pre-configured for [OpenClaw](https://openclaw.dev) integration.
|
||||
|
||||
## What It Does
|
||||
|
||||
- Installs **Docker**, **Nginx**, and **Certbot** (if not present)
|
||||
- Deploys **Mattermost + PostgreSQL** via Docker Compose
|
||||
- Configures **Nginx reverse proxy** with WebSocket support
|
||||
- Obtains a free **Let's Encrypt SSL certificate**
|
||||
- Binds to `127.0.0.1` for secure OpenClaw localhost access
|
||||
|
||||
## Prerequisites
|
||||
|
||||
| Requirement | Details |
|
||||
|---|---|
|
||||
| **OS** | Ubuntu 20.04+ / Debian 11+ |
|
||||
| **Access** | Root (sudo) |
|
||||
| **Ports** | 80 and 443 open to the internet |
|
||||
| **DNS** | A record pointing your domain to this server's IP |
|
||||
| **RAM** | 2 GB minimum (4 GB recommended) |
|
||||
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
# Download the installer
|
||||
git clone https://github.com/openclaw/mattermost-installer.git
|
||||
cd mattermost-installer
|
||||
|
||||
# Run the wizard
|
||||
sudo bash install.sh
|
||||
```
|
||||
|
||||
The wizard will ask you for:
|
||||
1. **Domain name** (e.g. `chat.example.com`)
|
||||
2. **Email** (for Let's Encrypt SSL)
|
||||
3. **Port** (default: 8000)
|
||||
4. **Install directory** (default: `~/mattermost-docker`)
|
||||
|
||||
## OpenClaw Integration
|
||||
|
||||
After installation, create a Bot Account in Mattermost:
|
||||
|
||||
1. Go to **System Console → Integrations → Bot Accounts**
|
||||
2. Enable bot creation, then create a bot with `post:all` permission
|
||||
3. Copy the generated Bot Token
|
||||
|
||||
Then configure OpenClaw:
|
||||
|
||||
```bash
|
||||
openclaw config set channels.mattermost.accounts.default.baseUrl "https://YOUR_DOMAIN"
|
||||
openclaw config set channels.mattermost.accounts.default.botToken "YOUR_BOT_TOKEN"
|
||||
```
|
||||
|
||||
OpenClaw connects internally via `http://localhost:8000` for maximum speed and security.
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
Internet → Nginx (443/SSL) → 127.0.0.1:8000 → Mattermost Container (:8065)
|
||||
↕
|
||||
OpenClaw Gateway → localhost:8000 ──────────────→ PostgreSQL Container
|
||||
```
|
||||
|
||||
## Management
|
||||
|
||||
```bash
|
||||
cd ~/mattermost-docker
|
||||
|
||||
# Start / Stop / Restart
|
||||
docker compose up -d
|
||||
docker compose down
|
||||
docker compose restart
|
||||
|
||||
# View logs
|
||||
docker compose logs -f mattermost
|
||||
|
||||
# Check status
|
||||
docker compose ps
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
| Issue | Fix |
|
||||
|---|---|
|
||||
| SSL cert failed | Verify DNS A record points to this server; check ports 80/443 are open |
|
||||
| Container won't start | Check logs: `docker compose logs mattermost` |
|
||||
| 502 Bad Gateway | Container may still be booting — wait 30s and refresh |
|
||||
| Permission denied | Run installer with `sudo` |
|
||||
|
||||
## License
|
||||
|
||||
MIT — use freely, contribute back. 🦞
|
||||
Reference in New Issue
Block a user