It is working, but there is some error

My apologies, I completely new to the site and don’t know about tunnels. I used this to make my minecraft server public in order to play with my friend, who lives in my country.
I have a doubt regarding the use of this program… Do I have to continuously run the program to make it work… or once I stopped the server I can close the window too…
The problem is that whenever my friend tries to connect to the server with the tunnel ip it shows can’t connect to server or Disconnected or Unknown Host but when He tries with Direct Connect it connects to the server, but takes a lot of time.