I had a spare pi lying about, a model 4b with 2GB ram, and recently I had been playing alot of Minecraft games with my freinds over lan from my pc but realised I could setup a server off my pi. But after setup whilst my freind was playing on it I decided to close the ssh connection I used for the setup ,I run my pi in headless mode with Raspbian lite, but was oblivious to the fact that after I closed the connection the server also closed, I only realised when my freind asked me why was the server down.
I cannot keep the ssh connection open as after some time it gets a broken pipe error, I could prevent this by entering some random command like
ls to keep it alive but I'm not always there to hold its handbut if I was realy I was thinking to just set it up and leave it there to do what a minecraft server does. I have tried to start the server with the
& suffix but it suspends itself early in the servers startup, however i had more succes using the
nohup command which workswell but doesnt allow me to give input to the server which would be desireable. I have no clue how to achieve this and have been hitting my head on the table over this, any help would be great.