databag/README.md

158 lines
6.2 KiB
Markdown
Raw Normal View History

2022-12-02 19:24:44 +00:00
[![contribute.design](https://contribute.design/api/shield/balzack/databag)](https://contribute.design/balzack/databag)
2022-11-01 16:36:13 +00:00
<div align="center">
2023-08-09 05:12:13 +00:00
<a href="#"><img src="/doc/icon_v2.png" width="8%" style="border-radius:50%"></a>
2022-11-01 16:36:13 +00:00
<h3 align="center">Databag</h3>
2024-02-03 09:39:13 +00:00
<p align="center">A federated messenger for self-hosting</p>
2022-11-01 16:36:13 +00:00
</div>
2024-03-22 21:21:22 +00:00
<p align="center">
<a href="/doc/design_overview.md">-> Design Overview <-</a>
</p>
2022-11-01 16:36:13 +00:00
<br>
2022-06-10 17:58:34 +00:00
<p align="center">
2022-11-01 07:55:25 +00:00
<a href="/doc/mobile.png"><img src="/doc/mobile.png" width="48%"/></a>
2022-11-01 07:41:40 +00:00
&nbsp;&nbsp;
2022-11-01 07:55:25 +00:00
<a href="/doc/browser.png"><img src="/doc/browser.png" width="48%"/></a>
2022-06-10 17:58:34 +00:00
</p>
2022-11-01 07:41:40 +00:00
<p align="center">
2022-11-01 20:46:03 +00:00
<sub>Mobile and Browser App Screens</sub>
2022-11-01 07:41:40 +00:00
</p>
<br>
2022-06-10 17:58:34 +00:00
2024-04-02 20:23:47 +00:00
Databag is designed for efficiency, consuming minimal hosting resources. Notable features include:
2023-04-20 04:56:15 +00:00
- Decentralized (direct communication between app and server node)
2023-04-17 00:17:50 +00:00
- Federated (accounts on different nodes can communicate)
2023-04-18 05:17:00 +00:00
- Public-Private key based identity (not bound to any blockchain or hosting domain)
2024-01-20 00:45:44 +00:00
- End-to-End encryption (the hosting admin cannot view topics if sealed)
2023-04-26 20:35:33 +00:00
- Audio and Video Calls (nat traversal requires separate relay server)
2022-11-17 19:16:38 +00:00
- Topic based threads (messages organized by topic not contacts)
2024-03-26 06:02:39 +00:00
- Unlimited participants (no limit on group thread members)
2023-04-18 22:41:47 +00:00
- Lightweight (server can run on a raspberry pi zero v1.3)
2022-07-23 03:58:52 +00:00
- Low latency (use of websockets for push events to avoid polling)
- Unlimited accounts per node (host for your whole family)
2023-06-10 17:38:58 +00:00
- Mobile alerts for new contacts, messages, and calls (supports UnifiedPush, FCM, APN)
2024-05-18 15:57:53 +00:00
- Multi-Factor Authentication (integrates with TOTP apps)
2022-06-10 18:47:18 +00:00
2022-11-01 07:41:40 +00:00
<br>
<p align="center">
2023-07-09 18:29:01 +00:00
<a href="https://f-droid.org/en/packages/com.databag/">
<img src="/doc/fdroid.png" width="18%">
</a>
2022-11-01 07:41:40 +00:00
<a href="https://apps.apple.com/us/app/databag/id6443741428">
2022-11-30 18:48:58 +00:00
<img src="/doc/astore.png" width="18%">
2022-11-01 07:41:40 +00:00
</a>
<a href="https://play.google.com/store/apps/details?id=com.databag">
2022-11-30 18:48:58 +00:00
<img src="/doc/gplay.png" width="18%">
2022-11-01 07:41:40 +00:00
</a>
</p>
2023-07-09 18:29:01 +00:00
The app is available on fdroid as well as the google and apple stores. You can test out the project [here](https://databag.coredb.org/#/create), but don't post anything important as this server is regularly wiped. Feedback on the UI/UX, bugs or features is greatly appreciated.
2022-06-10 19:04:29 +00:00
2022-07-25 20:19:16 +00:00
## Installation
2022-06-10 19:04:29 +00:00
2022-11-04 16:46:04 +00:00
To use databag, you will need a DNS name pointing to your node with a certificate. You can deploy a node manually, but you will have a much easier time using a container service. Containers for arm64 and amd64 are available [here](https://hub.docker.com/r/balzack/databag/tags).
2022-07-25 18:04:31 +00:00
2022-11-29 18:53:09 +00:00
### Docker Compose Command
2022-11-29 19:02:35 +00:00
From the net/container sub directory:
2022-11-29 18:53:09 +00:00
- sudo docker-compose -f compose.yaml -p databag up
2022-07-25 18:04:31 +00:00
### Example with Portainer and Nginx Proxy Manager
From Portainer:
2023-07-05 16:18:45 +00:00
- In the volume view, click add volume:
2022-12-20 06:28:04 +00:00
- Enter a name, then click 'Create the volume'
2022-07-25 18:04:31 +00:00
- In the container view, click add container:
- In the 'Image' field enter 'balzack/databag:latest'
- Click 'publish a new network port', and select port 7000 for both host and container
- Under 'Advanced container settings', select 'Env', and click 'Add Environment Variable'
- Enter 'Name' as 'ADMIN' and your admin password [password]
2022-12-20 06:25:04 +00:00
- Under 'Advanced container settings', select 'Volumes', then 'map additional volume'
- Enter '/var/lib/databag' for 'container' and the created volume for 'volume'
2022-07-25 18:04:31 +00:00
- Click 'Deploy the Container'
From Nginx Proxy Manager:
- Add a host and specify:
- Hostname [hostname.domain]
- Portainer IP address [address]
- Port '7000'
- Request new SSL certificate
<details>
<summary>Nginx Proxy config
➡️ Click to expand ⬅️
</summary>
```
server {
server_name your.site.tld;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:7000;
client_max_body_size 0;
proxy_max_temp_file_size 0;
}
listen 443 ssl http2;
ssl_certificate /etc/letsencrypt/live/your.site.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your.site.tld/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
add_header Strict-Transport-Security "max-age=0";
}
server {
if ($host = your.site.tld) {
return 301 https://$host$request_uri;
}
listen 80;
server_name your.site.tld;
return 404;
}
```
</details>
2022-07-25 18:04:31 +00:00
From Your Browser:
- Enter your server address in the address bar [hostname.domain]
- Click the cog icon in the top right
- Enter your admin password: [password]
- Click the cog icon in the dashboard
- Enter Federated Host as [hostname.domain]
- Click 'Save'
- Click the user icon to generate a new account link
- Follow the link to create an account
2022-11-17 03:59:19 +00:00
### Other installation options
2024-01-25 01:09:00 +00:00
Install without a container on a Raspberry Pi Zero [here](/doc/pizero.md).
2022-11-17 03:59:19 +00:00
2024-01-25 01:09:00 +00:00
Install without a container in AWS [here](/doc/aws.md).
2023-04-16 23:59:53 +00:00
2024-01-25 01:09:00 +00:00
Integrate Databag in an OpenWrt firmware [here](/doc/openwrt.md).
2024-01-24 22:34:30 +00:00
2024-03-12 22:30:30 +00:00
1-click installs in [CapRover](https://caprover.com/), [CasaOS](https://casaos.io), [Unraid](https://unraid.net/), [Runtipi](https://www.runtipi.io/), [Kubero](https://www.kubero.dev/), [Umbrel](https://umbrel.com/)
2023-08-09 05:27:58 +00:00
2023-04-16 23:59:53 +00:00
## Audio and Video Calls
2024-06-04 23:15:05 +00:00
Databag provides audio and video calling and relies on a STUN/TURN relay server for NAT traversal. Testing was done with both [coturn](https://github.com/coturn/coturn) and [cloudflare](https://developers.cloudflare.com/calls/turn/) and should work with any implementation. Instructions for installing a coturn server are provided [here](https://gabrieltanner.org/blog/turn-server/).
2023-04-16 23:59:53 +00:00
2024-06-04 23:15:05 +00:00
If you want to enable audio and video calls, you should setup your own relay server or use the cloudflare [turn service](https://developers.cloudflare.com/calls/turn/). For testing purposes you can however use the demo relay server configuration. In the admin configuration modal, set:
2023-04-17 00:16:33 +00:00
- Enable WebRTC Calls: -switch on-
2023-04-16 23:59:53 +00:00
- WebRTC Server URL: turn:34.210.172.114:3478?transport=udp
- WebRTC Username: user
- WebRTC Password: pass
2024-03-14 01:43:06 +00:00
### Roadmap
2024-06-30 17:14:34 +00:00
Please add any missing features; [here](/doc/backlog.md) is the current backlog. Features are prioritized based on interest from the community.