Community maintained Docker config for the knot server

Knot Docker#

IMPORTANT This is a community maintained repository, support is not guaranteed.

Docker container and compose setup to run a Tangled knot and host your own repository data.

Pre-built Images#

There is a repository of pre-built images for tags starting at v1.4.0-alpha if you prefer.

docker pull tngl/knot:latest

Note that these are not official images, you use them at your own risk.

Building The Image#

By default the Dockerfile will build the latest tag, but you can change it with the TAG build argument.

docker build -t knot:latest --build-arg TAG=master .

The command above for example will build the latest commit on the master branch.


When using compose, it can be specified as a build argument which will be passed to the builder.

build:
  context: .
  args: { TAG: master }

This will for example tell docker to build it using the master branch like the command.

Setting Up The Image#

The simplest way is to add the following to an .env file:

export KNOT_SERVER_HOSTNAME=example.com
export KNOT_SERVER_OWNER=did:plc:yourdidgoeshere
export KNOT_SERVER_PORT=443

Then use the provided compose file and run the following:

docker compose up -d

If it does not run you, might have to manually chown the server/ directory.

This will setup everything for you including a reverse proxy.