You might want to consider running something like the Raspberry Pi Zero. Looks like the Nano is 45mm x 18mm and the Pi Zero is 65mm x 30mm. If you could fit the Pi Zero it would probably make your life a lot easier.
I had the most luck installing the Zulu Embedded version of Java, and I've had a Clojure webapp running on my Pi Zero for over a week now without any hiccups.
I'm a post or two behind on chronicling my adventures, but I did at least capture how I got Clojure running on the Zero here: https://ajpierce.com/2020-01-08_safe-to-wake-pt4/