Requirements
- A Linux box you don’t use for anything else. 2 GB of RAM is enough for Mangrove plus a few small apps. Mangrove needs Docker access, which is equivalent to root, so don’t share the box with unrelated services.
- Docker with the Compose plugin.
- Caddy, with its admin API on
127.0.0.1:2019(Caddy’s default). - Go 1.25+ and Node 20+ to build Mangrove from source.
- nixpacks on the
PATH, only if you want the nixpacks build strategy (see Builds). The installer doesn’t install it.
One command
setup.sh:
- Installs Docker, Caddy, Go and Node if they’re missing.
- Builds the dashboard and the
mangrovebinary. - Creates the
mangrovesystem user and its directories (/var/lib/mangrove,/var/lib/mangrove-static,/etc/mangrove). - Installs the systemd units and memory slices from
deploy/systemd/. - Asks whether the box has a public IP or sits behind a home router, and sets up DDNS for the latter.
- Asks whether to install the optional storage helper (for turning a drive into a NAS).
- Starts the service and creates your admin account.
setup.sh is safe. Every step checks what’s already there.
When it finishes, Mangrove is running at http://127.0.0.1:7777.
Claiming the instance
On a fresh install nobody has an account. The first account becomes the owner, and creating it needs a single-use setup token, so someone who reaches the dashboard before you can’t claim the box. Mangrove creates the token the first time it starts with no accounts. It logs it and saves it to thesetup-token file in its data directory:
setup.sh reads the file and creates the account for you, so usually you never see it. If you start Mangrove some other way, enter the token on the dashboard’s first screen (opening /?setup_token=<token> fills it in), or pass it to mangrovectl setup --token.
The token stays the same across restarts until it’s used. Creating the first account deletes it, and from then on new accounts come from an owner (see Workspaces and roles).
Reach the dashboard
Mangrove’s API and dashboard listen on loopback only (127.0.0.1:7777). Nothing on the network can reach them until you choose
how. Two ways:
-
An SSH tunnel, for a quick look or a private box:
Then open
http://localhost:7777on your own machine. -
A domain with HTTPS, for everyday use: add a site to Caddy (or your
host’s edge) that reverse-proxies to
127.0.0.1:7777. See Going to production.
Try it locally
To try Mangrove on a laptop or dev box without systemd:http://127.0.0.1:7777, with its database and encryption key in ./data. The first visit asks you to create the first account, which becomes the owner. Paste the setup token from Mangrove’s output (also in ./data/setup-token); see Claiming the instance.
Mangrove creates its own Docker network (mangrove-net) the first time it
needs it.
After installing
- Put the dashboard behind HTTPS (see above).
- Set up backups. Losing the data directory’s
master.keymakes every stored secret unrecoverable. - Deploy something.
If the install fails
apt-get not found: the installer only supports Debian and Ubuntu. On another distro, install Docker, Caddy, Go and Node yourself, then follow Going to production by hand.- The service starts but the dashboard is blank: the dashboard wasn’t
built before the binary. Run
cd web && npm run build, rebuild the binary, and restart. See Upgrades. - Port 7777 is taken: set
MANGROVE_PORTin/etc/mangrove/mangrove.envand restart. See Configuration.