diff --git a/packages/server/src/services/admin.ts b/packages/server/src/services/admin.ts index 861d40dfb..323d0177e 100644 --- a/packages/server/src/services/admin.ts +++ b/packages/server/src/services/admin.ts @@ -110,9 +110,9 @@ export const getDokployUrl = async () => { } const settings = await getWebServerSettings(); - if (settings.host) { - const protocol = settings.https ? "https" : "http"; - return `${protocol}://${settings.host}`; + if (settings?.host) { + const protocol = settings?.https ? "https" : "http"; + return `${protocol}://${settings?.host}`; } - return `http://${settings.serverIp}:${process.env.PORT}`; + return `http://${settings?.serverIp}:${process.env.PORT}`; };