Weechat Android
weechat-android is a weechat relay client that allows you to connect to a running weechat cli (terminal) application from your android device. This lets you continue to chat on the town IRC server while you're away from your computer or "out and about". You also get to see the recent chat history.
Overview
This guide will take you through the steps to complete these tasks:
- Install the weechat-android app.
- Get weechat started in a terminal multiplexer.
- Set up weechat relay access on a random port with password protection.
- Create a new restricted ssh key with a pass phrase.
- Configure the app to use ssh to connect to the relay port.
Installation
The first step is to install the app on your android device using your preferred store / location:
Configuring weechat
In its default configuration weechat does not allow relay clients to connect. You will need to run the following commands to enable this feature:
- Open a town ssh session.
- If you haven't started a terminal multiplexer session create one now. If you already have one running then attach to it.
- Start weechat.
weechat - Choose a random port number to use for your relay port. It can be any unprivileged port but lets stick to one between 30000 and 39999.
- Enter this relay command into weechat and update the port to your chosen number.
/relay add weechat MYPORT - Enter this set command with a unique password. Note down the password for later or save it into your password manager. You will need to type it into the android app later.
/set relay.network.password "MYPASSWORD" - Save your settings.
/save
If you receive an error message during step 5, you may need to pick a different port number that isn't in use by another user.
SSH keys
In the previous section we configured our relay port but those ports aren't accessible to the outside world. We're going to set up ssh tunneling to work around this limitation.
Before we can connect we need to set up a new ssh key. If you already have one on your android device you can point weechat-android to that private key file. The following steps will assume that you're going to create a new key.
- Open a new window in your terminal multiplexer.
- Change directory into your ssh folder.
cd ~/.ssh/ - Make a new ssh key. For extra security be sure to set something for the pass phrase. You will need to type it into the android app later.
ssh-keygen -t ed25519 -f weechatandroid_ed25519 - Add your new key's public key to your authorized keys file.
cat weechatandroid_ed25519.pub >> authorized_keys - Edit your authorized keys file and add the following text to the start of the new key entry. Be sure to change the port number to the number you chose in the earlier section. This will restrict the ssh connection's access:
no-agent-forwarding,no-X11-forwarding,permitopen="127.0.0.1:{MYPORT}",command="echo 'This account can only be used for weechat relays'" - Transfer the weechatandroid_ed25519 private key file to your local machine. You may need to open a new local terminal window to do this.
scp tilde.town:.ssh/weechatandroid_ed25519 . - Transfer the weechatandroid_ed25519 private key file from your local machine to your android device using your preferred method. A tool like Localsend is ideal for this job. You can save it to any folder you like (e.g. Documents).
Configuring weechat-android
- Open the weechat-android app on your android device.
- Tap on the hamburger menu at the top right of the screen.
- Select "Settings".
- Tap on "Connection".
- Set "Connection Type" to "SSH Tunnel".
- Tap on "SSH tunnel settings".
- Set "SSH host" to "tilde.town".
- Set "SSH port" to "22".
- Set "SSH username" to your town username.
- Set "Authentication method" to "key".
- Tap on "Private key".
- Type in your ssh key pass phrase.
- Tap on "Choose file".
- Select the private key file that you transferred across.
- Tap the back arrow at the top left of the screen to go back to the "Connection" screen.
- Set "Relay host" to "127.0.0.1".
- Set "Relay port" to the port you chose earlier.
- Set "Relay password" to the password you chose earlier.
- To reduce load on the server ensure that these options are turned off:
- Reconnect on connection loss
- Connect on system boot
- Tap the back arrow at the top left of the screen to go back to the "Settings" screen.
- Tap the back arrow at the top left of the screen to go back to main screen.
- Tap on the hamburger menu at the top right of the screen.
- Select "Connect".
- If this is your first time using the app you may be asked to grant some permissions.
You'll know that you have successfully connected when the cat icon changes so that it has a cord in its mouth.
Ongoing Use
Now that you have weechat always running in your terminal multiplexer, you will be able to connect to it with weechat-android at any time.
Be sure to detach from the multiplexer, rather than closing it, whenever you've finished using the terminal.
Keep in mind that you will need to start a new multiplexer session, and start weechat again, if the server reboots.
Related Links
- Town Wiki - Tmux
- Town Wiki - Weechat
- Weechat Android SSH relay setup
- Setting up SSH - weechat-android wiki
last compiled: 2026-03-19 00:22:00.838912