Bitwarden SSH agent environment variable on macOS not persisting after reboot

Am I missing something, or do the Bitwarden SSH agent configuration instructions for macOS use methods that don’t persist after a reboot?

I followed the guide and ran:

export SSH_AUTH_SOCK=/Users/<user>/.bitwarden-ssh-agent.sock

as shown in the documentation, but the variable didn’t survive a reboot.

According to this article, the same issue occurs when using:

launchctl setenv "SSH_AUTH_SOCKET" "/Users/<user>/.bitwarden-ssh-agent.sock"

Am I missing something?

The line with the export command applies only to your current shell instance. As soon as you open another shell, it will not have this variable set. Even if you add it to your .bashrc or .zshrc, this will only be valid for commands executed in a shell.

You linked an article that explains how to make the setting persistent with LaunchAgents. Did you try this?

No, I didn’t try yet. I was wondering if this is what everybody is doing, especially given that it is not what the Bitwarden website suggests. Is that the best way to set the environment variable permanently?

Sorry, I do not know this because I do not use macOS.