Chat - IRC (ircd & weechat)
For the purpose of a quick and instant chat or communication which is 100% anonymous and if chosen private, especially for coordination of smaller groups (or committees - read governance), we use ircd - a peer-to-peer chat, built by DarkFi. ircd supports group chats (open and private) as well as DM. Weechat is a client most of the people use (runs the chat in terminal), other IRC clients will work as well.
Installation
Dependencies
sudo apt-get install -y git make jq gcc vim weechat pkg-config libssl-dev
On debian based system, the user can run this to install dependencies:
sudo apt-get update
sudo apt-get install -y git make jq gcc pkg-config libmpg123-dev
For other os, check here to see which dependencies are needed.
Config Download
mkdir ~/.config/darkfi
wget -P ~/.config/darkfi https://github.com/lunardao/ircd/blob/master/ircd_config.toml
ircd
All the steps are in the DarkFi's ircd installation guide and in the ircd config file template as comments, this manual shows more explicit steps.
To install ircd, and the chat client Weechat follow DarkFi's ircd installation guide
- Make sure to go through the whole installation and set up Weechat.
Usage
Run ircd and start weechat:
- ircd daemon must be running in a terminal window for weechat to work. To start ircd, enter:
ircd
- in another window run weechat:
weechat
Weechat tips
Weechat commands are run down in the chat input field
- Configure weechat, save and quit:
/server add darkfi localhost/6667 -autoconnect
/save
/quit
weechat
to restart- To change your nick in weechat, enter:
/nick <new_nick>
- Change chat rooms by alt + arrow up/down or alt + channel_number
Join an unencrypted channel
To add and open a public channel on ircd, such as #new_channel, just add it to autojoin line in the config file:
autojoin = [....<existing_channels>..., "#new_channel"]
Restart ircd (restart ircd after any config changes). The channel shall appear automatically in the weechat.
Join an encrypted channel
To add an encrypted channel to ircd:
- Include the name of the channel and the secret to the config file:
[channel."#nameofchannel"]
secret = "<secret_string>"
- add the "#nameofchannel" to the autojoin
[]
line just like with public channels above. - Save the config file and restart ircd - the channels will appear in the weechat client.
Generate secret for channel
In case of starting a new private channel, a secret must be generated.
- Generate a secret for a new secret channel, enter in terminal:
ircd --gen-secret
- Add the secret and a name of channel of your choice to your config file (like in the previous step).
- Share this secret and the exact name of the channel PRIVATELY with others who are to be included in the channel (like in the previous steps).
Direct Messages
To DM with someone on ircd:
- Generate a key-pair using
ircd --gen-keypair
. NEVER share your private key! Possibly keys can be shared to a file using
ircd --gen-keypair -o ~/some_dir/filename
- Add a line to ircd_config.toml:
[private_key."your_newly_generated_private_key"]
- Share your pub key publicly or with others you want to chat with
- Add a contact of a user to DM with to the ircd_config.toml:
[contact."name_for_contact_of_your_choice"]
contact_pubkey = "the_pub_key_sent_by_the_contact"
- Save the config and restart ircd
- To add this contact in the weechat client, enter
/query <same_name_as_in_the_config>
. Name appears in the contact list.- Note: However users may change their names as often as they wish, the /query
command is based on the added per contact to ircd_config.toml as the contact is added based on the contact_pubkey (aligning with the counterpartys private_key in their config). Can be understood as a contact list in a phone.
- Note: However users may change their names as often as they wish, the /query
- Both of the users interested to DM must have add the other ones pub key to the config as a contact, save and restart ircd.