Any recommendations for a good tutorial to install Golang onto my server

I have followed umpteen “Just do this” web site creation tutorials and they have all failed. Error messages were not helpful and I am becoming increasingly disillusioned.

I think the problem is conflicting applications so I would be very grateful if anyone can recommend how to install Golang to run alongside a dozen other hobby domains using Ubuntu 18.04 running Apache2 and also with the MySql database.

I have managed to:

  1. install Golang on the Ubuntu 18.04 localhost
  2. created “Hello world” which runs both:
    a. locally using http://localhost:8080
    b. online by uploading the executable and using http://domain.tld:8080

Ideally I would like to eliminate online port:8080 and been unable to find a suitable reverse-proxy or net utility that does not conflict with the existing platform.

I am using a Linode VPS if it makes any difference.

1 Like

Usually there is no need to install golang on the server, just deploy and start the properly crosscompiled binary on the server preferably managed by something like systemd.

In general I can suggest as reverse proxy, as it will also manage let’s encrypt certificate and renewal for you. Also it can dispatch on domain and path to your backend applications.

It’s hard to suggest anything to solve the conflicts though, as you haven’t even told what kind of conflicts you have.

My guess though is, that you have already some application listening on port 80 and/or 443. You need to configure that to listen somewhere else and put it behind the reverse proxy of your choice as well.

1 Like

You can also use Apache as a reverse proxy. See this

1 Like

As well as nginx. One could use HAproxy as well. Yes there are many alternatives, but I tend to suggest traefik most of the time, as configuration is often straight forward, it has built in support for Letsencrypt and also can deal with unencrypted HTTP2 on the backend (even though I have to read more about that). It even can accept HTTP2 on the front-end and demultiplex HTTP2 stream/channels or however those are called into distinct HTTP connections to the backend.

I’ve not yet found configurations for nginx and Apache that were able to do this.

1 Like

A very light reverse proxy project is here:

1 Like

But @John_Betog has Apache already running on the server (and listening on port 80/443 I guess) so using it as a reverse proxy would be the easiest way of achieving this.


I agree with you. Consider my mention as an alternative solution.

1 Like

Many thanks for the suggestions.

I now have some interesting alternatives.

I look forward to a fresh start soon and hope to report back with a successful solution.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.