Couper Documentation

edge

Running Couper

Couper is available as docker image from Docker Hub

Running Couper requires a working Docker setup on your computer. Please visit the get started guide to get prepared.

To download/install Couper, open a terminal and execute:

$ docker pull coupergateway/couper

Couper needs a configuration file to know what to do.

Create a directory with an empty couper.hcl file.

Copy/paste the following configuration to the file and save it.

server "hello" {
  endpoint "/**" {
    response {
      body = "Hello World!"
    }
  }
}

Now cd into the directory with the configuration file and start Couper in a docker container:

$ docker run --rm -p 8080:8080 -v "$(pwd)":/conf coupergateway/couper
{"addr":"0.0.0.0:8080","level":"info","message":"couper gateway is serving","timestamp":"2020-08-27T16:39:18Z","type":"couper"}

Now Couper is serving on your computer's port 8080. Point your browser or curl to localhost:8080 to see what's going on.

Press Ctrl + C to stop the container.

The following section will give you an introduction into Couper's configuration file.

If you prefer to learn about Couper by checking out certain features, visit the example repository.