CLI Reference
Commands
Section titled “Commands”meridian deploy
Section titled “meridian deploy”Deploy one server and get a shareable connection link. The server becomes both the control server (running Meridian’s control service) and an exit. Deploy builds the same reviewed topology as meridian setup, applies it with checkpoints, verifies real traffic through the delivered subscription, and prints a connection page and subscription URL. Re-running the same command resumes an interrupted deploy or redeploys, keeping paths, keys, and users. The first deploy of a fleet ends by showing its recovery key once (see meridian backup).
meridian deploy [SERVER] [flags]| Flag | Default | Description |
|---|---|---|
--sni HOST |
(auto) | Camouflage target. Without it, a first deploy tries sites in the server’s own subnet, then www.google.com, dl.google.com, www.cloudflare.com, and uses the first that carries traffic; a redeploy keeps the saved target. An explicit --sni is never swapped |
--domain DOMAIN |
(none) | Your domain: XHTTP moves onto it and WSS is added, both through Cloudflare’s CDN (XHTTP works without one, on the IP). The control service and connection pages stay on the IP certificate |
--self-steal |
off | Camouflage with your own domain (--sni, else --domain), pointed at the server with a DNS-only record: Meridian issues its Let’s Encrypt certificate and the server answers probes itself, with nginx’s stock 404. Deploy first checks where the name resolves: it stops when it doesn’t resolve and warns when it points elsewhere. A redeploy keeps it; a new --sni without the flag goes back to a borrowed site |
--hysteria2/--no-hysteria2 |
on | Offer Hysteria2 on UDP/443, disguised with salamander, as the last fallback. Uses the domain’s certificate, or the IP certificate without one |
--fingerprint NAME |
chrome | TLS fingerprint clients present on Reality, XHTTP, and WSS (chrome, firefox, safari, ios, android, edge, random, randomized). Change it if your region starts flagging the current one; a redeploy keeps the saved value |
--client-name NAME |
default | Name of the first client |
--display-name NAME |
(none) | Label for connection pages |
--icon EMOJI_OR_URL |
(none) | Page icon — emoji or image URL |
--color PALETTE |
ocean | Page color theme (ocean/sunset/forest/lavender/rose/slate) |
--user USER |
saved, else root | SSH user (non-root needs passwordless sudo) |
--ssh-port PORT |
saved, else 22 | SSH port |
--harden / --no-harden |
on | SSH key-only login, fail2ban, and UFW firewall. --no-harden is for servers shared with other services |
--warp / --no-warp |
off | Send outgoing traffic through Cloudflare WARP |
--geo-block / --no-geo-block |
on | Refuse Russian domains and IPs (geosite:category-ru + geoip:ru) at the exit. Xray JSON and Mihomo subscriptions already send them directly from the device |
--country CC |
address registry | Two-letter country shown in connection names and on the web panel’s server list. Without it, a first deploy asks the server address’s Regional Internet Registry (via IANA’s RDAP bootstrap, no geo-IP service); a redeploy keeps the saved country |
--yes |
Skip confirmation prompts | |
--json |
Emit the final deploy result as a meridian.output/v1 envelope |
|
--events=jsonl |
Stream typed progress events as JSONL on stderr | |
--request FILE |
Read a deploy-request JSON payload from a file; use - for stdin |
|
--dry-run |
Compile and preview the deploy without SSH or local changes |
Without an IP, deploy asks for one. local deploys on the machine you are running on. Deploy only redeploys a server that is already an exit in your fleet; add other servers with meridian node add. On a fleet that still runs the Remnawave panel, deploy offers to run meridian migrate first. Running it again with different flags updates that exit to match (for example, adding or dropping --domain or --no-hysteria2) while keeping your other exits, relays, gateways, and clients.
Machine/UI flow: meridian api workflow deploy --json returns a renderable wizard contract. A UI collects those fields, validates them against deploy-request, then runs meridian deploy --request deploy.json --json --events=jsonl. Machine deploys are non-interactive: the request must contain yes: true after the user confirms. --dry-run --json returns deploy-plan under data, so a UI can preview the mode, ports, and generated paths before opening SSH.
meridian setup
Section titled “meridian setup”A resumable guided wizard for one server or many: exits, Realm relays, routing gateways with failover pools, and users. It is written for people who have never set up a VPN: every question uses the real term (exit, relay, SNI) and explains it in one plain sentence, with a safe default you can accept by pressing Enter.
meridian setup [--intent FILE|-] [--restart] [--yes]| Flag | Default | Description |
|---|---|---|
--intent FILE |
(none) | Start at review from a complete topology JSON document; use - for stdin |
--restart |
Discard saved setup progress before starting | |
--yes, -y |
Approve the review and apply without asking |
The first question is the language (English, Русский, فارسی, 中文), preselected from your terminal and remembered in ~/.config/meridian/preferences.json; --lang or MERIDIAN_LANG skips it. Then the wizard walks through servers (an IP, user@IP:port, or local for this machine), what each server does, connection methods, routing (only asked when you have a routing gateway: each rule sends matching traffic to an exit or pool, directly from the gateway, or nowhere), users, a plain-language summary, and apply. Choices are lists: move with the arrow keys (or press an option’s number), toggle checklist items with Space, press ? for details, Enter to confirm, Esc to go back, and Ctrl+C to quit. Wherever a list offers “Something else”, you can type your own value. In text fields you can also type back, details, save, or quit (or the same words in your language). For the camouflage site, the wizard scans the exit’s own network first (about a minute) and lists those sites ahead of the well-known ones. Set MERIDIAN_PLAIN_PROMPTS=1 for numbered prompts (they are used automatically when the terminal can’t draw lists). Running meridian with no command in a terminal, before any VPN exists, offers to start the wizard. Progress is saved in ~/.config/meridian/setup.json after each stage, so running meridian setup again resumes; passwords and private keys are never stored there. --intent does not replace an existing draft unless --restart is also given. When apply succeeds, setup verifies every node and subscription and prints each user’s connection page.
meridian plan
Section titled “meridian plan”Show what meridian apply would change, comparing the topology in ~/.config/meridian/cluster.yml with the live servers and the control service. Nothing is changed.
meridian plan [--json]| Flag | Default | Description |
|---|---|---|
--json |
Emit the plan as a meridian.output/v1 envelope for CI and UI clients |
The output shows the plan hash, resource counts by kind, and any resources that need repair or could not be observed. JSON data contains plan_hash, converged, resources[], drifted_resources[], observation_errors[], and state_changes[].
Exit codes:
0— converged, nothing to do1— nothing to plan (no fleet yet, or unusable local state)2— changes pending (runmeridian apply)3— required evidence (the control service, SSH, local state) was unavailable
Don’t edit the topology in cluster.yml by hand. Change it with meridian setup, deploy, client add, node add, or relay add.
If access profile settings cannot be read, plan preserves the compiled result, lists unavailable evidence in observation_errors, and exits 3 with MERIDIAN_PLAN_EVIDENCE_UNAVAILABLE. Apply and import may skip an unavailable profile review only if the fleet has never sent named profiles to the service. After the fleet fence accepts, Meridian saves access_profiles_used: true immediately before the first settings request carrying named profiles. A failure or lost reply keeps that history, as does removing the last profile. Saving profiles in intent alone does not mark them used; older files without the flag still count saved named profiles as used. A fence refusal saves neither the proposal nor forgotten-server records. Once profiles have been sent, unavailable evidence stops apply and import with retryable exit 3; restore control-service access and retry. Import dry runs always require live evidence.
Setup (including --restart and --intent) and every imperative apply compare declared profile IDs and grants with the live service before saving topology or writing to servers. A mismatch needs meridian profile or meridian fleet import, or meridian apply to review a saved change. Unchanged exit: and gateway: grants may expand as protocols or relay camouflage change under that command’s topology review. Fresh bootstrap requires no service fingerprint, named profiles, or non-default memberships. Setup interrupted before its profile settings request can resume with meridian setup --yes, including failures after control credentials were saved. Once declarations may have reached the service, an outage requires access to be restored before retrying.
meridian apply
Section titled “meridian apply”Apply the reviewed topology in cluster.yml to your servers. Apply shows the plan hash and resource count, asks for confirmation, then applies the exact plan it showed, with checkpoints. An interrupted apply resumes where it stopped.
meridian apply [--yes] [--forget-unreachable] [--json]| Flag | Default | Description |
|---|---|---|
--yes, -y |
Skip confirmation | |
--forget-unreachable |
Forget what was deployed on a removed server that doesn’t answer over SSH (blocked or deleted) instead of failing its cleanup; it keeps serving its old users until you delete it | |
--json |
Emit the final apply result as a meridian.output/v1 envelope |
JSON data contains plan_hash, generation, and actions[] with status: "converged" | "applied" | "failed" | "unknown" | "skipped". JSON mode never prompts: without --yes it returns MERIDIAN_CONFIRMATION_REQUIRED with the plan hash and exits 2. A failed resource exits 3; fix the cause and run apply again. If local state cannot be saved after remote changes, apply exits 3 and says so; repair ~/.config/meridian permissions, then run plan and apply again.
Removals are applied too: whatever left the topology (users, protocol paths, exits, relays, routing gateways) is deleted after everything still in the plan has converged, and plan lists it first. The control server leaves only with meridian teardown, or moves with meridian restore.
Every apply is recorded in the control service as a revision (see meridian fleet history), and holds a lease there while it runs, so two machines never apply at once.
meridian client
Section titled “meridian client”client set NAME --profile PROFILE replaces profile membership after a service review; repeat --profile for every profile to keep. --dry-run previews without saving and JSON writes need --yes. Use a separate command for account limits, notes, or language. client bulk set-profiles --profile PROFILE uses the same selection flags and frozen commit as other bulk actions, including repeated --person, --search, and --tag.
The schedule options below work with client add and client set. New settings are applied only at creation; later applies preserve operator edits. client show carries the typed fields and the service’s computed schedule in JSON. client set --dry-run returns data.schedule_preview and applied: false; schedule changes in JSON need --yes. client extend --days N adds days to a pending first-use duration without activating it; after activation it extends the expiry and starts a new renewal series.
| Option | Meaning |
|---|---|
--reset-day N|default |
Anniversary reset day, 1–31; default uses creation day |
--duration DAYS|none |
1–3650 days from first traffic; none clears the duration |
--renew-days DAYS |
Renew every 1–3650 UTC days |
--renew-months MONTHS |
Renew every 1–120 calendar months |
--renewals N|unlimited |
1–10000 renewals; unlimited removes the cap |
--no-renew |
Turn automatic renewal off |
--dry-run |
Preview schedule dates without saving |
--yes |
Confirm schedule changes |
Use --devices unlimited (or 0) to exempt a person from the fleet cap. --devices default inherits it; these are separate choices in the panel. The API uses device_limit: 0 for unlimited and null for inheritance. The privacy level still applies. Remnawave migration preserves each cap, including zero, without importing device registrations.
Manage the people who connect.
meridian client add NAME [NAME...] [--limit SIZE] [--reset PERIOD] [--expires DATE] [--devices N\|default] [--json]meridian client show NAME [--connections] [--json]meridian client preview NAME --user-agent UA [--accept TYPE] [--suffix SUFFIX] [--json]meridian client usage NAME [--days N] [--json]meridian client list [--profile PROFILE] [--attention] [--tag TAG|none] [--json]meridian client set NAME [--limit SIZE] [--reset PERIOD] [--expires DATE] [--devices N\|default] [--note TEXT] [--tag TAG|none] [--language en|ru|fa|zh|default] [--json]meridian client reset-traffic NAME [--json]meridian client extend NAME --days N [--json]meridian client devices NAME [--remove ID | --clear] [--json]meridian client enable NAME [--json]meridian client disable NAME [--json]meridian client reissue NAME [--cut-off] [--yes] [--json]meridian client rotate-credentials NAME [--cut-off] [--yes] [--json]meridian client remove NAME [--cut-off] [--yes] [--json]meridian client remove NAME... [--dry-run] [--yes] [--json]| Flag | Default | Description |
|---|---|---|
--days N |
30 | UTC days for client usage or fleet usage, 1–730, capped at the saved retention |
--json |
Emit the result as a meridian.output/v1 envelope (all client commands) |
|
--attention |
off | client list: only people needing attention, with a reason column |
--limit SIZE |
none | Traffic limit (client add, client set): 500MB, 50GB, 1.5TB; none or 0 removes it. Units are binary (1 GB = 1024³ bytes), as the control service counts |
--reset PERIOD |
never | When used traffic starts again from zero: day, week, month, or never, by calendar day, week, or month |
--expires DATE |
never | When access ends: YYYY-MM-DD (the end of that day, UTC), an ISO time such as 2026-12-31T18:00:00+03:00 (a time without an offset is UTC), or never. Must be in the future |
--yes, -y |
Confirm client reissue, client rotate-credentials, or client remove; required with --json |
client add — creates each person immediately through the control service with their first settings and prints their connection page and subscription URL. No apply or SSH is needed. Names may use any script; the service assigns a Latin username when needed. Existing names are refused before any person in the batch is created.
client show — prints the connection page, subscription URL, status, traffic against the limit with its reset period, expiry, and last-seen time. The subscription URL is also the page URL for every person.
--connections also prints each canonical connection’s remark, protocol, and credential URI, followed by explicit Xray JSON, Mihomo, and sing-box URLs. JSON includes this view at data.connections; only this producing output reveals its credential fields. Do not put these links or QR images in logs or shared reports.
First reported traffic and the last reporting node come from accepted traffic growth (first_traffic_at and last_traffic_node in JSON). Historical first use can be unknown; these are aggregate counters, with no sessions or client addresses.
client list — lists every service person with status, traffic, expiry and activity. JSON returns data.summary and data.clients[]; there is no ownership flag.
client list --attention shows only people expiring within seven days (including the current instant), at or above 80% of quota, or with no lifetime traffic more than three days after creation. A reason column explains each row; JSON includes clients[].attention_reasons, and summary counts cover the filtered list. Undated imported traffic and reset periods still count as previous use. A separate Stopped using reason (stopped) flags a person who previously used the service but has no accepted traffic for more than three days. Never used (unused) remains a separate reason. stopped_days is an independent API threshold from 1–365 days, default 3; unused_days keeps its existing bounds and default. Period resets do not erase this evidence, and daily history can stay off. Imported use with no known last traffic time is not guessed to have stopped.
GET /api/attention needs read scope and also admits the signed-in owner. It returns observed_at, thresholds, people[] with usernames/reasons, and nodes[] with node IDs/reasons. Node findings include offline or not-yet-seen agents, failed apply resources, and degraded or unhealthy reported health. Optional query parameters are expiry_days (1–30, default 7), quota_percent (1–100, default 80), and unused_days (1–365, default 3). Attention is derived without stored flags, sessions, addresses, or device data.
client set — changes a client’s traffic limit, reset period, or expiry; only the options you pass change, and at least one is required. A client their limit or expiry has cut off (status limited or expired) can connect again as soon as the new values allow it. Changes take effect at once, and applies never touch them. A bad value exits 2 before Meridian connects anywhere. With --json, returns the client as the control service now has it in data.client, including traffic_limit_bytes, traffic_reset, and expires_at (empty means never).
client reset-traffic — starts the client’s used traffic from zero, as a new period would; a client their limit has cut off can connect again.
client extend — adds 1–3650 whole days after the later of now and the current expiry; a person without expiry gets now plus that duration. --days N is required. The calculation and enforcement share one service transaction, so concurrent extensions both count. An expired person can connect again, while operator disable and traffic limits still apply. JSON returns the effective status and expiry in data.client.
client enable / client disable — resume or suspend access. New connections are blocked after each node applies the change. A disable lasts until client enable; reviewed applies preserve it.
client rotate-credentials — Use meridian client rotate-credentials NAME --yes when connection credentials need replacing. It generates a new VLESS UUID and Hysteria2 auth while keeping the subscription token, page URL, device registrations, status, limits, expiry, traffic, notes, tags, and language. Apps receive the keys on their next subscription refresh; ask the person to refresh now. Old identities lose new streams as each node applies the change. A leaked subscription URL requires client reissue, which issues a new URL and clears device registrations.
The web panel offers Rotate connection keys for every person, using the same service operation as the CLI. JSON requires --yes and returns client-rotate-credentials, including the generation and per-node flow_blocks. Optional --cut-off also ends existing flows with the disclosed shared-inbound reset or node-wide core restart.
client reissue — replaces a client’s links after a leak. The control service issues a new subscription ID and new keys, so the old subscription URL, connection page, and links stop working. Meridian prints the new subscription URL, which also opens the new connection page. Status, limits, and expiry stay as set. Asks for confirmation unless --yes, and refuses names that aren’t your clients.
client remove — deletes people immediately through the control service after confirmation (--yes in JSON mode). Removing the last person is allowed. Several names use one frozen bulk preview and commit; --dry-run writes nothing. --cut-off is single-person only. --proposal has been retired; use names.
client usage — shows daily upload, download, and total bytes for any person in this control service, including people added in the web panel. Daily history must be enabled in Privacy; otherwise it exits 2 with the opt-in command. client show adds the last seven UTC days when history is on (data.usage in JSON, null when off). Empty days mean no recorded traffic; history is never backfilled.
client devices — shows a count in private mode and device details in full mode; off reads no devices. --json returns username, level, count, the effective limit, devices, and removed. --remove ID or --clear forgets registrations without revoking credentials; a repeat reports zero removals. Reads and removals include people added in the web panel. client set --devices N sets a cap; --devices default uses the fleet cap. See Device limits. Reissuing a client clears all device registrations and keeps the cap.
People are added and removed immediately in the control service, without an apply or SSH. Names can use any script. An exact username wins; otherwise a case-folded username or display name must identify one person. Ambiguous names are refused. A batch add checks every name before writing, then reports one service request per person. Existing names are refused.
Disable, expiry, quota suspension, removal, and credential replacement block new TCP streams and UDP associations for the affected identity, including new streams on an already authenticated Hysteria2 QUIC or VLESS mux connection. Other people keep their sessions. The person view and GET /api/users/{username}/flow-blocks report each node: blocked, pending_node, or agent_too_old. Pending nodes can keep serving their previous configuration until they receive and apply the change; this includes control-service outages. Update an old agent with meridian apply. Events record the node and outcome without addresses or device data.
A TCP flow dispatched before revocation, a Hysteria2 UDP association, or a VLESS XUDP association may continue until it ends. The pinned core has no per-user close operation. --cut-off on client remove, client reissue, or client rotate-credentials waits for the credential change to apply. The review lists each node: a core restart reconnects everyone using any Xray inbound or bridge on that node; an inbound reset reconnects users of the listed inbounds. If a reset fails, the fallback core restart reconnects every inbound and bridge on that node. VLESS nodes use a core restart; Hysteria2-only nodes reset the affected inbounds. JSON reports done, core_restart, failed, or timed_out under data.cut_off. The wait is up to five minutes; failures exit 4, timeouts 3. The web panel offers the same choice for removal, reissue, and rotation of service-owned people.
Private metadata: client set NAME --note TEXT --tag TAG edits only the supplied fields. A note holds up to 500 plain-text characters, with newlines; --note "" clears it. A tag holds 1–16 Latin letters, digits, or underscores, saved in uppercase; --tag none clears it. client show includes both fields, and client list --tag TAG filters its tag column (none selects untagged people). Reads and edits require people/admin scope. The web panel edits the same private fields; applies preserve them and encrypted snapshots carry them. See Private notes and tags.
client preview NAME --user-agent UA [--accept TYPE] [--suffix SUFFIX] explains selection and omissions without credentials. User-Agent is limited to 512 Unicode characters; Accept to 256, both one line and transient. --suffix supplies an existing format URL suffix; a matching custom format or block rule takes priority. JSON returns subscription-preview; the API is the read-scoped POST /api/subscription/preview.
Reviewed bulk changes
Section titled “Reviewed bulk changes”client list shows the first 100 matches. --limit 1–500 sets page size; --cursor VALUE continues the same query. JSON adds total, contextual facets, and optional next_cursor; summary counts describe the returned page. client bulk ACTION uses the same query, freezes a preview, shows a table, confirms, and commits atomically. --dry-run returns the preview only; JSON commit and undo require --yes. Exact --person USERNAME selection cannot be combined with filters. Read receipts with client bulk receipt ID; undo unchanged reversible fields with client bulk undo ID. A lost commit reply is resolved by reading the receipt.
client list --profile PROFILE filters saved access membership, including default; bulk actions use --match-profile PROFILE so set-profiles --profile remains the membership to assign. JSON includes contextual facets.profile counts and each row’s saved profiles. A multi-profile person is counted once per profile and once in the list. The empty facet key counts all matching people, independently of the active profile filter. Unknown valid profile IDs match nobody; invalid IDs are refused before service access.
A lost commit or undo reply is checked by reading the receipt; undo is confirmed only when the receipt records that it was undone. The console keeps that updated receipt and reads it again when you reopen it. client bulk undo ID --dry-run checks that the receipt is reversible, has not been undone, and is still within its undo window without sending a write; the final undo also checks live people and inbound capacity.
JSON facet counts stay integers for every valid tag, including tags such as TOKEN or API_KEY.
Bulk previews show the enforced state before the action, including expiry and refills already due. An action that changes no fields is counted as unchanged. Commit checks that state again for every selected person, including deletions; if a limit or schedule has changed, the refusal names the people to preview again. Refills use the commit time, and undo preserves enforcement that was already due before review.
Undo writes the original choices, then enforces expiry and quota rules just like commit. Lifecycle events distinguish enabling access from restoring it after a limit change. Before composing node documents, undo checks the current managed inbound capacity; a refusal leaves the people and receipt unchanged.
| Command | Reviewed change |
|---|---|
meridian client bulk extend --days 7 |
Extend expiry or pending duration |
meridian client bulk expiry --expires never |
Set or clear expiry |
meridian client bulk quota --limit 50GB --reset month --reset-day 15 |
Set or clear quota and reset strategy |
meridian client bulk reset-traffic |
Reset period traffic (irreversible) |
meridian client bulk enable |
Enable with effective status |
meridian client bulk disable |
Disable |
meridian client bulk tag --set-tag none |
Set or clear tag |
meridian client bulk devices --devices unlimited |
Set device cap |
meridian client bulk renewal --renew-days 30 --renewals 5 |
Set or clear renewal |
meridian client bulk delete |
Delete people atomically through a frozen service preview and commit |
meridian client bulk undo ID |
Undo reversible fields within ten minutes |
meridian client bulk receipt ID |
Read a durable receipt |
Shared filters: --search TEXT, --status STATUS, --tag TAG, --match-profile PROFILE, --expiring-within DAYS, --quota-at-least PERCENT, --never-used, --attention, --attention-reason REASON, --lifecycle STATE, --sort name|usage|expiry|activity, --order asc|desc. Use either --attention (any default reason) or --attention-reason. Lifecycle choices: pending, renewing, fixed, unlimited. Names sort by case-folded display name, then exact username. See client management for review and privacy rules.
Bulk previews freeze the selected people and row versions for ten minutes. Commit applies every reviewed change in one transaction and returns a durable receipt without notes or credentials. Reversible edits may be undone once within ten minutes; deletion and traffic reset are irreversible. Every person has the same service ownership.
Use meridian client remove sample-a sample-b --dry-run --json to preview, then meridian client remove sample-a sample-b --yes --json to commit. Declining the review writes nothing. Zero people is allowed; meridian test without an active person reports unavailable evidence (exit 3). --proposal is retired. Use single-person client remove NAME --cut-off to disclose and close existing sessions; earlier transfers may otherwise continue.
meridian client bulk extend --months 1 --person sample-a --dry-run --json
meridian client bulk renewal --renew-months 1
meridian client bulk renewal --no-renew
meridian client bulk disable --tag TRIAL_7 --yes --json
meridian client routing personmeridian client routing person work --dry-run --jsonmeridian client routing person work --yes --jsonmeridian client routing person --inherit --yesmeridian client routing person reads the effective policy. Use meridian client routing person work --dry-run --json, then meridian client routing person work --yes --json to review and save a private override; meridian client routing person --inherit --yes clears it. The console’s person card uses the same service review and keeps drafts in memory. Person overrides win over profile defaults, which win over the fleet default. Applies and credential reissue preserve overrides; encrypted snapshots carry them, and deletion removes them. This choice changes subscription delivery at app refresh, with no account or node-access edit.
Policy reads need people.read and people.private; assignment additionally needs people.delivery. delivery.read reads the reviewed catalog. Existing issued tokens keep their frozen grants; issue a token with the new grant to assign policies. Overrides are blank without private permission and never appear in subscriptions, events, or reviewed intent. A preview writes nothing. Confirmation requires its review_hash; a changed override, membership, or catalog needs another preview.
meridian privacy
Section titled “meridian privacy”Choose what the control service stores. Both device limits and daily history default to off; applying the fleet never changes these settings. See Privacy for the disclosures and seizure consequences.
meridian privacy [--json]meridian privacy show [--json]meridian privacy set [--devices off|private|full] [--device-limit N] [--history off|daily] [--history-days N] [--yes] [--json]| Flag | Default | Description |
|---|---|---|
--devices LEVEL |
unchanged | Device limits: off, private keyed fingerprints, or full device details |
--device-limit N |
unchanged (initially 3) | Default per-person cap when their own is unset, 1–100 |
--history LEVEL |
unchanged | off lifetime totals and last seen, or daily per-person and per-server UTC totals |
--history-days N |
unchanged (initially 90) | Retain 7–730 UTC days, including today |
--yes, -y |
Skip confirmation; required for a JSON change | |
--json |
Emit a meridian.output/v1 envelope |
Bare privacy is privacy show: settings, disclosures, and the last 50 changes. set changes only options you pass, shows what a raised level stores and what a lowered one removes, and asks for confirmation. Identical values are a no-op. JSON data includes the settings and changes; a set also reports deleted row counts and rekeyed_devices. The change records the token’s name, owner, or root, the time, and before/after values. Private records are cleared after a restore because the fleet fingerprint key is never snapshotted.
meridian profile
Section titled “meridian profile”Any non-default membership requires review, even when the live profile map and declaration fingerprint are missing. Previews and settings writes refuse a map that omits a profile still assigned to a person. Restore the missing profile through a reviewed edit, or assign the affected people to other profiles first.
Review which exits and paths each profile grants. default always grants everything and cannot be edited or removed.
meridian profile add limited --grant exit:main --dry-run --jsonmeridian profile add limited --grant exit:main --yes --jsonmeridian profile set limited --grant inbound:main:main-reality --yesmeridian profile set limited --empty --yesmeridian profile list --jsonmeridian profile remove limited --dry-run --jsonmeridian profile remove limited --yes --jsonRepeat --grant to combine exit:, gateway:, inbound:, and endpoint: references. set replaces the whole grant list. --empty grants nothing. The review lists people gaining and losing access, shared-inbound aliases, and the cut-off scope. Used-profile removal reports the count and refuses until membership is moved. Applies keep existing memberships, keys, and URLs. plan, apply, and fleet import include the same access review for profiled fleets.
meridian server
Section titled “meridian server”Manage saved SSH servers (~/.config/meridian/servers.json).
meridian server add [USER@]IP[:PORT]|local [--name NAME] [--user USER] [--ssh-port PORT]meridian server list [--json]meridian server set NAME [--allowance SIZE] [--reset-day DAY] [--provider TEXT] [--pay-on DATE] [--pay-every month|year|none] [--dry-run] [--yes] [--json]meridian server remove NAME_OR_IP [--yes]| Flag | Default | Description |
|---|---|---|
--name NAME |
(none) | Display name for the server |
--user/-u USER |
root | SSH user |
--ssh-port PORT |
22 | SSH port |
--yes, -y |
Skip the removal confirmation (server remove) |
server add local saves the machine you are on; later commands run on it directly instead of over SSH. Names and addresses must be unique; server add refuses collisions instead of retargeting an existing server. server remove deletes only the saved profile and refuses while the server still has a role in your topology.
The control service stores allowances and payment dates for the fleet’s declared servers. server set NAME accepts a saved server name, profile ID, or address. Omitted options keep their values; a bare command reads them. server list --json returns saved profiles with metadata and the computed next payment date. If the control service is unavailable, the list still shows saved profiles but omits current billing details.
| Server setting | Default | Meaning |
|---|---|---|
--allowance SIZE |
not set | Monthly traffic, such as 20TB or 50GB; none clears the limit. As with client quotas, 1 GB is 1,073,741,824 bytes |
--reset-day DAY |
1 | UTC midnight on day 1–31; a short month uses its last day |
--provider TEXT |
empty | Plain text on one line, up to 80 characters; none clears it |
--pay-on DATE |
not set | YYYY-MM-DD, including a past one-off payment; none clears both date and repeat |
--pay-every PERIOD |
none | month, year, or none; a repeat needs a payment date |
--dry-run |
Review the metadata edit without applying it | |
--yes, -y |
Apply the reviewed change without confirmation; required with JSON or without a terminal | |
--json |
A meridian.output/v1 envelope for server list or server set |
meridian server set edge --allowance 20TB --reset-day 15 --provider "Example provider" --pay-on 2026-11-15 --pay-every month --dry-run --jsonmeridian server set edge --allowance 20TB --reset-day 15 --yesmeridian server set edge --allowance none --pay-on none --yesWhen you enable an allowance or change its reset day, counting starts as soon as the control service saves the change. Earlier traffic in the current period is unknown. Changing only the allowance amount, provider, or payment date preserves period use. Monthly and yearly payment repeats advance on read after the date passes in UTC, preserving the original day through short months and leap years; one-off dates stay overdue. Removing a server’s final role drops its metadata; moving an exit keeps metadata with the physical server. Allowances and reminders are informational and do not block traffic.
meridian node
Section titled “meridian node”Manage exit servers. The first server is set up with meridian setup (or meridian deploy); add more exits with meridian node add.
meridian node add [USER@]IP[:PORT] [flags]meridian node list [--json]meridian node restart NAME [--core|--all] [--yes] [--json]meridian node remove NAME_OR_IP [--yes] [--force] [--forget-unreachable]meridian node replace EXIT [USER@]NEW_IP[:PORT] [--name NAME] [--yes] [--forget-unreachable]meridian node sni EXIT NEW_SNI [--self-steal] [--yes]| Flag | Default | Description |
|---|---|---|
--name NAME |
(auto) | Friendly name for the node |
--user USER |
saved, else root | SSH user on the node |
--ssh-port PORT |
saved, else 22 | SSH port on the node (node add, node replace) |
--sni HOST |
(auto) | Reality camouflage target for this node (without it, prefers a site in the node’s own subnet, else www.google.com) |
--domain DOMAIN |
(none) | Exit’s domain: XHTTP moves onto it and WSS is added, both through Cloudflare’s CDN; Hysteria2 uses its certificate |
--self-steal |
off | node add: camouflage with your own domain (--sni, else --domain) pointed at the node. node sni: NEW_SNI is your own domain |
--country CC |
address registry | Country shown in connection names; set it when the registry is wrong (anycast or leased ranges) |
--harden / --no-harden |
on | OS, SSH, and firewall hardening. Fleet servers always keep it; --no-harden is refused |
--yes |
Skip confirmation prompts | |
--forget-unreachable |
node remove, node replace: Forget what was deployed on a removed server that doesn’t answer over SSH (blocked or deleted) instead of failing its cleanup; it keeps serving its old users until you delete it |
|
--force |
node remove: also remove the relay chains that route to this exit |
|
--json |
Emit node list / node restart as a meridian.output/v1 envelope |
node add — connects over SSH, adds the server as an exit in your topology, and applies the reviewed plan (hardening, the node agent and Xray, enrollment with the control service). Existing clients receive the new exit on their next subscription refresh.
node list — lists nodes with their agent’s live status, version, and traffic. If the control service is unreachable, configured nodes are shown as unknown and the command exits 3.
node restart — sends a signed command to the node agent and waits for readiness. Default and --core restart Xray (netcore); --all restarts every running unit managed by the held node document, one at a time. Active connections drop while their unit restarts. --core and --all are exclusive; --json requires --yes. JSON preserves each command and the per-node outcome in data.nodes[]: done, failed, or timed_out. Failed restarts exit 4; a five-minute timeout exits 3. The Servers view in the web panel has a Restart Xray button with the same reconnect disclosure and results.
Core restarts, inbound resets, and their fallback restarts require the held document to be applied and the installed core.json to match its rendered credentials exactly. An unapplied or stale configuration returns a retryable failure before restarting or resetting the core. Apply the fleet, then submit a new command; repeating a command ID returns its saved result.
node remove — removes an exit or routing gateway from your topology. It lists every resource that will be deleted (the node’s record and document, its agent and Xray, firewall rules, client endpoints), asks for confirmation, and applies exactly that review; the server stays in your saved servers. It refuses for the control server (use meridian teardown), while relays still route to the exit (remove them first or pass --force), while a routing gateway enters the fleet through it, and when the result would break the topology (for example an empty egress pool or the default egress). Routing rules scoped to a removed gateway are dropped with it.
node replace — moves one exit to another server. EXIT is the exit ID or its server’s saved name or IP; the new server uses the same target syntax as node add (a saved name or local works too) and is saved like server add. The exit keeps its ID, Reality keys, protocol paths, SNI, WARP and geo settings, and every relay that points at it, so relay users keep working and direct users get the new address on their next subscription refresh. The review lists what will be deployed on the new server and every resource cleaned up on the old one (the agent and Xray, nginx files, firewall rules, and certificates); the saved server stays. It refuses for the control server (moving it would change every subscription URL; use meridian restore when it is lost) and for a new server that already has a role.
node sni — gives an exit’s Reality path a new camouflage SNI. EXIT is the exit ID or its server’s saved name or IP. It refuses apple.com and icloud.com names and www.microsoft.com, checks over SSH that the exit reaches the new site with TLS 1.3 and HTTP/2, shows the review (relays that follow the exit’s SNI, relays that keep their own, routing gateways built on the path, and what gets cleaned up), confirms, and applies it. The old name is replaced, not kept alongside: apps switch at their next subscription refresh (every 6 hours) or a manual refresh, and until then they cannot connect over Reality. XHTTP, WSS, and Hysteria2 don’t change. Use it when meridian test --probe reports the camouflage SNI blocked. With --self-steal, NEW_SNI is a domain you own: instead of the reachability check, it checks that the name resolves to the exit (stopping when it doesn’t resolve, warning when it points elsewhere), and the exit gets a Let’s Encrypt certificate for it and answers probes itself.
meridian relay
Section titled “meridian relay”Manage relays — Realm TCP forwarders that give users a domestic entry point to an exit abroad. Relays carry Reality traffic.
meridian relay add [USER@]RELAY_IP[:PORT] --exit EXIT [flags]meridian relay list [--exit EXIT] [--json]meridian relay remove RELAY [--exit EXIT] [--yes] [--forget-unreachable]meridian relay sni RELAY NEW_SNI [--exit EXIT] [--yes]| Flag | Default | Description |
|---|---|---|
--exit/-e EXIT |
(required for add) | Exit server IP or name |
--name NAME |
(auto) | Friendly name for the relay (e.g. “ru-moscow”) |
--port/-p PORT |
443 | Listen port on the relay server |
--sni HOST |
exit’s target | Reality camouflage target for this relay; omit to use the exit’s |
--user/-u USER |
saved, else root | SSH user on the relay |
--ssh-port PORT |
saved, else 22 | SSH port on the relay server (relay add) |
--yes/-y |
Skip confirmation prompts | |
--forget-unreachable |
relay remove: Forget what was deployed on a removed server that doesn’t answer over SSH (blocked or deleted) instead of failing its cleanup; it keeps serving its old users until you delete it |
|
--json |
Emit relay list (data.relays[]) as a meridian.output/v1 envelope |
relay add — adds a single-hop relay to your topology and applies it. Clients receive it on their next subscription refresh. For chains with more than one hop, use meridian setup.
relay remove — RELAY is a relay server’s IP or saved name, or a relay chain ID. It drops every chain through that server (narrow it with --exit), lists what will be deleted (Realm units, firewall rules, the exit-side listener, client endpoints), confirms, and applies the reviewed removal. The servers stay in your saved servers.
relay sni — gives the relay chains through a server (or one chain by ID; narrow it with --exit) a new camouflage SNI. It refuses the same names as node sni, checks that the exit reaches the site (a Reality listener on the exit serves the relay’s own name), reviews, confirms, and applies. Passing the exit’s own SNI makes the relay follow the exit again. Apps switch at their next subscription refresh.
To check a relay’s hops, run meridian check RELAY.
meridian route
Section titled “meridian route”Send chosen destinations from an exit through Cloudflare WARP, directly, or nowhere, ahead of the exit’s default egress.
meridian route add EXIT VALUE... --via warp|direct|block [--name ID] [--json]meridian route add EXIT --preset ai [--via warp|direct|block] [--name ID] [--json]meridian route list [EXIT] [--json]meridian route remove EXIT ROUTE [--yes] [--json]| Flag | Default | Description |
|---|---|---|
--via ACTION |
warp with --preset, else required for add |
warp, direct, or block |
--preset NAME |
Add a named destination set instead of VALUEs: ai (AI services) |
|
--name ID |
the preset, or the action, numbered | Route ID shown by route list and used by route remove |
--yes/-y |
Skip the removal confirmation (required with --json) |
|
--json |
Emit a meridian.output/v1 envelope (data.override for add/remove, data.exits[] for list) |
EXIT is an exit ID, saved server name, or IP. Each VALUE is a domain (subdomains included), geosite:NAME, or geoip:NAME; one route holds one kind.
route add — adds the route to the exit in your topology and applies it. Routes match in the order they were added. A warp route on an exit without WARP sets WARP up for that route only; other traffic stays direct.
route list — shows each exit’s default egress and its routes in match order.
route remove — removes one route and applies the change; its destinations follow the exit’s default egress again. When nothing on the exit uses WARP any more (no warp route and no --warp), the apply removes the WARP client from the server.
meridian fleet
Section titled “meridian fleet”Fleet-wide health and inventory from the live control service, its history of applies, upgrades, and the fleet as an editable file.
meridian fleet status [--json]meridian fleet inventory [--json]meridian fleet history [--json]meridian fleet events [--since ID] [--limit N] [--json]meridian fleet usage [--days N] [--json]meridian fleet routing [ru-split|full] [--dry-run] [--yes] [--json]meridian fleet response-rules test [--user-agent UA] [--accept TYPE] [--person NAME] [--suffix SUFFIX] [--json]meridian fleet contact [--text TEXT] [--link LINK|none] [--dry-run] [--yes] [--json]meridian fleet title [TITLE] [--dry-run] [--yes] [--json]meridian fleet refresh [HOURS] [--dry-run] [--yes] [--json]meridian fleet notice show [--for NAME] [--json]meridian fleet notice set TEXT [--until WHEN] [--for NAME] [--yes] [--json]meridian fleet notice clear [--yes] [--json]meridian fleet language [auto|en|ru|fa|zh] [--yes] [--json]meridian fleet upgrade [--latest | --tested] [--yes]meridian fleet export [--json]meridian fleet import FILE [--dry-run] [--yes] [--forget-unreachable] [--json]| Flag | Default | Description |
|---|---|---|
--since ID |
0 | fleet events: read events after this cursor |
--limit N |
100 | fleet events: return 1–2000 events |
--days N |
30 | UTC days for client usage or fleet usage, 1–730, capped at the saved retention |
--json |
Emit the result as a meridian.output/v1 envelope (status, inventory, history, routing, export, import, usage) |
|
--latest |
Look up a newer Realm release in the supported major; the default keeps the tested or selected version | |
--tested |
fleet upgrade: skip GitHub; Realm stays on the tested version or what you already upgraded to |
|
--yes, -y |
fleet upgrade, fleet routing, fleet import: skip the confirmation |
|
--dry-run |
fleet routing, fleet import: show the changes and the review, apply nothing |
|
--forget-unreachable |
fleet import: forget what was deployed on a removed server whose SSH port does not answer |
fleet status — control service health, each agent’s last report and whether it applied the current configuration, relay listeners, and client counts. An empty people directory does not degrade health; disabled, limited, or expired clients are counted but are your choice, not a fault. A reachable relay listener only proves TCP, so unverified relay routes keep health unknown; use meridian test to check the full path. Exit 0 means healthy, 4 degraded, and 3 unknown.
The active column counts people with growth in the last report, with its collection time shown below. A delayed older window cannot replace newer activity. Node byte totals survive counter epochs; traffic_counting_since marks complete durable accounting, with only retained evidence backfilled from before migration.
GET /api/nodes/NODE includes durable traffic_bytes, the active report window, and the counting start; its contract is meridian api schema service-node-status.
fleet status --json also returns each node’s current capacity (status, nullable sample and values, receipt time, and age). Missing, unavailable, and stale capacity are distinct from measured zero. GET /api/nodes/{node_id}/capacity?hours=24 uses fleet.read for current/recent/hourly evidence, with 1–168 UTC hourly buckets. The console shows CPU, memory, and host bandwidth separately from counted people traffic; Privacy documents the one-hour memory series, seven-day hourly retention, and gaps.
fleet inventory — your configured servers, roles, nodes, and relays, with live status when the control service is reachable. It never prints API tokens or secret paths. If live status is unavailable, the configured inventory is still shown, with warnings, and the command exits 3. Use plan --json to decide whether apply has work to do.
fleet history — every reviewed apply the control service recorded, newest first: its number, time, author (the machine’s token name, root for the CLI’s own token, owner for the web panel), status (proposed, approved, applied, or failed), and the start of its plan hash. --json returns data.revisions[].
fleet events — local lifecycle changes and node outages/recovery, oldest first after --since ID (default 0). --limit N returns 1–2000 events, default 100. JSON returns data.events[], next_cursor, and has_more; continue with the returned cursor. Each entry has a UTC time, kind, actor (token name, root, owner, or system), subject, and small details such as changed field names, token scope, or a privacy audit row ID. Credentials, raw errors, client addresses, and device data are excluded. The service keeps at most 2,000 events or 180 days, whichever is smaller, and includes them in snapshots. GET /api/events?after=ID&limit=N needs read scope and also admits the signed-in owner.
Custom token events show the effective capability labels in your CLI language; compatible preset tokens retain their scope label.
fleet upgrade: The control service and node agents upgrade to the installed Meridian version and keep their identities. Use the Realm version tested with this release, or the newer version already selected for this fleet. Only --latest looks up a newer same-major release on GitHub; Meridian records the version and verifies each archive against its published SHA-256. The command shows the versions before it asks you to apply, then runs meridian check. An unreadable component stops the upgrade before changes (exit 3).
fleet routing — reads the current client policy from local topology and explains both choices. ru-split (default) sends matched Russian destinations and private/LAN ranges directly; full tunnels internet traffic, including Russian destinations, and keeps private/LAN ranges direct. Both block QUIC. Xray JSON sends recognized BitTorrent peers directly only with ru-split. Under full, public peers use the VPN. Pass a policy to edit the intent, review it, confirm, and apply exactly that review. Without a terminal or with --json, a change requires --yes; --dry-run shows the review without applying it. JSON returns data.client_routing, choices[], and the review and apply when present. Apps receive the choice on their next subscription refresh or a manual refresh. The web panel shows it read-only in Settings. Exit geo-blocking stays separate; Base64 links carry no routing rules. See Client routing for format limits and how to allow Russian destinations at an exit.
fleet export — prints your fleet’s reviewed topology as a YAML file you can edit: exits and their protocol paths, relays, gateways, egress pools, routing rules, routes, and access profiles. The file omits people, the subscription title and refresh interval, the public contact, and server billing. Saved servers appear by name, or by address if unnamed. The file starts with schema: meridian.fleet/v1. Reality keys, API tokens, client links, and the XHTTP and WSS transport paths stay in Meridian and are not listed. --json returns the same document under data.document.
To import a JSON export, pass only the contents of data.document. Exports preserve app response rules, including any URL paths they contain.
fleet import — reads an edited topology file (or - for stdin), shows its changes and retiring resources, then confirms and applies the reviewed hash. If an older file explicitly includes subscription settings, contact, or billing, fleet import FILE --dry-run compares those fields with the live service. Omitted fields stay unchanged. If the file changes both topology and service settings, import the topology first without those fields, then review the original file again.
fleet usage — shows per-server byte totals for each UTC day, including retained use of removed servers. --days N chooses 1–730 days within retention. Daily history must be on; JSON returns fleet totals and nodes[].daily in data.
fleet title, fleet refresh — The control service saves subscription settings independently of topology. Read or change the title with fleet title [TITLE] and the refresh interval with fleet refresh [HOURS] (1–168). Use --dry-run to review and --yes to save without a prompt. The version check refuses a change if another editor saved first.
fleet contact — Use Settings → General in the panel or fleet contact to read and change the public instructions and support link. A panel contact edit requires a recent owner sign-in. Omitted CLI flags keep their current values; --text "" clears the text and --link none clears the link. JSON returns data.owner_contact and data.version. For a legacy file, omit owner_contact to keep the live contact. Supplying it replaces the entire contact: owner_contact: {} clears both fields; a text-only object clears the previous link. The preview lists each change.
Server allowances — fleet status and the Servers screen in the web panel show current period use, provider, reset day, next payment date, and server attention. Usage is approximate accepted user traffic (upload + download): protocol overhead, the server’s own downloads, and relay forwarding are excluded. Reports count in their UTC receipt period, so delayed reports can affect a later period. Relays and a control server without an agent say not measured, with no usage figure. Edit billing in Servers or with meridian server set NAME. The control service is sufficient even if an exit is offline.
GET /api/servers needs read scope and returns the server-usage contract: metadata, UTC period boundaries, counted bytes, tracking start, next payment, and measurement coverage. GET /api/attention adds servers[] with allowance_near at 80%, allowance_exceeded at 100%, payment_due within 7 days, and payment_overdue for past one-off dates. Its allowance_percent and allowance_exceeded_percent query thresholds are bounded to 1–100, with the first no higher than the second; payment_days is 1–30. Billing warnings set summary.needs_attention; fleet health and exit codes continue to describe runtime health.
The service notice is operator-owned. fleet notice set shows a rendered preview before confirmation; --until WHEN sets its expiry, --for NAME uses real account values, and JSON changes require --yes. fleet notice show reads it; fleet notice clear confirms removal. See Client management.
The default auto follows each person’s browser on connection and support pages and keeps app status remarks in English. An explicit en, ru, fa, or zh sets the starting page language and app remarks. fleet language reads it; fleet language CODE --yes --json saves it. client set NAME --language CODE sets a person override; --language default follows the fleet. Saved page choices take priority, and people can still switch on the page. Status codes stay English. These service settings survive reviewed applies and encrypted backups.
Preview and explain delivery
Section titled “Preview and explain delivery”meridian client preview person --suffix singbox --json and the console’s subscription preview show the effective policy, its source, every format’s ordered rules and DNS, and omitted features with reasons. The optional Destination field explains the selected format. Xray omissions distinguish individual and fingerprint profiles that cannot reach a requested exit. Policy rule numbers count LAN first, then custom rules, then the preset tail; they are shared across formats even when a client needs several serialized rules.
meridian fleet routing set work --dry-run --jsonmeridian fleet routing explain chat.example.test:443 --person person --format singbox --jsonmeridian fleet routing explain 198.51.100.10 --format xray-json --port 443 --network tcp --protocol other --jsonfleet routing explain reads the currently applied service settings and optional private person assignment. It returns the first matched rule and action, for example “this destination goes via exit west because rule 2 matched.” Omit --person to explain the fleet default. --format selects Xray JSON, Mihomo/Clash, Stash, sing-box, or Base64. TCP and ordinary traffic are assumed unless supplied; --protocol bittorrent supplies synthetic detected-protocol evidence. No DNS, reachability, or network lookup occurs. A missing port or cached pinned geodata is reported as unknown when an earlier rule needs it. Xray checks names with IPIfNonMatch; its final TCP/UDP rule sends unmatched names through the tunnel without a local DNS routing pass. IP rules match connections addressed by IP. Actual app selection and reachability can change which connection an automatic group uses.
| Format / apps | Destination rules | DNS | fake-IP | Via exit | BitTorrent |
|---|---|---|---|---|---|
| Xray JSON apps | All eight typed matchers | DoH, plain | Omitted | Yes, within the delivered profile | Best-effort detection |
| Mihomo / Clash Meta | All eight | DoH, DoT, plain | Yes | Primary connections only | Omitted |
| Stash | All eight | DoH, DoT, plain | Native mode; custom fake-IP omitted | Primary connections only | Omitted |
| sing-box / Hiddify | Inline domains, CIDR, ports, TCP/UDP, private IPs | DoH, DoT, plain | Yes | Supported connections only | Omitted |
| Base64 link apps | No rules | No settings | No | No rule-based choice | No |
The service reads geodata only from already-cached Xray archives whose hash matches Meridian’s pin. Explanations never start a download. Clients never receive remote rule sets. Xray sends configured public DNS through its automatic group and retains direct LAN resolvers; other clients use their represented DNS settings. Choosing an unsupported transport never converts it to plain DNS. Existing preset bytes and default fleet corpus answers stay unchanged.
POST /api/delivery-policies/explain accepts destination, optional person, format, port, network, and protocol; it needs delivery.explain, plus people.read and people.private with a person. Subscription previews require private permission for policy details or a destination explanation; lower grants receive the existing metadata only. Connection-page /info may include user.deliveryCapabilities: format names, support flags, and omission codes, without policy names, assignments, memberships, destinations, or endpoint details. The page keeps this fresh data in memory.
fleet response-rules test reads applied app rules with --user-agent UA, optional --accept TYPE, --person NAME, --suffix SUFFIX, and --json. It explains the first custom or built-in rule, format or refusal, policy source, and redacted header changes. Inputs are transient and bounded to 512/256 characters; no subscription, DNS lookup, device registration, or write occurs. --person accepts an account or display name of 1–64 characters; an empty or longer value fails with a user error (exit 2). Rules are edited in delivery.response_rules through fleet export and reviewed fleet import. App rules require Meridian’s control service; on Remnawave, run meridian migrate before adding any. Response rules describes fields, precedence, and refusal behavior.
meridian context
Section titled “meridian context”Keep several separate fleets on one machine, for example one for family and one for work, and choose which one commands work on.
meridian context list [--json]meridian context use NAMEmeridian context rename OLD NEWmeridian context remove NAME [--yes]| Flag | Default | Description |
|---|---|---|
--json |
context list: emit a meridian.output/v1 envelope |
|
--yes, -y |
context remove: remove a context whose fleet still has servers without asking |
context list — every context with its control server and how many exits, relays, and routing gateways it has, read from this machine only; * marks the current one:
* default 198.51.100.10 2 exits, 1 relay family 198.51.100.40 1 exitcontext use — makes NAME the fleet every later command works on. meridian deploy IP --context NAME creates a new context, and any command takes --context NAME to work on another fleet once.
context rename — renames a context; its fleet and servers are untouched.
context remove — deletes the context’s files from this machine and never contacts a server: the servers keep running, but this machine can no longer manage them. It refuses the current context, and while the fleet still has servers it asks first (--yes skips the question). The default context is Meridian’s home directory itself, so it cannot be renamed, and it can be removed only once another context has taken its fleet over. Such a copy is marked superseded in context list and refuses every change; removing default then deletes only the fleet’s files and keeps the SSH key and preferences.
meridian check
Section titled “meridian check”Check a server’s health, or whether a new server can run Meridian. What runs depends on the server’s role in your fleet:
- Not in the fleet yet — pre-flight checks: camouflage target reachability and DNS, port 443 availability and outside reachability, domain DNS, OS, disk, and clock. Nothing is installed; a short-lived listener tests the firewall when port 443 is free. DNS uses the server’s own resolver.
- Control, exit, or routing gateway — the control service (it answers, belongs to this fleet, and runs a compatible version), each node’s agent (online, applied the current configuration, current build), SSH (or local access), every compiled public and internal port, TLS certificates, and disk space. Run from another machine, the control server also gets a data-flow check: a ~50 KB download that warns when it freezes after about 16–24 KB (throttling, measured from where you are).
- Relay — every Realm hop on the server: the service is active and can reach its next hop, and the chain’s public entry accepts TCP from your machine.
With no server, every server in the fleet is checked.
meridian check [SERVER] [--domain NAME] [--sni HOST] [--user USER] [--ssh-port PORT] [--ai] [--json]meridian check [CONTROL-SERVER] --repair [--yes] [--user USER] [--ssh-port PORT]--domain and --sni apply to servers not deployed yet: they check that the domain resolves to the server and that a specific camouflage target is reachable. --user and --ssh-port override the saved SSH user and port. --ai copies an AI-ready diagnostic prompt to the clipboard. --json emits one meridian.output/v1 envelope with a report per server and scope.
Missing evidence is never treated as success. Exit 0 means every check passed, 4 means problems were found, 3 means required evidence was unavailable, and 2 means invalid input. Each failure prints its fix. Use meridian test to push real traffic through the whole route.
--repair — brings back a control service that is stopped or broken, for example after a failed upgrade. Every meridian apply refuses while the service does not answer, because the apply fence lives in it. The repair reinstalls the same meridian-vpn version under /opt/ctld with the server’s own configuration, rewrites the ctld unit, restarts it, and waits until it answers. Topology, people, node documents, the apply fence, and revisions stay in the database as they are. It works on the fleet’s control server only (a SERVER must name it), shows a review, and asks before it changes anything; --yes skips the question, and without a terminal it is required. It has no --json output. It refuses:
- a service that answers: use
meridian apply; - a server without its configuration (
/etc/ctld/config.json) or database: rebuild it from a snapshot withmeridian restore; - a server whose recorded install is another version than this Meridian: run the matching release, as the error says (for example
uvx --from 'meridian-vpn==4.0.0b15' meridian check --repair). A development checkout installs its own build over an older one.
meridian scan
Section titled “meridian scan”Find camouflage targets on the server’s own network using a pinned RealiTLScanner release. Meridian verifies its SHA-256 checksum before running it and removes the remote workspace afterwards.
meridian scan [SERVER] [--user USER] [--ssh-port PORT]RealiTLScanner scans IPv4 ranges; an IPv6-only server exits 3. Picking a result prints the command to use it — it doesn’t change a deployed topology. Skipping exits 0, an invalid choice exits 2, no suitable targets exits 4, and scanner or download failures exit 3.
meridian test
Section titled “meridian test”Test delivered VPN traffic from your device. No SSH is needed.
A full test picks an active client, fetches the exact Xray JSON that the control service delivers to them, and pushes real traffic through the automatic fallback and through every path of the target server. The first run may spend up to 120 seconds downloading and verifying the pinned Xray runtime. Traffic checks rotate independent IP observers and compare them with a direct request, so an observer outage is inconclusive rather than a false failure. MERIDIAN_CONNECT_TEST_URL overrides the observer for controlled environments.
Each path reports its time to first byte. When a path fails, Meridian opens a plain TCP connection to its endpoint to say whether it connects, but no traffic passes (the server answers but the VPN session carries nothing: wrong credentials or a session being cut) or is unreachable (nothing answers on that port). With --json, data.transports lists every path’s outcome (ok, no_traffic, unreachable, failed, egress_mismatch, inconclusive, invalid) and first_byte_ms.
A control service outage, HTTP 429, or HTTP 5xx makes the subscription unavailable, so the run exits 3. Any other subscription rejection such as 400 or 422 is a completed failure and exits 4.
meridian test [SERVER|DOMAIN] [--domain NAME] [--sni NAME] [--client NAME] [--basic] [--probe] [--timeout SECONDS] [--json]Without a target, test tests the saved server it runs on, or your only saved server. With several, it tests every public entry of your fleet in turn (each exit, then each relay’s entry) and exits with the worst result; --json then returns one result per server in data.results.
--client tests a specific active client. --basic runs only network and TLS checks, without downloading Xray, and cannot verify UDP-only paths; it cannot be combined with --client (exit 2). --timeout (default 5, range 1–30) limits each network operation, separate from the first-run Xray download.
Exit 0 means every check passed, 4 means the test found problems, and 3 means required evidence was unavailable. --json emits a meridian.output/v1 envelope with every check and finding.
Censor’s view: meridian test --probe
Section titled “Censor’s view: meridian test --probe”--probe looks at a server the way an active prober would, to check whether the deployment gives itself away, instead of sending traffic. It works on any IP or domain and applies stricter checks when the target belongs to your saved topology.
Checks follow the real deployment: public and internal port exposure, HTTP/TLS behavior, SNI consistency and camouflage, common proxy and management-panel paths, WebSocket upgrades, reverse DNS, HTTP/2, legacy TLS versions, and configured domains. --sni overrides the SNI for generic TLS probes. UDP-only listeners are reported as needing a full meridian test instead of being guessed.
--probe also answers “what is blocked?”. It opens TLS to the server with its camouflage SNI; if that fails, it retries without the SNI and opens the real camouflage site directly, then reports whether the server IP or the camouflage SNI looks blocked. If the real site can’t be reached either, the result is inconclusive rather than a finding. With a self-steal camouflage the real site is the server itself, so it is no independent comparison: when nothing gets through, the result is inconclusive. On the control server it also downloads the connection page’s ~50 KB script and watches for a transfer that freezes after about 16–24 KB, which is how throttled foreign IPs behave. When a WSS path goes through a CDN, the same download runs through the CDN. These results only mean something when you run them from inside the censored network. --probe cannot be combined with --basic, --client, or --domain. Exit codes are the same as test; skipped checks are never reported as passes.
meridian probe [SERVER|DOMAIN] [--sni NAME] [--timeout SECONDS] [--json] is the same as meridian test IP --probe.
meridian doctor
Section titled “meridian doctor”Collect system diagnostics for bug reports.
meridian doctor [SERVER] [--sni HOST] [--user USER] [--ssh-port PORT] [--ai]--sni picks the camouflage target to diagnose, --user and --ssh-port override the saved SSH user and port, and --ai copies a redacted, AI-ready report to the clipboard instead of printing the issue template.
Doctor follows the server’s roles: a relay-only server isn’t diagnosed as an exit, and routing gateways are labeled separately. Missing tools or a lost SSH connection make the report inconclusive (exit 3); sections already collected are still shown.
meridian logs
Section titled “meridian logs”Show a server’s recent logs, redacted, without logging in to it.
meridian logs [SERVER] [--lines N] [--grep TEXT] [--component NAME] [--user USER] [--ssh-port PORT]| Flag | Default | Description |
|---|---|---|
--lines, -n N |
100 |
Lines to show from each log (1–10000) |
--grep, -g TEXT |
Only lines containing this text; case-insensitive, matched literally rather than as a regex | |
--component, -c NAME |
all | Only node, panel, nginx, or relay; repeat to pick several |
logs reads what the server’s roles run: exits and routing gateways show the agent (netagent) and Xray (netcore) under node, the control server shows the control service (ctld) under panel, both show the nginx error log, and relays show their Realm units’ journal. --user and --ssh-port override the saved SSH user and port.
Meridian replaces tokens, passwords, keys, UUIDs, subscription IDs and secret paths it recognizes with [REDACTED], and strips terminal control characters. The host’s nginx error log can include requests to other sites. Review log output before sharing it. For a support report, meridian doctor checks the nginx configuration without reading that log.
A server without a fleet role, or a --component it doesn’t run, exits 2 before connecting. A log that can’t be read (a missing service, a lost SSH connection) is shown as unavailable and the command exits 3.
meridian token
Section titled “meridian token”Issue tokens with explicit action permissions. Review first; the secret is shown once.
meridian token capabilities [--json]meridian token list [--json]meridian token create NAME [--capability ACTION ... | --scope PRESET] [--expires-days DAYS | --expires-at UTC | --never-expires] [--dry-run] [--yes] [--json]meridian token revoke TOKEN_ID [--yes] [--json]Use one preset or repeat —capability. New tokens default to 90 days; —never-expires is explicit. —dry-run creates no token. —yes is required for JSON mutations. Creation JSON keeps the review under data.preview and reveals only data.issued.token in the producing output.
Declining creation or revocation, or running either without a terminal and without —yes, exits 1 and changes no token. Creation uses the exact expiry shown in the service preview; waiting at confirmation never extends it. If that instant has passed, request a new preview.
Listing, creation, and revocation require a configured Meridian control service. A missing saved service URL or credential exits 2 with deployment guidance; a Remnawave fleet points to meridian migrate. The local capability catalog remains available without a fleet.
For scraping, explicitly choose --capability metrics.read; it reads Prometheus text through the existing private control ingress and grants no account or configuration changes. Existing compatible presets retain their frozen grants. Review with --dry-run, then issue with --yes; client management has the authenticated Prometheus configuration.
meridian panel
Section titled “meridian panel”Show the web panel’s address, and a one-time setup link while it has no owner.
meridian panel [--setup-link]| Flag | Default | Description |
|---|---|---|
--setup-link |
Print a reset link even though the panel has an owner: it sets a new password, turns the sign-in code off, removes every passkey, and signs out every device |
The setup link works once, for 15 minutes; open it to choose the owner’s password. Once the panel has an owner, panel prints the address and whether a sign-in code is on. Treat both the address and a setup link like passwords. In the web panel you manage people, notices, language, privacy, and API tokens; servers, revisions, and topology settings are read-only there. See Web panel.
meridian teardown
Section titled “meridian teardown”Remove Meridian from a server.
meridian teardown [SERVER] [--user USER] [--ssh-port PORT] [--yes] [--discard-backup]On the last controller this removes people, settings, subscriptions and the live database. The review shows the last confirmed off-server save and changes since. If needed, Meridian tries to save a verified copy on your managing computer. It checks the database again after stopping the service: a newer edit keeps the database and stops teardown. --yes only answers the normal confirmation. If you intend to lose unbacked-up data, pass --discard-backup separately. An older service that cannot confirm a save also requires that explicit choice.
If preparation fails, Meridian restores the staged files and the previous service startup settings. If it reports that retirement has committed, the fleet is already stopped: fix the reported cleanup problem and rerun the same command, without adding --discard-backup. A small private receipt on the VPS makes this safe even if the SSH reply was lost.
Teardown removes the verified controller, agent, Xray, managed nginx listeners, certificates and tagged firewall rules, then the local fleet configuration. It refuses a shared nginx installation, unrelated certificate renewal, unrecognized unit or legacy panel before deleting anything. SSH hardening, installed packages, unrelated services and untagged firewall rules stay. On a dedicated host, nginx is stopped and disabled so its default HTTP site does not go public after teardown. In a fleet with several servers, retire the other roles through the fleet plan first.
--yes skips the confirmation; the role checks still run first. Declining exits 1. An unknown server name, or zero or several possible targets, exits 2 instead of prompting.
meridian backup
Section titled “meridian backup”Encrypted snapshots of the control service’s state, the machines that receive them, and the recovery key.
meridian backup pull [--name NAME]meridian backup recovery-key [--yes]meridian backup devicesmeridian backup revoke ID| Flag | Default | Description |
|---|---|---|
--name NAME |
this computer’s host name | backup pull: name this machine’s key gets when it is first registered |
--yes, -y |
backup recovery-key: replace an existing recovery key without asking |
After every command that changes the fleet, Meridian saves the control service’s newest snapshot in snapshots/ beside cluster.yml (the newest few are kept). A snapshot holds users, limits, traffic, revisions, API tokens, and a copy of this machine’s cluster.yml and servers.json, so it can rebuild the fleet on a machine with nothing else. It is encrypted to every registered machine’s key and to the recovery key, and never carries signing keys, sessions, or the web panel password. A failed save warns and never fails the command that triggered it.
backup pull — saves a snapshot now. The first pull on a machine creates its key (device.key, readable only by you) and registers it with the control service. If this computer’s fleet files are stale and the snapshot cannot rebuild the current fleet, the partial copy is kept under snapshots/partial/. It does not replace a full recovery copy or confirm a save. Run the command on the computer that last applied the fleet.
backup recovery-key — makes the fleet’s recovery key, or replaces the existing one after asking, and prints it once. Meridian keeps only its public half, so write it down or print it and keep it offline. The first deploy of a fleet already shows one. Not available with --json.
backup devices — lists the machines whose keys snapshots are sealed to, with their IDs and when each was registered, and whether the fleet has a recovery key.
backup revoke — stops sealing new snapshots to one machine’s key, for example a lost laptop. Snapshots it already holds stay readable with its key; revoke it before it can pull a new one.
meridian restore
Section titled “meridian restore”Restore checks the snapshot’s fleet before profile compatibility or target access. --force keeps this check. Choose this fleet’s snapshot, or restore another fleet’s snapshot into a different empty context.
An empty context imports validated fleet files before remote restore confirmation. Saved files keep profile history from the snapshot database and discard a carried unfinished restore. They remain if review fails or you decline confirmation; finished restore records are retained. An existing cluster.yml without topology is accepted; changes to that file after loading are refused.
Rebuild a lost or seized control server on another server from a snapshot.
meridian restore --to SERVER [--snapshot FILE] [--recovery-key] [--force] [--name NAME] [--user USER] [--ssh-port PORT] [--yes]| Flag | Default | Description |
|---|---|---|
--to SERVER |
(required) | The new control server: an IP, user@IP:port, or a saved name |
--snapshot FILE |
newest saved | Snapshot to restore |
--recovery-key |
Open the snapshot with the recovery key instead of this machine’s key; it is asked for (hidden) or read from one line of standard input. Asked for at a terminal when this machine has no key of its own | |
--force |
Restore even though the old control service still answers | |
--name NAME |
(none) | Name for the new server |
--user/-u USER |
root | SSH user on the new server |
--ssh-port PORT |
22 | SSH port on the new server |
--yes, -y |
Skip the confirmation |
Restore opens the snapshot, reviews what it will do, and asks. It then installs the control service on the new server from the snapshot, moves the control server (and the old server’s exit, if it had one) to the new address in your topology, and runs the normal reviewed apply. The restored service gets a new fleet authority, new signing keys, and a new API token, so every agent enrolls again and a seized server can’t sign anything your nodes accept. Users keep their accounts, limits, and traffic. The restored web panel has no owner, so the end prints a one-time setup link for a new password; restore then lists other computers’ backup keys and, at a terminal, offers to revoke each one.
On a bare IP every subscription URL contains the control server’s address, so each link changes: the review says so and the end prints everyone’s new link, including people added in the web panel. With a domain, links stay the same once its DNS record points at the new server; the review names the records.
Restore refuses while the old control server still answers, because two control services would split the fleet; --force overrides it, for example when the old server was seized. It warns when --snapshot names an older file than the newest saved one: an older snapshot brings back tokens, machines, and people you have since removed. A restore that stops can be run again and continues where it stopped.
Restore also checks snapshot profiles against the local intent before staging or target access; --force does not skip this check. A stored declaration fingerprint permits topology expansion of unchanged grants. Unstamped snapshots require an identical compiled grant map. Restore merges deposited profile history even when it retains newer local intent, and pins reviewed declarations through resumes. Choose a matching snapshot, or restore matching fleet files into a new context and review the desired saved change afterwards with meridian apply. See Recovery.
On a machine without the fleet, pass the snapshot file; restore asks for the recovery key: the snapshot’s own copy of the fleet’s files is restored first. If this machine’s copy is older than the snapshot’s, restore puts the fleet in a new context and, after the review names it, takes the fleet over from the old one, which is then marked superseded and refuses changes until you meridian context remove it.
meridian migrate
Section titled “meridian migrate”Move a fleet that runs the Remnawave panel to Meridian’s control service, in place, keeping every link.
meridian migrate [--yes]| Flag | Default | Description |
|---|---|---|
--yes, -y |
Skip the confirmation |
Migrate first reviews the move: the clients it carries over, anything about a client it can’t keep, and the panel data nobody keeps (the panel’s admin account and API tokens, per-day usage history, HWID device registrations, panel plugins and response rules Meridian didn’t set, client IP forwarding (it served the panel’s per-user IP limits), and the Remnawave subscription page; Meridian’s own connection pages stay). After you confirm, it:
- Backs up the panel’s database, to
backups/on your machine and to/var/backups/meridian-migration/on the control server, with your fleet files - Installs the control service beside the panel and imports every client with the same keys, subscription ID, status, limits, expiry, and traffic
- Stops the panel (its data stays) and removes each node’s container
- Applies the fleet: every exit gets the agent, enrolled with the control service
- Checks that every client’s subscription link is exactly what it was
- Removes Remnawave
There is no rollback; the backup is the way back. Each step is saved, so a migration that stops resumes when you run it again, and a finished one does nothing. If the links check fails, Remnawave is left in place, stopped, and the command stops with an error. Without a terminal, pass --yes; otherwise migrate stops after the review. meridian deploy offers to migrate when it finds a Remnawave fleet.
meridian update
Section titled “meridian update”Update the CLI to the latest release of its major version on PyPI. A newer major version is only announced; --major moves to it after you have read the release notes. A beta build follows newer betas of its major version and then the stable release. Meridian tries uv, pipx, and pip, and only reports success when the active meridian command shows the new version. Exit 0 means already current or updated; 3 means the update or its verification failed. Updating the CLI does not change your servers.
meridian update [--major]meridian serve
Section titled “meridian serve”Run the control service. Meridian installs it on the control server as the ctld systemd unit, which runs this command; you don’t run it yourself.
meridian serve [--config FILE]| Flag | Default | Description |
|---|---|---|
--config FILE |
/etc/ctld/config.json |
Service configuration, written by Meridian |
The service listens on 127.0.0.1:3000 behind nginx and keeps its state in one SQLite file under /var/lib/ctld/. It logs no requests, so subscription IDs and secret paths never reach the journal. meridian logs SERVER -c panel shows its log.
meridian api
Section titled “meridian api”Inspect the machine-readable contracts behind JSON output, for scripts and UI clients.
meridian api schemas [--json] [--include-schemas]meridian api commands [--json] [--include-schemas]meridian api schema NAME [--envelope|--json]meridian api workflow NAME [--json]| Flag | Default | Description |
|---|---|---|
--json |
Emit the catalog as a meridian.output/v1 envelope |
|
--include-schemas |
Include full JSON Schemas (implies JSON output) for api schemas or api commands |
|
--envelope, --json |
Wrap api schema NAME in a meridian.output/v1 envelope instead of printing the raw schema |
api schemas — lists schema names such as output-envelope, deploy-request, deploy-result, deploy-plan, plan-envelope, apply-envelope, client-list-envelope, fleet-status-envelope, and event.
api commands — lists command contracts: argv, envelope and data schemas, possible statuses and outcomes, exit-code meanings, every option the command accepts (machine_flags), and interrupt_behavior. Arguments, options, and descriptions are read from the CLI itself. Ctrl-C exits 130 without a JSON envelope (interrupt_behavior: "exit_130_without_envelope").
api schema NAME — prints one JSON Schema, e.g. meridian api schema output-envelope.
api workflow NAME — prints a UI-renderable workflow, e.g. meridian api workflow deploy --json.
meridian help
Section titled “meridian help”Explain Meridian to an AI agent, or show one command’s help.
meridian help [agents | COMMAND...]meridian help agents prints a Markdown guide for AI agents: what Meridian does, how the fleet and its reviewed topology fit together, where state lives, the rules for driving the CLI safely (non-interactive flags, JSON envelopes, plan before apply, confirmation before removal, links as secrets), exit codes, and common tasks. It always prints plain Markdown, so an agent can read it from a pipe.
meridian help COMMAND shows the same help as meridian COMMAND --help, e.g. meridian help node add. Without arguments it prints the top-level help. An unknown topic exits 2.
Global options
Section titled “Global options”Global options go before the command, for example meridian --quiet doctor. Command options such as test --json go after it.
| Flag | Description |
|---|---|
--version, -v |
Show the CLI version and exit |
--verbose |
Enable debug logging |
--quiet, -q |
Suppress progress output |
--context NAME |
Work on another fleet (meridian context); default: MERIDIAN_CONTEXT, else the current context. Also accepted after the command, as in meridian deploy 203.0.113.5 --context work |
--lang CODE |
Language for the setup wizard: en, ru, fa, or zh (default: saved choice, else asked) |
--json |
Request a JSON envelope from a command that supports it; other commands fail explicitly |
--install-completion |
Install shell completion for the current shell |
--show-completion |
Print the completion script for the current shell |
JSON output uses the meridian.output/v1 envelope (schema, command, operation_id, status, summary, data, warnings, errors). It is supported by every command that lists --json: deploy, plan, apply, check, test, probe, all client and route commands, fleet status/inventory/history/export/import, node/relay list, and the api commands. The global --json and a command’s own --json are interchangeable. Secrets are redacted before JSON leaves the process. Run meridian api commands --json to discover the contracts.
Common server options
Section titled “Common server options”These recur across commands; each command accepts only the options listed in its own section.
| Flag | Used by |
|---|---|
SERVER argument |
deploy, check, scan, test, doctor, logs, teardown, node add, relay add, server add |
--user, -u USER |
deploy, check, node add, relay add, server add, scan, doctor, logs, teardown, restore |
--ssh-port PORT |
deploy, check, node add, relay add, server add, scan, doctor, logs, teardown, restore |
--sni HOST |
deploy, check, node add, relay add, test, doctor |
--domain DOMAIN |
deploy, check, node add, test |
--self-steal |
deploy, node add, node sni |
Client commands use the control service’s API directly and don’t take a server. test runs from your device and doesn’t use SSH.
Server resolution
Section titled “Server resolution”Name the server first, the way ssh does: an IP, a saved name, user@host:port, or local to run on the current machine without SSH. --user and --ssh-port fill in what the target leaves out and must not contradict it. An empty user or port means the saved value, else root and 22. With no server, Meridian uses local mode (when running on a deployed server) or the only saved server. Zero or several candidates exit 2 rather than prompting.
