Skip to main content
February 15, 2022
Question

[Linux] Use $XDG_RUNTIME_DIR instead of $HOME/.1password?

  • February 15, 2022
  • 8 replies
  • 709 views

I like to try (although not very successfully) to keep my home directory clean of unnecessary dotfiles. While this is a very cool feature, I think it makes more sense to keep the socket in $XDG_RUNTIME_DIR. This seems to be what the directory is made for, and would prevent another folder under the home directory.

From the https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html:

$XDG_RUNTIME_DIR defines the base directory relative to which user-specific non-essential runtime files and other file objects (such as sockets, named pipes, ...) should be stored. The directory MUST be owned by the user, and he MUST be the only one having read and write access to it. Its Unix access mode MUST be 0700.


1Password Version: 8.6.0~26.BETA
Extension Version: 2.3.0
OS Version: Fedora Linux 35 (Workstation Edition)

8 replies

February 15, 2022

Quick follow up, I just tried it myself (by symlinking $HOME/.1password/agent.sock -> $XDG_RUNTIME_DIR/1password-ssh-agent.sock and updating my SSH config file to


Host *
IdentityAgent ${XDG_RUNTIME_DIR}/1password-ssh-agent.sock

and it still works fine. The 1Password app actually already has a socket in there (1Password-BrowserSupport.sock), so it doesn't seem like a stretch to add another.

XIII
February 16, 2022

I’d like this too, but on macOS.

ashugg
November 5, 2025

Instead of ~/Library/Application Support/1Password ?

November 4, 2025

Necro bump for supporting this is 2025.

November 4, 2025

Hi @ragectl ,

Thanks for bumping this. I'll re-share this with the team. 

Just to confirm, you are looking for a way to personalize the "~/.1password/" directory location from "~" to potentially the env's $XDG_RUNTIME_DIR or elsewhere.

Let me know if I got that wrong.

Cheers,
Phil & Team

January 27, 2026

I'm pretty sure he wants to move the socket path from

SSH_AUTH_SOCK=/home/username/.1password/agent.sock

to

SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/1Password-ssh-agent.sock"

or some other location. Using the XDG directories is less of a "personalization" and more of a standardization for systems that use the https://specifications.freedesktop.org/ Specification  it has the added benefit of keeping a users home directory more organized. A bunch of `.someapplication` directories in my ~/ bugs me.