Confused with server starting and stopping when started

So i set up my mine os server, logged on to the webgui created a server and started it. it started and then stopped a few seconds after. I accepted the eula and tried again but still the same. I heard you have to log in from somewhere other than root, but im not sure how to

You would have set up a password for the mc account, you can use that at the WebUI login screen.