mars-ram

Install mars-ram on your computer

Mars-RAM on your phone talks to mars-ram on your computer. Install it once with one command, then pair your phone.

Before you start

You need Why
Node.js 24 or newer runs mars-ram
Pi the sessions you see on the phone
Tailscale on the computer and the phone the private network between them (on macOS the Tailscale app is enough: mars-ram finds its command inside Tailscale.app)
An SSH server Linux: OpenSSH (sshd). macOS: System Settings › General › Sharing › Remote Login. Windows: the OpenSSH Server optional feature

mars-ram doctor checks all of them after installing.

Install

In a terminal, the same on Linux, macOS and Windows:

pnpm add -g mars-ram

That is the recommended way. With npm or Bun instead:

npm i -g mars-ram
bun add -g mars-ram

If pnpm says the global bin directory is not set, run pnpm setup once, open a new terminal and run the command again.

Then set it up for your user:

mars-ram install

It installs for your user only, with no administrator rights. It asks which Pi environments to include and for a confirmation. On Windows, use a normal terminal (not “Run as administrator”).

Linux or macOS without pnpm or npm: this script does the same in one line:

curl -fsSL https://marssall.github.io/mars-ram/install.sh | sh

On Windows, use pnpm or npm.

Then pair your phone

Open a new terminal and run:

mars-ram pair

Scan the code with the app. On Windows, if your user is an administrator, run mars-ram pair in an administrator terminal: the computer asks you there to authorize the phone.

Using ZeroTier instead of Tailscale? Join the computer to your ZeroTier network, authorize it in ZeroTier Central, and run mars-ram pair: it finds ZeroTier on its own. If Tailscale is connected too, it asks which one your phone uses (or pass --network zerotier; mars-ram pair-zt still works and means the same). If the computer is in several ZeroTier networks, it lists their addresses and you pick one with --address <ipv4>. This needs an app version that supports ZeroTier. Over ZeroTier you get SSH sessions, the terminal and files, and, with an up-to-date app and mars-ram install, private links and Siempre atento too. A private link is then served only on the computer’s ZeroTier address (the one the phone paired with), never on the LAN, and its URL is http://<ZeroTier IPv4>:47811/l/…. Siempre atento registers the phone over the same ZeroTier connection and sends its notices to the phone’s ZeroTier address. Android runs one VPN at a time, so notices from a ZeroTier computer arrive only while ZeroTier is on, and from a Tailscale computer only while Tailscale is on. If the same computer is paired over both Tailscale and ZeroTier, it keeps only the phone’s most recent Siempre atento registration, so its notices come over that one network. On Linux, a firewall (ufw or firewalld) blocks ZeroTier until you let it in: when one is on, mars-ram pair (over ZeroTier) and mars-ram doctor print the exact command with the interface name, such as sudo ufw allow in on <ZeroTier interface> comment 'ZeroTier'; that one rule covers SSH and private links (the computer’s port 47811) alike, and Siempre atento needs nothing more: its notices go out from the computer to the phone’s port 47812, which default outgoing rules allow, and the phone needs no firewall change (Tailscale does not need this).

In the app, Add computer first asks which network you use, Tailscale or ZeroTier, and remembers it; you can change it on the first step. It then walks you through it step by step: it checks Tailscale and Private DNS on the phone (or, for ZeroTier, that the ZeroTier app is installed and on; Android runs one VPN at a time) and moves on by itself once they are right, shows these commands for Linux, macOS or Windows with copy buttons, and, if the scan fails or stalls, See what’s wrong names the likely cause and its fix. I know, scan jumps straight to the camera; Add manually stays available from the scan step.

What the installer does

  1. pnpm add -g mars-ram (or npm, or Bun) puts the mars-ram package from the npm registry in your package manager’s global folder. The package runs no install scripts; it carries one fixed version of mars-ram and checks its SHA-256 before unpacking it.
  2. mars-ram install copies mars-ram to ~/.mars-ram and connects the Pi bridge. The package’s mars-ram stays your command; if an earlier install with the script left its own mars-ram command, it removes it (only that one, never a file it did not create).

The curl … | sh script adds its own mars-ram command (~/.local/bin/mars-ram). It checks the requirements, downloads one fixed version from the releases of MarsSall/mars-ram, checks its SHA-256 against the value written inside the script (if they differ, it deletes the download and installs nothing) and runs mars-ram install.

Read it before you run it

The npm package, on Linux, macOS and Windows (Windows 10 and later include tar). Download it without installing it; npm pack prints the exact file name, for example mars-ram-0.1.2.tgz:

npm pack mars-ram

Extract that exact file, using the name it printed:

tar -xzf mars-ram-0.1.2.tgz

Open package/bin/mars-ram.mjs (the program that runs) and package/README.md with any editor; on Windows, Notepad works. The source is public: the launcher is host/cli/npm/mars-ram.mjs in MarsSall/mars-ram, and package/archive/ holds the same file as the GitHub release.

The script:

curl -fsSL https://marssall.github.io/mars-ram/install.sh -o install.sh
less install.sh
sh install.sh

Later

If something goes wrong