Skip to content
Tildev0.6.1

Chat accounts

This page shows how to write a chat account in config.toml: one for XMPP and one for IRC. The complete list of keys is in config.toml: accounts.

Each account is a [[accounts.chat]] table with one table inside it, connection. A chat account has no store and no transport.

[[accounts.chat]]
id = "jabber"
name = "Jabber"
[accounts.chat.connection]
protocol = "xmpp"
username = "ada@example.org"
password = "#{pass show chat/jabber}"
[accounts.chat.connection.settings]
host = "xmpp.example.org"
security = "starttls"
resource = "tilde"
nick = "ada"
  • id names the account for commands such as tcli send chat. Each id is used once among the chat accounts.
  • name is the label of the account. protocol is xmpp or irc.
  • username and password log in. Do not write a password in the file: see Passwords.
  • settings holds the keys of the protocol.

The username is the bare JID, user@domain, and the password is required.

Key Meaning Default
host The server to connect to. the domain of the JID
port The TCP port, 1 to 65535. 5222 (5223 with security = "tls")
security auto, none, starttls or tls. auto
resource The name of this client among the ones of the same account. tilde
nick The nickname in group chats. the part of the JID before @

The username is the nick. Only the nick and the host are required. Without a password the account connects without logging in.

[[accounts.chat]]
id = "libera"
name = "Libera"
[accounts.chat.connection]
protocol = "irc"
username = "ada"
password = "#{pass show chat/libera}"
[accounts.chat.connection.settings]
host = "irc.libera.chat"
channels = "#tilde, #dotnet"
realname = "Ada Lovelace"
Key Meaning Default
host The server. none
port The TCP port, 1 to 65535. 6697 (6667 with security = "none")
security auto, tls or none. auto
auth sasl, pass (the server password) or none. sasl when there is a password, else none
account The account of the SASL login. the nick
user The user name of the registration. the nick
realname The real name of the registration. the nick
reconnect Connect again after a lost connection: true or false. true
channels Channels to join at every connect, separated by commas, at most 100. none

auth other than none needs a password, and a password with auth = "none" is an error.

The connection is always encrypted unless you write security = "none". auto is the default. For XMPP it means direct TLS on port 5223 and STARTTLS on any other port. With any other value, the password never goes out on a connection that is not encrypted. IRC has no STARTTLS, so auto means TLS from the first byte, the same as tls.

Terminal window
tcli check

tt does not show chat accounts yet. Send a message with tcli send chat to try an account, and use tcli check --connect to log in.