Prerequisites
Ensure you have the following installed:Go
Version 1.24.1 or laterDownload from go.dev/doc/install
Git
For cloning the repository (optional)Install from git-scm.com
Quick Install
Install Gate globally usinggo install:
- Download the Gate source code
- Compile the binary
- Install it to
$GOPATH/bin/gate(typically~/go/bin/gate)
Run Without Installation
You can run Gate directly without installing usinggo run:
- Testing Gate without installing
- Running different versions side-by-side
- CI/CD pipelines
- Development environments
Go downloads and caches modules locally, so subsequent runs are much faster.
Install Specific Version
Install a specific version or commit:Build from Source
For development or custom builds:Build the binary
CGO_ENABLED=0- Static binary without C dependencies-s -w- Strip debug info (smaller binary)-X- Set version information
Cross-Compilation
Build Gate for different platforms:Development Workflow
For active development:Module Information
Gate’s Go module details:Using Gate as a Library
You can also import Gate as a library in your own Go projects:Troubleshooting
go: command not found
go: command not found
Go is not installed or not in your PATH.
- Install Go from go.dev/doc/install
-
Add Go to your PATH:
gate: command not found after install
gate: command not found after install
$GOPATH/bin is not in your PATH.Add it to your shell profile:Build fails with 'go version too old'
Build fails with 'go version too old'
Gate requires Go 1.24.1 or later.Update Go:
Module download errors
Module download errors
Check your internet connection and proxy settings:Clear module cache and retry:
Build errors with dependencies
Build errors with dependencies
Update and tidy dependencies:
Performance Optimization
For production builds, use these optimizations:- Fully static binary (no external dependencies)
- Smaller binary size (stripped symbols)
- Better portability
- Suitable for containers (distroless, scratch)
Verify Installation
Check that Gate is installed correctly:Next Steps
Quick Start
Get your proxy running
Configuration
Customize Gate settings
Developers Guide
Contribute to Gate or build plugins
Binary Installation
Install pre-built binaries instead

