Running Mattermost On Windows

Hi guys,

I work for a large enterprise that generally builds most of its apps on top of Microsoft technologies. My background in development is generally using managed languages, Java, C#, WPF, ASP.NET, on top of Windows and I am afraid to admit that my knowledge of linux is rather limited.

Now, I feel like my company could really benefit from a tool like Mattermost as we are unable to use anything that isn’t self-hosted due to the nature of the work we do. At the moment team communication is generally handled via Skype and Email and it’s all a bit of a mess. Unfortunately, being a primarily Microsoft-oriented company means that the IT guys are quite jittery about firing up a Debian/Ubuntu server and running something like Mattermost from there so I have been investigating the possibility of compiling and running Mattermost on Windows.

What I have found interesting is that I haven’t seen anyone else really wanting to or needing to do the same thing but it feels like there must be other organisations where it would be a benefit to be able to run Mattermost on a Windows Server instance. After a little fiddling here and there I managed to get Mattermost compiled and running what seems like successfully on my Windows 10 development box running against a Windows install of Postgres.

So after that long-winded introduction I guess my questions are: is there any reason there has been no previous attempt to make a version of Mattermost available for Windows users? With my Windows go-compiled version, am I likely to run into any unforeseen issues or should it run as well as it would under osx/linux?

I have to admit, I cheated slightly and took all the prepared javascript/css/html files from the 1.2.1 release and used them with my own compiled version of the 1.2.1 go source as obviously running in a Windows environment I have no easy way of using a makefile but I presume the same could be achieved in a gulp/grunt script that would work for Windows developers (again, my javascript knowledge is painfully out of date here so I could be wrong!).

Anyway, if anyone could answer those questions I would be very grateful as I think Mattermost could work really well in a Windows environment - especially if I can write some webhooks into TFS and our other eployment tools so that issues can be surfaced in specific channels rather than through crappy emails!

Cheers guys :smiley:,

James.

We’ve thought about it, just wasn’t sure if there was a lot of demand for Windows Server, and we’d need volunteers for testing, documentation, support and troubleshooting.

Could we have your help adding a feature idea so this proposed change could be upvoted?

Hi you. Bravo. What are the basic hardware prerequisites for a mattermost install?

James, this is really useful to know! I’m also looking into running Mattermost self-hosted on Windows.

I’ll have a go at this myself and pop a feature idea in if I can get it working, along with some notes. If you have any tips on the process you took to get it compiled and running on Windows that would be useful.

Thanks.

Getting the go code compiled in Windows is actually pretty easy - if you just set up your Windows go environments, set the required paths and grab the required dependencies it should just build straight off.

The problem for me was the web client side of things. For the life of me I could not get the tools working properly in windows that are used to properly compile up all of the React code properly. This is not so much a Mattermost problem as a problem with the tools themselves - they have known issues in Windows and essentially focus on Linux OS’s.

In the end I used Vagrant to set up a Linux VM to handle the client side of things. This is one hacky way of doing it - you can set up Vagrant to share your Windows code source folder so it’s accessible from within the guest Linux OS and then run watchify/browserify to automatically build your React code changes that you make from within Windows - you just have to change it to poll to detect changes.

If you just want to run the latest release then it’s much simpler - grab the latest distribution which has all the properly compiled React client side code all ready. You simply need to then compile the go code in Windows and you should be good to go!

Great, thanks James. I’m getting there now. The go code is compiled and I have a server running. Just getting the react stuff going now.

The process has been quite painful as while also being stuf to Windows platform I’m hidden behind a corporate firewall too.

Right. I finally got it all working. Building the client required changing a few things (mainly using globify instead of watchify due to Windows CLI lack of globbing). Setting up paths and file locations was also a bit of a challenge…

So basic steps are - set up SQL db, build server, build client, run node and finally run server.

Hi, I got it all working. I compiled the go code in windows. Got the latest distribution and got the compiled react code. run the compiled go file and it works fine. BUT THE BROWSER COULD NOT GET ANY CSS FILE FROM SERVER. I checked the direct link , in my case http://localhost:8065/static/css/bootstrap-3.3.5.min.css , and the css is downloaded. But the browser is not rendering any css. i can see that the css files are listed in the source node of the developer tools in the browser but when i click to see the css there is nothing there. ALSO the browser successfully gets the JS files from server but not the css. Please HELP!