Garden with a linux backend

go get


Garden Linux

A Linux backend for Garden.

You can deploy Garden (inside a Garden container) using the Garden BOSH Release repository.

See the old README for old documentation, caveat lector.

Installing Garden-Linux

Note: the rest of these instructions assume you arranged for the garden-linux code, and dependencies, to be installed in your $GOPATH inside a linux environment, either by following the steps above or through some other mechanism.

The rest of these instructions assume you are running inside an Ubuntu environment (for example, the above vagrant box) with go installed and the code checked out.

  • Build garden-linux

    cd $GOPATH/src/ # assuming your $GOPATH has only one entry
    go build -a -tags daemon -o out/garden-linux
  • Set up necessary directories

    sudo mkdir -p /opt/garden/containers
    sudo mkdir -p /opt/garden/snapshots
    sudo mkdir -p /opt/garden/overlays
    sudo mkdir -p /opt/garden/rootfs
  • (Optional) Set up a RootFS

    If you plan to run docker images instead of using the warden rootfs provider, you can skip this step.

    Follow the instructions at to generate a rootfs, or download one from Extract it to /opt/warden/rootfs (or pass a different directory in the next step).

    sudo tar -xzpf -C /opt/garden/rootfs
  • Run garden-linux

    cd $GOPATH/src/ # assuming your $GOPATH has only one entry
    sudo ./out/garden-linux \
           -depot=/opt/garden/containers \
           -bin=$PWD/old/linux_backend/bin \
           -rootfs=/opt/garden/rootfs \
           -snapshots=/opt/garden/snapshots \
           -overlays=/opt/garden/overlays \
           -listenNetwork=tcp \
           -listenAddr= \
  • Kick the tyres

    The external API is exposed using Garden, the instructions at that repo document the various API calls that you can now make (it will be running at if you followed the above instructions).

External API

The garden-linux executable provides a server which clients can use to perform operations on Garden Linux, such as creating containers and running processes inside containers.

Garden Linux is configured by passing command line flags to the garden-linux executable.

Garden defines the protocol supported by the server and provides a Go API for programmatic access.


Restructure in progress: code in the old/ directory is being replaced with code elsewhere in the repository.

See the Developer's Guide to get started.