Deploying WeeChat
Introduction
WeeChat (Wee Enhanced Environment for Chat) is a fast, light, and extensible chat client that runs in your terminal. When deployed on a server, it can be accessed via relay protocols or web interfaces, providing persistent connections to IRC, Matrix, Slack, and other chat networks.
WeeChat is highly scriptable with support for multiple programming languages (Python, Perl, Ruby, Lua, TCL, Guile, and JavaScript), making it extremely customizable.
Key features of WeeChat include:
- Multi-Protocol Support: IRC, Matrix (via plugin), Slack, and more
- Relay Protocol: Access WeeChat remotely via relay connections
- Web Interface: Access via Glowing Bear or other web clients
- Extensive Scripting: Plugins in Python, Perl, Ruby, Lua, TCL, and more
- Persistent Connection: Stay connected while your client is offline
- Trigger System: Automate actions based on events
- Secure Password Storage: Encrypted password storage
- Split Windows: View multiple buffers simultaneously
- Customizable Bars: Fully configurable interface
- Mouse Support: Mouse navigation in terminal
- FIFO Pipe: Control WeeChat from external scripts
- Proxy Support: Connect through HTTP, SOCKS4, and SOCKS5 proxies
This guide walks you through deploying WeeChat on Klutch.sh using Docker for persistent chat access.
Prerequisites
Before deploying WeeChat on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your configuration
- IRC server or other chat network credentials
- Basic familiarity with Docker and IRC concepts
Repository Structure
Create a GitHub repository with the following structure:
weechat-deploy/├── Dockerfile└── .dockerignoreDockerfile
Create a Dockerfile in your repository. For web access, we’ll include Glowing Bear:
FROM weechat/weechat:latest
# Relay port for web clientsEXPOSE 9001
# The base image handles the entrypointEnvironment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
WEECHAT_HOME | No | /weechat | WeeChat home directory |
Deployment on Klutch.sh
- Push your Dockerfile to your GitHub repository.
- Log in to Klutch.sh and create a new project.
- Create a new app within your project and connect your GitHub repository containing the Dockerfile.
- Configure the deployment settings: - Select **HTTP** as the traffic type - Set the internal port to **9001** (for relay access)
- Attach a persistent volume: - Mount path: `/weechat` - Recommended size: 1 GB - Purpose: Configuration, logs, and scripts
- Click **Deploy** and wait for the build to complete.
- Configure the WeeChat relay for remote access.
Configuring Relay Access
After deployment, you need to configure WeeChat’s relay for remote access. This typically requires initial configuration via direct access or pre-configured files.
Setting Up Relay
Once you have access to WeeChat, configure the relay:
/relay add weechat 9001/set relay.network.password "your-secure-password"Using Glowing Bear
Glowing Bear is a web frontend for WeeChat:
- Visit Glowing Bear
- Enter your WeeChat relay URL
- Provide the relay password
- Connect to your WeeChat instance
Post-Deployment Configuration
After connecting to WeeChat:
- Add IRC servers:
/server add freenode irc.freenode.net - Configure nicknames and authentication
- Install scripts as needed
- Set up auto-join channels
Troubleshooting
Cannot Connect to Relay
Verify the relay is running and the password is correctly set. Check that port 9001 is exposed.
Connection Drops
Configure ping settings to maintain connections through firewalls and NAT.