DocsInstall
DocsStart
Installing Memora
Install Memora with npm, Docker or the native installer: paths, flags, the systemd unit, reverse proxy, backups and upgrades.
On this page
- Network exposure
- Native install
- What it does
- Paths
- Flags
- Exit codes
- The systemd unit
- Settings
- First run
- Day to day
- Upgrading
- Uninstall
- Firewall
- Docker
- Volumes: /data and /state
- Verify
- Upgrading
- npm
- Start, stop and restart
- Update
- Uninstall with memora-cli
- Uninstall by hand (versions before 1.3.2)
- Troubleshooting
- Reverse proxy
- Backups
- Automation: --check and --upgrade
Memora ships as two binaries plus a folder of web UI assets:
| Piece | Role |
|---|---|
memora | The server: HTTP API, MCP, web UI, and WebSocket on one TCP port (default 8400) |
memora-cli | The operator console. Run it with no arguments for slash commands (/guide, /web, /config, ...) |
assets/ | Web UI files, found through MEMORA_ASSETS |
It runs on Linux (x86_64, aarch64) and Windows 10/11 (x64). Install it with npm (Linux and Windows, runs as you), Docker, the native installer (a systemd service on Linux) or from source. On Windows, use npm. All end the same way: run memora-cli setup, open the link it prints and enter the code.
Fastest path (pick one, in this order of ease), then open the link the setup command prints and enter the code:
# npm (Linux x86_64 / arm64, Windows x64; Node.js 22 or newer)
npm install -g @codrihub/memora && memora
memora-cli setup --minutes 15 # in a second terminal
# Docker: no clone or folder permissions needed (named volumes)
docker run -d --name memora --restart unless-stopped -p 8400:8400 \
-v memora-data:/data -v memora-state:/state ghcr.io/codrihub/memora:latest
docker exec -it memora memora-cli setup --minutes 15
# Native installer (Linux server with systemd)
curl -fsSL https://raw.githubusercontent.com/Codrihub/memora/main/scripts/install.sh | sudo sh
sudo memora-cli setup --minutes 15- Network exposure
- Native install
- Docker
- npm
- Start, stop and restart
- Update
- Uninstall with memora-cli
- Uninstall by hand (versions before 1.3.2)
- Troubleshooting
- Reverse proxy
- Backups
- Automation:
--checkand--upgrade
Network exposure#
Memora opens exactly one TCP port. The HTTP API, MCP (/mcp), the web UI, and the realtime WebSocket (/ws) all share it. The local event intake /_bus answers on the same port but only to loopback clients.
The state database is embedded SQLite (<state>/memora.db). The server creates and migrates it on first start; it opens no port and needs no separate database server or install.
Nothing else listens. Allow only that one port through the firewall, or none at all when a reverse proxy on the same host is the entry point (--behind-proxy).
Native install#
Requirements: Linux on x86_64 or aarch64 with systemd, curl (or wget), tar, sha256sum, and git (vault history uses it).
# Inspect first: https://github.com/Codrihub/memora/blob/main/scripts/install.sh
curl -fsSL https://raw.githubusercontent.com/Codrihub/memora/main/scripts/install.sh | sudo shPass flags after sh -s --, for example:
curl -fsSL https://raw.githubusercontent.com/Codrihub/memora/main/scripts/install.sh \
| sudo sh -s -- --version 1.0.0 --behind-proxyor download the script and run it: sudo sh install.sh --help.
The script is idempotent: running it again reinstalls the same files and keeps the port and bind address of the existing unit unless you pass new ones.
What it does#
- Downloads
memora-<version>-<arch>-linux.tar.gzfor this CPU from GitHub Releases (the latest, or--version), downloadsSHA256SUMSfrom the same release, and refuses to continue if the checksum does not match. - Installs the binaries atomically (copy to a temp file, then
mv). - Creates the system user and group
memora(no login shell, home/var/lib/memora). - Creates
/var/lib/memora/state(0700) and/var/lib/memora/vault(0750), owned bymemora. - Writes
/etc/systemd/system/memora.service, enables and starts it, waits for/healthz, then verifies the state database withmemora-cli db check. - Prints the next step and, when listening on every interface, a firewall hint.
Paths#
| Path | Content |
|---|---|
/usr/local/bin/memora, /usr/local/bin/memora-cli | Binaries |
/usr/local/share/memora/assets/ | Web UI |
/usr/local/share/memora/VERSION | Installed version (read by --check) |
/usr/local/share/memora/install.sh | Copy of the installer, used for --upgrade, --check, --uninstall, and memora-cli update |
/var/lib/memora/state/ | memora.db (owner, API key hashes, sessions, settings, activity log), backups/ |
/var/lib/memora/vault/ | Suggested vault folder (chosen in the browser after the first sign-in) |
/etc/systemd/system/memora.service | The unit |
--prefix moves the first four (default /usr/local), --data-dir moves the last two (default /var/lib/memora).
Flags#
| Flag | Meaning |
|---|---|
| (none) | Install or reinstall the latest release |
--version X.Y.Z | Install that release |
--from-source | Build with cargo build --release --locked in the checkout the script lives in (sudo ./scripts/install.sh --from-source); built as $SUDO_USER |
--from-dir PATH | Install PATH/memora, PATH/memora-cli, PATH/assets/ (an unpacked release, or your own build). Version from --version, else PATH/VERSION |
--port N | Port (default 8400) |
--bind ADDR | Bind address (default 0.0.0.0) |
--behind-proxy | Bind 127.0.0.1; a reverse proxy on this host is the only entry |
--prefix DIR | Install prefix (default /usr/local) |
--data-dir DIR | Data root (default /var/lib/memora) |
--no-start | Install and enable, but do not start |
--no-systemd | Skip the unit and the system user (containers, tests); prints the command to start the server by hand |
--upgrade | Replace binaries and assets, keep state, restart the service if it was running |
--force | With --upgrade: reinstall even when already up to date |
--uninstall | Stop and remove the unit, binaries, and assets; keep data |
--purge | With --uninstall: also delete the data dir and the memora user (asks first) |
--check | Print MEMORA_LATEST= and MEMORA_INSTALLED=; change nothing |
--yes, -y | Never ask (needed for --purge without a terminal) |
--dry-run | Print every action, change nothing |
--repo OWNER/NAME | Download from another GitHub repository (forks); also settable as MEMORA_REPO |
MEMORA_RELEASES_URL points the installer at a mirror that serves the same layout as GitHub (<url>/latest, <url>/download/vX.Y.Z/<file>).
Root is required except for --check, --dry-run, and --no-systemd into a prefix you can write to.
Exit codes#
| Code | Meaning |
|---|---|
0 | Success |
1 | Error (see the message) |
2 | Bad usage |
3 | Already up to date (--upgrade) |
4 | Network or download failure |
5 | Checksum mismatch or missing from SHA256SUMS |
6 | Not running as root |
7 | Unsupported OS or CPU |
The systemd unit#
The installer writes this unit (shown with the default paths and port):
[Unit]
Description=Memora - long-term memory for AI agents (HTTP API + MCP + web UI)
Documentation=https://github.com/Codrihub/memora
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=memora
Group=memora
WorkingDirectory=/var/lib/memora
Environment=HOME=/var/lib/memora
Environment=MEMORA_STATE=/var/lib/memora/state
Environment=MEMORA_ASSETS=/usr/local/share/memora/assets
Environment=MEMORA_PORT=8400
Environment=MEMORA_BIND=0.0.0.0
Environment=MEMORA_VAULT=/var/lib/memora/vault
Environment=GIT_AUTHOR_NAME=Memora
Environment=GIT_AUTHOR_EMAIL=memora@localhost
Environment=GIT_COMMITTER_NAME=Memora
Environment=GIT_COMMITTER_EMAIL=memora@localhost
Environment=RUST_LOG=info
ExecStart=/usr/local/bin/memora
Restart=on-failure
RestartSec=3
TimeoutStopSec=15
LimitNOFILE=65536
UMask=0027
# Hardening
NoNewPrivileges=yes
AmbientCapabilities=
CapabilityBoundingSet=
ProtectSystem=strict
ReadWritePaths=/var/lib/memora
ProtectHome=yes
PrivateTmp=yes
PrivateDevices=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectKernelLogs=yes
ProtectControlGroups=yes
ProtectClock=yes
ProtectHostname=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
LockPersonality=yes
MemoryDenyWriteExecute=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
SystemCallFilter=~@privileged
[Install]
WantedBy=multi-user.targetA port below 1024 adds CAP_NET_BIND_SERVICE instead of the empty capability set. There are no IP restrictions (IPAddressDeny=) by default; use the firewall, MEMORA_DOMAIN, or the access rules in the UI.
The installer rewrites the unit on every run. Put local changes in a drop-in:
sudo systemctl edit memora # for example, a vault outside /var/lib/memora:
# [Service]
# ReadWritePaths=/srv/notes
sudo systemctl restart memoraBecause of ProtectSystem=strict and ProtectHome=yes, the server can only write under /var/lib/memora. A vault anywhere else (including /home) needs the drop-in above (and ProtectHome=read-only or no for /home).
Settings#
The unit sets the basics (MEMORA_STATE, MEMORA_ASSETS, MEMORA_PORT, MEMORA_BIND, MEMORA_VAULT, RUST_LOG) as Environment= lines. Everything else (MEMORA_BASE_URL, MEMORA_DOMAIN, MEMORA_TRUSTED_PROXIES, ...) is stored in the state database (table server_config). Edit it with the console: sudo memora-cli → /config, then /restart.
A value stored with /config wins over the unit's Environment= lines; a key with no stored value uses the environment. If you stored MEMORA_PORT with /config and later reinstall with --port, change or clear it in /config too, otherwise the stored value keeps applying. The provisioning owner password and API key are environment-only and never stored (see CONFIGURATION.md).
See CONFIGURATION.md for every variable.
First run#
sudo memora-cli # opens the console; it finds the running server itself
/guide # step-by-step, or:
/web # prints a one-time codeOpen http://<host>:8400/login, enter the code, create the owner account, then choose the vault folder (/var/lib/memora/vault is suggested).
Day to day#
sudo systemctl status memora
sudo systemctl restart memora
sudo journalctl -u memora -f
sudo memora-cli # /status, /keys, /config, /restart, /mcp ...Upgrading#
sudo /usr/local/share/memora/install.sh --upgrade # latest release
sudo /usr/local/share/memora/install.sh --upgrade --version 1.0.1
sudo memora-cli update # same, from the consoleBinaries and assets are swapped atomically, the state directory and vault are untouched, and the service is restarted if it was running. The server migrates memora.db itself on start. Take a memora-cli db backup before upgrading, and read the CHANGELOG before a major version bump.
Uninstall#
sudo /usr/local/share/memora/install.sh --uninstall # keeps /var/lib/memora and the memora user
sudo /usr/local/share/memora/install.sh --uninstall --purge # also deletes notes, account, keys, and the userOr run memora-cli uninstall, which asks what to keep (see Uninstall with memora-cli).
Firewall#
Open only the Memora port, and only when clients connect directly:
sudo ufw allow 8400/tcp
# or
sudo firewall-cmd --permanent --add-port=8400/tcp && sudo firewall-cmd --reloadBehind a reverse proxy on the same host, install with --behind-proxy and open only the proxy's 80/443.
Docker#
git clone https://github.com/Codrihub/memora.git && cd memora
mkdir -p data state && sudo chown -R 1000:1000 data state
docker compose up -d
docker compose exec -it gateway memora-cli # then /guide, or /webdocker compose up pulls ghcr.io/codrihub/memora:<version>; if the image is not available (or you set IMAGE=memora:local) it builds from the Dockerfile. Image tags: <version> (for example 1.0.0), <major>.<minor> (for example 1.0), and latest (stable releases only), for linux/amd64 and linux/arm64. The compose file pins the release it ships with; set IMAGE in .env to run another tag.
Volumes: /data and /state#
Both must be persistent (the Compose file bind-mounts ./data and ./state):
/datais the vault: your notes, their git history, and the event log. Lose it and the notes are gone./stateholdsmemora.db(owner account, password hash, API key hashes, sessions, settings, setup/lock state, activity log). Lose it and every agent key stops working, the instance falls back to first-run setup, and anyone who reaches the port during that window could claim it.
The container runs as uid 1000; set MEMORA_UID/MEMORA_GID in .env if the host directories belong to another user. MEMORA_DATA_DIR and MEMORA_STATE_DIR move the host directories, and MEMORA_HTTP_PORT changes the published host port. See CONFIGURATION.md.
Verify#
curl -s http://127.0.0.1:8400/healthz
docker compose exec gateway memora-cli db check
docker compose exec gateway memora-cli status
ls -l state/memora.dbUpgrading#
git pull
docker compose pull && docker compose up -d # or: docker compose up -d --buildSettings: docker compose exec -it gateway memora-cli → /config, then docker compose restart gateway (/restart cannot restart a container from inside).
npm#
Requirements: Linux on x86_64 or arm64, or Windows 10/11 on x64; Node.js 22 or newer; and git (vault history uses it).
npm install -g @codrihub/memora
mkdir -p ~/memora && cd ~/memora
MEMORA_VAULT=./vault MEMORA_STATE=./state memora
# in a second terminal, same folder:
MEMORA_STATE=./state memora-cli # then /guide, or /webOn Windows, in PowerShell:
npm install -g @codrihub/memora
mkdir ~\memora; cd ~\memora
$env:MEMORA_VAULT = '.\vault'; $env:MEMORA_STATE = '.\state'; memora
# in a second terminal, same folder:
$env:MEMORA_STATE = '.\state'; memora-cli # then /guide, or /webnpx @codrihub/memora --version runs it without a global install.
@codrihub/memora holds the memora and memora-cli commands and the web UI (used unless MEMORA_ASSETS is set). The binaries come from @codrihub/memora-linux-x64, @codrihub/memora-linux-arm64 or @codrihub/memora-win32-x64, optional dependencies npm installs only on a matching machine. The Linux ones are the static binaries of the GitHub release with the same version, so glibc and musl distributions both work; the Windows one is built with a static C runtime and needs nothing else. There is no install script and nothing is downloaded at install time, so it works with --ignore-scripts and from a registry mirror; it does not work with --omit=optional, which leaves the binaries out. On macOS the commands print where to go instead: use Docker or build from source.
The npm install sets up no service, user or data folder: the server runs as you, with MEMORA_STATE and MEMORA_VAULT where you point them (./state by default). Keep the state folder private (chmod 700 state; on Windows, keep it under your user profile), since it holds the owner account and key hashes. On Windows, memora-cli runs every command as you: there is no root or service account to switch to. For a long-running server, prefer the native install.
Upgrade with npm install -g @codrihub/memora@latest (memora-cli update prints this too) and restart the server; the state database is migrated on start.
Start, stop and restart#
memora-cli start, stop and restart (or /start, /shutdown and /restart in the console) work out how this install runs and do the right thing:
| Install | What memora-cli start / stop / restart does | By hand |
|---|---|---|
| Native (systemd) | runs systemctl start / stop / restart memora (as root) | sudo systemctl start memora |
| npm, source | runs the server in the background, with memora.pid, memora.log and stop.token in the state folder; stop asks it to end over a local, token-protected request and waits, stop --force kills it | run memora and keep it open; Ctrl+C stops it |
| Docker | prints the host commands (a container cannot stop itself) | docker start / stop / restart memora |
From the browser, the owner can shut the server down in Settings, Shut down: the server answers, then stops gracefully and exits with status 0, the same as Ctrl+C or systemctl stop. A supervisor that restarts a cleanly exited process starts it again (systemd Restart=always, Docker --restart unless-stopped); the installer's unit uses Restart=on-failure, so it stays stopped. API keys cannot shut the server down.
Update#
Check what you run first: memora --version and memora-cli --version. memora-cli update (or /update in the console) works out how this copy was installed and prints, or runs, the right steps. By install method:
| Install | Update with | Then |
|---|---|---|
| npm (Windows, Linux) | npm install -g @codrihub/memora@latest | memora-cli restart, or Ctrl+C the running memora and start it again |
| Docker Compose | docker compose pull && docker compose up -d | nothing: the container is re-created |
| Docker run | docker pull ghcr.io/codrihub/memora:latest, then docker rm -f memora and the same docker run again (same volumes) | nothing |
| Native (systemd) | sudo memora-cli update (runs install.sh --upgrade) | nothing: the service is restarted |
| Source | git pull && cargo build --release | memora-cli restart |
Settings, accounts and notes stay; the server migrates memora.db on start. Take a memora-cli db backup first if you are unsure.
Release zip (older Windows installs). Windows now installs with npm. To switch, stop the old server (Ctrl+C in its window), run npm install -g @codrihub/memora, and start memora with the same folders so everything carries over, for example in PowerShell:
$env:MEMORA_STATE = 'C:\Users\you\memora\state'; $env:MEMORA_VAULT = 'C:\Users\you\memora\vault'; memoraThen delete the old program folder (only the .exe files and assets, not your state or vault folders).
Uninstall with memora-cli#
memora-cli uninstall # or /uninstall in the consoleIt explains what it removes for this install (the service and program files, or the npm package, or the container), then shows a checklist; press space to select and Enter to continue:
- Settings and accounts (the state folder: database, keys, sessions)
- Vault notes (your vault folder)
Both are unticked, so by default your settings and notes are kept and a later install picks them up again. Deleting the vault asks you to type its folder name. Before the state folder is deleted, a final database backup is offered. System folders, your home folder and the program's own folder are never deleted.
| Install | What uninstall does |
|---|---|
| Native (systemd) | runs the installed install.sh --uninstall (adds --purge only when both folders are the installer's own) |
| npm | stops the server, deletes what you ticked, then tells you to run npm uninstall -g @codrihub/memora |
| Source | stops the server, deletes what you ticked; delete the program folder yourself |
| Docker | prints docker rm -f memora and, for what you ticked, docker volume rm memora-state / docker volume rm memora-data |
Without a terminal it needs --yes and deletes only what the flags say: memora-cli uninstall --yes [--delete-config] [--delete-vault].
On a version older than 1.3.2 there is no uninstall command: see Uninstall by hand.
Uninstall by hand (versions before 1.3.2)#
memora-cli uninstall arrived in 1.3.2. On an older version it answers unknown command `uninstall` . Either update first and then run memora-cli uninstall (npm: npm install -g @codrihub/memora@latest), or remove Memora by hand with the steps below. They only touch Memora: never use wildcards, and never delete a parent folder or your home folder.
1. Check the version. memora --version and memora-cli --version.
2. Find the folders. Memora keeps two folders:
- the state folder (settings, accounts, keys):
MEMORA_STATE, or by defaultstateinside the folder where you startedmemora(for exampleC:\Users\you\stateor~/memora/state); - the vault folder: your notes, wherever you chose.
The server prints both when it starts: Memora HTTP server starting vault=... state=.... memora-cli status, run in the same folder, shows the state folder too.
3. Stop Memora. Press Ctrl+C in the window where memora runs (or close that window). Then make sure it is gone:
| Shell | Check | Stop if still running |
|---|---|---|
| PowerShell | Get-Process memora -ErrorAction SilentlyContinue | Stop-Process -Name memora |
| cmd | tasklist /FI "IMAGENAME eq memora.exe" | taskkill /IM memora.exe |
| Linux, macOS | pgrep -ax memora | pkill -x memora |
4. Remove the program.
| Install | Commands |
|---|---|
| npm (any OS) | npm uninstall -g @codrihub/memora, then npm ls -g --depth=0: if @codrihub/memora-win32-x64 (or -linux-x64, -linux-arm64) is still listed, npm uninstall -g that exact name |
| Docker run | docker rm -f memora, then docker image rm ghcr.io/codrihub/memora:latest |
| Docker Compose | docker compose down in the folder of docker-compose.yml (no -v) |
| Native (systemd) | sudo /usr/local/share/memora/install.sh --uninstall (keeps /var/lib/memora) |
| Release zip | delete the folder that holds memora.exe, memora-cli.exe and assets (check its contents first, as below) |
5. Delete the state folder (optional). Look inside first: it should hold memora.db (and maybe memora.log, memora.pid, stop.token, backups). Then delete that exact path:
# Windows, PowerShell
Get-ChildItem -LiteralPath 'C:\Users\you\state'
Remove-Item -LiteralPath 'C:\Users\you\state' -Recurse -Confirm:: Windows, cmd
dir "C:\Users\you\state"
rmdir /S "C:\Users\you\state"# Linux, macOS
ls -la ~/memora/state
rm -rI -- ~/memora/stateDocker: docker volume ls, then remove the exact names, docker volume rm memora-state. Compose: check and delete the ./state folder next to docker-compose.yml. Native: /var/lib/memora/state (or install.sh --uninstall --purge, which also deletes the notes, see below).
6. The vault folder: only if you are sure. It holds your notes. It is optional to delete it; copy it somewhere safe first (it is plain Markdown). Use the same two steps on its exact path: look inside (Get-ChildItem / ls), then Remove-Item -LiteralPath '<vault>' -Recurse -Confirm or rm -rI -- <vault>. Docker: docker volume rm memora-data, or the ./data folder with Compose. Native: sudo /usr/local/share/memora/install.sh --uninstall --purge deletes /var/lib/memora with the notes, the account and the memora user.
Troubleshooting#
memora-cli: unknown command `uninstall` (or start, stop, restart). You run a version older than 1.3.2. Update, then run the command again: npm install -g @codrihub/memora@latest, then memora-cli uninstall. Or remove it by hand: Uninstall by hand.
/update says "not installed with install.sh (built from source)" on an npm install. Older versions could miss an npm install. Update with npm, npm install -g @codrihub/memora@latest, and restart the server; newer versions detect npm reliably. Never run cargo build for an npm install.
/restart says "systemctl restart" on npm or Windows. Same cause (older version). Stop the server with Ctrl+C in its window and run memora again, or update and use memora-cli restart.
Which version do I have? memora --version and memora-cli --version. The latest release is on GitHub Releases.
Reverse proxy#
Run Memora on loopback (--behind-proxy natively; in Docker set MEMORA_HTTP_PORT=127.0.0.1:8400 in .env) and let the proxy terminate TLS. Then set, with /config or in .env:
| Variable | Why |
|---|---|
MEMORA_BASE_URL=https://memora.example.com | Public URL; links and MCP snippets use it, and its host becomes an allowed domain |
MEMORA_DOMAIN=memora.example.com | Only these hostnames are served; requests for the bare IP or other names get 404 |
MEMORA_TRUSTED_PROXIES=203.0.113.10 | Proxies whose forwarding headers are believed. Loopback (same-host nginx, cloudflared) is always trusted; only list remote proxies |
In Docker, a proxy on the host reaches the container through the Docker network, so the container sees the network's gateway address (for example 172.18.0.1) instead of loopback. Add that address to MEMORA_TRUSTED_PROXIES, otherwise every request appears to come from it.
The proxy must forward Host, X-Forwarded-For, and X-Forwarded-Proto, and upgrade WebSockets on /ws. nginx and Caddy examples are in DEPLOYMENT.md.
Backups#
Back up both the state database and the vault. The database is small but critical.
State, online (the server keeps running):
sudo memora-cli db backup # state/backups/memora-<UTC time>.db, keeps the newest 10
sudo memora-cli db backup --to /var/backups/memora.db
sudo memora-cli db check # integrity, permissions, sizes, last backup age
docker compose exec gateway memora-cli db backup # Docker: lands in ./state/backups/The copy is a consistent snapshot (VACUUM INTO), checked with integrity_check, mode 0600. Never cp a live memora.db: recent commits sit in memora.db-wal. Restore with the server stopped:
sudo systemctl stop memora
sudo memora-cli db restore /var/backups/memora.db # verifies it; keeps the replaced DB in state/backups/
sudo systemctl start memoraAlso keep a copy of state/key-seal.bin, which encrypts the sealed API key copies. Vault and state together: archive both with the server stopped:
sudo systemctl stop memora
sudo tar -C /var/lib/memora -czf memora-backup-$(date +%F).tar.gz state vault
sudo systemctl start memoraKeep backups private: the database holds password and key hashes (never plaintext secrets).
Automation: --check and --upgrade#
These are the contract for scripts and automation.
$ /usr/local/share/memora/install.sh --check
MEMORA_LATEST=1.0.1
MEMORA_INSTALLED=1.0.0MEMORA_INSTALLED comes from /usr/local/share/memora/VERSION (written by the installer), else from memora --version, else unknown (or none when nothing is installed). MEMORA_LATEST is unknown and the exit code 4 when GitHub cannot be reached. --check needs no root.
$ sudo /usr/local/share/memora/install.sh --upgrade --yes [--version X.Y.Z]
...
MEMORA_UPGRADE_RESULT=ok FROM=1.0.0 TO=1.0.1--upgrade --yes never prompts. The last line of output is always MEMORA_UPGRADE_RESULT=<ok|uptodate|error> FROM=<old> TO=<new>, and the exit code is 0 (ok), 3 (already up to date), 4 (network), 5 (checksum), 6 (not root), or 1/2 for other errors.