# Tangled.sh Knot These are the config files for the Tangled knot hosted at [knot.ionchy.ca](https://knot.ionchy.ca), built using [knot-docker](https://tangled.sh/@ionchy.ca/knot-docker). Detailed instructions on hosting a knot can be found at [knot-hosting](https://tangled.sh/@tangled.sh/core/blob/master/docs/knot-hosting.md). ## Docker installation These instructions assume a user `www-data` on the host for Docker to use. 1. In `knot-docker` directory, create Docker image with `docker build -t knot:latest --build-arg TAG=master --build-arg UID=$(id -u www-data) --build-arg GID=$(id -u www-data) .` 2. In this directory, create bind mount directories with `mkdir keys repositories server` 3. Ensure `repositories` and `server` are owned by `www-data` with `chown www-data:www-data repositories server` 4. Edit `docker-compose.yml` with appropriate `KNOT_SERVER_HOSTNAME` and `KNOT_SERVER_OWNER` 5. Create Docker container with `docker-compose up -d` 6. Knot is now ready for reverse proxy from `KNOT_SERVER_HOSTNAME:443` to local port 5555 (knot verification will not work over HTTP port 80!) 7. [Optional] Remove Docker build image with `docker image prune` and untag parent image with `docker rmi alpine:latest` ## Repository troubleshooting * SSH keys must be added to Tangled *after* the knot is created for it to pick them up. Run `docker exec knot knot keys` to verify the keys. * Git remote URLs must be of the form `ssh://git@KNOT_SERVER_HOSTNAME:2222/KNOT_SERVER_OWNER/REPO` since the container exposes port 2222 for Git. Remember to allow the port through your firewall.