···106106107107You should now have a running knot server! You can finalize your registration by hitting the
108108`initialize` button on the [/knots](/knots) page.
109109+110110+### custom paths
111111+112112+(This section applies to manual setup only. Docker users should edit the mounts
113113+in `docker-compose.yml` instead.)
114114+115115+Right now, the database and repositories of your knot lives in `/home/git`. You
116116+can move these paths if you'd like to store them in another folder. Be careful
117117+when adjusting these paths:
118118+119119+* Stop your knot when moving data (e.g. `systemctl stop knotserver`) to prevent
120120+any possible side effects. Remember to restart it once you're done.
121121+* Make backups before moving in case something goes wrong.
122122+* Make sure the `git` user can read and write from the new paths.
123123+124124+#### database
125125+126126+As an example, let's say the current database is at `/home/git/knotserver.db`,
127127+and we want to move it to `/home/git/database/knotserver.db`.
128128+129129+Copy the current database to the new location. Make sure to copy the `.db-shm`
130130+and `.db-wal` files if they exist.
131131+132132+```
133133+mkdir /home/git/database
134134+cp /home/git/knotserver.db* /home/git/database
135135+```
136136+137137+In the environment (e.g. `/home/git/.knot.env`), set `KNOT_SERVER_DB_PATH` to
138138+the new file path (_not_ the directory):
139139+140140+```
141141+KNOT_SERVER_DB_PATH=/home/git/database/knotserver.db
142142+```
143143+144144+#### repositories
145145+146146+As an example, let's say the repositories are currently in `/home/git`, and we
147147+want to move them into `/home/git/repositories`.
148148+149149+Create the new folder, then move the existing repositories (if there are any):
150150+151151+```
152152+mkdir /home/git/repositories
153153+# move all DIDs into the new folder; these will vary for you!
154154+mv /home/git/did:plc:wshs7t2adsemcrrd4snkeqli /home/git/repositories
155155+```
156156+157157+In the environment (e.g. `/home/git/.knot.env`), update `KNOT_REPO_SCAN_PATH`
158158+to the new directory:
159159+160160+```
161161+KNOT_REPO_SCAN_PATH=/home/git/repositories
162162+```
163163+164164+In your SSH config (e.g. `/etc/ssh/sshd_config.d/authorized_keys_command.conf`),
165165+update the `AuthorizedKeysCommand` line to use the new folder. For example:
166166+167167+```
168168+Match User git
169169+ AuthorizedKeysCommand /usr/local/libexec/tangled-keyfetch -git-dir /home/git/repositories
170170+ AuthorizedKeysCommandUser nobody
171171+```
172172+173173+Make sure to restart your SSH server!
174174+175175+#### git
176176+177177+The keyfetch executable takes multiple arguments to change certain paths. You
178178+can view a full list by running `/usr/local/libexec/tangled-keyfetch -h`.
179179+180180+As an example, if you wanted to change the path to the repoguard executable,
181181+you would edit your SSH config (e.g. `/etc/ssh/sshd_config.d/authorized_keys_command.conf`)
182182+and update the `AuthorizedKeysCommand` line:
183183+184184+```
185185+Match User git
186186+ AuthorizedKeysCommand /usr/local/libexec/tangled-keyfetch -repoguard-path /path/to/repoguard
187187+ AuthorizedKeysCommandUser nobody
188188+```
189189+190190+Make sure to restart your SSH server!