···
You should now have a running knot server! You can finalize your registration by hitting the
`initialize` button on the [/knots](/knots) page.
112
+
(This section applies to manual setup only. Docker users should edit the mounts
113
+
in `docker-compose.yml` instead.)
115
+
Right now, the database and repositories of your knot lives in `/home/git`. You
116
+
can move these paths if you'd like to store them in another folder. Be careful
117
+
when adjusting these paths:
119
+
* Stop your knot when moving data (e.g. `systemctl stop knotserver`) to prevent
120
+
any possible side effects. Remember to restart it once you're done.
121
+
* Make backups before moving in case something goes wrong.
122
+
* Make sure the `git` user can read and write from the new paths.
126
+
As an example, let's say the current database is at `/home/git/knotserver.db`,
127
+
and we want to move it to `/home/git/database/knotserver.db`.
129
+
Copy the current database to the new location. Make sure to copy the `.db-shm`
130
+
and `.db-wal` files if they exist.
133
+
mkdir /home/git/database
134
+
cp /home/git/knotserver.db* /home/git/database
137
+
In the environment (e.g. `/home/git/.knot.env`), set `KNOT_SERVER_DB_PATH` to
138
+
the new file path (_not_ the directory):
141
+
KNOT_SERVER_DB_PATH=/home/git/database/knotserver.db
146
+
As an example, let's say the repositories are currently in `/home/git`, and we
147
+
want to move them into `/home/git/repositories`.
149
+
Create the new folder, then move the existing repositories (if there are any):
152
+
mkdir /home/git/repositories
153
+
# move all DIDs into the new folder; these will vary for you!
154
+
mv /home/git/did:plc:wshs7t2adsemcrrd4snkeqli /home/git/repositories
157
+
In the environment (e.g. `/home/git/.knot.env`), update `KNOT_REPO_SCAN_PATH`
158
+
to the new directory:
161
+
KNOT_REPO_SCAN_PATH=/home/git/repositories
164
+
In your SSH config (e.g. `/etc/ssh/sshd_config.d/authorized_keys_command.conf`),
165
+
update the `AuthorizedKeysCommand` line to use the new folder. For example:
169
+
AuthorizedKeysCommand /usr/local/libexec/tangled-keyfetch -git-dir /home/git/repositories
170
+
AuthorizedKeysCommandUser nobody
173
+
Make sure to restart your SSH server!
177
+
The keyfetch executable takes multiple arguments to change certain paths. You
178
+
can view a full list by running `/usr/local/libexec/tangled-keyfetch -h`.
180
+
As an example, if you wanted to change the path to the repoguard executable,
181
+
you would edit your SSH config (e.g. `/etc/ssh/sshd_config.d/authorized_keys_command.conf`)
182
+
and update the `AuthorizedKeysCommand` line:
186
+
AuthorizedKeysCommand /usr/local/libexec/tangled-keyfetch -repoguard-path /path/to/repoguard
187
+
AuthorizedKeysCommandUser nobody
190
+
Make sure to restart your SSH server!