Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/web-servers/caddy/compile-caddy-from-source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,19 @@ Caddy has recently updated their license, clearly defining what is considered pe

You will need a current version of Go on your Linode. Read our guide on [installing Go](/docs/development/go/install-go-on-ubuntu/).

1. Pull Caddy from the source. If you followed our guide on installing Go, the `$GOPATH` is `/usr/local/go`, otherwise use `$GOPATH/drc`
1. Print your Go installation's current `$GOPATH`:

go env GOPATH

1. Pull Caddy from the source. Replace `$GOPATH` with the path retrieved in the previous step.

cd $GOPATH/src
go get -u github.com/mholt/caddy
go get -u github.com/caddyserver/builds

2. Navigate to the Caddy directory and start the build:

cd $GOPATH/src/go/src/github.com/mholt/caddy
cd $GOPATH/src/github.com/mholt/caddy/caddy
go run build.go -goos=linux -goarch=amd64

3. When the build finishes you will have a Caddy binary in the current directory. Move the binary to `/usr/bin` so that Caddy can function correctly:
Expand Down