Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How do I pass an emvironment variable to a docker.

Featured Replies

I want to pass an environment variable to the Komga docker to limit it's memory usage:
 

JAVA_TOOL_OPTIONS=-Xmx2g

 

The relevant variable page is here for komga:
https://komga.org/installation/docker.html#user-group-identifiers

 

Sadly I haven't been able to understand how to use the following part to enter this and google is failing me.
image.png.dc78c66e309166b24735e5cc60d04d71.png

 

Unfortunately this part is TBD in the manual:
https://wiki.unraid.net/Manual/Docker_Management#Environment_Variables

 

image.png.df47e5cf1060c2576f998680225fba92.png

Edited by dodgypast

1 hour ago, dodgypast said:

I want to pass an environment variable to the Komga docker to limit it's memory usage:
 


JAVA_TOOL_OPTIONS=-Xmx2g

 

The relevant variable page is here for komga:
https://komga.org/installation/docker.html#user-group-identifiers

 

Sadly I haven't been able to understand how to use the following part to enter this and google is failing me.
image.png.dc78c66e309166b24735e5cc60d04d71.png

 

Unfortunately this part is TBD in the manual:
https://wiki.unraid.net/Manual/Docker_Management#Environment_Variables

 

image.png.df47e5cf1060c2576f998680225fba92.png

Name: whatever you want to call it.

Key: JAVA_TOOL_OPTIONS

Value: -Xmx2g

  • Author

Thanks a lot.

  • 3 years later...

Late reply but I wanted to say thank you! Funny coincidence, because I was looking at exactly the same environment variable for exactly the same container. I was even planning on giving it exactly the same 2g of RAM. Your answer (and the posed question as well) couldn't have been more perfect for my use case

*edit*
For anyone wanting to try this out, note that in my case adding this variable to a running container, damaged it beyond repair. It spit out a whole bunch of (SQLite) database errors, crashed and kept crashing on launch, all the while quick-firing DB errors. I had to remove the appdata completely to get it running again. This wasn't really an issue because I hadn't configured anything yet but just know this might happen. After deleting the appdata it starts up fine with the new parameter. Could be a fluke, could be that I should have stopped the container first or it could be that this variable needs to be added before the first run. Whatever the case, if you want to add this variable to an already configured container, back up your appdata and perhaps stop the container first. If it turns out that the only way to add it is before the first run....wel that's a problem I guess if your container was already configured

Edited by BlueBull

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.