opschain vault store-file
Included from Basic tier
opschain vault store-file <node-path> --path secret-vault://<path>/<key> -f <file> [--replace]
Uploads a file and stores its content in the server's vault under a
secret-vault:// URL — text files as-is, binary files Base64-encoded by the
server. Everything else follows opschain vault store: the positional node
path names the owner (updatable on the node's secrets path, or on
/secrets), the vault refuses to overwrite an existing value unless
--replace is given, and the response carries only the cipher-stacked
stored value (or the not-returned placeholder on a plaintext-storing vault).
Under multi-vault a provider-qualified URL
(secret-vault://<provider-code>@<path>/<key>) writes through the named
provider with your stored credential for it, exactly as for
opschain vault store — never a silent fallback to another vault.
Server-only (see opschain docs cli/vault).
Flags
| Flag | Meaning |
|---|---|
--path <url> | The secret-vault://<path>/<key> URL to store under (required). |
-f, --file <file> | The file whose content to store (required). |
--replace | Overwrite an existing value at the URL (refused otherwise). |
Output
As opschain vault store, plus the uploaded filename in the -o json /
-o yaml document (path, stored, generated — always false here — and
filename).
Exit codes
| Code | Meaning |
|---|---|
| 0 | Stored. |
| 1 | The file could not be read, the server refused (value exists without --replace, authorisation), or the request failed. |
| 2 | Usage error (missing required flags, malformed node path). |
Named errors
reading the secret file: <cause>— the-ffile is unreadable.expected a node path like demo, demo/environments/dev or /projects/demo/environments/dev/assets/web, got "<arg>"(exit 2).- Server refusals arrive as
ERROR:results and surface verbatim (exit 1).
Examples
opschain vault store-file demo/environments/dev --path secret-vault://ssh/deploy_key -f ~/.ssh/deploy_key
See also
opschain docs cli/vault-store— store a literal value, or have the server generate one.opschain learn 3.5— secrets and vault, guided.