How to compile,build and make package from source code of mattermost to be deployed on live server

I have made some custom changes in Mattermost source code and want to compile, build and make package, so i can deploy on the live server, where my customised mattermost can be deployed and accessed by custom url. I want help in understanding and implementing it.

Hi @omppatil and welcome to the Mattermost forums!

Usually you will only need the build essentials for your distribution and you will need a copy of the matching golang version on your system and if you have all that, you can start with typing make in the root of the source code folder and see where it goes. If you encounter errors, let us know.

In the meantime I’m going to see if I can find documentation about this.

hi @agriesser I was able to compile run mattermost on my local system successfully. but how do i build from source code of both mattermost-server and mattermost-webapp folders and deploy the build to the server , as in when i do the following steps such as using “make build” command in “mattermost-server” local folder and “make build-client” command from “mattermost-server” local folder and one tar file was generated and i extracted that tar file on my server and saved it in opt/mattermost folder, but when i try to run using “./bin/mattermost” , it gives me “config file not found error”. My extracted tar does not contain config.json file in it. i even referred this following links <no title> — Mattermost documentation and Install Mattermost server — Mattermost documentation,

and also referred How to Install Mattermost on Ubuntu 22.04 - RoseHosting

“Compiling” actually means to build from source and you seem to have managed to do so, just for reference, this is the link I was given which talks about setting up the developer environment and compiling the project from source:

I’m not sure if a config.json file is included in the setup or if it can be generated with some command, but you can always use the bundled default config.json from your previous install so that it contains all the default values.

A config.json is automatically generated if the server cannot find one.

Thanks Agniva for confirming my assumption!

Thank you for your help @agriesser and @agnivade