[Solved] Config.js recreated on every container start - how to configure?

So for some reasons the developer thought it would be a great idea to “refresh” the config.js on every container boot. I’m sure that’s great when changing/adding features but how am I supposed to configure it now? There’s no documentation about it. So do I need to go through that commit and find out all environment variables that I need to add to .env to hopefully get me the result I like to have?

1 Like

I’m not sure what the design was targeting. I’m using docker stack, and I put all my config in the docker-compose.yml file. Perhaps this is unacceptable for you, especially for the passwords. Maybe the docker environment can be adjusted not to re-generate the config.js each time? The installation manual says (https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-docker):

IMPORTANT: At the moment, the configuration is not regenerated on every container boot, so if you make any changes to your .env file, make sure you remove the configuration directory before starting your containers again.

I guess they “fixed” that? Maybe there is a directive you can give that will halt the container from regenerating the config.js?

Good luck!

Yeah the remaining configuration is not being regenerated but the config.js is. It’s a bit of a difficult system because of on one hand you of course want changes to the .env or docker-compose to show up in the config but on the other hand you need some way to have manual configuration changes be permanent…

So for now I don’t know how to disable the regeneration of the config.js and putting everything in compose.yaml would be an effort and as soon as the source changes, I’ll have to merge that file.

1 Like

One more hack comes to mind: just after your docker-compose up; (presumeably this is run by a script?) add sleep 10; docker copy permanent-config.js <jitsi-web-directory>;. That is, overwrite the newly-generated config.js?

1 Like

yeah that would be my last solution, periodically overwriting the config.js with my personal modified version.
It’s ugly but would at least work.

1 Like

Create a file called custom-config.js and place it at the root of your web configuration directory…


Edit that file to set/override configuration values like so…

config.enableNoisyMicDetection = true;
config.constraints.video.height = { ideal: 720, max: 720, min: 180 };
// etc.

The content of that file is appended to the auto-generated config.js.

1 Like