Run your own Mana server
A Raspberry Pi 4/5 or an old laptop at home is enough for a family. The server never sees your content, so it does not need to be trusted with it.
What you need
- A Raspberry Pi 4 or 5 (64-bit OS) with an SSD, or any old laptop/PC running Linux, or Windows with WSL2.
- A home internet connection, and access to your router's settings.
- A free hostname from No-IP (or DuckDNS) so your server keeps a stable name while your home IP changes.
1. Install
git clone https://github.com/EdgeAdaptics/mana-server.git
cd mana-server
sudo ./deploy/pi/install.sh
This installs Docker, copies the stack to /opt/mana, creates a secret, and
sets everything to start on boot and after power cuts. It also schedules a nightly backup.
2. Try it on your home network first
Everything works without the internet. In /opt/mana/.env set
MANA_BIND=0.0.0.0, then:
sudo systemctl restart mana-server
curl http://localhost:8080/readyz # {"status":"ready"}
Find the computer's local address (hostname -I), and in the app use
http://<that-address>:8080 from phones on the same Wi-Fi.
3. Reach it from anywhere with No-IP
- At No-IP create a hostname, for example
mvk.sytes.net, then DDNS Keys → create a key for that hostname. Note its username and password. - Edit
/opt/mana/.env:MANA_DOMAIN=mvk.sytes.net MANA_PUBLIC_BASE_URL=https://mvk.sytes.net NOIP_HOSTNAME=mvk.sytes.net NOIP_USERNAME=<ddns key username> NOIP_PASSWORD=<ddns key password> MANA_CADDY_TLS=http01 COMPOSE_PROFILES=public - On your router, forward TCP 80 and 443 to the server's local address. Give the server a fixed local IP (DHCP reservation) so the forward keeps working.
sudo systemctl restart mana-server. The updater points your hostname at your home IP every 5 minutes, and Caddy fetches a free HTTPS certificate.- Test from a phone on mobile data (not your Wi-Fi):
https://mvk.sytes.net/readyz.
tailscale or cloudflared profile instead, or ask your ISP
for a public IPv4 address.cd /opt/mana && docker compose logs ddns caddy # see updater and certificate status
4. Publish the app for your family
Copy an Android build into the downloads folder. It appears on the Download page with its checksum.
sudo cp mana.apk /opt/mana/data/downloads/
The web app for iPhone, iPad and browsers
Each Mana release includes a web version of the app. Install it once and this server
offers it at https://<your address>/app/; the Download page then shows an
Open Mana in the browser button with the steps for adding it to an iPhone home
screen.
cd /opt/mana
sudo scripts/install-web-app.sh # newest release, checks SHA256SUMS
sudo scripts/install-web-app.sh --remove # take it away again
The script downloads mana-<version>-web.tar.gz and the release's
SHA256SUMS from GitHub, refuses a file whose checksum does not match, and swaps
it into data/web/. No restart is needed. Run it again after each Mana release.
While the Mana repositories are private, install the GitHub CLI and run
gh auth login first as your normal user (not with sudo): under
sudo the script runs gh as you, so your login is used. Or download
the two files yourself and use --file mana-…-web.tar.gz --sums SHA256SUMS.
If gh is not logged in, the script says so instead of downloading.
http:// addresses other than localhost. The server sends a strict
security policy with it: the app may load and talk only to this server and cannot be
embedded in other sites. The browser keeps each person's encrypted data, so remind people to
set up their recovery code.5. Backups, restore and moving to a new computer
cd /opt/mana
docker compose exec -u 10001 server python -m mana_server.backup create
docker compose exec -u 10001 server python -m mana_server.backup verify /data/backups/mana-<date>.tar.gz
# restore on a new machine (server stopped, empty data folder)
docker compose run --rm -u 10001 server python -m mana_server.backup restore /data/backups/mana-<date>.tar.gz
Backups contain only encrypted content and routing data: the database, every encrypted
photo and voice note (data/blobs), and every member's own encrypted backup
(data/backups-user). Copy them off the machine (USB disk, another computer) so a
dead SD card or disk does not take everything with it.
data/backups-user are locked with
their recovery codes. You cannot open them, and you do not need to: just keep them in your
server backups so a host move does not lose them. Each account has at most one, and it is
erased when the account is deleted.6. Storage and limits
Set these in .env if the defaults do not suit your disk or your family:
| Setting | Default | What it limits |
|---|---|---|
MANA_SPACE_QUOTA_BYTES | 2 GiB | Photos and voice notes per space |
MANA_MAX_BLOB_BYTES | 50 MiB | One photo or voice note |
MANA_MAX_BACKUP_BYTES | 20 MiB | One member's encrypted personal backup |
MANA_RL_LINK_PER_MINUTE | 10 | "Link a new phone" codes, and attempts to use one, per minute |
MANA_RL_RECOVERY_PER_MINUTE | 10 | Recovery-code attempts per minute from one address |
What the server stores for each feature is the same story everywhere: locked bytes plus routing data. For linked phones it keeps a hashed, single-use code for 10 minutes; for recovery it keeps only a public key that can check, never create, a recovery proof; for location sessions, SOS, budgets, goals, collections and plans it keeps ordinary encrypted events it cannot read.
How big a server do I need?
A load test (scripts/bench.py) with 5 spaces of 20 members each, 1,000
messages with live sync, 50 photos of 256 KiB, key delivery and 100 personal backups
completed with no errors on a single ordinary laptop at roughly 160 to 290 requests per
second, with typical replies in 6 to 40 ms. A family uses a tiny fraction of that; a
Raspberry Pi 4 with an SSD is plenty. Run it against a test server only:
python scripts/bench.py --url http://127.0.0.1:8080 --spaces 5 --members 20
7. Operator page
Set MANA_ADMIN_TOKEN in .env to a long random string and open
the operator page. It shows health, storage, counts and backups,
and can run a backup. It never shows anyone's content.
8. Updating
cd ~/mana-server && git pull
sudo cp docker-compose.yml /opt/mana/ && cd /opt/mana && docker compose up -d --build
Database changes are applied automatically on start. Take a backup first. Update the server before handing out a new app version: new app features such as linking phones, recovery codes and encrypted backup need the matching server.