Sign inSign up

aairey/weechat-otr

By aairey

•Updated over 6 years ago

WeeChat Client + OTR plugin and some extra python libraries

Image
0

1.2K

aairey/weechat-otr repository overview

⁠docker-weechat-otr

Docker Automated build

Run the WeeChat⁠ IRC client with Off-the-Record⁠ (OTR) encryption.

⁠Image details

This images contains:

  • the latest WeeChat from their repository
  • Spelling dictionaries (aspell) for English, French, German and Dutch
  • Support for scripts in Python, Lua and Perl
  • OTR⁠ script
  • wee-slack⁠ script
  • matrix.org⁠ script
  • Dependency for the whatsapp⁠ script

⁠Run from Docker Hub

A pre-built image is available on Docker Hub⁠ and can be run as follows:

docker run -t -i aairey/weechat-otr

The container will start up with the WeeChat⁠ client. Within WeeChat⁠, configure your nick, username, realname:

/set irc.server.freenode.nicks alice
/set irc.server.freenode.username alice
/set irc.server.freenode.realname "Alice Springs"

Finally, connect to freenode:

/connect freenode

⁠Run headlessly

Since v2.1 it is possible to run weechat in headless mode, using the binary weechat-headless.

Sample working docker-compose.yml file that I use personally:

weechat:
# script to run the old version manually in tmux (for interactive password prompt)
# docker run -e "TERM=screen-256color" -v /path/to/weechat/config/:/home/guest/.weechat -p 9001:9001 -ti docker.io/aairey/weechat-otr:v1.9.1 -a
  image: docker.io/aairey/weechat-otr:v2.1
  environment:
    TERM: screen-256color
    LANGUAGE: en_US:en
    LANG: en_US.UTF-8
    LC_ALL: en_US.UTF-8
    WEECHAT_PASSPHRASE: "${WEECHAT_PASSWORD}"
  entrypoint: 'weechat-headless'
  ports:
    - 9001:9001
  volumes:
    - /path/to/weechat/config:/home/guest/.weechat

You can set your decrypt password in a file named .env next to your docker-compose.yml (make sure it is in your .gitignore!)

⁠Build from Source

  1. Make sure Docker⁠ is installed.

  2. Clone docker-weechat-otr from GitHub⁠

    git clone https://github.com/aairey/docker-weechat-otr.git
    
  3. Build the docker image

    cd docker-weechat-otr
    docker build -t aairey/weechat-otr .
    
  4. Run a docker container with that image

    docker run -t -i aairey/weechat-otr
    

⁠Use OTR Encryption

Within WeeChat⁠, you can use OTR⁠ encryption as follows:

  1. Start a private conversation without encryption:

    /query bob hello
    
  2. Within the private chat buffer, start the encrypted session

    /otr start
    

    It may take a few seconds until the encrypted conversation is established.

For more info, run /help otr in the server buffer to view the OTR help.

⁠Storing Configuration Permanently

The instructions above show an easy way to try out WeeChat⁠ and OTR⁠ encryption.

However, if you use WeeChat⁠ regularly, you may soon find it annoying that all data in the Docker⁠ container is lost as soon as WeeChat⁠ exits:

  • You need to configure your nick each time you start the container (/set irc.server.freenode.nicks alice)
  • WeeChat⁠ generates new OTR⁠ keys and fingerprints each time it starts.
  • All conversation logs are gone once WeeChat⁠ quits.

If you start using WeeChat⁠ regularly, you want to store data permanently. In order to do that, you need to create a directory on your host computer and map that directory to /home/guest/.weechat in the Docker⁠ container:

mkdir ~/.weechat
chmod 700 ~/.weechat
docker run -v ~/.weechat:/home/guest/.weechat -t -i aairey/weechat-otr

That way, all WeeChat⁠ data is stored in ~/.weechat on the host system, and can be re-used in the next docker run.

⁠Why OTR?

Spiegel Online has an interesting article⁠ on how intelligence agencies crack encrypted Internet communication. As the linked documents from the Snowden archives suggest, the NSA seems to have major problems with decrypting OTR messages.

⁠Credits

  • fstab⁠ For providing the image I based this one upon.

Tag summary

Content type

Image

Digest

Size

219.5 MB

Last updated

over 6 years ago

docker pull aairey/weechat-otr