Solution skill
Lago 1.8.2 docker-compose startup fails: OpenSSL::PKey -:RSAError: Neither PUB key nor PRIV key
Complete solution
Shows how to fix lago 1.8.2 docker-compose startup fails: OpenSSL::PKey -:RSAError: Neither PUB key nor PRIV key. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
For "bin/rails aborted! OpenSSL::PKey -:RSAError: Neither PUB key nor PRIV key": on the mis-tagged image: pulling the repo directly worked around the 1.8.2/1.8.1 mix-up until the release process was fixed. Generate an RSA private key and set it before starting: echo "LAGO\RSA\PRIVATE\_KEY [your value] genrsa 2048 | base64)\"" >>.env then source.env.
bin/rails aborted! OpenSSL::PKey -:RSAError: Neither PUB key nor PRIV keySteps
- Generate an RSA private key and set it before starting:
echo "LAGO_RSA_PRIVATE_KEY [your value] genrsa 2048 | base64)\"" >> .envthensource .env. The maintainer confirmed the missing key was the cause of the crash. On the mis-tagged image: pulling the repo directly worked around the 1.8.2/1.8.1 mix-up until the release process was fixed. Source: https://github.com/getlago/lago/issues/389 - Take the question above and check if it matches what you're seeing. If it does, work through the verified fix step by step. Start with the cause described first, because that's what tells you the fix applies to your setup, then apply the changes in the order given. Verify by re-running whatever failed before, and expect the same behavior the thread author reported.
Expected: The maintainer confirmed the missing key was the cause of the crash.
When to use
You are seeing this: Deploying Lago 1.8.2 with docker-compose, the API container crashed during db:migrate with bin/rails aborted! Use this skill when you run into "Lago 1.8.2 docker-compose startup fails: OpenSSL::PKey -:RSAError: Neither PUB key nor PRIV key".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: Lago 1.8.2, still 1.8.1. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://github.com/getlago/lago/issues/389
Evidence
Someone asked: Deploying Lago 1.8.2 with docker-compose, the API container crashed during db:migrate with bin/rails aborted! OpenSSL::PKey -:RSAError: Neither PUB key nor PRIV key raised from config/initializers/rsakeys.rb. The deployment was missing the LAGORSAPRIVATEKEY env value. A side note from the thread: the 1.8.2 compose image was mis-tagged and effectively still 1.8.1, which the maintainer called a release-process mistake. The verified answer: Generate an RSA private key and set it before starting: echo "LAGO_RSA_PRIVATE_KEY [your value] genrsa 2048 | base64)\"" >> .env then source .env. The maintainer confirmed the missing key was the cause of the crash. On the mis-tagged image: pulling the repo directly worked around the 1.8.2/1.8.1 mix-up until the release process was fixed. Source: https://github.com/getlago/lago/issues/389 Discussion and confirmation live at https://vectle.com/threads/thr_PGTh6JWCELc2NXq2oRVQ-g
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_hpZW_kgtqAxjXK5KgmOdsg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Lago 1.8.2 docker-compose startup fails: OpenSSL::PKey -:RSAError: Neither PUB key nor PRIV key <span>— Vectle</span></a>