# LICENSE.RELOAD

> Load the license file again, from the configured path or from a new one.

URL: https://docs.hotkv.com/commands/license-reload/

```
LICENSE.RELOAD [path]
```

- Group: License
- Complexity: O(1)
- HotKV Cloud: all plans
- On-Premise: no license needed

`LICENSE.RELOAD` reads the license file again and applies it at once,
without a restart. Without an argument it reads the configured file
(`license-path` in `hotkv.conf`, `license_path` under `[enterprise]` in
`hotkv.toml`); with `path`, it reads that file instead. Use it after you
replace the license file with a renewed one.

While a license is in force, a reload goes through the same check as
[LICENSE.SET](https://docs.hotkv.com/commands/license-set/index.md): a file that cannot be read, or a license
that is not usable on this server, is refused and the license already in force
stays in force, so a mistyped path cannot take the server's licensed commands
away. A good file replaces the license in force.

When no usable license is in force, the command succeeds whenever the file
could be read, even if the license in it is not usable: check the result
with [LICENSE.INFO](https://docs.hotkv.com/commands/license-info/index.md). It
cannot be called from a script.

## Return value

Simple string `OK` in RESP2 and RESP3, or one of these errors:

| Case | Error |
| --- | --- |
| No path given and none configured | `ERR no license path configured` |
| A license is in force, and the file could not be read or is not usable here | `ERR license not reloaded:` followed by the reason. The license in force stays. |
| No license is in force, and the file could not be loaded | `ERR` followed by the reason |

## Examples

```
127.0.0.1:6379> LICENSE.RELOAD
OK
127.0.0.1:6379> LICENSE.RELOAD /etc/hotkv/hotkv.license
OK
127.0.0.1:6379> LICENSE.RELOAD /etc/hotkv/no-such-file.license
(error) ERR license not reloaded: cannot open license file: /etc/hotkv/no-such-file.license
```

The license in force is unchanged after the error: [LICENSE.INFO](https://docs.hotkv.com/commands/license-info/index.md) still shows it in force.

## Compatibility

HotKV-only command.

## See also

[LICENSE.SET](https://docs.hotkv.com/commands/license-set/index.md), [LICENSE.INFO](https://docs.hotkv.com/commands/license-info/index.md),
[On-Premise quick start](https://docs.hotkv.com/quickstart-onpremise/index.md)