Icon assets missing

Hi,

I’ve set up an n8n instance on Cloudways following a thread on here and also a couple of online articles. It’s all working, however, I am getting 404 errors for all n8n node icons. It looks like n8n is putting the icons folder in .cache in the root of my home directory, but the rest of the application is installed in /applications/[name]/public_html/

Is there any way I can change this? My pm2 config file is as follows:

    "NODE_ENV": "production",
    "N8N_HTTP_PORT": "5678",
    "N8N_HOST": "n8n.mydomain.com",
    "N8N_PROTOCOL": "https",
    "VUE_APP_URL_BASE_API": "n8n.mydomain.com/",
"GENERIC_TIMEZONE": "Europe/London",
"WEBHOOK_URL": "https://n8n.mydomain.com/"

Here is an example of an error for one of the .svg files:
URL: https://n8n.mydomain.com/icons/nodes/n8n-nodes-base.webhook.svg
Status: 404 Not Found
Source: Disk Cache

Thanks,
Jim

Update:

I have changed to n8n version 0.202.1 and everything is working fine now. Not sure what’s up with the latest few versions. Looking at the release notes, possibly something to do with the lazy loading?

Also, I realised that I could change where the .cache is stored by setting the env N8N_USER_FOLDER.

Cheers,
Jim

1 Like

Hi @jimhuds, I am not sure what Cloudways does, but there have been a lot of changes around deploying n8n recently. I am sure @netroy can provide further details if you have any specific questions around this.

As for fixing any problems related to this, it might be worth making sure that no outdated data is cached anywhere. So depending on how you have deployed n8n it could be worth simply removing everything apart from the database and the data directory and then starting a fresh instance with this data (after taking a backup of course).

Hi, thanks for the response. After getting it working and learning the basics of npm/pm2, I actually got interested enough to move our server directly to Vultr, so I will be running it on there soon. Are there any benefits/downsides to using the docker image instead of npm?

I personally prefer the docker image very much as it bundles everything required to run n8n (I don’t need to worry about running the right Node.js version for example) and avoids conflicts with other applications (requiring another version of Node.js for example to stick with the example).

The obvious downside would be an additional layer of configuration to think about. For example, while an npm application running on bare metal for example could access all directories of the current user straight away, docker would require you to first map these. The docker run command in our documentation would take care of mapping the local ~/.n8n directory on your machine to against the /home/node/.n8n directory of the n8n docker container using the -v ~/.n8n:/home/node/.n8n option. If you’d like to access any additional directories you would need to map these as well before n8n can access them.

@jimhuds Do you have any reverse proxy set in front of your n8n instance? The error you are seeing sounds like there is a url whiltelist that’s preventing the requests for /icons from reaching the n8n server.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.