Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 1.93 KB

secrets-1password-connect.md

File metadata and controls

27 lines (19 loc) · 1.93 KB

1Password Connect on a remote server

Read secrets from a self-hosted 1Password Connect server on headless or remote T3 Code hosts without desktop approval prompts. If you don't already run Connect, a 1Password service account is simpler. See Secrets for basics.

Set it up

  1. In 1Password, create a Connect server and access token scoped only to the vaults T3 Code needs.
  2. Deploy the Connect API and sync containers where the T3 Code server can reach them.
  3. Install the 1Password CLI (op) on the T3 Code server machine.
  4. Set OP_CONNECT_HOST (use https:// unless local or on a trusted private network) and OP_CONNECT_TOKEN in the server's environment (for a background service, add them to service.env and run t3 service restart). Do not set OP_SERVICE_ACCOUNT_TOKEN in the same environment.
  5. In Settings → Secrets → Add provider, enter any sign-in address (e.g. my.1password.com; op ignores it while Connect is configured), then use op://vault/item/field references.

Verify

On the server machine, test with a clean environment:

curl -s "$OP_CONNECT_HOST/health"
env -i PATH="$PATH" HOME="$(mktemp -d)" OP_CONNECT_HOST="$OP_CONNECT_HOST" OP_CONNECT_TOKEN="$OP_CONNECT_TOKEN" \
  op read --no-newline "op://Automation/provider-token/credential" >/dev/null && echo "Secret read"

Notes

  • Agent scope: Agents inherit the server's environment and can read any vault accessible to the Connect token—grant only vaults you're comfortable exposing to agents.
  • Reference names: Use item IDs if an item title contains characters outside letters, digits, spaces, ., _, and - (e.g. colons).
  • op over Connect supports op read (not op vault list), and T3 Code times out secret reads after 45 seconds.