[Bug]: Docker: Self signed cert env-vars not working anymore #2030

Open
opened 2026-02-28 20:01:33 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @philkman on GitHub (Apr 9, 2025).

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

Self signed certificates provided as Docker environment variables ACTUAL_HTTPS_KEY and ACTUAL_HTTPS_CERT are throwing the following electron error since version 2.4.0:
Rejection: Error: error:0480006C:PEM routines::no start line

Once the certificates are provided as files (/data/config.json, /data/selfhost.crt, selfhost.key), the error is gone and actual server is starting properly.

How can we reproduce the issue?

  • Set environment variables ACTUAL_HTTPS_KEY and ACTUAL_HTTPS_CERT to configure HTTPS with self signed certificates.
  • Start the docker image actualbudget/actual-server:2.4.0
  • Server won't start an throw the error Rejection: Error: error:0480006C:PEM routines::no start line

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

No response

Operating System

Linux

Originally created by @philkman on GitHub (Apr 9, 2025). ### Verified issue does not already exist? - [x] I have searched and found no existing issue ### What happened? Self signed certificates provided as Docker environment variables `ACTUAL_HTTPS_KEY` and `ACTUAL_HTTPS_CERT` are throwing the following electron error since version 2.4.0: `Rejection: Error: error:0480006C:PEM routines::no start line` Once the certificates are provided as files (`/data/config.json`, `/data/selfhost.crt`, `selfhost.key`), the error is gone and actual server is starting properly. ### How can we reproduce the issue? - Set environment variables `ACTUAL_HTTPS_KEY` and `ACTUAL_HTTPS_CERT` to configure HTTPS with self signed certificates. - Start the docker image `actualbudget/actual-server:2.4.0` - Server won't start an throw the error `Rejection: Error: error:0480006C:PEM routines::no start line` ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? _No response_ ### Operating System Linux
GiteaMirror added the serverbug labels 2026-02-28 20:01:33 -06:00
Author
Owner

@MikesGlitch commented on GitHub (Apr 12, 2025):

Hi 👋

I think I've seen this before when my certificate was invalid. Can you try creating a new one? It might be expired/some such.

Worth a try.

@MikesGlitch commented on GitHub (Apr 12, 2025): Hi 👋 I think I've seen this before when my certificate was invalid. Can you try creating a new one? It might be expired/some such. Worth a try.
Author
Owner

@dconry commented on GitHub (May 5, 2025):

Note for anyone else bitten by this... almost certainly due to a breaking change to the dotenv library (see "Multiline values" here), as documented here.

I spent entirely too much time trying to make the environment variable way listed in the Actual docs work with this change. I believe I exhausted all possible combinations of escaped/unescaped/doubly escaped newlines, slash ns, and quotes, both in the environment variable definition and in the docker container's JSON config file directly.

I eventually went back to the "Configuring with config.json" alternative here, and am now moving on with my life.

@dconry commented on GitHub (May 5, 2025): Note for anyone else bitten by this... almost certainly due to a breaking change to the `dotenv` library (see "Multiline values" [here](https://www.npmjs.com/package/dotenv)), as documented [here](https://stackoverflow.com/questions/55236936/how-can-i-solve-npm-err-error0909006cpem-in-node-js/56561186#56561186). I spent entirely too much time trying to make the environment variable way listed in the Actual docs work with this change. I believe I exhausted all possible combinations of escaped/unescaped/doubly escaped newlines, slash `n`s, and quotes, both in the environment variable definition and in the docker container's JSON config file directly. I eventually went back to the "Configuring with config.json" alternative [here](https://actualbudget.org/docs/config/https/), and am now moving on with my life.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#2030