Transfer files and text from the terminal with the Relayium CLI
Last updated: 2026-08-07
The Relayium CLI is a single small binary that moves files and ephemeral text from your terminal — encrypted end to end, self-hostable, and completely free. It handles copying files to a server, pushing a build between machines, sending an archive across networks, and moving a URL, command, or code snippet without first saving it as a file.
Whichever way you use it, the file bytes travel directly between the two ends and never pass through Relayium's servers. This guide gets you installed and through your first transfer, then points you at the deeper how-tos for each mode.
Install in one command
What you need
- A macOS, Linux or Windows machine with a terminal. Prebuilt binaries cover x86-64 and arm64 on all three.
- curl, for the one-line install on macOS and Linux — curl --version prints a version. On Windows, download the .zip from the releases page instead.
- A writable install directory. The script uses /usr/local/bin when it can write there and ~/.local/bin otherwise, and its last lines name the one it chose.
- Nothing else for push, pull or daemon direct. Only minting a pairing code with send or text, and uploading with up, need a free Relayium account.
On macOS or Linux, one command downloads a prebuilt binary for your OS and puts it on your PATH:
curl -fsSL https://relayium.com/install.sh | sh
- Prefer to pick the file yourself? Download a binary from the releases page.
- Have Go installed? Clone the repo and run: go build -o relayium ./cmd/relayium (from the server directory).
- Then run relayium --help to see every command, and relayium version to check the build.
The three ways it moves files
Relayium moves files three ways. You pick by where the other end is, not by learning three different tools — they share one transfer engine with per-file resume and SHA-256 verification.
- push / pull — to a server you can already SSH into. Bytes travel over your SSH connection; no Relayium account.
- send / receive — to another person across networks, using a short pairing code the sender's CLI mints (sign in once with relayium login; the receiver never does). A minted code is good for five minutes, so start the receiving machine's command within that window.
- Relayium CLI send/receive and text are direct-only P2P: they never relay file or message bytes through TURN or any other Relayium server. If the two ends cannot establish a direct connection, the session fails rather than falling back to a relay.
- serve + push relayium:// (daemon direct) — straight between two servers you own, over pinned TLS. No relay, no SSH, no code.
Send ephemeral text
Run relayium text on one machine to mint a pairing code and wait, then join from the other machine with the printed code:
relayium text
relayium text 483920
- Minting the code needs relayium login; joining with a code needs no login.
- Both machines must stay online. Messages are end-to-end encrypted, and Relayium servers never store their bodies.
- Relayium CLI send/receive and text are direct-only P2P: they never relay file or message bytes through TURN or any other Relayium server. If the two ends cannot establish a direct connection, the session fails rather than falling back to a relay.
- Either endpoint can still copy or retain received text.
- Each message can be at most 65,536 UTF-8 bytes. Use relayium send for anything larger.
Your first transfer
The quickest thing to try is copying a folder to a server you can SSH into. Relayium uses your existing SSH access, so there is nothing to configure on the remote and no account to create:
Check the CLI is on your PATH. It prints a version string, not "command not found".
relayium versionCheck you can already reach the server the ordinary way. push reuses exactly this access, so an ssh that works settles the connection and authentication prerequisite — it does not promise the transfer itself, which still needs write permission and free space at user@your-server:backups/.
ssh user@your-server truePush the folder. The last argument is host:path — the colon is what marks it remote, and a trailing slash means "into this directory".
relayium push ./photos user@your-server:backups/Confirm the files arrived where you expected. push ./photos reproduces photos/ under the destination, so the folder name comes along.
ssh user@your-server ls backups/photos
What a successful run looks like
With relayium on the far end, push prints one line per completed file and exits 0. Against a bare server it prints the tar-stream summary instead — both are success.
relayium push ./photos user@your-server:backups/
photos/IMG_0413.jpg (2314518 bytes)
photos/IMG_0414.jpg (1998233 bytes)
echo $?
# 0- If relayium is installed on the remote too, push uses the native protocol (resumable, per-file SHA-256).
- push falls back to a plain tar stream when relayium isn't on the remote, so it works even against a bare server — that fallback is push-only.
- Pull the same files back with: relayium pull user@your-server:backups/ ./restore — pull always needs relayium on the remote (it has no tar fallback), so install it there first.
When the first command doesn't work
Four things go wrong on a first run more often than everything else put together. None of them needs guesswork — each has a command whose output decides it.
Symptom, check, fix
- "relayium: command not found", right after the install script said it succeeded.
command -v relayium # (prints nothing)The binary is installed, but its directory isn't on your PATH. The script's last lines name the directory it used and print the exact export PATH line to add; run them, then open a new shell and try relayium version again.
- push exits immediately with "push destination must be remote (host:path)".
relayium push ./photos user@your-server backups/ # push destination must be remote (host:path)The destination lost its colon, so relayium read it as a local path. Write it scp-style, with no space between the host and the path: user@your-server:backups/
- pull fails against a server that push worked fine against.
ssh user@your-server command -v relayium # (prints nothing)pull has no tar fallback, because the remote is the sender in that direction — it needs relayium installed there. Install it on the server with the same one-line command and run the pull again.
- Two machines join the same code and one prints "the other side is running `relayium text`, not `relayium send`/`relayium receive`".
# a message session: BOTH ends run text relayium text relayium text 483920The two ends ran different commands. Use relayium text on both machines for messages, and relayium send on one with relayium receive on the other for files; the mismatch is refused before anything is dialed, so nothing was sent.
Free, and private by design
There is nothing to pay. Of the three ways above, the only sign-in is the sender's in send / receive mode, so its CLI can mint a pairing code (cloud up uses your account too, to store the file). The CLI connects the two ends directly, so your files are never uploaded to a server in the middle — the only thing that ever touches Relayium is a tiny rendezvous handshake in send / receive mode, used to introduce the two ends, never the file itself.
Every transfer is encrypted end to end, every file is verified with a SHA-256 hash on arrival, and an interrupted transfer resumes from where it stopped instead of starting over. It runs on macOS, Linux and Windows, and the whole thing is open source and self-hostable.
Frequently asked questions
Does the CLI cost anything?
No. The CLI is completely free. Direct file and text bytes never pass through a Relayium relay, so there is nothing to meter and nothing to pay.
Do I need a Relayium account?
To mint a pairing code with send or text, and for cloud up. push / pull uses your own SSH and daemon direct uses public-key trust, so neither needs an account. A server mints pairing codes only for a signed-in account, so the creator runs relayium login once; joining with a code you were handed needs no login. A receive user never signs in.
Which operating systems are supported?
Prebuilt binaries are published for macOS, Linux and Windows on both x86-64 and arm64. The install script covers macOS and Linux; on Windows, download the .zip from the releases page.
Do my files pass through Relayium's servers?
No. In every mode the file bytes travel directly between the two ends. Only send / receive contacts our servers at all, and only for a small rendezvous handshake — never the file contents.
Install the Relayium CLI and make your first transfer — completely free.
Get the CLI