- Notifications
You must be signed in to change notification settings - Fork33
Learn how to self-host Beeper
License
beeper/self-host
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This guide is obselete, please usebridge-manager
We've made selt-hosting Beeper bridges infinitely easier! We recommend using our new toolbridge-manager rather than this old method.
If you're just looking to install Beeper, you can get ithere. If you're a developer wanting to contribute or if you want to self-host Beeper on your own infrastructure, read on.
Read the fullFAQ
Beeper is built on top of an open source chat protocol calledMatrix. 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
- NativeiOS andAndroid clients (closed source forks ofElement iOS andAndroid)
- Mac OS,Windows andLinux clients (closed source forks ofElement 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 thehttps://github.com/spantaleev/matrix-docker-ansible-deploy playbook to deploy Beeper’s Matrix bridges alongside a Matrix homeserver and clientPurchase 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 pwgenLinuxapt install git pwgenDownload playbook to your desktop/laptop
git clone https://github.com/spantaleev/matrix-docker-ansible-deploy.git && cd matrix-docker-ansible-deployConfigure the installation
mkdir inventory/host_vars/matrix.<insert_domain>wget https://raw.githubusercontent.com/beeper/self-host/main/vars.ymlcp vars.yml inventory/host_vars/matrix.<insert_domain>/vars.ymlopen
inventory/host_vars/matrix.<insert_domain>/vars.ymlin 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 1and 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/hostsOpen
inventory/hostsin 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.nsenterInstall docker and make sure it is started
Mac OS - Follow instructionshttps://docs.docker.com/desktop/install/mac-install
Linux - Follow instructionshttps://docs.docker.com/desktop/install/linux-install/#generic-installation-steps
Run Ansible in docker from the
/matrix-docker-ansible-deploydirectory. If this doesn't work, check theplaybook 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 /workmake rolesansible-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 configurationhttps://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-allinstead 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-userIn 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.orgthen 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
helpin 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 orFluffyChat
- Advanced and optional! Enable federation
- Add a root
A recordto your DNS pointing at your Droplet IP - Modify
vars.ymltomatrix_nginx_proxy_base_domain_serving_enabled: true, then re-run the Ansible script - Confirm it’s working athttps://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.
About
Learn how to self-host Beeper
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Contributors3
Uh oh!
There was an error while loading.Please reload this page.
