Installing code in self hosted n8n

self hosted n8n in docker
std db

I found this API I want to use

Can you point me to how I install this and make it available to my n8n workflows?

I saw a note

but that’s about accessing std libraries, how do I install the above one? Is it even possible?

I’m struggling a lot with disparate http calls. A single code block would make more sense.

Hey @bally,

You would need to create a custom image using something like the below as your Dockerfile.

FROM n8nio/n8n:latest

USER root
RUN npm install -g streakapi
USER node

Then run n8n like normal and make sure you set the env option for external packages to include streakapi and you should be good to go.

I see - that would mean some sort of location where I can build my own docker image?
I’m doing this on my synology so I think this is also not going to be trivial…

If the NAS is not able to do it then you may need another way to do it, doing it with a custom image is the recommended solution though.

You may be able to connect to the container directly as root to install the package if the NAS allows it.