# Disco - Interactive Shell Discourse Management Tool with Telegram Notifications

**URL:** https://meta.discourse.org/t/disco-interactive-shell-discourse-management-tool-with-telegram-notifications/387063
**Category:** Extras
**Created:** [October 29, 2025, 1:40pm UTC](https://meta.discourse.org/t/disco-interactive-shell-discourse-management-tool-with-telegram-notifications/387063 "2025-10-29T13:40:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![DigneZzZ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dignezzz/32/506171_2.png) [@DigneZzZ](https://meta.discourse.org/u/DigneZzZ)
#### Post date: [October 29, 2025, 1:40pm UTC](https://meta.discourse.org/t/disco-interactive-shell-discourse-management-tool-with-telegram-notifications/387063/1 "2025-10-29T13:40:11Z")

</div>

# disco - Interactive Shell Discourse Management Tool with Telegram Notifications

| | | |
| --- | --- | --- |
| ℹ | **Summary** | A command-line wrapper for Discourse management with interactive menu interface and automatic Telegram notifications for maintenance operations |
| 🛠 | **Repository Link** | [GitHub - DigneZzZ/discourse-cli: Discourse CLI interface with TG events when rebuild · GitHub](https://github.com/DigneZzZ/discourse-cli) |
| 📖 | **Documentation** | [Installation Guide](https://github.com/DigneZzZ/discourse-cli/blob/main/INSTALL.md) · [Quick Start](https://github.com/DigneZzZ/discourse-cli/blob/main/QUICKSTART.md) · [Examples](https://github.com/DigneZzZ/discourse-cli/blob/main/EXAMPLES.md) |

  

## 👋 Introduction

Hey everyone!

I want to share a solution I created while managing my community forum. Like many of you, I have a Telegram group for my community, and I was constantly getting questions about **“Is the forum down?”** or **“When will maintenance be finished?”** whenever I needed to update or restart Discourse.

To solve this (and make my life easier), I built **disco** - a command-line wrapper for Discourse management that includes **automatic Telegram notifications** and an **interactive menu interface**.

  

## 🎯 What Problem It Solves

- **No more “Is the forum down?” questions** - automatic notifications to your Telegram group
- **Simplified management** - interactive menu instead of remembering launcher commands
- **Safety first** - confirmations for dangerous operations (rebuild, stop, cleanup)
- **Better visibility** - real-time status, logs, and resource monitoring
- **Faster troubleshooting** - all operations in one place with clear output

  

## ✨ Features

### 🎮 Interactive Menu Interface

Launch `disco` without arguments to get a beautiful numbered menu:

```plaintext
╔════════════════════════════════════════════════════════════╗
║ 🚀 Discourse Manager v1.2.0 ║
║ 📦 Container: app | Status: 🟢 Running ║
╚════════════════════════════════════════════════════════════╝

 1. 📊 Show Status
 2. 🔄 Restart Container
 3. 📝 View Logs (last 100 lines)
 4. 📺 Live Monitor
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 5. 🔧 Full Rebuild (with updates) ⚠
 6. ⚡ Fast Rebuild
 7. 💾 Create Backup
 8. 🧹 Cleanup Docker Resources ⚠
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 9. ▶️ Start Container
10. ⏸️ Stop Container ⚠
11. 🐚 Enter Container Shell
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
12. 📥 Update Launcher
13. 📱 Test Telegram Notifications
14. ⚙️ Show Configuration
15. 🔄 Update disco
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 0. ❌ Exit

```

**Features:**

- Just type a number (1-15) to select action
- Real-time container status in header
- Visual warnings (⚠) for critical operations
- Safety confirmations - type “yes” to confirm dangerous actions
- Smart sudo detection - warns when root privileges needed

### 📱 Telegram Notifications

Automatic notifications keep your community informed:

**When rebuild starts:**

```plaintext
🔧 Forum is going into maintenance

⏱ Expected time: ~10 minutes

We apologize for the temporary inconvenience.

```

**When complete:**

```plaintext
✅ Forum is back online!

⏱ Maintenance time: 7m 57s
🔖 Version: 3.2.0.beta4

Thank you for your patience! 🚀

```

**On errors:**

```plaintext
❌ Forum update failed

⏱ Attempt duration: 3m 12s

⚠️ Administrator attention required!
Check logs: disco logs

```

### 📊 Monitoring & Diagnostics

**Status Overview:**

```plaintext
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Discourse Status
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📦 Container: app
🟢 Status: Running
⏱ Uptime: Up 3 days
🔖 Version: 3.2.0.beta4
💻 CPU: 2.5%
🧠 Memory: 1.2GB / 4GB

```

**Features:**

- Real-time CPU and memory usage
- Container uptime tracking
- Automatic version detection via API
- Live log monitoring with follow mode
- Resource monitoring dashboard

### 🛡 Safety Features

- **Confirmation prompts** for critical operations (rebuild, stop, cleanup)
- **Sudo detection** - warns when privileges are needed
- **Version display** - always know what version is running
- **Detailed warnings** - explains exactly what each critical action will do

### ⚡ Quick Operations

All standard Discourse operations available:

- **Container management** - start, stop, restart, enter shell
- **Maintenance** - rebuild (full/fast), backup, cleanup
- **Monitoring** - status, logs, live resource monitor
- **Updates** - launcher updates with one command

  

## 📥 Installation

### Quick Install

```bash
# Download and install
curl -o disco https://raw.githubusercontent.com/DigneZzZ/discourse-cli/main/disco
chmod +x disco
sudo mv disco /usr/local/bin/

# Verify installation
disco version

# Launch interactive menu
disco

```

## ⚙ Configuration

### Basic Setup

Create a configuration file in one of these locations:

- `~/.disco.env` (recommended)
- `/etc/disco/.env`
- Next to the script

```bash
# Copy example configuration
curl -o ~/.disco.env https://raw.githubusercontent.com/DigneZzZ/discourse-cli/main/.env.example

# Edit settings
nano ~/.disco.env

```

### Configuration Example

```bash
# Basic settings
DISCOURSE_PATH=/var/discourse
CONFIG_NAME=app

# Telegram notifications (optional)
TELEGRAM_BOT_TOKEN=1234567890:ABCdefGHIjklMNOpqrsTUVwxyz
TELEGRAM_CHAT_ID=-1001234567890
TELEGRAM_THREAD_ID=1

```

### Setting up Telegram Notifications

**1. Create a bot:**

- Message [@BotFather](https://t.me/BotFather) on Telegram
- Send `/newbot` command
- Follow the instructions
- Save the bot token

**2. Get Chat ID:**

- Send any message to your bot
- Visit: `https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates`
- Find `"chat":{"id":...}` in the response

**3. Get Thread ID (for groups with topics):**

- Send a message to the desired topic in your group
- In getUpdates response, find `message_thread_id`

**4. Test notifications:**

```bash
disco test-telegram

```

  

## 🚀 Usage

### Interactive Menu (Recommended)

```bash
# Launch interactive menu
disco

# With sudo for administrative actions
sudo disco

```

Simply type the number of the action you want to perform!

### Command-Line Mode

For automation or quick operations:

```bash
# Status and monitoring
disco status # Show container status
disco logs # View last 100 lines
disco logs 500 # View last 500 lines
disco monitor # Real-time resource monitoring

# Container management
sudo disco start # Start container
sudo disco stop # Stop container
sudo disco restart # Restart container
disco enter # Enter container shell

# Maintenance
sudo disco rebuild # Full rebuild with updates
sudo disco fast-rebuild # Quick rebuild (no launcher update)
sudo disco backup # Create backup (auto name)
sudo disco backup my-name # Create backup (custom name)
sudo disco cleanup # Clean up Docker resources

# Utilities
sudo disco update-launcher # Update Discourse launcher
disco test-telegram # Test Telegram notifications
disco show-config # Show disco configuration
disco version # Show version
disco help # Show help

```

  

## 📄 Settings

| Name | Description | Default | Required |
| --- | --- | --- | --- |
| `DISCOURSE_PATH` | Path to Discourse installation directory | `/var/discourse` | No |
| `CONFIG_NAME` | Container configuration name | `app` | No |
| `TELEGRAM_BOT_TOKEN` | Telegram bot token from @BotFather | - | No (for notifications) |
| `TELEGRAM_CHAT_ID` | Telegram chat or group ID for notifications | - | No (for notifications) |
| `TELEGRAM_THREAD_ID` | Thread ID in group with topics | - | No (optional) |

  

## 💡 Use Cases

### Community Manager

- Keep community informed during maintenance automatically
- No more “is the forum down?” questions
- Professional maintenance notifications

### System Administrator

- Interactive menu for occasional management tasks
- Safety confirmations prevent accidents
- Quick access to logs and status

### DevOps Teams

- CLI mode for automation and scripts
- Consistent operations across team members
- Easy integration with monitoring systems

  

## 📈 Real-World Impact

Since deploying this tool:

- ✅ **Zero “is the forum down?” questions** in our Telegram group
- ✅ **Faster maintenance operations** - no context switching between terminal and messaging
- ✅ **Fewer mistakes during updates** - safety confirmations work!
- ✅ **Better monitoring** - quick access to logs and resource usage

  

## 📚 Documentation

- **[Installation Guide](https://github.com/DigneZzZ/discourse-cli/blob/main/INSTALL.md)** - Detailed installation instructions
- **[Quick Start Guide](https://github.com/DigneZzZ/discourse-cli/blob/main/QUICKSTART.md)** - Get started in 5 minutes
- **[Features Documentation](https://github.com/DigneZzZ/discourse-cli/blob/main/FEATURES.md)** - Interactive menu features explained
- **[Usage Examples](https://github.com/DigneZzZ/discourse-cli/blob/main/EXAMPLES.md)** - Real-world workflows and scenarios
- **[Changelog](https://github.com/DigneZzZ/discourse-cli/blob/main/CHANGELOG.md)** - Version history

  

## ❤ Why I Built This

Managing Discourse through the standard launcher is powerful, but:

- Commands are hard to remember
- No built-in notification system for community
- Easy to make mistakes with critical operations
- Community members always asking about downtime

**disco** wraps the launcher with a user-friendly interface and keeps everyone informed automatically.

  

## 🤝 Contributing

Contributions are welcome! If you have ideas or suggestions:

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Submit a Pull Request

Or simply [open an issue](https://github.com/DigneZzZ/discourse-cli/issues) with your feedback!

  

## 📃 License

MIT License - completely free to use and modify.

  

* * *

**GitHub Repository:** [GitHub - DigneZzZ/discourse-cli: Discourse CLI interface with TG events when rebuild · GitHub](https://github.com/DigneZzZ/discourse-cli)
