This guide is obselete, please use bridge-manager
We've made selt-hosting Beeper bridges infinitely easier! We recommend using our new tool bridge-manager rather than this old method.
If you're just looking to install Beeper, you can get it here. If you're a developer wanting to contribute or if you want to self-host Beeper on your own infrastructure, read on.
Read the full FAQ
Beeper is built on top of an open source chat protocol called Matrix. When we started building Beeper, we made a fundamental decision to open source the majority of our backend code and provide you with the option to self-host Beeper. We chose to do this because:
- We want you to be able to inspect the source code that Beeper uses to connect to other chat networks
- We want to contribute to the Matrix ecosystem
- We want to provide great libraries for others to develop open source Matrix bridges
Our infrastructure stack is composed of:
Beeper Clients
- Native iOS and Android clients (closed source forks of Element iOS and Android)
- Mac OS, Windows and Linux clients (closed source forks of Element Web/Desktop)
Matrix Homeserver
Open Source, Beeper-maintained Matrix bridges
Open source, community maintained Matrix bridges, Beeper sponsored
fair/kakaotalk | fair/line |
---|
What is a Matrix bridge? Learn more
Self hosting Beeper is possible, but not an easy task right now. It requires experience and/or willingness to learn Linux system administration.
Note: only open source Matrix clients like Element or SchildiChat can connect to a self-hosted system at this time. Beeper clients require a Beeper account and use Beeper’s infrastructure.
💡 We recommend using the https://github.com/spantaleev/matrix-docker-ansible-deploy playbook to deploy Beeper’s Matrix bridges alongside a Matrix homeserver and client-
Purchase a domain
- We recommend Google Domains
- Insert this domain (eg
selfhostbeeper.com
) wherever<insert_domain>
is shown in these instructions.
-
Select a hosting provider
- We recommend a 2GB RAM 50GB disk Digital Ocean Droplet
- Record the Droplet IP to use in next step
-
Configure DNS
Type Host Priority Weight Port Target A matrix - - - droplet-ip - Test your domain to make sure it’s pointing at the Droplet IP
nslookup -type=A matrix.<insert_domain>
- Test your domain to make sure it’s pointing at the Droplet IP
-
Install necessary tools on your desktop/laptop
Mac OS
brew install git pwgen
Linuxapt install git pwgen
-
Download playbook to your desktop/laptop
git clone https://github.com/spantaleev/matrix-docker-ansible-deploy.git && cd matrix-docker-ansible-deploy
-
Configure the installation
mkdir inventory/host_vars/matrix.<insert_domain>
-
wget https://raw.githubusercontent.com/beeper/self-host/main/vars.yml
-
cp vars.yml inventory/host_vars/matrix.<insert_domain>/vars.yml
-
open
inventory/host_vars/matrix.<insert_domain>/vars.yml
in a text editor- Insert your
<insert_domain>
in line 12 - Enter a real email address in line 27 and 40
- Wherever
<create_secretkey>
shows up (eg line 22), switch back to your terminal, runpwgen -s 64 1
and insert that key into the file - Disable any bridges you do not want (saves RAM!) or enable Telegram by following instructions on Line 52
- Save the file.
- Insert your
-
cp examples/hosts inventory/hosts
-
Open
inventory/hosts
in a text editor- Replace
<your_domain>
with your domain - Replace
your-server's external IP address>
with Droplet IP - add the following to the hosts file:
ansible_connection=community.docker.nsenter
. The hosts file shold now look like this:
- Replace
[matrix_servers]
matrix.YOUR.DOMAIN ansible_host=YOUR_SERVERS_IP ansible_connection=local ansible_ssh_user=root ansible_connection=community.docker.nsenter
-
Install docker and make sure it is started
Mac OS - Follow instructions https://docs.docker.com/desktop/install/mac-install
Linux - Follow instructions https://docs.docker.com/desktop/install/linux-install/#generic-installation-steps
-
Run Ansible in docker from the
/matrix-docker-ansible-deploy
directory. If this doesn't work, check the playbook instructions.docker run -it --rm \ -w /work \ -v `pwd`:/work \ -v $HOME/.ssh/id_rsa:/root/.ssh/id_rsa:ro \ --entrypoint=/bin/sh \ docker.io/devture/ansible:2.13.6-r0-1
-
Your terminal should now show
/work
, then issue these commandsgit config --global --add safe.directory /work
make roles
ansible-playbook -i inventory/hosts setup.yml --tags=install-all,ensure-matrix-users-created,start
- Your server is now installed! Check that everything is working
ansible-playbook -i inventory/hosts setup.yml --tags=self-check
- ignore the errors about federation
- Additional configuration https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-playbook.md#other-configuration-options
- Note that if you remove components from
vars.yml
, or if we switch some component from being installed by default to not being installed by default anymore, you'd need to run the setup command with--tags=setup-all
instead of--tags=install-all
. See Playbook tags introduction****
e. Create your user account, change the command to include your preferred username (
<insert_username
) and password (<your_password>
).ansible-playbook -i inventory/hosts setup.yml --extra-vars='username=<insert_username> password=<your_password> admin=yes' --tags=register-user
-
In a browser, open our recommended Matrix client, https://app.schildi.chat/#/login
- Click ‘Edit’ and
https://matrix.<your_domain>
into the homeserver field, eghttps://matrix.beeptest.org
then click Continue - Sign in with your username/password created in step 14e
- Click ‘Edit’ and
-
Set up each bridge
- Click the + icon, then type in
@whatsappbot:<your_domain>
into the search bar and wait for a suggestion to appear, then click on it, then click Done. This will start a chat with the ‘bridge bot’ and provide you with a console to login and setup the bridge - Click the Whatsapp Bridge Bot chat in the left panel, then send the message
help
in the chat to see the list of commands. Each bridge has a slightly different sign in command, but it is usuallylogin
,link
, orlogin-qr
- Repeat Step 16 for each bridge you would like to configure (eg
@instagrambot:<your_domain>
) - Great! Now all your bridges are set up
- Click the + icon, then type in
-
Set up mobile apps
- Android - SchildiChat
- iOS - Recommended apps: Element or FluffyChat
- Advanced and optional! Enable federation
- Add a root
A record
to your DNS pointing at your Droplet IP - Modify
vars.yml
tomatrix_nginx_proxy_base_domain_serving_enabled: true
, then re-run the Ansible script - Confirm it’s working at https://federationtester.matrix.org/
- How to upgrade your installation later
We would love to hear what you think about Beeper and our open source software. We hang out at #beeper:beeper.com on Matrix, or create an issue in this repository.