Skip to content

armgit / dashy

Public Imported from GitHub
0

๐Ÿš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

๐Ÿ“ Updated troubleshooting docs which were out-dated from >v3

Alicia Sykes5d2818171b3a
diff --git a/docs/alternate-views.md b/docs/alternate-views.md
index d43215d3..834302be 100644
--- a/docs/alternate-views.md
+++ b/docs/alternate-views.md
@@ -61,4 +61,4 @@ Even if the target is not set (or is set to `sametab`), you can still launch any
If you don't like the custom context menu, it can be disabled by setting `appConfig.disableContextMenu: true`.
-If you get a 'Refused to Connect' error in the modal or workspace views, then the target app has it's X-Frame-Options HTTP set to block requests from embedded content. You can easily fix this by setting this header to ALLOW, for instructions on how to do so, see the [Troubleshooting Docs](/docs/troubleshooting.md#refused-to-connect-in-modal-or-workspace-view).
+If you get a 'Refused to Connect' error in the modal or workspace views, then the target app is sending headers that block it from being embedded. You can fix this by allowing Dashy in the app's `Content-Security-Policy`, for instructions on how to do so, see the [Troubleshooting Docs](/docs/troubleshooting.md#refused-to-connect-in-modal-or-workspace-view).
diff --git a/docs/pages-and-sections.md b/docs/pages-and-sections.md
index 71a9be21..2bbc7f82 100644
--- a/docs/pages-and-sections.md
+++ b/docs/pages-and-sections.md
@@ -81,7 +81,7 @@ The following example shows creating a config, publishing it as a [Gist](https:/
### Restrictions
-Only top-level fields supported by sub-pages are `pageInfo` and `sections`. The `appConfig` and `pages` will always be inherited from your main `conf.yml` file. Other than that, sub-pages behave exactly the same as your default view, and can contain sections, items, widgets and page info like nav links, title and logo.
+Sub-pages support the top-level `pageInfo`, `sections` and `appConfig` fields. A sub-page's `appConfig` is merged over your main one, so you only need the settings you want to change, like `theme` or `layout`. `appConfig.auth` and `pages` always come from your main `conf.yml` file. Other than that, sub-pages behave exactly the same as your default view, and can contain sections, items, widgets and page info like nav links, title and logo.
### URL Structure
diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md
index 91cbf5d4..d368dde1 100644
--- a/docs/troubleshooting.md
+++ b/docs/troubleshooting.md
@@ -27,7 +27,7 @@
- ["Invalid filename" when saving a sub-page](#invalid-filename-when-saving-a-sub-page)
- ["Cannot save to an external URL"](#cannot-save-to-an-external-url)
- [Saved successfully but the UI shows the old config](#saved-successfully-but-the-ui-shows-the-old-config)
- - [Container crashes or restart loop after saving](#container-crashes-or-restart-loop-after-saving-310-and-311-only)
+ - [Container crashes or restart loop after saving](#container-crashes-or-restart-loop-after-saving-before-3213)
- [Intentionally read-only mode](#intentionally-read-only-mode)
- [Status Checks Failing](#status-checks-failing)
- [Service Error 401 or 403](#service-error---401-or-403)
@@ -42,8 +42,7 @@
- [404 On Static Hosting](#404-on-static-hosting)
- [404 from Mobile Home Screen](#404-after-launch-from-mobile-home-screen)
- [404 On Multi-Page Apps](#404-on-multi-page-apps)
- - [Dashy hosted at a sub-path](#dashy-hosted-at-a-sub-path-eg-examplecomdashy)
- - [Ngrok Invalid Host Headers](#invalid-host-header-while-running-through-ngrok)
+ - [Blocked request in dev mode](#blocked-request-this-host-is-not-allowed-in-dev-mode)
- [Refused to Connect in Web Content View](#refused-to-connect-in-modal-or-workspace-view)
- [Sub-pages](#sub-pages)
- [Sub-page shows "Unable to find config for ..."](#sub-page-shows-unable-to-find-config-for-)
@@ -58,27 +57,25 @@
- [High CPU or RAM Usage on Startup](#high-cpu-or-ram-usage-on-startup)
- [Heap limit Allocation failed](#ineffective-mark-compacts-near-heap-limit-allocation-failed)
- [Command failed with signal "SIGKILL"](#command-failed-with-signal-sigkill)
- - [Node Sass unsupported environment](#node-sass-does-not-yet-support-your-current-environment)
- [Unreachable Code Error](#unreachable-code-error)
- [Cannot find module './_baseValues'](#error-cannot-find-module-_basevalues)
- [Auth & OIDC](#auth--oidc)
- - [Auth Validation Error: "should be object"](#auth-validation-error-should-be-object)
+ - [Auth Validation Error: "must be object"](#auth-validation-error-must-be-object)
- [Keycloak Redirect Error](#keycloak-redirect-error)
- [OIDC or Keycloak failure on numeric client IDs](#oidc-or-keycloak-failure-on-numeric-client-ids)
- [Redirect loop after login](#redirect-loop-after-login)
- [invalid_redirect_uri](#invalid_redirect_uri)
- - [Login works in the browser but the dashboard refuses to save anything (403)](#login-works-in-the-browser-but-the-dashboard-refuses-to-save-anything-403)
+ - [Login works, but Dashy shows "Authentication failed"](#login-works-but-dashy-shows-authentication-failed-oidc)
+ - [Sent back to the login page after a while](#sent-back-to-the-login-page-after-a-while)
- [Logged in but no admin controls](#logged-in-but-no-admin-controls)
- [Login works but Dashy errors on the callback with "OIDC signinCallback returned no user"](#login-works-but-dashy-errors-on-the-callback-with-oidc-signincallback-returned-no-user)
- [Sign-out leaves you stuck on Authentik](#sign-out-leaves-you-stuck-on-authentik)
- [Untrusted certificate from Authentik](#untrusted-certificate-from-authentik)
- - [Numeric client_id getting truncated](#numeric-client_id-getting-truncated)
- [Header auth: "not from trusted proxy"](#header-auth-unauthorized---not-from-trusted-proxy)
- [Header auth: "missing user header"](#header-auth-unauthorized---missing-user-header)
- [Invalid user object with all-digit hash](#invalid-user-object-warning-on-startup-with-an-all-digit-hash-or-placeholder)
- [OIDC login fails with CORS-shaped error from untrusted cert](#oidc-login-looks-like-a-cors-error-in-devtools-but-the-idp-is-configured-for-cors-correctly)
- [Docker & image issues](#docker--image-issues)
- - [App Not Starting After Update to 2.0.4](#app-not-starting-after-update-to-204)
- [Mount Type Mismatch](#mount-type-mismatch)
- [DockerHub toomanyrequests](#dockerhub-toomanyrequests)
- [Old image tags fail to pull](#old-image-tags-fail-to-pull)
@@ -166,7 +163,7 @@ Also check the host side is a real path. A bare name with no `/` or `./` in fron
Try opening in a private window, do you see the new one now? If so, this is some local settings you've set. Just clear it from Dashy's config menu under Config --> "Reset Local Settings". See [How to Reset Local Settings](#how-to-reset-local-settings).
-If the private window is stale too, and you have `appConfig.enableServiceWorker: true`, the PWA cache is serving an old copy. Unregister the worker under the Application tab in devtools, then reload.
+If the private window is stale too, the server is sending the old file. Check your [mount](#edits-on-the-host-never-reach-the-container), and clear any proxy or CDN cache in front of Dashy.
### Empty dashboard with "Login" in the title
@@ -176,11 +173,13 @@ This one is intentional. With auth configured and no session yet, the server sen
On Netlify, Vercel, GitHub Pages and similar there's no Dashy server, so `conf.yml` gets copied into `dist/` at build time. Editing it afterwards does nothing until you build again. Commit your change to `user-data/conf.yml` and let the host rebuild, or run `yarn build` locally.
+<a id="dashy-hosted-at-a-sub-path-eg-examplecomdashy"></a>
+
### Nothing loads when Dashy is behind a sub-path
-Serve Dashy at `example.com/dashy` and the browser still requests `example.com/conf.yml`. The config path is fixed at build time as `/conf.yml`, and `BASE_URL` doesn't apply to it, so a proxy forwarding only `/dashy/*` never sees the request.
+Serve Dashy at `example.com/dashy` and the browser still requests `example.com/conf.yml`. Dashy expects to be at the root of its domain, so the config, saves, sub-pages and page links all use paths starting at `/`. A proxy forwarding only `/dashy/*` never sees those requests.
-Give Dashy its own hostname or subdomain, or build from source with `VITE_APP_CONFIG_PATH` set to the full path. Any `VITE_` variable is read during the build, so setting one on the prebuilt Docker image won't do anything.
+Give Dashy its own hostname or subdomain instead, like `dashy.example.com`.
---
@@ -264,7 +263,9 @@ Or if you're serving up the compiled Vue app directly, instead of using the Node
### "Invalid filename" when saving a sub-page
-The save endpoint rejects sub-page filenames with path separators or non-yaml extensions. Check the `path:` value of the page in your `pages:` block. It needs to be a plain basename like `home.yml`, not `pages/home.yml` or `home.txt`.
+The save endpoint only accepts sub-page files ending in `.yml` or `.yaml`. Check the `path:` value of the page in your `pages:` block, e.g. `home.yml`, not `home.txt`.
+
+Sub-page files also need to sit directly in `user-data/`. Dashy drops any folders from the path, so `pages/home.yml` is read from and saved to `user-data/home.yml`.
### "Cannot save to an external URL"
@@ -276,14 +277,15 @@ Or you could download the config to `user-data/something.yml`, and update `path:
Two unrelated causes share this symptom:
-1. **Local storage overrides the file.** Dashy lets users save settings locally in browser storage, which take priority over `conf.yml`. Open Dashy in incognito to confirm. If the changes appear there, clear local settings via Config menu > "Clear Local Settings".
+1. **Local storage overrides the file.** Dashy lets users save settings locally in browser storage, which take priority over `conf.yml`. Open Dashy in incognito to confirm. If the changes appear there, clear local settings via Config menu > "Reset Local Settings".
2. **Docker isn't picking up file changes.** Some text editors save by replacing the inode, which breaks single-file bind mounts. Edit the file in place, or mount the parent directory rather than the single file. [More background](https://medium.com/@jonsbun/why-need-to-be-careful-when-mounting-single-files-into-a-docker-container-4f929340834).
<a id="container-crashes-or-restart-loop-after-saving-config"></a>
+<a id="container-crashes-or-restart-loop-after-saving-310-and-311-only"></a>
-### Container crashes or restart loop after saving (3.1.0 and 3.1.1 only)
+### Container crashes or restart loop after saving (before 3.2.13)
-If your container crashes or restart-loops right after clicking save, with logs like `ERR_HTTP_HEADERS_SENT` or `ERR_STREAM_WRITE_AFTER_END`, this was a known double-`res.end()` bug in 3.1.0 and 3.1.1. Fixed in v3.2.13 and later.
+If your container crashes or restart-loops right after clicking save, with logs like `ERR_HTTP_HEADERS_SENT` or `ERR_STREAM_WRITE_AFTER_END`, this was a known double-`res.end()` bug in versions before 3.2.13. Update to fix it.
```bash
docker pull lissy93/dashy:latest
@@ -292,7 +294,11 @@ docker compose up -d --force-recreate
### Intentionally read-only mode
-To hide the "Save to disk" UI for everyone, set `appConfig.preventWriteToDisk: true` in `conf.yml`. This is a UI-only flag โ€” the `/config-manager/save` server endpoint itself is gated by the configured auth method (`auth.users` with `ENABLE_HTTP_AUTH`, OIDC/Keycloak admin role, header-auth, etc.), so anyone unauthenticated or non-admin already can't save regardless of this flag. For Docker users, you can harden things further by mounting `user-data` (or just `conf.yml`) as read-only โ€” the kernel will refuse the write even before the server tries.
+To stop anyone saving to disk, set `appConfig.preventWriteToDisk: true` in `conf.yml`. This disables the "Save to Disk" button, and the server rejects saves with a 403. The server reads it on startup, so restart Dashy after adding it by hand.
+
+Without this flag, saving is only limited to admins if you've set up [server-side auth](/docs/authentication/built-in.md#choosing-a-protection-mode), like `auth.users` with `ENABLE_HTTP_AUTH`, OIDC, Keycloak or header auth. With no auth, or `auth.users` alone, anyone who can reach Dashy can save.
+
+For Docker users, you can also mount `user-data` (or just `conf.yml`) as read-only, so the write fails even if a save gets through.
---
@@ -361,33 +367,29 @@ Similar to above, if you get a 404 error when visiting a page directly on multi-
See also: [#670](https://github.com/Lissy93/dashy/issues/670), [#763](https://github.com/Lissy93/dashy/issues/763)
-### Dashy hosted at a sub-path (e.g. `example.com/dashy`)
-
-If the homepage works but sub-page links 404, or assets fail to load, it's almost always the base path.
-Rebuild with `BASE_URL` set to the sub-path - leading slash, no trailing slash:
-
-Vue Router uses this to prefix every route. Without it, links resolve to `/home/...` instead of `/dashy/home/...` and skip your reverse proxy altogether. More detail in [web-server configuration](/docs/management.md#web-server-configuration).
+<a id="invalid-host-header-while-running-through-ngrok"></a>
-### Invalid Host Header while running through ngrok
+### `Blocked request. This host is not allowed` in dev mode
-Just add the [-host-header](https://ngrok.com/docs#http-host-header) flag, e.g. `ngrok http 8080 -host-header="localhost:8080"`
+This comes from Vite's dev server (`yarn dev`) when you open it through another hostname, e.g. with ngrok or a reverse proxy. Add the hostname to [`server.allowedHosts`](https://vite.dev/config/server-options#server-allowedhosts) in `vite.config.mjs`, or with ngrok, use `ngrok http 5173 --host-header=rewrite`. The production server (Docker or `node server.js`) doesn't check the hostname.
### `Refused to Connect` in Modal or Workspace View
-This is not an issue with Dashy, but instead caused by the target app preventing direct access through embedded elements.
+This is not an issue with Dashy, but instead caused by the target app blocking other sites from embedding it.
-As defined in [RFC-7034](https://datatracker.ietf.org/doc/html/rfc7034), for any web content to be accessed through an embedded element, it must have the [`X-Frame-Options`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options) HTTP header set to `ALLOW`. If you are getting a `Refused to Connect` error then this header is set to `DENY` (or `SAMEORIGIN` and it's on a different host). Thankfully, for self-hosted services, it is easy to set these headers.
+It does this with the [`X-Frame-Options`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options) header, or a [`frame-ancestors`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors) rule in its `Content-Security-Policy`. To fix it, send a `frame-ancestors` rule that includes Dashy's address. Browsers then ignore `X-Frame-Options`, but it's tidier to remove it. There's no `ALLOW` value for it, and browsers ignore `ALLOW-FROM`. If the app already sends its own `Content-Security-Policy`, edit its `frame-ancestors` rather than adding a second one.
-These settings are usually set in the config file for the web server that's hosting the target application, here are some examples of how to enable cross-origin access with common web servers:
+These headers are usually set in the config file for the web server or reverse proxy in front of the target app. Here are some examples for common web servers, just replace `https://dashy.example.com` with your Dashy address. If you can't change the headers, set the item's `target` to `newtab` instead.
#### NGINX
-In NGINX, you can use the [`add_header`](https://nginx.org/en/docs/http/ngx_http_headers_module.html) module within the app block.
+In NGINX, you can use [`add_header`](https://nginx.org/en/docs/http/ngx_http_headers_module.html) within the app block. If the app sends `X-Frame-Options` itself, [`proxy_hide_header`](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_hide_header) removes it.
```text
server {
...
- add_header X-Frame-Options SAMEORIGIN always;
+ proxy_hide_header X-Frame-Options;
+ add_header Content-Security-Policy "frame-ancestors 'self' https://dashy.example.com" always;
}
```
@@ -399,22 +401,26 @@ In Caddy, you can use the [`header`](https://caddyserver.com/docs/caddyfile/dire
```text
header {
- X-Frame-Options SAMEORIGIN
+ -X-Frame-Options
+ Content-Security-Policy "frame-ancestors 'self' https://dashy.example.com"
}
```
#### Apache
-In Apache, you can use the [`mod_headers`](https://httpd.apache.org/docs/current/mod/mod_headers.html) module to set the `X-Frame-Options` in your config file. This file is usually located somewhere like `/etc/apache2/httpd.conf
+In Apache, you can use the [`mod_headers`](https://httpd.apache.org/docs/current/mod/mod_headers.html) module in your config file. This file is usually located somewhere like `/etc/apache2/httpd.conf`
```text
-Header set X-Frame-Options: "ALLOW-FROM http://[dashy-location]/"
+Header unset X-Frame-Options
+Header set Content-Security-Policy "frame-ancestors 'self' https://dashy.example.com"
```
-#### LightHttpd
+#### lighttpd
+
+In lighttpd, you can use [`setenv.set-response-header`](https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModSetEnv).
```text
-Content-Security-Policy: frame-ancestors 'self' https://[dashy-location]/
+setenv.set-response-header = ( "Content-Security-Policy" => "frame-ancestors 'self' https://dashy.example.com" )
```
---
@@ -426,7 +432,7 @@ Content-Security-Policy: frame-ancestors 'self' https://[dashy-location]/
This means Dashy couldn't match the URL segment to any entry in your `pages:` list. A few causes:
#### Old bookmark from before an upgrade
-Slugs are now trimmed more aggressively (e.g. `๐ŸŒ Command Center` used to give `-command-center`, now gives `command-center`). Re-bookmark from the nav, or update the URL by hand.
+Page URLs changed in v4 for names with letters outside A-Z. For example, `GrรถรŸe` used to give `/home/gre`, and now gives `/home/grรถรŸe`. Re-bookmark from the nav, or update the URL by hand.
#### The page was renamed or removed
The URL no longer resolves to anything. Check the `pages:` array in `conf.yml` and confirm the sub-page still exists.
@@ -442,21 +448,21 @@ Hard-refresh (<kbd>Ctrl</kbd> + <kbd>F5</kbd>) after a major upgrade. The PWA ca
### Sub-page missing from nav, or won't open when clicked
-If page defined in `pages:` is nowhere in the nav bar, or its link goes to a different page, then there's probably something wrong with the name you chose. Note that Dashy strips out any non-alphanumeric characters.
+If page defined in `pages:` is nowhere in the nav bar, or its link goes to a different page, then there's probably something wrong with the name you chose. Note that Dashy builds each page's URL from its name, keeping only letters, numbers, `-` and `_`.
- Ensure each page does have a valid `name` and `path` field
- Check two pages don't have the same/similar name
-- Check each page has a name which has at least some alpha-numeric characters
-- Very long names could be being stripped/truncated
+- Check each page has a name which has at least some letters or numbers
+- Check the page isn't hidden from you by its `displayData`
### Sub-page ignores its theme, layout or appConfig
-This is by design. Only the `appConfig` from your root `conf.yml` is used - theme, layout, iconSize, statusCheck, etc. are inherited globally so behaviour stays consistent across pages.
+A sub-page's `appConfig` is merged over your root one, so its theme, layout and other settings should apply. If they don't, you've probably picked a theme or layout in the UI on that page. That's saved in your browser and takes priority, so clear it with [Reset Local Settings](#how-to-reset-local-settings).
-If you put `appConfig` inside a sub-page YAML, it's silently dropped on load. Move the values to the root config. See [Restrictions](/docs/pages-and-sections.md#restrictions).
+The exception is `appConfig.auth`, which only ever comes from your root `conf.yml`. See [Restrictions](/docs/pages-and-sections.md#restrictions).
### Sub-config files return 404
-If your `conf.yml` references additional pages via `pages:` and the browser shows `Sub-config load failed: /something.yml`, the cause is almost always a Docker mount that only exposes `conf.yml` and not the rest of `user-data/`.
+If your `conf.yml` references additional pages via `pages:` and Dashy shows `Unable to load config from '/something.yml'`, the cause is almost always a Docker mount that only exposes `conf.yml` and not the rest of `user-data/`.
If you've done this:
@@ -481,7 +487,7 @@ Now everything in your `user-data` folder is reachable at the web root. Same app
If you've got a multi-page dashboard, and are hosting the additional config files yourself, then CORS rules will apply. A CORS error will look something like:
```text
-Access to XMLHttpRequest at 'https://example.com/raw/my-config.yml' from origin 'http://dashy.local' has been blocked by CORS policy:
+Access to fetch at 'https://example.com/raw/my-config.yml' from origin 'http://dashy.local' has been blocked by CORS policy:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
```
@@ -509,7 +515,7 @@ If you're getting an error about scenarios, then you've likely installed the wro
Alternatively, as a workaround, you have several options:
- Try using [NPM](https://www.npmjs.com/get-npm) instead: So clone, cd, then run `npm install`, `npm run build` and `npm start`
-- Try using [Docker](https://www.docker.com/get-started) instead, and all of the system setup and dependencies will already be taken care of. So from within the directory, just run `docker build -t lissy93/dashy .` to build, and then use docker start to run the project, e.g: `docker run -it -p 8080:8080 lissy93/dashy` (see the [deploying docs](https://github.com/Lissy93/dashy/blob/master/docs/deployment.md#deploy-with-docker) for more info)
+- Try using [Docker](https://www.docker.com/get-started) instead, and all of the system setup and dependencies will already be taken care of. So from within the directory, just run `docker build -t lissy93/dashy .` to build, and then use docker start to run the project, e.g: `docker run -it -p 8080:8080 lissy93/dashy` (see the [Docker docs](/docs/deployment/docker.md) for more info)
### The engine "node" is incompatible with this module
@@ -519,7 +525,7 @@ The solution is to upgrade to the latest LTS version of Node 24.
Alternatively (not recommended), you can ignore this warning by running `yarn install --ignore-engines`.
-Dashy needs Node **`^22.18.0 || >=24.11.0`** - that's either the Node 22 LTS line at 22.18.0 or newer, or 24.11.0 or newer.
+Dashy needs Node **`^22.22.2 || ^24.15.0 || >=26.0.0`** - that's 22.22.2 or newer on the Node 22 line, 24.15.0 or newer on the Node 24 line, or Node 26 and up.
Check your current version with `node --version`.
The easiest way to do this, is to use a version manager, like [nvm](https://github.com/nvm-sh/nvm) to quickly download and apply different node versions. Run `nvm install 24` then `nvm use 24`.
@@ -534,24 +540,9 @@ If you genuinely need a fresh build (you've patched something in `src/`), do it
### High CPU or RAM Usage on Startup
-When the Dashy container first starts, it runs a Vue production build in parallel with the server. This is **a one-time cost per container start**, but it briefly uses around **1โ€“1.5 GB of RAM and 100% of one CPU core** for anywhere from 30 seconds to several minutes (depending on host speed). On Pi-class hardware or VMs with less than 1 GB of RAM, this spike can be enough to lock up the host.
-
-**To work around it:**
-
-1. **Allocate at least 1 GB of RAM to the container** - 2 GB is recommended on Raspberry Pi or low-powered VMs. Anything below 512 MB is unlikely to complete the first build.
-2. **Set explicit Docker resource limits** so the build can't starve other services on the same host:
- ```yaml
- services:
- dashy:
- image: lissy93/dashy:latest
- deploy:
- resources:
- limits:
- memory: 2g
- cpus: '1.5'
- ```
-3. **Wait it out** - once the build completes, idle CPU drops to near zero and idle RAM is typically under 100 MB. If you watch `docker stats`, you'll see the spike taper off.
-4. If the spike never tapers (i.e., Dashy stays at 100% CPU forever and never serves the page), see [Heap limit Allocation failed](#ineffective-mark-compacts-near-heap-limit-allocation-failed) below - that usually means the build was killed mid-way and is being retried.
+Since v4, the Docker image comes prebuilt, so starting it just runs the server, which idles at around 100 MB of RAM. If you see a big CPU or RAM spike every time the container starts, you're on an older version, which built the app on startup. Update to `lissy93/dashy:latest`.
+
+Building Dashy yourself (`yarn build` or `docker build`) still needs a lot more memory than running it. If that's too much for your host, build it somewhere else, or use the prebuilt image.
See also: [#1585](https://github.com/Lissy93/dashy/issues/1585), [#969](https://github.com/Lissy93/dashy/issues/969), [#1500](https://github.com/Lissy93/dashy/issues/1500), [#877](https://github.com/Lissy93/dashy/issues/877)
@@ -569,21 +560,16 @@ If you see an error message, similar to:
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
```
-This is likely caused by insufficient memory allocation to the container. When the container first starts up, or has to rebuild, the memory usage spikes, and if there isn't enough memory, it may terminate. This can be specified with, for example: `--memory=1024m`. For more info, see [Docker: Runtime options with Memory, CPUs, and GPUs](https://docs.docker.com/config/containers/resource_constraints/). For more context on what the spike is, see [High CPU or RAM Usage on Startup](#high-cpu-or-ram-usage-on-startup) above.
+Node ran out of memory while building Dashy. With v4 this only happens when you build it yourself, so build on a machine with more free RAM, or use the prebuilt Docker image. Older versions built on every start, so if you're on one, update, or give the container more memory with e.g. `--memory=1024m`. For more info, see [Docker: Runtime options with Memory, CPUs, and GPUs](https://docs.docker.com/config/containers/resource_constraints/).
See also: [#380](https://github.com/Lissy93/dashy/issues/380), [#350](https://github.com/Lissy93/dashy/issues/350), [#297](https://github.com/Lissy93/dashy/issues/297), [#349](https://github.com/Lissy93/dashy/issues/349), [#510](https://github.com/Lissy93/dashy/issues/510), [#511](https://github.com/Lissy93/dashy/issues/511) and [#834](https://github.com/Lissy93/dashy/issues/834)
### Command failed with signal "SIGKILL"
-In Docker, this can be caused by not enough memory. When the container first starts up, or has to rebuild, the memory usage spikes, and so a larger allocation may be required. This can be specified with, for example: `--memory=1024m`. For more info, see [Docker: Runtime options with Memory, CPUs, and GPUs](https://docs.docker.com/config/containers/resource_constraints/)
+The build was killed for using too much memory. Same causes and fixes as [Heap limit Allocation failed](#ineffective-mark-compacts-near-heap-limit-allocation-failed) above.
See also [#624](https://github.com/Lissy93/dashy/issues/624)
-### Node Sass does not yet support your current environment
-
-Caused by node-sass's binaries being built for a for a different architecture
-To fix this, just run: `yarn rebuild node-sass`
-
### Unreachable Code Error
An error similar to: `Fatal error in , line 0. Unreachable code, FailureMessage Object: 0xffe6c8ac. Illegal instruction (core dumped)`
@@ -595,15 +581,17 @@ See also: [#776](https://github.com/Lissy93/dashy/issues/776)
### Error: Cannot find module './_baseValues'
Clearing the cache should fix this: `yarn cache clean`
-If the issue persists, remove (`rm -rf node_modules\ yarn.lock`) and reinstall (`yarn`) node_modules
+If the issue persists, remove `node_modules` and reinstall: `rm -rf node_modules && yarn`
---
## Auth & OIDC
-### Auth Validation Error: "should be object"
+<a id="auth-validation-error-should-be-object"></a>
-In V 1.6.5 an update was made that in the future will become a breaking change. You will need to update you config to reflect this before V 2.0.0 is released. In the meantime, your previous config will continue to function normally, but you will see a validation warning. The change means that the structure of the `appConfig.auth` object is now an object, which has a `users` property.
+### Auth Validation Error: "must be object"
+
+Your `appConfig.auth` is still in the list format from before V 1.6.5, which is no longer supported. Dashy ignores it and logs a warning, so your login is turned off and anyone can see your dashboard. Users now go under `auth.users`.
For more info, see [this announcement](https://github.com/Lissy93/dashy/discussions/177).
@@ -634,7 +622,7 @@ For example, add the access control header to Keycloak, like:
`Access-Control-Allow-Origin [URL-of Dashy]`
-Note that for requests that transport sensitive info like credentials, setting the accept header to a wildcard (`*`) is not allowed - see [MDN Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#requests_with_credentials), so you will need to specify the actual URL.
+Note that for requests that transport sensitive info like credentials, setting `Access-Control-Allow-Origin` to a wildcard (`*`) is not allowed - see [MDN Docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#requests_with_credentials), so you will need to specify the actual URL.
You should also ensure that Keycloak is correctly configured, with a user, realm and application, and be sure that you have set a valid redirect URL in Keycloak ([screenshot](https://user-images.githubusercontent.com/1862727/148599768-db4ee4f8-72c5-402d-8f00-051d999e6267.png)).
@@ -649,6 +637,8 @@ nginx.ingress.kubernetes.io/enable-cors: "true"
See also: #479, #409, #507, #491, #341, #520
+<a id="numeric-client_id-getting-truncated"></a>
+
### OIDC or Keycloak failure on numeric client IDs
If your IdP rejects the login with an *"invalid client"* / *"client not found"* error, and your `clientId` is a long numeric value, the cause is almost certainly YAML number parsing.
@@ -666,7 +656,7 @@ appConfig:
endpoint: https://idp.example.com/
```
-The same applies to `auth.keycloak.clientId`. Dashy will print a warning in the [browser console](#how-to-open-browser-console) when it detects a numeric `clientId`, to help diagnose this.
+The same applies to `auth.keycloak.clientId`. Dashy will print a warning in the [browser console](#how-to-open-browser-console) when a numeric `clientId` is too long to store exactly, to help diagnose this.
See also: #1941
@@ -675,13 +665,15 @@ See also: #1941
Your `endpoint` probably includes `.well-known/openid-configuration`. Drop everything from `.well-known` onwards
### invalid_redirect_uri
-The redirect URI Authentik has registered for the provider doesn't exactly match the URL Dashy is being served from. Register both the bare URL and the trailing-slash version, and make sure the scheme matches (`http` vs `https`).
+The redirect URI registered with your provider doesn't exactly match the URL Dashy is being served from. Register both the bare URL and the trailing-slash version, and make sure the scheme matches (`http` vs `https`).
+
+<a id="login-works-in-the-browser-but-the-dashboard-refuses-to-save-anything-403"></a>
-### Login works in the browser but the dashboard refuses to save anything (403)
-Dashy's server is rejecting the id_token. Check Dashy's container logs for `[auth-oidc] token verification failed`. Common causes:
+### Login works, but Dashy shows "Authentication failed (OIDC)"
+Your provider accepted the login, but Dashy's server is rejecting the id_token. The browser console will say `OIDC login succeeded, but Dashy still received unauthenticated config`. Check Dashy's container logs for `[auth-oidc] token verification failed`. Common causes:
- **Issuer mismatch**. Authentik is behind a reverse proxy that isn't sending `X-Forwarded-Proto: https`, so its discovery document advertises `http://` while you configured `https://` in Dashy. Fix the proxy or set `AUTHENTIK_HOST`/`AUTHENTIK_LISTEN__TRUSTED_PROXY_CIDRS` on the Authentik containers
-- **Audience mismatch**. The `aud` claim in the id_token is not `dashy`. Confirm the provider's Client ID is exactly `dashy` (no leading or trailing whitespace)
-- **Dashy server can't reach Authentik**. The Dashy container fails to fetch the discovery document. Exec into the container and try `wget -qO- https://auth.example.com/application/o/dashy/.well-known/openid-configuration`
+- **Audience mismatch**. The `aud` claim in the id_token doesn't match your `clientId`. Confirm the provider's Client ID and your `clientId` are exactly the same (no leading or trailing whitespace)
+- **Dashy server can't reach your provider**. The Dashy container fails to fetch the discovery document. Exec into the container and try `wget -qO- <your-endpoint>/.well-known/openid-configuration`
- **Clock skew**. The middleware allows 30 seconds of drift. If a container's clock is further off than that, `exp`/`iat` checks fail
If you've exhausted these and need a stop-gap, set `oidc.disableServerSideCheck: true` to skip server-side verification and fall back to client-side-only auth. This leaves Dashy's server routes unprotected, so only use it in a trusted environment (see the [OIDC docs](/docs/authentication/oidc.md)).
@@ -690,10 +682,10 @@ If you've exhausted these and need a stop-gap, set `oidc.disableServerSideCheck:
Your SSO session's id_token expired, so Dashy signs you out (rather than leaving a logged-in-looking UI whose API calls all silently 401). For OIDC, set `oidc.enableSilentRenew: true` to refresh the session in the background before it lapses; this needs your provider to issue refresh tokens (Dashy adds the `offline_access` scope automatically when it's on). Otherwise, just sign in again when prompted.
### Logged in but no admin controls
-The id_token doesn't include the groups claim. Open browser devtools after logging in, find the call to `/application/o/dashy/userinfo/`, and check the response. You should see a `groups` array containing `dashy-admins`. If not:
-- The `groups` scope mapping doesn't exist, or is not attached to the provider's property mappings
-- The user is not in the `dashy-admins` group
-- The conf.yml is missing `groups` from `scope:` and Authentik is therefore not sending it
+Dashy only makes you an admin if your token's groups or roles include the `adminGroup` or `adminRole` set in your `oidc` or `keycloak` config. Check one of those is set, and matches exactly. With OIDC, the [browser console](#how-to-open-browser-console) shows `Authenticated as <user> (non-admin)` after login, along with the groups and roles Dashy received. If your group isn't there:
+- The user is not in that group
+- Your provider isn't sending a `groups` claim. In Authentik, the `groups` scope mapping needs to exist and be attached to the provider
+- You've set `scope:` in conf.yml and left out `groups`
### Login works but Dashy errors on the callback with "OIDC signinCallback returned no user"
The id_token came back without a username claim. Confirm the provider has "profile" and "email" in its scopes and the "Include claims in id_token" is on
@@ -704,9 +696,6 @@ Dashy redirects to Authentik's end-session endpoint on logout. If Authentik's in
### Untrusted certificate from Authentik
Self-signed certs make Dashy's server-side fetch of the discovery document fail. Use a real cert (Let's Encrypt, or your homelab CA installed into the Dashy image) for the Authentik hostname.
-### Numeric client_id getting truncated
-Don't use numeric-only client IDs. If you must, wrap the value in quotes in conf.yml so YAML treats it as a string
-
### Header auth: "Unauthorized - not from trusted proxy"
The IP your reverse proxy presents as isn't in `auth.headerAuth.proxyWhitelist`. For Docker it's usually the bridge IP, not your LAN IP. Find it with `docker compose exec dashy getent hosts <proxy-service-name>` and paste that into `proxyWhitelist`. Restart Dashy after the change.
@@ -723,16 +712,6 @@ If your identity provider uses a self-signed or untrusted certificate, the brows
## Docker & image issues
-### App Not Starting After Update to 2.0.4
-
-Version 2.0.4 introduced changes to how the config is read, and the app is build. If you were previously mounting `/public` as a volume, then this will over-write the build app, preventing it from starting. The solution is to just pass in the file(s) / sub-directories that you need. For example:
-
-```yaml
-volumes:
-- /srv/dashy/conf.yml:/app/user-data/conf.yml
-- /srv/dashy/item-icons:/app/public/item-icons
-```
-
### Mount Type Mismatch
```text
@@ -767,7 +746,7 @@ or
You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
```
-When DockerHub returns one of these errors, or a `429` status, that means you've hit your rate limit. This was [introduced](https://www.docker.com/blog/scaling-docker-to-serve-millions-more-developers-network-egress/) last year, and prevents unauthenticated or free users from running docker pull more than 100 times per 6 hours.
+When DockerHub returns one of these errors, or a `429` status, that means you've hit your rate limit. Docker Hub allows 10 pulls an hour per IP address if you're not logged in, or 100 an hour on a free account.
You can [check your rate limit status](https://www.docker.com/blog/checking-your-current-docker-pull-rate-limits-and-status/) by looking for the `ratelimit-remaining` header in any DockerHub responses.
#### Solution 1 - Use an alternate container registry
@@ -777,8 +756,8 @@ You can [check your rate limit status](https://www.docker.com/blog/checking-your
#### Solution 2 - Increase your rate limits
-- Logging in to DockerHub will increase your rate limit from 100 requests to 200 requests per 6 hour period
-- Upgrading to a Pro for $5/month will increase your image requests to 5,000 per day, and any plans above have no rate limits
+- Logging in to DockerHub (`docker login`) will increase your rate limit from 10 to 100 pulls per hour
+- Paid plans (Pro and above) have no pull limit
- Since rate limits are counted based on your IP address, proxying your requests, or using a VPN may work
### Old image tags fail to pull
@@ -815,7 +794,7 @@ If `docker ps` shows the Dashy container as `unhealthy`, the periodic healthchec
#### SSL-enabled Dashy
-The healthcheck reads the same cert paths as the main server (`/etc/ssl/certs/dashy-pub.pem` and `/etc/ssl/certs/dashy-priv.key`) to detect whether to probe HTTPS or HTTP. If you've mounted certs at non-default paths via `SSL_PUB_KEY_PATH` / `SSL_PRIV_KEY_PATH`, the healthcheck will pick those up automatically as long as those env vars are set in the container environment (not just at run time).
+The healthcheck reads the same cert paths as the main server (`/etc/ssl/certs/dashy-pub.pem` and `/etc/ssl/certs/dashy-priv.key`) to detect whether to probe HTTPS or HTTP. If you've mounted certs at non-default paths via `SSL_PUB_KEY_PATH` / `SSL_PRIV_KEY_PATH`, the healthcheck will pick those up automatically as long as those env vars are set on the container. With certs in place, it checks `SSL_PORT` (443 by default) over HTTPS, instead of `PORT`.
#### Custom port
@@ -823,7 +802,7 @@ If you've set `PORT` to override the default 8080, the healthcheck honors the sa
#### Container is unhealthy past the grace period
-The healthcheck has a 20s `start-period` after which failures start counting. The image is prebuilt, so startup is just `node server.js` binding to a port - fast even on a Pi. If the container is still `unhealthy` past the grace period, the server has likely crashed. Check `docker logs <container>` for the real error (usually a malformed `conf.yml` or a missing `user-data` mount).
+The healthcheck has a 20s `start-period` after which failures start counting. The image is prebuilt, so startup is just `node server.js` binding to a port - fast even on a Pi. If the container is still `unhealthy` past the grace period, the server isn't listening where the healthcheck expects. Check `docker logs <container>` for `Unable to start Dashy's Node server`, which usually means something else is already using that port, e.g. when running with `network_mode: host`. A broken `conf.yml` won't cause this, since the healthcheck doesn't depend on it.
See also: [#1410](https://github.com/Lissy93/dashy/issues/1410)
@@ -914,7 +893,7 @@ Before proceeding, ensure that if the widget requires auth your API is correct,
#### Timeout Error
-If the error message in the console includes: `Error: timeout of 500ms exceeded`, then your Glances endpoint is slower to respond than expected. You can fix this by [setting timeout](https://github.com/Lissy93/dashy/blob/master/docs/widgets.md#setting-timeout) to a larger value. This is done on each widget, with the `timeout` attribute, and is specified in ms. E.g. `timeout: 5000` would only fail if no response is returned within 5 seconds.
+If the widget says `Request timed out`, or the console shows `RequestError: timeout of ...ms exceeded`, then the service didn't respond in time. Check it's reachable, and if it's just slow, [set a longer timeout](/docs/widgets.md#setting-timeout) on that widget with the `timeout` attribute, in ms. The default is `50000` (50 seconds). With `useProxy`, you'll see `Upstream server timed out` instead, and the proxy always gives up after 30 seconds.
#### CORS error
@@ -932,7 +911,7 @@ There are several ways to fix a CORS error:
#### Option 1 - Ensure Correct Protocol
-You will get a CORS error if you try and access a http service from a https source. So ensure that the URL you are requesting has the right protocol, and is correctly formatted.
+If Dashy is served over HTTPS, your browser blocks requests to `http://` services. This is called mixed content rather than CORS, but it looks the same in Dashy. So use `https://` for the service if it supports it, or proxy the request (see option 3). Also check the URL is correctly formatted.
#### Option 2 - Set Headers
@@ -997,16 +976,13 @@ If this is the case, you can disable the UI error message of a given widget by s
A 401 error means your API key is invalid, it is not an issue with Dashy.
-Usually this happens due to an error in your config. If you're unsure, copy and paste the [example](/docs/widgets.md#weather) config, replacing the API key with your own.
+Usually this happens due to an error in your config. If you're unsure, copy and paste the [example](/docs/widgets.md#weather-forecast) config, replacing the API key with your own.
Check that `apiKey` is correctly specified, and nested within `options`. Ensure your input city is valid.
To test your API key, try making a request to `https://api.openweathermap.org/data/2.5/weather?q=London&appid=[your-api-key]`
-If [Weather widget](/docs/widgets.md#weather-forecast) is working fine, but you are getting a `401` for the [Weather Forecast widget](/docs/widgets.md#weather-forecast), then this is also an OWM API key issue.
-Since the forecasting API requires an upgraded plan. ULPT: You can get a free, premium API key by filling in [this form](https://home.openweathermap.org/students). It's a student plan, but there's no verification to check that you are still a student.
-
-A future update will be pushed out, to use a free weather forecasting API.
+New OpenWeatherMap keys can take a couple of hours to start working, so a brand new key may return `401` at first.
See also: [#803](https://github.com/Lissy93/dashy/issues/803), [#789](https://github.com/Lissy93/dashy/issues/789), [#577](https://github.com/Lissy93/dashy/issues/577), [#621](https://github.com/Lissy93/dashy/issues/621), [#578](https://github.com/Lissy93/dashy/issues/578), [#806](https://github.com/Lissy93/dashy/discussions/806)
@@ -1044,8 +1020,8 @@ Please acknowledge the difference between errors and warnings before raising an
### Copy to Clipboard not Working
-If the copy to clipboard feature (either under Config --> Export, or Item --> Copy URL) isn't functioning as expected, first check the browser console. If you see `TypeError: Cannot read properties of undefined (reading 'writeText')` then this feature is not supported by your browser.
-The most common reason for this, is if you not running the app over HTTPS. Copying to the clipboard requires the app to be running in a secure origin / aka have valid HTTPS cert. You can read more about this [here](https://stackoverflow.com/a/71876238/979052).
+If the copy to clipboard feature (either under Config --> View / Export Config, or an item's "Copy to Clipboard" option) shows an "Unable to copy" error, first check the browser console. If you see `Clipboard access requires HTTPS`, then your browser is blocking access to the clipboard.
+The most common reason for this, is if you're not running the app over HTTPS. Copying to the clipboard requires the app to be running in a secure origin / aka have valid HTTPS cert. You can read more about this [here](https://stackoverflow.com/a/71876238/979052).
As a workaround, you could either:
@@ -1062,7 +1038,7 @@ Some settings are stored locally, in the browser's storage.
In some instances cached assets can prevent your settings from being updated, in which case you may wish to reset local data.
-To clear all local data from the UI, head to the Config Menu, then click "Reset Local Settings", and Confirm when prompted.
+To reset local settings from the UI, head to the Config Menu, then click "Reset Local Settings", and Confirm when prompted. This clears the settings you've changed in the UI, like theme and layout, on every page, but keeps you logged in.
This will not affect your config file. But be sure that you keep a backup of your config, if you've not written changes it to disk.
You can also view any and all data that Dashy is storing, using the developer tools. Open your browser's dev tools (usually <kbd>F12</kbd>), in Chromium head to the Application tab, or in Firefox go to the Storage tab. Select Local Storage, then scroll down the the URL Dashy is running on. You should now see all data being stored, and you can select and delete any fields you wish.
diff --git a/docs/widgets.md b/docs/widgets.md
index 888a092b..3d31513e 100644
--- a/docs/widgets.md
+++ b/docs/widgets.md
@@ -192,7 +192,7 @@ A simple, live-updating local weather component, showing temperature, conditions
### Weather Forecast
-Displays the weather (temperature and conditions) for the next few days for a given location. Note that this requires either the free [OpenWeatherMap Student Plan](https://home.openweathermap.org/students), or the Premium Plan.
+Displays the weather (temperature and conditions) for the next few days for a given location.
<p align="center"><img width="400" src="https://pixelflare.cc/alicia/dashy/weather-forecast" /></p>
@@ -200,12 +200,12 @@ Displays the weather (temperature and conditions) for the next few days for a gi
**Field** | **Type** | **Required** | **Description**
--- | --- | --- | ---
-**`apiKey`** | `string` | Required | Your OpenWeatherMap API key. You can get one at [openweathermap.org](https://openweathermap.org/) or for free via the [OWM Student Plan](https://home.openweathermap.org/students)
+**`apiKey`** | `string` | Required | Your OpenWeatherMap API key. You can get one for free at [openweathermap.org](https://openweathermap.org/)
**`city`** | `string` | Required | A city name to use for fetching weather. This can also be a state code or country code, following the ISO-3166 format
**`cityId`** | `number` | _Optional_ | An OpenWeatherMap numeric city ID, used to disambiguate cities that share a name. You can find the ID in the URL of the city's page on [openweathermap.org](https://openweathermap.org/) (e.g. `2643743` for London, GB). If provided, this will override the `city` option
**`lat`** | `number` | _Optional_ | Latitude for a specific location. If provided alongside `lon`, this will override the `city` and `cityId` options
**`lon`** | `number` | _Optional_ | Longitude for a specific location. If provided alongside `lat`, this will override the `city` and `cityId` options
-**`numDays`** | `number` | _Optional_ | The number of days to display of forecast info to display. Defaults to `4`, max `16` days
+**`numDays`** | `number` | _Optional_ | The number of days to display of forecast info to display. Defaults to `6`, and the free API covers about 5 days ahead
**`units`** | `string` | _Optional_ | The units to use for displaying data, can be either `metric` or `imperial`. Defaults to `metric`
**`hideDetails`** | `boolean` | _Optional_ | If set to `true`, the additional details (wind, humidity, pressure, etc) will not be shown. Defaults to `false`
@@ -224,7 +224,7 @@ Displays the weather (temperature and conditions) for the next few days for a gi
- **CORS**: ๐ŸŸข Enabled
- **Auth**: ๐Ÿ”ด Required
-- **Price**: ๐Ÿ”ด Premium (free for personal use only)
+- **Price**: ๐ŸŸ  Free plan
- **Privacy**: _See [OWM Privacy Policy](https://openweather.co.uk/privacy-policy)_
---
@@ -3734,7 +3734,7 @@ Then set `DASHY_WEATHER_TOKEN='xxx'` in your container or local environment, and
### Setting Timeout
-If the endpoint you are requesting data from is slow to respond, you may see a timeout error in the console. This can easily be fixed by specifying the `timeout` property on the offending widget. This should be an integer value, in milliseconds. By default timeout is `2500` ms (2ยฝ seconds).
+If the endpoint you are requesting data from is slow to respond, you may see a timeout error in the console. This can easily be fixed by specifying the `timeout` property on the offending widget. This should be an integer value, in milliseconds. By default timeout is `50000` ms (50 seconds).
For example: