Configuration with public IP

I am using grafana windows standalone version , I want to configure grafana application in a server with public IP. How to configure grafana in a server and how to run grafana in background. The grafana run with the command prompt,The application cannot be access when the command prompt is closed. How can we resolve those scenarios.