databag is a free, open source social networking project written in TypeScript and released under Apache-2.0. It has 1,489 GitHub stars, 95 forks and 59 open issues, and was last pushed 3 months ago. On this registry it ranks #28 of 44 tracked projects in Social Networking, with 5 head-to-head comparisons available. It gained 1 stars over the last 3 tracked days.

What is databag?

What it is

Databag is a fast and lightweight self-hosted messenger written in TypeScript under the Apache-2.0 license. It belongs to the community and social networking ecosystem, with topics spanning decentralized web, federated chat, mobile messenger, and self-hosted server projects. Clients are available through F-Droid as well as the Google and Apple stores.

The concrete problem it addresses is the need for a messaging service that users can host themselves while keeping communication across independent nodes. It uses public-private key based identity that is not bound to a blockchain or hosting domain. The design targets low resource hosting, so a server can run on a Raspberry Pi Zero v1.3, while accounts on different nodes communicate through federation.

Key capabilities

  • The messenger supports decentralized direct communication between the app and a server node, and federation between nodes.
  • Identity uses public-private keys rather than a hosting domain or blockchain account.
  • End-to-end encryption prevents a hosting admin from viewing sealed topics.
  • Audio and video calls are supported, but NAT traversal requires a separate relay server.
  • Messages are organized in topic based threads, and group threads have no limit on participants.
  • The server uses websockets for push events, and mobile alerts support UnifiedPush, FCM, and APN.
  • Multi-factor authentication integrates with TOTP apps.

Who uses it and how

  • Individuals or families can host one node for unlimited accounts and multiple household members.
  • Small self-hosters can run the server on low-power hardware such as a Raspberry Pi Zero v1.3.
  • Operators can deploy with Docker Compose, Portainer, or another container service, then expose the node through DNS and TLS.
  • Users can connect mobile clients from F-Droid, Google, and Apple stores to a hosted node.
  • Test users can try the hosted instance at databag.coredb.org, but it is regularly wiped and unsuitable for important posts.

Getting started

Typical installation uses Docker Compose with balzack/databag containers for arm64 and amd64, or Portainer with balzack/databag:latest exposed on port 7000. A DNS name and TLS certificate are required, and a hosted test option exists at databag.coredb.org.

When to use it — and when not to

Databag fits self-hosters who want a lightweight federated messenger, key based identity, sealed topic encryption, and node control. It requires DNS, TLS, container hosting, storage, and a separate relay server for audio and video calls. The hosted test server is wiped regularly, so it is better for evaluation than for important posts.

project readme (upstream, from github) — read inline

contribute.design

Databag

A federated messenger for self-hosting

-> Design Overview


  

Mobile and Browser App Screens


Databag is designed for efficiency, consuming minimal hosting resources. Notable features include:

  • Decentralized (direct communication between app and server node)
  • Federated (accounts on different nodes can communicate)
  • Public-Private key based identity (not bound to any blockchain or hosting domain)
  • End-to-End encryption (the hosting admin cannot view topics if sealed)
  • Audio and Video Calls (nat traversal requires separate relay server)
  • Topic based threads (messages organized by topic not contacts)
  • Unlimited participants (no limit on group thread members)
  • Lightweight (server can run on a raspberry pi zero v1.3)
  • Low latency (use of websockets for push events to avoid polling)
  • Unlimited accounts per node (host for your whole family)
  • Mobile alerts for new contacts, messages, and calls (supports UnifiedPush, FCM, APN)
  • Multi-Factor Authentication (integrates with TOTP apps)

The app is available on fdroid as well as the google and apple stores. You can test out the project here, but don't post anything important as this server is regularly wiped.

Design

Read the Design Guidelines. Link to Figma File. Feel free to duplicate the Figma file to edit. Feedback on the UI/UX, bugs or features is greatly appreciated.

Installation

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.

Docker Compose

Launch with dockerhub container using docker compose:

Standard launch
# From the net/container sub directory:
docker-compose -f compose.yaml -p databag up
Launch with certbot https certificate
# FIRST: create a DNS entry in your DNS to point your desired subdomain to your host
# SECOND: edit the net/container/docker-compose-swag.yml to include your domain name
# THIRD: From the root of the project directory:
mkdir -p ~/appdata
docker-compose -f net/container/docker-compose-swag.yml -p databag up

Example with Portainer and Nginx Proxy Manager

From Portainer:

  • In the volume view, click add volume:
    • Enter a name, then click 'Create the volume'
  • 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]
    • Under 'Advanced container settings', select 'Volumes', then 'map additional volume'
      • Enter '/var/lib/databag' for 'container' and the created volume for 'volume'
    • 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
Nginx Proxy config ➡️ Click to expand ⬅️
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;
}

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

Example with nginx-proxy

If you are using nginx-proxy for automatic certification renewall, see the example provided in /examples/docker-nginx-proxy/ directory.

Other installation options

Install without a container on a Raspberry Pi Zero here.

Install without a container in AWS here.

Integrate Databag in an OpenWrt firmware here.

1-click installs in CapRover, CasaOS, Unraid, Runtipi, Kubero, Umbrel

Audio and Video Calls

Databag provides audio and video calling and relies on a STUN/TURN relay server for NAT traversal. Testing was done with both coturn and cloudflare and should work with any implementation. Instructions for installing a coturn server are provided here.

If you want to enable audio and video calls, you should setup your own relay server or use the cloudflare turn service. For testing purposes you can however use the demo relay server configuration. In the admin configuration modal, set:

  • Enable WebRTC Calls: -switch on-
  • WebRTC Server URL: turn:34.210.172.114:3478?transport=udp
  • WebRTC Username: user
  • WebRTC Password: pass

Roadmap

Please add any missing features; here is the current backlog. Features are prioritized based on interest from the community.

Frequently asked questions

Is databag free to use?

databag is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does databag do?

fast & lightweight self-hosted messenger

What is databag written in?

databag is primarily written in TypeScript. Its source is publicly available at https://github.com/balzack/databag, and it has 1,489 GitHub stars.