Skip to content

Self-Hosting Server

SocketXP IoT Management Platform server can be self-hosted in your data center or private/public cloud as a Virtual Machine(VM) instance.

The server is called SocketXP Gateway(socketxp-gtwy).

Download and Install

Download and install the SocketXP Gateway binary package for your Linux distribution as shown below:

Redhat/Centos/Fedora

curl -O https://portal.socketxp.com/download/socketxp-gtwy/socketxp-gtwy-2.0.1-1.x86_64.rpm
sudo yum install ./socketxp-gtwy-2.0.1-1.x86_64.rpm

Debian/Ubuntu

curl -O https://portal.socketxp.com/download/socketxp-gtwy/socketxp-gtwy_2.0.1-1_amd64.deb
sudo apt install ./socketxp-gtwy_2.0.1-1_amd64.deb

Note

After installation, socketxp-gtwy server will be running in the background as a Linux systemd service. The systemd service configuration file can be found at: /etc/systemd/system/socketxp-gtwy.service. The log file can be found under /var/lib/socketxp-gtwy/log/

Server Configuration

Create a configuration file named config.json under the folder /var/lib/socketxp-gtwy/ with the following configurations:

{
    "gateway_domain":"gateway.socketxp.example.com",
    "gateway_port":9443,
    "oidc_providers": [
            {
                "name": "microsoft",
                "client_id": "xxxxxxxxxx",
                "client_secret": "xxxxxxxxxxx",
            }
    ]
} 
Register SocketXP Gateway as an OIDC client app with your OIDC SSO provider, say microsoft or google. How to do this is specific to your OIDC SSO provider and outside the scope of this documentation.

Use https://your-socketxp-portal-domain-name/api/logincallback as the OIDC client app's login callback API.

For this example, we'll register https://portal.socketxp.example.com/api/logincallback as the login callback API with the OIDC provider - Microsoft 365 or Google G-Suite.

Replace the client_id and client_secret in the above config file with the OIDC client app credentials provided by your OIDC SSO provider for the app.

Server SSL Certificate and Key

Register your server's wildcard domain name (*.socketxp.example.com) with Let'sEncrypt or any SSL certificate authority(CA) and get an SSL certificate/key pair for your server's wildcard domain name (*.socketxp.example.com).

Store the server's certificate chain file and the private key file as server.crt and server.key under the /var/lib/socketxp-gtwy folder.

License File

We offer a 30-day free trial license for our Enterprise Version software.

To create an Enterprise Free Trial License, login to the SocketXP Cloud Gateway in the US region at: https://portal.socketxp.com/ using your email ID.

Go to the License tab, click the "Start Free Trial" button. Fill in your organization details and requirements in the form and click the "Create Free Trial License" button. An new Free Trial License will be created.

Click the "Download License File" button to download the license file. Copy the license.pem file to /var/lib/socketxp-gtwy folder in your self-hosted VM server.

Restart the server

After you save the configuration file, restart the socketxp-gtwy server to pickup the above configuration changes, using the command shown below:

systemctl restart socketxp-gtwy

Access the web portal

Access the server's web portal by pointing your browser to https://portal.socketxp.example.com. Login using your SSO credentials as a primary admin user.

Now you can provide your team members access to the server, by adding their email IDs in the MyTeam page.

Your server is now ready to accept any device registration requests.

Accessing the APIs

Your SocketXP Gateway server's APIs can be accessed using the following subdomain URL:

https://api.socketxp.example.com

The API endpoints are same as the ones documented in the API Reference Guide.

For example, to list the devices in your account:

curl https://api.socketxp.example.com/v1/devices/:page_num/:rows_per_page \
  -X GET \
  -H "Authorization: Bearer <your-auth-token-goes-here>" 

Any Questions?

Please write to [email protected], if you have any questions.