This is a very noob question, so please understand and take that into account.
I have a basic go web app and a server running Ubuntu 22.04 with a domain which I bought from hosting provider. They installed an also ISPManager control panel there. But the control panel does not provide a way (from what I’ve seen) to host a Go application there, only PHP anf python for the most part.
I don’t have any knowledge of web servers like Apache or Nginx, but I know some Linux CLI, and I have written the web app myself. I can also SSH into the server.
I tried running an app by just using go run, but in that case (predictably) I had to enter an IP address of a server along with a port name.
How can I host my app there?
2
Answers
If you have ssh access it means that you also have permission to transfer files from remote with sftp or scp etc. So in basics you just need to compile your code and then transfer it to the server with protocols I mentioned or you may use applications like filezilla. Then you need to install a load balancer you can use nginx and there is a simple guide for installing and configuring you may follow link. The other thing you need to do is configuring public dns with A record maybe. As a summary it is not a really simple thing to achieve, I recommend you to find a support from someone (maybe freelancer.). I hope this answer finds you well…
Regards,
My suggestion is to use one of the myriads of clouds that automatically manages your app, is just so much easier to run, scale, monitor, view logs … etc:
I strongly suggest you try the cloud run, as if free unless you are really putting it to heavy work. But if you just need a service that is REST-API or a web-site just go with the first link.
GCP Cloud Run (my favorite) has also free tier
Amazon ECS
and if you do a search there are many more with free tier