H
Homarr2mo ago
Ayush

Errors installing docker container

Node.js v22.13.1
❌ Invalid environment variables: [
{
code: 'invalid_type',
expected: 'string',
received: 'undefined',
path: [ 'DB_URL' ],
message: 'Required'
}
]
/app/apps/websocket/wssServer.cjs:498552
throw new Error("Invalid environment variables");
^

Error: Invalid environment variables
at onValidationError (/app/apps/websocket/wssServer.cjs:498552:11)
at createEnv (/app/apps/websocket/wssServer.cjs:498558:12)
at createEnv2 (/app/apps/websocket/wssServer.cjs:498599:10)
at Object.<anonymous> (/app/apps/websocket/wssServer.cjs:498651:11)
at Module._compile (node:internal/modules/cjs/loader:1562:14)
at Object..js (node:internal/modules/cjs/loader:1699:10)
at Module.load (node:internal/modules/cjs/loader:1313:32)
at Function._load (node:internal/modules/cjs/loader:1123:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
Node.js v22.13.1
❌ Invalid environment variables: [
{
code: 'invalid_type',
expected: 'string',
received: 'undefined',
path: [ 'DB_URL' ],
message: 'Required'
}
]
/app/apps/websocket/wssServer.cjs:498552
throw new Error("Invalid environment variables");
^

Error: Invalid environment variables
at onValidationError (/app/apps/websocket/wssServer.cjs:498552:11)
at createEnv (/app/apps/websocket/wssServer.cjs:498558:12)
at createEnv2 (/app/apps/websocket/wssServer.cjs:498599:10)
at Object.<anonymous> (/app/apps/websocket/wssServer.cjs:498651:11)
at Module._compile (node:internal/modules/cjs/loader:1562:14)
at Object..js (node:internal/modules/cjs/loader:1699:10)
at Module.load (node:internal/modules/cjs/loader:1313:32)
at Function._load (node:internal/modules/cjs/loader:1123:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
27 Replies
Cakey Bot
Cakey Bot2mo ago
Thank you for submitting a support request. Depending on the volume of requests, our team should get in contact with you shortly.
⚠️ Please include the following details in your post or we may reject your request without further comment: - Log (See https://homarr.dev/docs/community/faq#how-do-i-open-the-console--log) - Operating system (Unraid, TrueNAS, Ubuntu, ...) - Exact Homarr version (eg. 0.15.0, not latest) - Configuration (eg. docker-compose, screenshot or similar. Use ``your-text`` to format) - Other relevant information (eg. your devices, your browser, ...)
Frequently Asked Questions | Homarr documentation
Can I install Homarr on a Raspberry Pi?
Ayush
AyushOP2mo ago
Operating system: Unraid Configuration: using the docker container from Unraid apps When I go to open the webUI I get the following error in the logs
2025-01-29T21:02:44.903Z info: tRPC request from server-fetch by user 'undefined (undefined)'
2025-01-29T21:02:44.927Z error: tRPC Error with query on 'serverSettings.getCulture': (INTERNAL_SERVER_ERROR) - no such table: serverSetting
SqliteError: no such table: serverSetting
at Database.prepare (/app/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21)
at I.prepareQuery (/app/apps/nextjs/.next/server/chunks/5143.js:164:94639)
at QueryPromise._prepare (/app/apps/nextjs/.next/server/chunks/5143.js:170:88719)
at QueryPromise.executeRaw (/app/apps/nextjs/.next/server/chunks/5143.js:170:89295)
at QueryPromise.execute (/app/apps/nextjs/.next/server/chunks/5143.js:170:89366)
at QueryPromise.then (/app/apps/nextjs/.next/server/chunks/5143.js:170:55294)
SqliteError: no such table: serverSetting
Error [TRPCClientError]: no such table: serverSetting
at ti.from (.next/server/src/middleware.js:16:3510)
at <unknown> (.next/server/src/middleware.js:16:33556) {
cause: undefined,
shape: [Object],
data: [Object],
meta: [Object]
}
2025-01-29T21:02:44.903Z info: tRPC request from server-fetch by user 'undefined (undefined)'
2025-01-29T21:02:44.927Z error: tRPC Error with query on 'serverSettings.getCulture': (INTERNAL_SERVER_ERROR) - no such table: serverSetting
SqliteError: no such table: serverSetting
at Database.prepare (/app/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21)
at I.prepareQuery (/app/apps/nextjs/.next/server/chunks/5143.js:164:94639)
at QueryPromise._prepare (/app/apps/nextjs/.next/server/chunks/5143.js:170:88719)
at QueryPromise.executeRaw (/app/apps/nextjs/.next/server/chunks/5143.js:170:89295)
at QueryPromise.execute (/app/apps/nextjs/.next/server/chunks/5143.js:170:89366)
at QueryPromise.then (/app/apps/nextjs/.next/server/chunks/5143.js:170:55294)
SqliteError: no such table: serverSetting
Error [TRPCClientError]: no such table: serverSetting
at ti.from (.next/server/src/middleware.js:16:3510)
at <unknown> (.next/server/src/middleware.js:16:33556) {
cause: undefined,
shape: [Object],
data: [Object],
meta: [Object]
}
Manicraft1001
Manicraft10012mo ago
Please post a screenshot of your app config in Unraid. Censor the encryption secret
Ayush
AyushOP2mo ago
Left everthing default, except storage: /mnt/cache/appdata/homarr/appdata and the encryption key ofcourse
Manicraft1001
Manicraft10012mo ago
Post a screenshot anyway please Maybe the defaults are wrong
Ayush
AyushOP2mo ago
Is tehre an easy way to share it?
Ayush
AyushOP2mo ago
No description
Ayush
AyushOP2mo ago
You want this or..?
Manicraft1001
Manicraft10012mo ago
Can you check what the value of DB_MIGRATIONS_DISABLED is? And also the DB_URL value?
Ayush
AyushOP2mo ago
No description
Ayush
AyushOP2mo ago
You mean by going into the console?
Manicraft1001
Manicraft10012mo ago
Either by entering the container and executing printenv in the shell or by sending screenshots of the config
Ayush
AyushOP2mo ago
No description
Ayush
AyushOP2mo ago
oops 1 sec
Manicraft1001
Manicraft10012mo ago
too late, you leaked your key. Once uploaded the pictues stay on Discord
Ayush
AyushOP2mo ago
agh I'll change it after
Manicraft1001
Manicraft10012mo ago
I recommend you to start over. Chaning the encryption key will make you loose all integration secrets and you must re-enter them!
Ayush
AyushOP2mo ago
Ok i'll re-create it 1 sec
Manicraft1001
Manicraft10012mo ago
Now let me check the rest of your envs. I still have the screenshot open
Ayush
AyushOP2mo ago
kk
Manicraft1001
Manicraft10012mo ago
@Meierschlumpf since the DB_DRIVER is set to better sqlite, the DB_URL can be set. The container should run in production mode, hence the default value should be chosen: https://github.com/homarr-labs/homarr/blob/c19a4009f37ec2aba8d4edd2d19819605ecb9575/packages/db/env.ts#L33 But why do we get this error? And while we're at it, the errors sounds like migrations are not being executed. But looking at the result of printenv, it is clearly set to false. @Ayush can you post the output of printenv once again (this time with the secret censored)? So @Meierschlumpf can take a look at it
Ayush
AyushOP2mo ago
Sure, 1 sec
Ayush
AyushOP2mo ago
No description
Manicraft1001
Manicraft10012mo ago
Thanks. Please wait for Meier's reply
Meierschlumpf
Meierschlumpf2mo ago
For me it seems like NODE_ENV is not defined, right? except it is somehow set within the program
Meierschlumpf
Meierschlumpf2mo ago
GitHub
fix(docker): missing production env variable by Meierschlumpf · Pul...
Homarr Thank you for your contribution. Please ensure that your pull request meets the following pull request: Builds without warnings or errors (pnpm buid, autofix with pnpm format:fix) Pull r...
Ayush
AyushOP2mo ago
So how shall I continue? @Meierschlumpf @Manicraft1001 any idea how I can continue? For anyone else thats running into this, for now I just added
-e NODE_ENV='production'
-e NODE_ENV='production'
To the extra args in the docker configs

Did you find this page helpful?