What operating system is my Railway server running?

I'm looking into how to increase the JVM heap size.
Solution:
Then Ubuntu.
Jump to solution
15 Replies
Percy
Percy15mo ago
Project ID: 59529c94-83a4-4029-89c7-3ac4d98ea51b
Nathan Lively
Nathan LivelyOP15mo ago
59529c94-83a4-4029-89c7-3ac4d98ea51b
root
root15mo ago
It depends on how you're building your container image- are you using the default Nixpacks builder?
MantisInABox
MantisInABox15mo ago
If I remember correctly, the containers are Debian/Ubuntu based but I could be wrong
root
root15mo ago
If so, it's Ubuntu
Nathan Lively
Nathan LivelyOP15mo ago
Yes, I'm deploying my Java17 code directly from GitHub.
root
root15mo ago
But do you have a Dockerfile?
Nathan Lively
Nathan LivelyOP15mo ago
No.
Solution
root
root15mo ago
Then Ubuntu.
root
root15mo ago
You can use the JAVA_OPTS environment variable to set JVM options.
Nathan Lively
Nathan LivelyOP15mo ago
Thanks! Is that in the docs somewhere? I've never used that before.
root
root15mo ago
Java | Nixpacks
App source + Nix packages + Docker = Image
Nathan Lively
Nathan LivelyOP15mo ago
So it looks like I need to add set JAVA_OPTS=%JAVA_OPTS% -Xmx8m in some env variable?
Nathan Lively
Nathan LivelyOP15mo ago
Ooops, did that close the thread? No Looks like something you add to railway.toml?
root
root15mo ago
Nope, just put JAVA_OPTS=-Xmx8m in your service's Variables tab. I mean, you can use railway.toml, but the web interface is often easier
Want results from more Discord servers?
Add your server