Skip to main content

Custom NPM user for plugin access

This is not a common case; follow these steps only if Support directs you to. It applies to Informer 2025.2.13 and later, whose container images use an updated file structure compared to earlier builds.

When a custom commissioned plugin needs repository access that the default Informer user does not have, you can mount the Linux host's .npmrc file into the Informer containers so they authenticate as your user.

Authenticate the Linux host

Log in to the Informer server as the maintenance user you use for installs and upgrades (this example uses administrator).

Install npm on the host. The command varies by Linux distribution; this example uses Ubuntu:

sudo apt install npm

Configure the Entrinsik repository:

sudo npm config set registry https://docker.entrinsik.com/repository/npm/

Authenticate to the repository, entering your Entrinsik Docker repository credentials (the same ones used to install Informer) when prompted for username, password, and email:

sudo npm login --auth-type=legacy

The host is now authenticated as your user, which has access to the unpaid plugins and your specific custom plugin. These credentials are stored as a token in the .npmrc file for the logged-in user. To find that file's parent directory:

echo $HOME

Mount the .npmrc file into the containers

Mount the host-side .npmrc path into each container as a volume.

  • Host-side path (varies by maintenance user), for example: /home/administrator/.npmrc
  • Container-side location (on 2025.2.13 and later): /informer/.npmrc

Edit docker-compose.yml and add the volume mount under each Informer container's volumes section:

informer-api:
image: docker.entrinsik.com:5000/informer:target
working_dir: /informer
entrypoint: "/bin/sh -c 'node dockerpreboot.js && pm2 start node_modules/@entrinsik/informer-server/index.js -i 2 --name informer --no-daemon'"
volumes:
- ./plugins:/informer/plugins
- ./java/plugins:/informer/java/plugins
- ./config.json:/informer/config.json
- /home/administrator/.npmrc:/informer/.npmrc

Save the file, then stop and start Informer to create new containers with the added volume. The host's npm credentials now replace the containers' defaults, so the containers can install plugins from config.json that require special access.

Upgrading from 2025.2.12 and earlier

If your Informer previously had a working .npmrc mount and will not start after upgrading to 2025.2.13 or later because a required plugin is missing, change the container-side path from the legacy path to the new one.

From:

- /home/administrator/.npmrc:/root/.npmrc

To:

- /home/administrator/.npmrc:/informer/.npmrc