© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•13mo ago•
2 replies
ecstasy

supavisor: Erlang error: badarg for Unknown cipher or invalid key size

Greetings!

I am trying my best to selfhost on NixOS. I've had multiple issues so far with running the vector container (because I have a rootless docker setup) and such but I managed to fix them all. I do all steps according to the tutorial for Getting start on supabase self-hosted with their docker stack in their
supabase/supabase
supabase/supabase
repo

After 5 hours of trying I cannot simply fix the issue of the
supavisor
supavisor
container. It says that:

** (ErlangError) Erlang error: {:badarg, {'aead.c', 90}, 'Unknown cipher or invalid key size'}:
2025-01-24T22:28:46.614839869Z 
2025-01-24T22:28:46.614842465Z   * 1st argument: Unknown cipher or invalid key size
2025-01-24T22:28:46.614844354Z 
2025-01-24T22:28:46.614846368Z     (crypto 5.1.3) crypto.erl:985: :crypto.crypto_one_time_aead(:aes_256_gcm, "3fd00454580de44ea216d8b7b234267a2a6a6aec7e56d2b38e641a45597af0f2", <<243, 178, 249, 138, 252, 233, 248, 206, 0, 121, 122, 154, 132, 235, 178, 124>>, "123", "AES256GCM", 16, true)
2025-01-24T22:28:46.614849333Z     (cloak 1.1.2) lib/cloak/ciphers/aes_gcm.ex:47: Cloak.Ciphers.AES.GCM.encrypt/2
2025-01-24T22:28:46.614851112Z     (supavisor 1.1.56) lib/cloak_ecto/type.ex:37: Supavisor.Encrypted.Binary.dump/1
2025-01-24T22:28:46.615235141Z     (ecto 3.10.3) lib/ecto/type.ex:931: Ecto.Type.process_dumpers/3
2025-01-24T22:28:46.615241177Z     (ecto 3.10.3) lib/ecto/repo/schema.ex:1015: Ecto.Repo.Schema.dump_field!/6
2025-01-24T22:28:46.615243192Z     (ecto 3.10.3) lib/ecto/repo/schema.ex:1028: anonymous fn/6 in Ecto.Repo.Schema.dump_fields!/5
2025-01-24T22:28:46.615245105Z     (stdlib 4.3) maps.erl:411: :maps.fold_1/3
2025-01-24T22:28:46.615254732Z     nofile:29: (file)
** (ErlangError) Erlang error: {:badarg, {'aead.c', 90}, 'Unknown cipher or invalid key size'}:
2025-01-24T22:28:46.614839869Z 
2025-01-24T22:28:46.614842465Z   * 1st argument: Unknown cipher or invalid key size
2025-01-24T22:28:46.614844354Z 
2025-01-24T22:28:46.614846368Z     (crypto 5.1.3) crypto.erl:985: :crypto.crypto_one_time_aead(:aes_256_gcm, "3fd00454580de44ea216d8b7b234267a2a6a6aec7e56d2b38e641a45597af0f2", <<243, 178, 249, 138, 252, 233, 248, 206, 0, 121, 122, 154, 132, 235, 178, 124>>, "123", "AES256GCM", 16, true)
2025-01-24T22:28:46.614849333Z     (cloak 1.1.2) lib/cloak/ciphers/aes_gcm.ex:47: Cloak.Ciphers.AES.GCM.encrypt/2
2025-01-24T22:28:46.614851112Z     (supavisor 1.1.56) lib/cloak_ecto/type.ex:37: Supavisor.Encrypted.Binary.dump/1
2025-01-24T22:28:46.615235141Z     (ecto 3.10.3) lib/ecto/type.ex:931: Ecto.Type.process_dumpers/3
2025-01-24T22:28:46.615241177Z     (ecto 3.10.3) lib/ecto/repo/schema.ex:1015: Ecto.Repo.Schema.dump_field!/6
2025-01-24T22:28:46.615243192Z     (ecto 3.10.3) lib/ecto/repo/schema.ex:1028: anonymous fn/6 in Ecto.Repo.Schema.dump_fields!/5
2025-01-24T22:28:46.615245105Z     (stdlib 4.3) maps.erl:411: :maps.fold_1/3
2025-01-24T22:28:46.615254732Z     nofile:29: (file)


The key that goes "3fd...." is my desparate attempt to write the
SECRET_KEY_BASE
SECRET_KEY_BASE
env variable there in the stack to some 256 bit string. It still does not work.

I cannot simply just expose my postgres db for local development because we use Prisma and i need the transaction mode of Supavisor.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Pgsodium cipher text invalid
SupabaseSSupabase / help-and-questions
3mo ago
supavisor database connection error
SupabaseSSupabase / help-and-questions
14mo ago
invalid api key
SupabaseSSupabase / help-and-questions
7mo ago
Supavisor pooler
SupabaseSSupabase / help-and-questions
2mo ago