Skip to content

Device Key File

SocketXP installs a per device private key file at: /var/lib/socketxp/device.key when you login to the SocketXP Cloud Gateway using the SocketXP login command. This key is used to authenticate the device with the user account. The key is also used to uniquely identify the device and the services running in the device that needs remote access.

If you plan to clone your IoT device OS image into multiple SSD or flash cards, make sure you delete this device.key file before cloning.

If you delete a device from the Devices section in the SocketXP Portal page, you also need to delete the /var/lib/socketxp/device.key file in the device before you could add the device back to your account. Failing which you'll get the following error on your console:

Server Error:  Invalid device key (REclP7PzXMTe61zh3ASa0jd7Y0k3AiF...). Delete device key file at /var/lib/socketxp/device.key and then login again.

Europe Region Users Note:

If you are a Europe region user, use the --region="eu" flag in all the SocketXP commands including socketxp login command, socketxp connect command or any socketxp command, to force your device to connect with the EU gateway. If not, your device will connect with the US gateway(which is the default gateway) and you may get an error as follows "Server Error: Invalid Device Key...".

Credentials are NOT global objects. Credentials are local to the gateway in a region. Credentials include authtokens and device keys.