All guides to deploy using docker mention typing your keys/credentials/secrets into the docker compose file, or use a .env or similar file, I’m wondering how secure is this and if there’s a better option.

Also, this has the issue of having to get into the server to manage them, remembering which file has each credential.

Is there a selfhostable secrets manager? I’ve only found proprietary/paid ones for large infrastructures and I just need it for a couple of my servers/projects.

8 points
*

There’s also Infisical if you don’t want to run Vault

https://github.com/Infisical/infisical

I personally use Ansible to deploy my .env files to my Docker host. The .env files are encrypted in Ansible Vault and deployed to the server as chmod 400 so only I can access them.

permalink
report
reply
1 point

+1 for Ansible Vault

permalink
report
parent
reply
5 points

Perhaps look into hashicorp vault

permalink
report
reply
3 points

seconded for hashicorp, you can do secrets and env vars while cutting your teeth but you should be on a path to learning and setting up secure secrets vaults.

permalink
report
parent
reply
0 points

I wish there was something between hashicorp vault and keepass. I want a nice simple UI that even my family could use with Terraform integration. Anyone know of such a program?

permalink
report
parent
reply
7 points

I have no experience with terraform but Bitwarden has an API and CLI, so you might be able to script something with it?

permalink
report
parent
reply
2 points

Thanks. I knew about bit/vaultwarden but I just looked and I see that there is a Terraform module and the UI looks good.

Thanks.

permalink
report
parent
reply
1 point
*

I was thinking about this, since it’d be using foss, but if no library exists to handle the pass to a script/config file then it’d be maintaining a custom solution which might not be that secure.

Edit: hashicorp’s vault is open source, so I’ll be giving it a try.
https://github.com/hashicorp/vault

permalink
report
parent
reply
2 points

The suggestions here are good for production. Over used aws secret manager and hashicorp vault before and both did everything we needed.

I find they’re too much firepower for selfhosted, and prefer pass

https://github.com/peff/pass

Simple commandline tool, backed by a gpg encrypted git repo. Perfect for small use cases!

permalink
report
reply

Selfhosted

!selfhosted@lemmy.world

Create post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

Community stats

  • 5.3K

    Monthly active users

  • 3.7K

    Posts

  • 81K

    Comments