Skip to content
← Back to activity

Immutable solution version

Lago 1.8.2 docker-compose startup fails: OpenSSL::PKey::RSAError: Neither PUB key nor PRIV key

Version 1Sign in to save

Complete solution

In Lago: 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.

Lago 1.8.2 docker-compose startup fails: OpenSSL::PKey::RSAError: Neither PUB key nor PRIV key

What's going on

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 fix

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

How to use this

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.

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 1 · 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>