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