Documentation menu

Installing the server

Uninstalling Memex

One command removes Memex from a machine. By default it keeps your data and configuration, so that a mistake costs nothing; a flag deletes them as well.

Before you start

If the notes matter, take a backup and copy it to another machine first. Brains are also plain Markdown files under /var/lib/memex/brains/, which you can simply copy.

sudo memex backup --output /root/memex-final.tar.gz

Uninstall

sudo memex uninstall          # keeps the data and the configuration
sudo memex uninstall --purge  # also deletes /var/lib/memex and /etc/memex

The same action is Uninstall in the memex menu.

Removed
AlwaysThe systemd service, the program and its symlink, the nginx or Apache site the installer created (the file it had backed up, if any, is restored), and cloudflared if the installer downloaded it.
With --purgeAlso the data directory /var/lib/memex, the configuration /etc/memex, and the memex user if the installer created it.
Nevernginx, Apache and certbot themselves, and the certificates certbot obtained.
  • Remove a certificate yourself with certbot delete --cert-name <domain>.
  • Without a terminal, --purge requires --yes --confirm ERASE.
  • For a permanent Cloudflare tunnel, delete the tunnel in the Cloudflare dashboard as well. Remove the DNS record of a domain if it is no longer used.

Check that it worked

systemctl status memex
command -v memex

The service is unknown and the command is no longer found. Without --purge, /var/lib/memex and /etc/memex are still there: installing Memex again finds the data and no new admin key is generated, since accounts exist.

Erasing the data but keeping Memex

To start again from an empty instance without uninstalling, use sudo memex reset --erase (Erase everything in the menu). It deletes every brain, account and setting after two confirmations, and takes a backup first unless --no-backup is given.

Reference: install.md.