Installing NetGet

NetGet runs as a global CLI on your machine. It manages the OpenResty gateway, generates nginx config, and serves the operator dashboard at local.netget.


Prerequisites

Install OpenResty on macOS:

brew install openresty/brew/openresty

On Linux, follow the OpenResty install guide.


Install

npm install -g netget

This installs the netget CLI and bundles the operator dashboard frontend.

Verify:

netget --version

First run — netget init

netget init

Run this once the first time you set up a gateway on a machine. It is safe to run again later; each step is idempotent and skipped if already done. In order:

  1. HTTPS cert — generates a local cert via mkcert (skipped if one already exists).
  2. Gateway config — writes/refreshes the OpenResty config from your current domain map.
  3. Starts the gateway — installs com.netget.openresty, a launchd service (macOS) or systemd unit (Linux) that runs OpenResty and keeps it alive across restarts and reboots. This is not brew services — netget manages its own service definition directly.
  4. Gateway identity claim — first-run only: establishes your .me identity as the owner of this gateway. Your credentials are never stored, only the resulting hash.

Step 3 needs to bind ports 80 and 443, so it will prompt for your sudo password in the terminal — that prompt only appears when you run it yourself interactively.

When it finishes, netget init tells you the next step, because a gateway with nothing behind it just serves 502s:

npm install -g monad.ai
monads start local

Once a monad is running, open http://local.netget in your browser.


Day-to-day commands

netget         # opens the interactive CLI menu
netget reload  # reload (or start) the gateway
netget restart # alias for reload

netget with no arguments opens the interactive CLI menu — the day-to-day entry point once a gateway is already set up.


Uninstall

npm uninstall -g netget

Remove the /etc/hosts entry and the OpenResty config manually if needed:

# /etc/hosts — remove the local.netget line
# OpenResty conf.d netget include — delete if present

See also