Updating ThingWorx AppKeys > For Windows > Update a ThingWorx AppKey for Analytics Server – Manual Process
Update a ThingWorx AppKey for Analytics Server – Manual Process
When you need a new ThingWorx AppKey, use the procedure below to manually update and encrypt the key. If you are using Analytics Server version 8.4.4 or later, you can use an easier scripted process to encrypt the new key. For more information, see Update a ThingWorx AppKey – Scripted Process.
1. Log into ThingWorx Composer, as an Administrator, and create a new AppKey. For more information, see the Application Keys section of the ThingWorx Help Center.
* 
The Application Key you provide to ThingWorx Analytics must be a key assigned to a user with Administrator privileges. After installation, the Application Key can be reassigned to a non-administrator user who has the appropriate permissions. See ThingWorx Application Key Permission Levels.
The same key can be used for both Analytics Server and Platform Analytics.
2. On the Windows computer where your ThingWorx Analytics is installed, open the Windows PowerShell, or a Command Prompt, in Administrator mode and navigate to the properties file at the following path:
C:\Program Files (x86)\ThingWorxAnalytics\Thingworx_Analytics_Server\config\system-environment-variables.properties
3. In the #keyStore section, make note of the following alphanumeric folder names that are randomly assigned during ThingWorx Analytics installation:
key.store.directory
key.store.password.directory
key.store.password.file
key.store.file
Example folder names:
Keystore folders
4. Navigate to the C:\Program Files (x86)\ThingWorxAnalytics\Thingworx_Analytics_Server directory.
5. Run the following command, replacing the angle brackets with the randomly assigned alphanumeric folder names:
java -cp css-security-bin.jar com.thingworx.analytics.css.security.encryption.Encryptor <new_thingworx_appkey> <key.store.password.directory> <key.store.directory> <key.store.password.file> <key.store.file> twxAnalyticsAppKey
Example command:
java -cp css-security-bin.jar com.thingworx.analytics.css.security.encryption.Encryptor 947845b6-96ce-4d96-ae21-ba35818dc702 /C:/PROGRA~2/THINGW~1/THINGW~1/988f188b /C:/PROGRA~2/THINGW~1/THINGW~1/d18429a3 e3bb250 cd0e1544 twxAnalyticsAppKey
6. Do one of the following to restart the ThingWorx Analytics services:
From the installation bin directory, run the following command: .\twas.ps1 restart.
From the Windows Start menu, navigate to ThingWorx Analytics Server, right-click on the Restart option, and select Run As Administrator.
It might take several seconds for the Things in ThingWorx to refresh and reconnect.
Was this helpful?