[BUG] Unable to add custom js and css.
Is there an existing issue for this?
- [x] I have searched the existing issues
Current Behavior
Nothing, it seems grocy ignores the js and css file. I have confirmed that the files exist in the container and are in the right spot as per the instructions on the grocy GitHub page.
Expected Behavior
Grocy uses the custom js and css at started up.
Steps To Reproduce
start container using docker compose in portainer.
Environment
- OS: Ubuntu 20.04
- How docker service was installed:
CPU architecture
x86-64
Docker creation
version: '3'
services:
devgrocy:
image: lscr.io/linuxserver/grocy:latest
container_name: devgrocy
environment:
- GROCY_DATAPATH=/config/data
- PUID=1000
- PGID=1000
- TZ=America/Chicago
volumes:
- devgrocy:/config
- /home/bob/docker/grocydev/custom:/config/data
restart: unless-stopped
volumes:
devgrocy:
driver: local
driver_opts:
type: none
o: bind
device: /home/bob/docker/devgrocy
Container logs
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│ old date │ new date │ path │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2024-05-27 │ 2024-12-17 │ /config/nginx/nginx.conf │
│ 2023-08-13 │ 2024-12-06 │ /config/nginx/ssl.conf │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
[custom-init] No custom files found, skipping...
[ls.io-init] done.
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────
██╗ ███████╗██╗ ██████╗
██║ ██╔════╝██║██╔═══██╗
██║ ███████╗██║██║ ██║
██║ ╚════██║██║██║ ██║
███████╗███████║██║╚██████╔╝
╚══════╝╚══════╝╚═╝ ╚═════╝
Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID: 1000
User GID: 1000
───────────────────────────────────────
Linuxserver.io version: v4.5.0-ls294
Build-date: 2025-06-15T07:42:46+00:00
───────────────────────────────────────
using keys found in /config/keys
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│ old date │ new date │ path │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2024-05-27 │ 2024-12-17 │ /config/nginx/nginx.conf │
│ 2023-08-13 │ 2024-12-06 │ /config/nginx/ssl.conf │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
[custom-init] No custom files found, skipping...
[ls.io-init] done.
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────
██╗ ███████╗██╗ ██████╗
██║ ██╔════╝██║██╔═══██╗
██║ ███████╗██║██║ ██║
██║ ╚════██║██║██║ ██║
███████╗███████║██║╚██████╔╝
╚══════╝╚══════╝╚═╝ ╚═════╝
Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID: 1000
User GID: 1000
───────────────────────────────────────
Linuxserver.io version: v4.5.0-ls294
Build-date: 2025-06-15T07:42:46+00:00
───────────────────────────────────────
using keys found in /config/keys
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│ old date │ new date │ path │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2024-05-27 │ 2024-12-17 │ /config/nginx/nginx.conf │
│ 2023-08-13 │ 2024-12-06 │ /config/nginx/ssl.conf │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
[custom-init] No custom files found, skipping...
[ls.io-init] done.
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
im pretty sure it works.
compose:
volumes:
- /opt/docker/grocy/grocy_data:/config
filesystem:
root@r720-omv:/opt/docker/grocy/grocy_data# ls -ls /opt/docker/grocy/grocy_data/data
total 12284
16 -rw-r--r-- 1 docker users 15371 Aug 30 16:19 config.php
4 -rw-r--r-- 1 docker users 155 Jan 14 2024 custom_js.html
12252 -rw-r--r-- 1 docker users 12541952 Nov 20 11:01 grocy.db
4 drwxrwxr-x 2 docker users 4096 Aug 30 15:00 plugins
4 drwxr-xr-x 3 docker users 4096 Aug 31 13:31 storage
4 drwxr-xr-x 3 docker users 4096 Nov 7 12:31 viewcache
file:
root@r720-omv:/opt/docker/grocy/grocy_data# cat /opt/docker/grocy/grocy_data/data/custom_js.html
<script>
if (Grocy.View == "purchase")
{
$("#price-type-total-price").change(function()
{
$("#price-type-unit-price").click();
});
}
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
It does not work, I also checked the file inside the filesystem of the docker container. The file is present in the correct directory, user rights als okay, but it still does not work.
Even on startup of grocy, it says
[custom-init] No custom files found, skipping...
Any help would be much appreciated since I really need this feature, otherwise I cannot continue to use grocy in docker.
Thank you!
grocy | 2026-01-19T03:00:11.497845905Z [custom-init] No custom files found, skipping...
This is completely unrelated. Its from LSIO, not Grocy
OP would need to just use a single mount point and the edit the files within data accordingly.
Instead of:
volumes:
- devgrocy:/config
- /home/bob/docker/grocydev/custom:/config/data
They would just do:
volumes:
- /home/bob/docker/grocy/appdata:/config
grocy | 2026-01-19T03:00:11.497845905Z [custom-init] No custom files found, skipping...
This is completely unrelated. Its from LSIO, not Grocy
Thanks for the clarification, I didn't know that.
I have only one single mountpoint. The content of the file is like this:
<script>
if (Grocy.ActiveNav == "products")
{
$("#related-links").append('<a class="btn btn-danger grocycodes-label-list-button" href="#">Grocycodes label list</a>');
$(document).on("click", ".grocycodes-label-list-button", function()
{
Grocy.Api.Get("objects/products?query[]=active=1&order=name",
function(products)
{
document.body.innerHTML = "";
for (var i = 0; i < products.length; i++)
{
var product = products[i];
document.write(' \
<div style="border: 1px solid black; width: 200px; text-align: center; padding: 5px 0 5px 0;"> \
<img src="' + U("/product/" + product.id + "/grocycode?size=80") + '" /> \
<h1 style="margin: 2px 0 2px 0;">' + product.name + '</h1> \
</div>');
}
}
);
});
}
</script>
This should add a button, snippet is from the grocy dev in this Reddit thread:
https://www.reddit.com/r/grocy/s/AxqunOwHUz
However unfortunately the button is not there (in master data / products / "hamburger menu")
I also made sure the file is in the same folder like the grocy.db is, as described by the Grocy dev (which is /config/data/). I even chmod'ed the file with 666 to make sure it is not because of access rights.
By the way, there was already someone complaining about this in thread:
Unfortunately the Grocy dev could not help because of the containerization with Docker.
So you guys are the last resort 😃