Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Docker health-check script fails when using self signed certificates #4393

Closed
1 task done
matthijssn opened this issue Feb 17, 2025 · 2 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@matthijssn
Copy link

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

When using self signed certificated, the fetch used in the health-check node script returns an error, what results in an unhealthy status in Docker.

FetchError: request to https://localhost:8003/health failed, reason: self-signed certificate at ClientRequest

How can we reproduce the issue?

Generate own self signed certificates and use them the actual docker compose setup. Enable health check in the docker compose, pointed to the health-check.js script in the src/scripts folder.

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Microsoft Edge

Operating System

Linux

@MikesGlitch
Copy link
Contributor

MikesGlitch commented Feb 17, 2025

I don't know if you're on discord but here's a solution: https://discord.com/channels/937901803608096828/1340016243415056494/1340035073113723003

If you're not on discord here's the highlights:

Image

Basically, you need to tell node to use the self signed certificate by setting the environment variable NODE_EXTRA_CA_CERTS:

NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/ca.crt node src/scripts/health-check.js'

You'll want to make sure your self signed certificate has localhost in the subject list.

@matthijssn
Copy link
Author

Thanks, ill try it out! probably a good idea when this is part of the docs (https://actualbudget.org/docs/config/https) as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants