Skip to main content
If you have Go installed, you can install and run Gate directly using Go’s toolchain. This is ideal for developers or those who want to build from source.

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
Verify your installation:

Quick Install

Install Gate globally using go install:
This will:
  • Download the Gate source code
  • Compile the binary
  • Install it to $GOPATH/bin/gate (typically ~/go/bin/gate)
Make sure $GOPATH/bin is in your PATH:
Run Gate:

Run Without Installation

You can run Gate directly without installing using go run:
This is perfect for:
  • 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:
1

Clone the repository

2

Install dependencies

This downloads all required dependencies specified in go.mod.
3

Build the binary

For a production build with optimizations:
Flags explained:
  • CGO_ENABLED=0 - Static binary without C dependencies
  • -s -w - Strip debug info (smaller binary)
  • -X - Set version information
4

Run the binary

5

(Optional) Install to PATH

Cross-Compilation

Build Gate for different platforms:

Development Workflow

For active development:
1

Clone and enter directory

2

Run in development mode

This rebuilds automatically when you run the command.
3

Run tests

4

Format code

5

Check for issues

See the Developers Guide for comprehensive development documentation.

Module Information

Gate’s Go module details:
View all dependencies:
Update dependencies:

Using Gate as a Library

You can also import Gate as a library in your own Go projects:
Add to your project:

Troubleshooting

Go is not installed or not in your PATH.
  1. Install Go from go.dev/doc/install
  2. Add Go to your PATH:
$GOPATH/bin is not in your PATH.Add it to your shell profile:
Gate requires Go 1.24.1 or later.Update Go:
Check your internet connection and proxy settings:
Clear module cache and retry:
Update and tidy dependencies:

Performance Optimization

For production builds, use these optimizations:
Benefits:
  • 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:
Expected output:

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