You need a portable server. https://moodlebox.net/en/help/what-is-the-moodlebox/ is very portable. Being the size of a pack of cigarettes, the ship won't notice anything.
The downside could be, with 10 W power consumption Raspberry Pi is not a real server. Currently the number of _simultaneous_ users is limited to 25: https://discuss.moodlebox.net/d/36-low-number-of-concurrent-connected-users. It might change though. See towards the end of the above discussion.