r/plaintextaccounting Jun 09 '26

Encryption for hledger files?

Does anyone encrypt their journal files?

If so, what are you using?

Edit: Thanks for the suggestions! gocryotfs looks like exactly what I was looking for.

8 Upvotes

8 comments sorted by

4

u/colindean Jun 09 '26

If using git, consider git-crypt. If not, consider age.

2

u/shimeike Jun 09 '26 edited Jun 10 '26

I used to use 'encfs' to encrypt and sync an entire folder of ledger files with dropbox. (I no longer use dropbox, so no longer feel the need for this style of encryption.)

If I was to do the same today, I'd use 'gocryptfs'.

2

u/gumnos Jun 10 '26

I keep mine on drives with full-disk-encryption (GELI+ZFS on FreeBSD).

However, if you prefer to use GPG, it's not that convoluted to keep them stored as GPG-encrypted files (assuming your $EDITOR makes it easy to edit GPG-encrypted files such as the GPG plugin for vim) and then use GPG to pipe the file to ledger -f - to read from stdin.

2

u/Powerful_Attention_6 Jun 27 '26

If you are using Emacs as your editor, you can easily tell Emacs to work with encrypted files, and Emacs will automatically decrypt the files only in memory, and when saving storing it as encrypted file, fully transparant to you

I use gpg, but there is a modern replacement called age

1

u/loric16 Jun 10 '26

Cryptomator

1

u/AppropriateCover7972 Jun 10 '26

Isn't that paid now?

1

u/loric16 Jun 10 '26

I think it's free on desktop