Skip to main content

Quick Start


The version of kratos must be v2.0.0 or above.

Environment Requirements

These environments and tools must be installed properly.

The GO111MODULE should be enabled.

go env -w GO111MODULE=on

If you faced with network problem (especially you are in China Mainland), please setup GOPROXY

Install Kratos tool

You can do it either way.

1. go install installation

go install

2. Source code compilation and installation

git clone
cd kratos
make install

Project Creation

# create project's layout
kratos new helloworld

cd helloworld
# pull dependencies
go mod download

Compilation and Running

# installation dependency
go get
# generate all codes of proto and wire etc.
go generate ./...

# run the application
kratos run

Try it out

curl ''

The response should be
"message": "Hello kratos"

Project Layout

Kratos CLI always pull the layout project from GitHub for project creation. The layout project is: