Last Updated: February 25, 2016
· rondale-sc

Persistent IRC history with IRSSI and TMUX

Persistent IRC history with IRSSI

IRC is a wonderful tool to keep in touch with other developers. Maintaining chat history is not something that most IRC clients deal with well. Also, I don't really want to leave the terminal (like ever). Luckily, we can use IRSSI and TMUX together to provide a solution.

IRSSI is a terminal based irc client. It's great, and relatively easy to.

Server Setup

First you'll want to log into your server. I use Linode for this personally, and have a great experience with them thus far. Once you're on youre server you'll want to install IRSSI.

Check your system package manager first, if you want to compile from source here is a quick start guide

Once you've gotten it installed you'll be able to fire it up from the commandline with the irssi command. But we want this to be persistent so we'll use tmux.

<small>(install TMUX with your preferred package management solution)</small>

tmux new -s irssi irssi

The above command will create a new tmux session and run the irssi command. Once you have that you can detach from this session and reatach later (this will save your irssi history).

  • Attach with tmux attach -t irssi
  • Detach with <TMUX PREFIX> d


Add a server (let's face it probably freenode)

/server add -auto -network Freenode 6667

This will permanently store freenode in ~/.irssi/config and connect you when you run the irssi command

Add your nick

/network add -nick <your-nick> Freenode

Now you'll be logged in when you are connected to freenode.

Join a channel

/join #ruby-lang

Will join you to a channel. This will not be persisted, so the next time you log in you'll want to join again. You can add channels to auto join in your ~/.irssi/config if you'd like that ability.


There you have it. A simple start to IRSSI and TMUX. Enjoy persistent chat history, today!

Here's what my setup looks like:


If you'd like to see my config which handles a few other scenarios like nick identification and the solarized theme check here.

3 Responses
Add your response

Another option is using znc which gives you the messages between when you disconnected and reconnected. Enable the log mod and hook an apache alias up to that folder and you my friend can easily access all your logs from a browser.

over 1 year ago ·

IRSSI will also log chat messages to disk, if you tell it to - the functionality is built in. You'd still want to have IRSSI running as close to 24/7 as possible so that it can log messages sent while you were disconnected from the session. Logging to disk is especially useful when you need to be able to go back to parts of a conversation which have scrolled beyond IRSSI's scroll buffer. It also allows, as noted above, for browser-based review of conversations without having to touch your command line - useful if you want to check in, but don't have time to actually join the conversation.

Be careful, though - some channels on some networks (and, indeed, some of the networks themselves) forbid logging of chat sessions, usually for privacy reasons. We all know that this is a relatively useless measure for privacy protection, but it's still good to keep an eye on the policies for places you connect to and ensure you're not breaking a usage agreement.

Freenode isn't one of those places, thankfully, and essentially by definition.

over 1 year ago ·

i follow this step but when will make conection i find a problem. Irssi say "Not connected to server" can help me about it??

over 1 year ago ·