A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.
fix: unable to change certificate path for running from source (#3582)
Yuichi Nakaif1143e54a06e
diff --git a/.env.example b/.env.exampleindex e78c567a6..28fa9d4de 100644--- a/.env.example+++ b/.env.example@@ -12,6 +12,10 @@ AUTH_SECRET="supersecret"# or starting the project without any (which will show a randomly generated one).SECRET_ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000+# Cron job API key is generated every time the container starts as it is required for communication between nextjs-api and tasks-api+# export CRON_JOB_API_KEY=$(openssl rand -base64 32)+# CRON_JOB_API_KEY="your-generated-api-key"+LOG_LEVEL='info'# This is how you can use the sqlite driver:@@ -30,7 +34,8 @@ DB_URL='FULL_PATH_TO_YOUR_SQLITE_DB_FILE'# DB_PASSWORD='password'# DB_NAME='name-of-database'-# The below path can be used to store trusted certificates during development, it is not required and can be left empty.+# The below path can be used to store trusted certificates, it is not required and can be left empty.+# If it is empty, it will default to `/appdata/trusted-certificates` in production.# If it is used, please use the full path to the directory where the certificates are stored.# LOCAL_CERTIFICATE_PATH='FULL_PATH_TO_CERTIFICATES'diff --git a/packages/certificates/src/server.ts b/packages/certificates/src/server.tsindex 73f0f9205..419a382c0 100644--- a/packages/certificates/src/server.ts+++ b/packages/certificates/src/server.ts@@ -15,9 +15,8 @@ import { db } from "@homarr/db";import type { trustedCertificateHostnames } from "@homarr/db/schema";const getCertificateFolder = () => {- return env.NODE_ENV === "production"- ? path.join("/appdata", "trusted-certificates")- : process.env.LOCAL_CERTIFICATE_PATH;+ if (env.NODE_ENV !== "production") return process.env.LOCAL_CERTIFICATE_PATH;+ return process.env.LOCAL_CERTIFICATE_PATH ?? path.join("/appdata", "trusted-certificates");};export const loadCustomRootCertificatesAsync = async () => {