> For the complete documentation index, see [llms.txt](https://docs.luasec.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.luasec.org/licensing/hwid.md).

# HWID locking & resets

Keys are **locked to a device** on first use. This section explains how binding works and how to reset it.

## How binding works

* The loader gathers a hwid via the executor's `gethwid()`.
* On a key's **first** successful run, that HWID is stored on the key.
* Every later run must present the **same** HWID, or it's rejected with `hwid_mismatch`.

If an executor doesn't expose `gethwid()`, the id becomes `unknown-hwid` for that run.

## Resetting a HWID

A user who changes device (or executor) needs their HWID reset. There are three ways (most of them require API key):

| Who              | How                                                                            |
| ---------------- | ------------------------------------------------------------------------------ |
| **You (seller)** | Reset the key's HWID from the dashboard, or via the bot's `/force-resethwid`.  |
| **The user**     | If you enable self-resets, they run `/resethwid` in your Discord.              |
| **Managers**     | Staff with the manager role can reset any user's HWID with `/force-resethwid`. |

Enable user self-resets with the bot:

```
/config resethwid enabled: true
```

See the [command reference](/discord-bot/commands.md) for details.

## Abuse considerations

Frequent self resets can be used to share one key across devices. If you allow self resets, consider:

* Keeping expiry short on shared/ad-reward keys.
* Watching the analytics for a key whose device count churns.
* Banning a key that's clearly being passed around because the leak watermark ties a dump back to it.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.luasec.org/licensing/hwid.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
