Skip to content

Deploying RobustIRC

Introduction

RobustIRC is a distributed IRC implementation designed to eliminate the single points of failure that plague traditional IRC networks. Using the Raft consensus algorithm, RobustIRC provides a fault-tolerant chat network where nodes can fail without disrupting the service or causing netsplits.

Key highlights of RobustIRC:

  • Distributed Architecture: No single point of failure in the network
  • Raft Consensus: Uses Raft for consistent state across nodes
  • No Netsplits: Designed to prevent network fragmentation
  • IRC Compatible: Works with standard IRC clients via bridge
  • Automatic Failover: Seamless handling of node failures
  • Message Durability: Messages are replicated across nodes
  • Simple Operation: Fewer operational concerns than traditional IRC
  • Go Implementation: Written in Go for performance and reliability
  • Open Source: Apache 2.0 licensed

This guide walks through deploying a RobustIRC node on Klutch.sh using Docker.

Why Deploy RobustIRC on Klutch.sh

Deploying RobustIRC on Klutch.sh provides several advantages:

Simplified Deployment: Klutch.sh automatically builds and deploys RobustIRC without complex cluster configuration.

Persistent Storage: Attach persistent volumes for Raft state that survives container restarts.

HTTPS by Default: Klutch.sh provides automatic SSL for secure node communication.

Always-On Availability: Your RobustIRC node remains available 24/7 for network participation.

Prerequisites

Before deploying RobustIRC on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your RobustIRC configuration
  • Understanding of distributed systems concepts
  • Basic familiarity with Docker

Preparing Your Repository

Create a GitHub repository containing your Dockerfile for RobustIRC deployment.

Repository Structure

robustirc-deploy/
├── Dockerfile
└── .dockerignore

Creating the Dockerfile

Create a Dockerfile in the root of your repository:

FROM golang:1.21-alpine AS builder
RUN apk add --no-cache git
RUN go install github.com/robustirc/robustirc@latest
FROM alpine:latest
COPY --from=builder /go/bin/robustirc /usr/local/bin/
# Create data directory
RUN mkdir -p /data
# Expose ports
# 8443 - HTTPS API
# 60667 - IRC bridge
EXPOSE 8443
ENTRYPOINT ["robustirc"]

Environment Variables Reference

VariableRequiredDescription
ROBUSTIRC_NETWORKYesNetwork name for the IRC network
ROBUSTIRC_LISTENNoListen address (default: :8443)

Deploying RobustIRC on Klutch.sh

    Push Your Repository to GitHub

    Commit and push your Dockerfile to GitHub.

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project with a descriptive name like “robustirc”.

    Create a New App

    Within your project, create a new app. Connect your GitHub account and select the repository containing your RobustIRC Dockerfile.

    Configure HTTP Traffic

    In the deployment settings:

    • Select HTTP as the traffic type
    • Set the internal port to 8443

    Attach Persistent Volumes

    Add the following volume:

    Mount PathRecommended SizePurpose
    /data5 GBRaft state and message storage

    Deploy Your Application

    Click Deploy to start the build process.

    Access RobustIRC

    Once deployment completes, your RobustIRC node is available at your app URL.

Configuration

Bootstrapping a Network

For a new RobustIRC network, the first node must bootstrap:

  1. Start the first node with bootstrap flags
  2. Record the network peers configuration
  3. Add additional nodes using the peer addresses

Joining Existing Network

To join an existing RobustIRC network:

  1. Obtain peer addresses from network operators
  2. Configure your node with the peer list
  3. Start the node to join the cluster

Using the Bridge

To connect standard IRC clients:

  1. Deploy the RobustIRC bridge component
  2. Configure clients to connect to the bridge
  3. The bridge translates between IRC and RobustIRC protocols

Operational Considerations

Cluster Size

  • Minimum 3 nodes recommended for fault tolerance
  • 5 nodes provides better resilience
  • Odd numbers preferred for Raft consensus

Monitoring

  • Monitor node health and Raft leader status
  • Watch for consensus issues
  • Track message throughput

Additional Resources

Conclusion

Deploying RobustIRC on Klutch.sh gives you a node in a fault-tolerant IRC network without the complexity of traditional IRC server federation. With Raft consensus ensuring consistency and automatic failover, RobustIRC provides reliable chat infrastructure that survives node failures gracefully.