Golang running on Virtualmin


Not sure if I’m posting in the correct forum, but I would like to run a Go-application (with its own server) on one of the domains at my Virtualmin setup. Is this possible?

I’m today using Virtualmin’s own Git configuration, but it doesn’t let me do what I want (and need) without to many hacks and dependencies (eg XML-Rpc etc) to manage Git-repos outside of Virtualmin-administration. And having git-repos available, per user, at a more intuitive website than the standard included page, would be highly appreciated.

Been looking into https://gogs.io/ which also support ssh (cant find any solutions on how to get it working with «Virtualmin-git»).

Anyone have an idea? :slight_smile:

Thank you in adv.

// Joachim


did you found how to use gogs on a domain managed by your virtualmin server ?


I wrote up a doc about running Hugo on a Virtualmin system, but haven’t published it yet. That wouldn’t include proxy rules, though. But, there’s very little that’s weird about a Virtualmin system…the usual docs should Just Work.

But, if following the normal gogs docs doesn’t work let us know what goes wrong. I’ll probably get around to either writing up gogs or adding an Install Script for it at some point, but there’s a lot on my todo list right now.


you’re right. I followed the normal gogs docs and it’s working.
Do you know how to create an installer script to automatize this task for every domain who require it ? Or do will I have to do it manually each time ?


Services that need proxying are a little tricky, and right now only Virtualmin Pro has the proxy setup code in it (and not for go apps; it’s for Ruby on Rails and Node.js apps).

But, I’d like to see a lot more go support in Virtualmin going forward, because I really enjoy working with go, and want to work on some of my own projects in go. It’s on my todo list to work on it once Virtualmin 6 is out.

Jamie has written up some decent docs about making Install Scripts; but, again, without the proxy support (missing from Virtualmin GPL), it’d be tricky to completely automate it. Those docs are here: https://www.virtualmin.com/documentation/developer/scripts

I’ll talk to Jamie about whether the proxy features for Install Scripts can make their way into GPL for Virtualmin 6, or if it’ll take major work to make it happen. I think it’s just a matter of copying the right lib file over, but may need some core code changes, too.

Thank you for the details.

Things like this, Ruby, Node, Golang, etc, are actually perfect candidates to run in containers. It would be so great to have the Docker (which Jamie already integrated to Cloudmin) be able to deploy a container into a Virtualmin user account which he can then start and stop.

Put it like this:

Launch VM with Cloudmin that hosts containers.

User from his Virtualmin account decides to launch a Node project, launches container with Node template (that gets created inside a VM assigned for container management like CoreOS, Debian, Alphine, etc.) and can manage it from his regular Virtualmin control panel.

The app is now running without issues, you don’t need to mess with any dependencies, proxies or have them running in the Virtualmin server itself at all. Each customer can install thousand of different apps they want regardless if they are supported or not inside Virtualmin. The job that Virtualmin would do here is just create the Apache proxy so the container can be accessed to the public on the domain for that Virtualmin customer like example.com:8551 as well punching the firewall and setting up the rest of the settings. Custom can now run his regular site but launch other dev projects if he wants.

Cool right? No. Amazing! Is this possible?

Of course, because this is the beauty in Virtualmin/Cloudmin integration which I think has a great solution to problems like this. You could even decide to have that VM assigned only for containers for that specific customer and launch another VM for another customer (giving max security). So each VM is per customer that runs his containers. And users don’t even need to be aware of anything like this. They just log into their Virtualmin panel and launch the base image they want, (magic is done in the background). If the hosting plan allows it of course.