Back to services

Databag

Federated, end-to-end encrypted messaging service for the web, iOS, and Android, supporting text, photos, video, and WebRTC video and audio calls.

View alternatives to Databag
Suggest edit
Open source
Self-hostable
Apache-2.0
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

Introduction

Databag is a federated messaging tool built for self-hosting, designed to run efficiently and use few resources. Clients communicate directly with your own server node, and accounts on different nodes can still contact each other. The project is open source under the Apache-2.0 license. The server is written in Go, the web client is built on React, and the mobile client is built on React Native.

Key Features

  • Decentralized: clients communicate directly with server nodes.
  • Federation: accounts on different nodes can communicate with each other.
  • Identity based on public/private keys: identity does not depend on any blockchain and is not tied to a hosted domain name.
  • End-to-end encryption: once a topic is encrypted (sealed), even the server administrator cannot view its content.
  • Audio and video calls: based on WebRTC. NAT traversal requires a separately deployed STUN/TURN relay server (tested with coturn and Cloudflare TURN).
  • Messages organized by topic: messages are grouped by topic rather than by contact.
  • Unlimited group size: there is no cap on the number of members in a group chat thread.
  • Low latency: events are pushed over WebSocket, so no polling is needed.
  • Unlimited accounts per node: one node can serve your whole family.
  • Mobile notifications: you get alerts for new contacts, new messages and incoming calls, with support for UnifiedPush, FCM and APN.
  • Multi-factor authentication: works with TOTP authenticator apps.

Target Users and Use Cases

Suited to individuals, families and small groups who value privacy and want control over their communication data. It is also a good fit for self-hosting enthusiasts who want to set up a private chat service on low-power devices such as a Raspberry Pi, a NAS or an OpenWrt router.

Clients

  • Web app in the browser
  • Android: available from F-Droid or Google Play
  • iOS: available from the App Store

An official demo server is provided so you can try it out first. Data on the demo server is cleared periodically, so don't post anything important.

Installation and Deployment

Before deploying, you need a DNS domain name pointing to your node and a matching HTTPS certificate. Container deployment is recommended, and amd64 and arm64 images are available on Docker Hub (balzack/databag).

Standard startup with Docker Compose (run from the net/container subdirectory):

docker-compose -f compose.yaml -p databag up

Automatically obtaining an HTTPS certificate with certbot: first configure the DNS records, then enter your domain name in net/container/docker-compose-swag.yml, and run:

mkdir -p ~/appdata
docker-compose -f net/container/docker-compose-swag.yml -p databag up

Portainer + Nginx Proxy Manager:

  1. Create a container from the balzack/databag:latest image and map port 7000.
  2. Set the administrator password with the ADMIN environment variable and mount the data volume at /var/lib/databag.
  3. The reverse proxy must support WebSocket upgrades.
  4. Open the service address in your browser, click the gear icon in the upper right corner, enter the administrator password to access the admin panel, set the Federated Host, and then generate an account registration link.

Other options:

  • Install directly on a Raspberry Pi Zero or AWS without containers
  • Integrate it into OpenWrt firmware
  • One-click install on CapRover, CasaOS, Unraid, Runtipi, Kubero and Umbrel

Technical Requirements

  • A domain name and an HTTPS certificate are required
  • The server is very lightweight and can run on a Raspberry Pi Zero v1.3
  • To enable audio and video calls, you need to host your own TURN relay server or use a third-party one, then enable WebRTC in the admin panel and enter the server address and credentials

Notable Features

  • Very low resource usage, making it suitable for running long term on low-power hardware.
  • Identity is key-based and does not depend on a domain name, which makes future migration more flexible.
  • The feature roadmap is prioritized based on community feedback.