Skip to main content
Mo runs on its own machine, so it cannot see localhost:3000 or an internal staging host. A tunnel exposes one or more hostname:port addresses from your machine to a single Mo session through a Momentic Connector. Start the tunnel, pass its ID to mo start --tunnel, and stop it when the session is done.

tunnel start

Start a tunnel to one or more addresses.
string
required
One or more hostname:port addresses reachable from this machine.
flag
Keep the tunnel attached to the terminal and run until you press Ctrl+C. By default the tunnel detaches and keeps running in the background.
When the tunnel is ready, the command prints its ID as JSON:
In background mode the command returns immediately after printing. In foreground mode it prints the ID and then blocks; stopping the process also revokes the tunnel.

tunnel stop

Stop a tunnel and revoke Mo’s access to it.
The command asks the local tunnel process to shut down, then revokes the Connector tunnel on the server. If the local process is already gone, the command still revokes the tunnel and prints a warning. On success it prints { "tunnelId": "..." }.

tunnel list

List tunnels started from this machine.
status is starting, running, unreachable (the state file exists but the process does not respond), or cleanup_failed (the process exited without revoking the tunnel; run mo tunnel stop to finish cleanup).

Example: test a local dev server

Notes

  • Tunnel state lives in ~/.momentic/mo-tunnels. mo tunnel list only shows tunnels started from this machine.
  • One tunnel can serve several addresses; start it with every host Mo needs before you create the session.
  • A background tunnel outlives your shell. Stop it explicitly, or it stays open until you do.