# Grafana Windows Development

**URL:** <https://community.grafana.com/t/grafana-windows-development/47078>\
**Category:** Developers & API\
**Created:** [May 5, 2021, 12:51pm UTC](https://community.grafana.com/t/grafana-windows-development/47078 "2021-05-05T12:51:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![besimsuljic](https://avatars.discourse-cdn.com/v4/letter/b/f05b48/32.png) [@besimsuljic](https://community.grafana.com/u/besimsuljic)\
**Post date:** [May 5, 2021, 12:51pm UTC](https://community.grafana.com/t/grafana-windows-development/47078/1 "2021-05-05T12:51:58Z")

</div>

Hello Everyone I got a Question Regarding Grafana Development on Windows Especialy on How get a Windows Executable from The Build Proccess. I already set up my Enviroment with WSL. And I went through the Documentation

> **[How to set up a Grafana development environment on a Windows PC using WSL](https://grafana.com/blog/2021/03/03/how-to-set-up-a-grafana-development-environment-on-a-windows-pc-using-wsl/)**
>
> A step-by-step guide to running Grafana on a Windows PC using the Linux runtime environment.

And Everything seems to Work Fine The Build Proccess runs without errors And i Get the Linux Executables out. the only thing that is left is the Problem that i Have no Idea on How to Get a Windows Executable from this Could you please Help me.

---

<div class="post-metadata">

**Author:** ![anon15813046](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@anon15813046](https://community.grafana.com/u/anon15813046)\
**Post date:** [May 5, 2021, 2:10pm UTC](https://community.grafana.com/t/grafana-windows-development/47078/2 "2021-05-05T14:10:24Z")

</div>

Hi @besimsuljic,  
If you’re looking to build a Grafana windows binary, then I would suggest you take a look at this [README](https://github.com/grafana/grafana/blob/master/contribute/developer-guide.md#building-on-windows) file on the Grafana repository.  
Since you have WSL already set up on your machine, try run `make build-go`. This builds the Grafana binary on your windows machine. The Grafana binaries will be in `bin\windows-amd64`.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![besimsuljic](https://avatars.discourse-cdn.com/v4/letter/b/f05b48/32.png) [@besimsuljic](https://community.grafana.com/u/besimsuljic)\
**Post date:** [May 5, 2021, 2:30pm UTC](https://community.grafana.com/t/grafana-windows-development/47078/3 "2021-05-05T14:30:45Z")

</div>

Hi Uche thank you for your Quick Response. Should I Run the make build-go Command in my WSL Enviroment or from Windows

V V sre., 5. maj 2021 ob 16:20 je oseba Uche via Grafana Labs Community Forums \<[grafana@discoursemail.com](mailto:grafana@discoursemail.com)\> napisala:

---

<div class="post-metadata">

**Author:** ![besimsuljic](https://avatars.discourse-cdn.com/v4/letter/b/f05b48/32.png) [@besimsuljic](https://community.grafana.com/u/besimsuljic)\
**Post date:** [May 5, 2021, 2:32pm UTC](https://community.grafana.com/t/grafana-windows-development/47078/4 "2021-05-05T14:32:45Z")

</div>

Here is the Response from the Build Process it Automaticly Targets the Linux Enviroment.  
build go files  
GO111MODULE=on go run build.go build  
Version: 7.5.0-pre, Linux Version: 7.5.0, Package Iteration: 1620224881pre  
rm -r ./bin/linux-amd64/grafana-server  
rm -r ./bin/linux-amd64/grafana-server.md5  
go version  
go version go1.16.2 linux/amd64  
Targeting linux/amd64  
go build -ldflags -w -X main.version=7.5.0-pre -X main.commit=6a97236b7a -X main.buildstamp=1616789583 -X main.buildBranch=master -o ./bin/linux-amd64/grafana-server ./pkg/cmd/grafana-server  
rm -r ./bin/linux-amd64/grafana-cli  
rm -r ./bin/linux-amd64/grafana-cli.md5  
go version  
go version go1.16.2 linux/amd64  
Targeting linux/amd64  
go build -ldflags -w -X main.version=7.5.0-pre -X main.commit=6a97236b7a -X main.buildstamp=1616789583 -X main.buildBranch=master -o ./bin/linux-amd64/grafana-cli ./pkg/cmd/grafana-cli

V V sre., 5. maj 2021 ob 16:30 je oseba Besim Suljic \<[besim.suljic@gmail.com](mailto:besim.suljic@gmail.com)\> napisala:

---

<div class="post-metadata">

**Author:** ![anon15813046](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@anon15813046](https://community.grafana.com/u/anon15813046)\
**Post date:** [May 5, 2021, 4:05pm UTC](https://community.grafana.com/t/grafana-windows-development/47078/5 "2021-05-05T16:05:27Z")

</div>

@besimsuljic  
I think you should try running this on your windows command-line environment instead: `go run build.go build`. But I think this might require you to install GCC on your windows machine as outlined in the README file I mentioned earlier.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![besimsuljic](https://avatars.discourse-cdn.com/v4/letter/b/f05b48/32.png) [@besimsuljic](https://community.grafana.com/u/besimsuljic)\
**Post date:** [May 5, 2021, 4:21pm UTC](https://community.grafana.com/t/grafana-windows-development/47078/6 "2021-05-05T16:21:38Z")

</div>

I will try it thank you a lot for the help and the quick response.

Best Regards

---

<div class="post-metadata">

**Author:** ![anon15813046](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@anon15813046](https://community.grafana.com/u/anon15813046)\
**Post date:** [May 5, 2021, 4:42pm UTC](https://community.grafana.com/t/grafana-windows-development/47078/7 "2021-05-05T16:42:56Z")

</div>

@besimsuljic If my suggestion above doesn’t work, then you should run this command on your WSL environment: `env GOOS=windows GOARCH=amd64 go build build.go`.  
Hope that helps!

---

<div class="post-metadata">

**Author:** ![besimsuljic](https://avatars.discourse-cdn.com/v4/letter/b/f05b48/32.png) [@besimsuljic](https://community.grafana.com/u/besimsuljic)\
**Post date:** [May 6, 2021, 7:27am UTC](https://community.grafana.com/t/grafana-windows-development/47078/8 "2021-05-06T07:27:42Z")

</div>

Hy Uche Thanks a lot for your Support it Works as Expected I had a little strugle with the GCC Compiler but in the End It is Done Thanks a lot.

Best Regards

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/grafana/original/2X/e/ef5308cc58c9e5a13187b5012eb99f406928462f.png) [@system](https://community.grafana.com/u/system)\
**Post date:** [May 6, 2022, 7:28am UTC](https://community.grafana.com/t/grafana-windows-development/47078/9 "2022-05-06T07:28:26Z")

</div>

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