[FEAT]: Desktop Electron launcher should respect env variable COLLECTOR_PORT if set

Author: rexxowskiCreated Sep 14, 2026Updated Sep 14, 2026
Labelsenhancementfeature request

What would you like to see?

I am experiencing collision of the Desktop AnythingLLM Electron (running on port 8888 by default) with my local complex software system. It would be very helpful if the Electron launcher would respect the environment variable COLLECTOR_PORT before it sets the starting port to choose.

in dist-electron/main/index.js instead of: process.env.COLLECTOR_PORT = isDev ? 8888 : await getPort({ port: 8888 });

there could be something like: process.env.COLLECTOR_PORT = process.env.COLLECTOR_PORT || (isDev ? 8888 : await getPort({ port: 8888 }));

Source: Mintplex-Labs/anything-llm