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
Percy9mo ago
Project ID: 59529c94-83a4-4029-89c7-3ac4d98ea51b
Nathan Lively
Nathan Lively9mo ago
59529c94-83a4-4029-89c7-3ac4d98ea51b
root
root9mo ago
It depends on how you're building your container image- are you using the default Nixpacks builder?
MantisInABox
MantisInABox9mo ago
If I remember correctly, the containers are Debian/Ubuntu based but I could be wrong
root
root9mo ago
If so, it's Ubuntu
Nathan Lively
Nathan Lively9mo ago
Yes, I'm deploying my Java17 code directly from GitHub.
root
root9mo ago
But do you have a Dockerfile?
Nathan Lively
Nathan Lively9mo ago
No.
Solution
root
root9mo ago
Then Ubuntu.
root
root9mo ago
You can use the JAVA_OPTS environment variable to set JVM options.
Nathan Lively
Nathan Lively9mo ago
Thanks! Is that in the docs somewhere? I've never used that before.
root
root9mo ago
Java | Nixpacks
App source + Nix packages + Docker = Image
Nathan Lively
Nathan Lively9mo ago
So it looks like I need to add set JAVA_OPTS=%JAVA_OPTS% -Xmx8m in some env variable?
Nathan Lively
Nathan Lively9mo ago
Ooops, did that close the thread? No Looks like something you add to railway.toml?
root
root9mo 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