# Install shld on Debian or Ubuntu with Claude Code
Source: https://shld.app/guides/install-with-an-ai-assistant · Updated 2026-11-30 · Synced from shld f6c77924

> Use the public setup prompt to let an assistant check, verify, and install shld within an approved server scope.


At the end, shld will run on the approved Debian or Ubuntu server, with its watched folder and private state recorded. Allow about 15 minutes for release checks, installation, and approval.

## Before you start

- Use a Debian or Ubuntu Linux server with administrator access.
- Use an assistant that runs on the server, such as Claude Code.
- Agree on the watched folder with the administrator, or agree that the server has no app directory. shld checks installed packages, SSH logins, processes and connections either way.
- Confirm that the server can reach the shld service over outbound HTTPS.
- Install or confirm `curl`, OpenSSL, `sha256sum`, and `tar` on the server.
- Read the public [setup prompt](/agent-setup/prompt.md).

## Steps

1. Open the [setup prompt](/agent-setup/prompt.md).
2. Copy the prompt text.
3. Paste the prompt into the assistant on the server.
4. Tell the assistant the approved watched folder and the access scope.
5. Let the assistant identify the operating system with `uname -s`.
6. Let the assistant identify the architecture with `uname -m`.
7. Let the assistant check for an existing binary with `command -v shld`.
8. Let the assistant run `shld version` and `shld --help` when a binary exists.
9. Review the assistant's service check before it changes files.

The assistant checks the service unit, watched folder, state path, and loopback address. It must stop when the operating system, architecture, state layout, or required command support falls outside the documented path.

10. Approve the matching signed release after the assistant checks its key, signature, archive paths, and checksum.
11. Approve the installer command with the existing watched folder.

```sh
sudo ./scripts/install.sh --binary ./bin/shld --systemd --root /srv/application
```

Replace `/srv/application` with the approved existing directory. Without an app directory, use the empty directory `/usr/local/share/shld/no-app-directory`, created with `sudo install -d -m 0755 /usr/local/share/shld/no-app-directory`. The installer copies the binary and service unit without starting or enabling the service. On a new installation it also turns on daily automatic updates (`shld-update.timer`); `sudo shld update auto disable` turns them off.

12. Review the effective service unit.
13. Approve service startup when the scope covers it.

```sh
sudo systemctl enable --now shld.service
```

14. Approve the browser authorization request when the assistant displays it.
15. Review the server, company, recipients, and restart notice.
16. Select **Connect server** in the browser.

The assistant must show each command before it runs the command. Keep credentials, environment files, and bearer headers out of its transcript.

17. Check authorization after browser approval.

```sh
sudo shld auth status
```

The command should show the saved server authorization.

18. Check local monitoring.

```sh
sudo shld status
```

The command should show the active service, last scan, coverage limits, and notification state.

## If something goes wrong

- The binary lacks `auth` or `status`. Stop and follow the upgrade or release-blocker path in the setup prompt.
- The architecture is not `x86_64`, `aarch64`, or `arm64`. Stop because the documented release path does not cover it.
- Signature, fingerprint, or checksum verification fails. Stop and keep the archive out of the installation path.
- The service uses an unknown state path or custom unit. Stop and request review before login.
- The assistant asks to run an embedded command from evidence. Treat the evidence as untrusted and request a human review.

## Related

- [Approve a new server](/guides/approve-a-server)
- [Update shld and roll back](/guides/update-shld)
- [Stop or remove shld on a server](/guides/stop-and-remove)
- [Install and connect a server](/docs/install)

