> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dezerx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Datalix

> Resell Datalix servers, game servers, Nextcloud and S3 storage through the Datalix reseller API.

![Datalix settings in Spartan](https://mintcdn.com/dezerx/dVNBM3sq4VCh7CKa/public/services/datalix/settings.webp?fit=max\&auto=format\&n=dVNBM3sq4VCh7CKa\&q=85\&s=d108952eaf1c899fa1eba20f811a4bac)

The Datalix module orders the server at Datalix when an invoice is paid, extends it there on every renewal, and gives the customer a full control panel inside Spartan. It ships switched off.

| Datalix product | What the customer gets |
| - | - |
| KVM server | Power, console, reinstall, rescue, backups, SSH keys, ISO images, reverse DNS, hostname, UEFI and TPM |
| Dedicated server, built to order | Power, reinstall, rescue, reverse DNS, with RAM and disk options |
| Dedicated server, ready for sale | A ready machine from the Datalix sale list |
| Game server | Power and the game, version and package you picked |
| Nextcloud | A Nextcloud instance on the customer's domain |
| S3 object storage | Buckets, sized in TB |

## Connect Spartan

**1. Enable the module**

Open Admin, Integrations, Modules and switch Datalix on. Then open its settings.

**2. Paste the API token**

Create a reseller API token with write access in the Datalix customer area and paste it. A read-only token cannot order or open the console. The token is stored encrypted.

**3. Add your account id**

Optional, but recommended. With your Datalix user UUID Spartan can show your credit, warn you when it runs low, and recover an order whose answer got lost.

**4. Test it**

Press Test connection, then Save. Test connection only reads, it never orders anything.

> [!WARNING]
>
> Leave the API URL on [https://backend.datalix.de/v1/](https://backend.datalix.de/v1/). Any other address means orders go to that server instead of Datalix.

## Settings

| Setting | Default | What it does |
| - | - | - |
| Reseller interface id | Empty | When set, suspending also locks the service in that reseller interface |
| Default runtime handling | Match the due date | Match the due date buys just enough days to cover the Spartan due date. Fixed days per cycle buys a set number of days each time |
| Buffer days | 2 | Extra days past the due date, so a late payment never hits an expired server |
| Credit warning window | 7 days | Warns admins when your Datalix credit cannot cover the renewals due in this window |
| Late payment window | 14 days | A renewal paid this long after the Datalix expiry is still extended. After that nothing is bought and admins get an alert |
| On suspend | Stop the server | Stop, shut down cleanly, or leave it running |
| noVNC console | On | Shows the Console tab on KVM servers. Needs the console relay below |
| Ask for a hostname at checkout | Off | Adds an optional hostname field to the order form |
| Upgrade payment field (credit) | Empty | Sent with every upgrade order. Upgrades stay off while it is empty |

> [!NOTE]
>
> Datalix sells runtimes of 30 to 360 days. Longer cycles, like a yearly plan, are covered by the sync, which runs every 30 minutes and tops the server up before it runs out.

## Console relay

The Datalix console only works through a small relay on your own server. The relay signs in to Datalix for the customer, so your reseller API token never reaches a browser. Until a relay is set up, the Console tab tells customers the console is not available.

**1. Enter the relay address**

Open Datalix, Settings, Console relay. Set the relay address to `https://your-panel.com/datalix-console`. When the relay runs on the panel server, also set the panel to relay address to `http://127.0.0.1:8091`. Save.

**2. Install the relay**

Copy the install command shown on the page and run it as root on the server behind the relay address. It needs Node.js 18 or newer and systemd. It starts the `dezerx-datalix-console` service and adds the `/datalix-console/` path to your nginx site. Running it again updates the relay.

**3. Test it**

Press Test relay. It checks that the relay answers, knows the secret, and can reach Datalix.

> [!NOTE]
>
> Behind Cloudflare, make sure no WAF or bot rule blocks websockets on `/datalix-console/`. Generating a new relay secret stops the console until you run the new install command.

## Set up a product

Create a product, open the Module tab and pick Datalix.

![Datalix product module tab](https://mintcdn.com/dezerx/dVNBM3sq4VCh7CKa/public/services/datalix/product.webp?fit=max\&auto=format\&n=dVNBM3sq4VCh7CKa\&q=85\&s=7c1d884fdd2301918cb91b7bb30feb9f)

**1. Pick what to sell**

Choose the Datalix product, then the packet. The list comes live from your reseller account, with the location and your price per 30 days. Sold out packets are marked.

**2. Operating system**

Pick the default OS, and tick Let the customer choose the OS to offer more at checkout.

**3. Resources**

Set the IPv4 addresses, traffic and hostname pattern. `vps{service_id}.example.com` gives every server its own name. Dedicated servers also get RAM, disk and uplink, S3 gets storage in TB.

**4. Customer tools**

Untick anything the customer should not be able to do, like reinstall or ISO images.

Configurable options can change the order per customer. Map an option to the packet id, OS id, IPv4 addresses, traffic, S3 storage or dedicated RAM option. The packet browser on the settings page has a copy button for every packet id.

## What happens and when

| Spartan event | At Datalix |
| - | - |
| Paid order | Orders the server. Each order carries a fixed id, so a retry can never buy a second server |
| Renewal paid | Extends the server by the missing days |
| Suspend | Stops it (or what On suspend says) and locks it when an interface id is set |
| Unsuspend | Unlocks it and starts it again if it was running |
| Terminate | Stops it, turns off both Datalix auto renew modes and unlinks it |
| Upgrade | Orders the upgrade, then moves the product once Datalix shows the new packet |

> [!WARNING]
>
> Datalix has no delete call. A terminated server runs out at its expiry date and Datalix removes it. Unused days are not refunded.

## Managing a service

The Datalix tab on the admin service page shows the Datalix id, status, packet and what it costs you, next to the Datalix expiry and the Spartan due date.

![Datalix tab on the admin service page](https://mintcdn.com/dezerx/dVNBM3sq4VCh7CKa/public/services/datalix/service.webp?fit=max\&auto=format\&n=dVNBM3sq4VCh7CKa\&q=85\&s=c33af325385789177c6ec511306b13b6)

* Resync pulls the latest state from Datalix.
* Extend at Datalix adds days by hand. It costs money, so it asks first.
* Unlink detaches the service without touching anything at Datalix.
* A service that is not linked yet can be linked to a server you already have at Datalix, by its id or from the list of your Datalix services.
* History shows when it was ordered and became ready, plus every extension.

## The customer side

Customers manage the server from the Server group on their service page.

![Datalix server overview in the client area](https://mintcdn.com/dezerx/MtvRmnABC_5aCLVW/public/services/datalix/client.webp?fit=max\&auto=format\&n=MtvRmnABC_5aCLVW\&q=85\&s=79dd3ebe27ca76be67efa838d6725c18)

| Tab | Use |
| - | - |
| Overview | Status, IPs, resources, live usage and power buttons |
| Console | noVNC in the browser |
| Network | IP addresses and reverse DNS |
| Backups | Create, restore and delete backups |
| Reinstall | New OS or the rescue system |
| Access | Root password and SSH keys |
| ISO images | Mount a custom ISO |
| Settings | Hostname, UEFI and TPM |
| Buckets | S3 buckets, for S3 storage |
| Activity | Tasks and incidents |

Tabs only show when the Datalix product supports them and the product allows them.

## Good to know

* Datalix allows 2 orders per 30 seconds. Spartan queues the rest, nothing gets lost.
* Keep enough credit on your Datalix account. Orders and renewals fail when the credit limit is reached, and admins get an alert.
* Upgrades are off until you set the Upgrade payment field. Try one upgrade on a cheap server before you sell them.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.