Compile for other OS/Architecture

in the earlier versions of caddy the readme lined out that you can run build.go with the -goos and -goarch to compile for other platforms.

with the v1 release the entire process changed with the build.go apparently no longer being involved. so how does one now compile for other platforms? or has that sadly become impossible and one needs to install go on any target platform one may want?

It’s even simpler now, just follow the instructions on the README:

Cross-compiling Go isn’t a Caddy-specific question, but all you have to do is set the environment variables GOOS and GOARCH to the values you need.

okay, I was just confused because the instructions were gone.

although personally I think it was slightly easier hitting the compile for multiple platforms with the 2 as parameters, rather than having to poke around in the control panel for the environment variables.

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