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


(John Rutherford) #1

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.


(Norbert Melzer) #2

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 traefik.io 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.


(Johan Dahl) #3

You can also use Apache as a reverse proxy. See this https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html


(Norbert Melzer) #4

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.


(George Calianu) #5

A very light reverse proxy project is here:


(Johan Dahl) #6

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.


(George Calianu) #7

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


(John Rutherford) #8

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.


(system) closed #9

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