Skip to content

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
└── .dockerignore

Dockerfile

Create a Dockerfile in your repository. For web access, we’ll include Glowing Bear:

FROM weechat/weechat:latest
# Relay port for web clients
EXPOSE 9001
# The base image handles the entrypoint

Environment Variables

VariableRequiredDefaultDescription
WEECHAT_HOMENo/weechatWeeChat home directory

Deployment on Klutch.sh

  1. Push your Dockerfile to your GitHub repository.
  2. Log in to Klutch.sh and create a new project.
  3. Create a new app within your project and connect your GitHub repository containing the Dockerfile.
  4. Configure the deployment settings: - Select **HTTP** as the traffic type - Set the internal port to **9001** (for relay access)
  5. Attach a persistent volume: - Mount path: `/weechat` - Recommended size: 1 GB - Purpose: Configuration, logs, and scripts
  6. Click **Deploy** and wait for the build to complete.
  7. 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:

  1. Visit Glowing Bear
  2. Enter your WeeChat relay URL
  3. Provide the relay password
  4. Connect to your WeeChat instance

Post-Deployment Configuration

After connecting to WeeChat:

  1. Add IRC servers: /server add freenode irc.freenode.net
  2. Configure nicknames and authentication
  3. Install scripts as needed
  4. 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.

Additional Resources