Operating the server
The memex command
The program that runs the server is also the tool that manages it. memex with no argument opens an assistant that takes the whole terminal and offers every action as a box to select; each action is also a subcommand with flags, so everything can be scripted.
Keys
| Key | Effect |
|---|---|
Arrows, or h j k l | Move between the boxes. |
Enter | Choose; in a form, go to the next field, then save. |
Esc | Go back, or cancel a question. On the first menu, q or Esc quits. |
Tab, Shift-Tab | Next and previous field of a form. |
PgUp, PgDn | Scroll the output of an action. |
Ctrl-C | Quit. While an action runs, this interrupts it. |
Secrets such as a tunnel token or an API key are typed masked. Anything you must keep (the admin key and the setup link, a password-reset link) is printed again on the normal screen when the assistant closes, so it remains in the scrollback.
Line-by-line mode
The full-screen interface is used only when both the input and the output are a terminal. On a dumb terminal, or on request with the global --plain flag, the same questions are asked one line at a time, with the same result.
sudo memex --plain
sudo memex --plain installWithout a terminal at all (a script, a pipe) nothing is asked: commands need their flags, and destructive ones need --yes.
Subcommands
| Command | Purpose |
|---|---|
memex setup | The interactive assistant (same as memex alone). |
memex install | Install, reinstall or change the access mode. See Quick install. |
memex status | Show the state of the instance. |
memex update | Check for a new version and install it; --check, --rollback, --mode. See Updates. |
memex backup | Write a backup archive. See Backup and restore. |
memex restore <archive> | Replace the data with the content of a backup. |
memex reindex | Rebuild the search indexes and record files changed on disk. |
memex config | Show or change settings. See Configuration. |
memex notify | Manage notification channels. See Notifications. |
memex model | Manage the model of semantic search. See Semantic search. |
memex admin-key | Print a fresh setup key, only while no account exists. |
memex reset | Create a password-reset link for an administrator, or erase everything. See Recovering administrator access. |
memex uninstall | Remove Memex from the machine. See Uninstalling. |
memex serve | Run the server; this is what the systemd service starts. |
memex version | Print the version. |
Run them with sudo: the configuration and the data are not readable by ordinary users. Three flags apply to every command: --config <file> (default /etc/memex/config.toml), --lang en|fr and --plain.
The service
systemctl status memex
sudo systemctl restart memex
journalctl -u memex -fThe service runs as the memex user, restarts on failure and is sandboxed, with only /var/lib/memex writable. Reference: install.md.