mana

Host a server

Your family's server, at home

A Raspberry Pi or an old laptop is enough for a family. The server never sees your content, so it does not need to be trusted with it. It only needs to stay switched on.

Don't want to run a server? The Mana free server is the default choice in the app. To host your own during the public beta, write to karguz609@gmail.com to get the server package. It includes an installer and the complete operator guide, which your server also shows on its own website.

What you need

A small computer

A Raspberry Pi 4 or 5 (64-bit) with an SSD, a Jetson-class board or mini PC, any computer running Linux, or Windows with WSL2. It should stay on and plugged in.

A home connection

Ordinary home broadband is fine. With the recommended setup you need no public IP address and no router changes, even behind carrier-grade NAT.

The server runs in Docker. It starts on boot and after power cuts, keeps its secrets on the machine, and takes a backup every night.

Install

  1. Copy the server package to the computer and run its installer. It installs Docker, sets up the server in /opt/mana, creates the server's secrets and schedules backups.
  2. Check that it is running:
    curl http://localhost:8080/readyz      # {"status":"ready"}
  3. To try it on your home Wi-Fi first, let it listen on your network and use http://<the computer's local address>:8080 in the app. Plain http:// is accepted only for home-network addresses, and the app marks the connection as not encrypted in transit. Your content is still end-to-end encrypted.
  4. Tell the server its home address and it also answers over https:// on port 8443, with a certificate from its own certificate authority. Phones that already know the server over its public address use that when the home internet is down, so the home connection is encrypted too.

Reach it from anywhere

Pick one. Both give your server a public https:// address without opening ports on your router, and both work when your internet provider shares one IP address between many homes. Your content stays end-to-end encrypted either way.

Recommended

Tailscale Funnel

Free and no domain needed. The HTTPS certificate stays on your computer, and Tailscale's relays pass the encrypted traffic through without being able to read it.

With your own domain

Cloudflare Tunnel

A short address such as mana.example.com, often faster because Cloudflare has servers close to most homes. Cloudflare terminates HTTPS, but your content stays encrypted end to end and unreadable to it.

Tailscale Funnel in three commands

curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
sudo tailscale funnel --bg 8080

The first time, Funnel prints a link: open it while signed in to Tailscale to allow Funnel for your network, then run the last command again. It prints your address, which stays the same after reboots. Set it as the server's public address in its settings file, restart the server, and test it from a phone on mobile data by opening https://<your address>/readyz. Everyone, at home or away, then uses that one address.

Every Funnel visitor reaches the server through the same relay, so per-address limits such as sign-ups per minute are shared between them. That is fine for a family.

Cloudflare Tunnel

In the Cloudflare dashboard, create a tunnel under Zero Trust, Networks, Tunnels, and add a public hostname that points at the server. Put the tunnel token and your hostname in the server's settings file, enable the tunnel profile and restart. The operator guide has the exact settings.

Have a public IPv4 address at home and prefer your own domain without a tunnel? The server can also get its own Let's Encrypt certificate with port forwarding. Many home connections are behind carrier-grade NAT, where that cannot work, so a tunnel is usually the simpler choice.

Decide who can sign up

A server on the internet should not let strangers create accounts. The registration setting has three values:

SettingWho can create an account
invite (default)Only someone holding a fresh invite to a space, or a sign-up code from you. The very first account on an empty server needs neither, so create yours straight away.
openAnyone who can reach the server.
closedNobody. Existing members keep everything and can still link new devices and use recovery.

Invites are the normal way in: an invite link also lets the person create their account. For anyone else, create a sign-up code on the operator page, choosing how many people may use it and for how many days. The code is shown once and stored only as a hash.

Offer the apps

Your server has its own small website with a Download page, a user guide and a page that opens invite links. Copy app builds from our releases into its downloads folder and they appear on the Download page with their checksums.

For iPhone, iPad and browsers, install the web app that comes with each release. The included script checks the release checksum before it swaps the files in, and the web app then appears at https://<your address>/app/. It needs https://, so set up Funnel or a tunnel first.

Backups and moving to a new computer

The server takes a consistent backup every night and can verify and restore it. Backups contain only encrypted content and the routing data needed to deliver it. Copy them to a USB disk or another computer, so that one failed disk cannot take everything with it.

Members' personal backups are locked with their own recovery codes; you cannot open them and do not need to. Moving to a new computer is a restore of the latest backup onto a fresh install.

Storage and limits

LimitDefault
Photos, videos and voice notes per space2 GiB
One photo, video or voice note50 MiB
One member's encrypted personal backup20 MiB

All of these can be changed. In a load test, five spaces of twenty members with live sync, photos and backups ran without errors on an ordinary laptop. A family uses a tiny fraction of that, and a Raspberry Pi 4 with an SSD is plenty.

Operator page

Set an admin token and open the operator page. It shows health, storage, counts and backups, runs a backup on demand, and manages sign-up codes.

The Accounts tab lists the accounts on your server with their devices, when they were last active, how many spaces they are in and how much they store. From an account you can suspend it (it is signed out everywhere and the app tells its owner), lift the suspension, revoke a lost device, or delete the account. The Usage tab charts active and new accounts, items written and bytes uploaded per day. Supervised children's accounts are listed with their guardians, age group and end date, and you can end a supervision if it is misused.

That is all an operator can see: accounts, devices, activity times and storage amounts. Messages, photos, names, space names and who said what are encrypted on members' phones, so nothing on the server can show them. Use suspension and deletion sparingly, and tell your members what you can see.

Device trust

From 0.9 each device keeps a second key that it uses to sign every request, so a copied sign-in is worthless. On Android the key lives in the phone's secure hardware and Android vouches for it, which lets the operator page show each device's trust level: a verified phone (genuine hardware, locked bootloader, the genuine Mana app), an unverified one (rooted or custom system), the web app, or a computer. No hardware identifiers are ever requested or stored. The device trust setting decides what to do with that:

SettingWhat happens
record (default)Show trust levels and refuse nobody. Devices on older apps keep working.
require-boundEvery device must have such a key. Apps from 0.9 add one when they next sign in; older apps stop working until they are updated.
require-hardwareNew devices must be verified phones. Devices already on the server stay and are listed for you. The web app and the computer apps are refused unless you allow them too.

The server also keeps its own certificate authority for this and for home-network https. Copy its folder together with the server's identity key when you move to a new computer; the operator guide has the details.

Updating

Take a backup, install the new server package with the same installer, and it rebuilds and restarts the server. Database changes are applied on start. Update the server before handing out a new app version.

Your responsibilities as a host

When you run a server for other people, you are the operator of that service. You cannot read their content, but you do hold some information about how it is used. Please read what operators hold, keep the computer updated, keep backups safe, and tell your members before you shut the server down.