# Custom path to the license file

Use this guide to change the default license directory to a custom one.

1\. Install the latest package using the [Installation](/v6.12.0/deployment/installation.md) guides.

Skip the license activation step.

2\. After successful installation, stop AppServer.

3\. Navigate to the AppServer folder and open the **AppServerX.xml** file for editing.

4\. Add the **PathToServiceFilesDirectory** tag to the root tag of **AppServerX.xml**.

This sets the base directory for the license file and other service data (for example, **Resources/**).

{% tabs %}
{% tab title="Linux" %}
Default path:

* **/var/lib/WebSpellChecker/**

Example:

```xml
<!-- Example: use a custom directory for service files -->
<PathToServiceFilesDirectory>/opt/License</PathToServiceFilesDirectory>
```

{% endtab %}

{% tab title="Windows" %}
Default path:

* **C:/ProgramData/WebSpellChecker/**

Example:

```xml
<!-- Example: use a custom directory for service files -->
<PathToServiceFilesDirectory>C:/License</PathToServiceFilesDirectory>
```

{% endtab %}
{% endtabs %}

5\. Save changes and start AppServer for the changes to take effect.

6\. Activate licensing using one of the [Licensing](/v6.12.0/deployment/licensing.md) guides.

{% hint style="success" %}
Upon successful license activation, you should find **license.xml** here:

* **\<PathToServiceFilesDirectory>/license/license.xml**
  {% endhint %}

{% hint style="warning" %}
`PathToServiceFilesDirectory` changes the base path for other service files too.

It also changes the location of additional **Resources**, including Hunspell dictionaries.

If you change `PathToServiceFilesDirectory`, move the **Resources/** directory into the new location:

{% tabs %}
{% tab title="Linux" %}
From the default Resources path:

* **/var/lib/WebSpellChecker/Resources/**

To the new path:

* **\<PathToServiceFilesDirectory>/WebSpellChecker/Resources/**
  {% endtab %}

{% tab title="Windows" %}
From the default Resources path:

* **C:/ProgramData/WebSpellChecker/Resources/**

To the new path:

* **\<PathToServiceFilesDirectory>/WebSpellChecker/Resources/**
  {% endtab %}
  {% endtabs %}
  {% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.wproofreader.com/v6.12.0/deployment/licensing/custom-path-to-the-license-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
