---
title: "Walkthrough: Standalone SDK on Linux & macOS"
description: "Walkthrough: Standalone SDK on Linux"
---

[Skip to content](https://portal.sandgrain.eu/knowledge-base/walkthrough-standalone-sdk-on-linux#main-content)

English

Show submenu for translations

![SandGrain\_Logo\_RGB\_white-bijgesneden (1)](https://portal.sandgrain.eu/hs-fs/hubfs/SandGrain_Logo_RGB_white-bijgesneden%20(1).png?width=427&height=83&name=SandGrain_Logo_RGB_white-bijgesneden%20(1).png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [Contact us](https://portal.sandgrain.eu/login)

[Contact us](https://portal.sandgrain.eu/login?hsLang=en)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://portal.sandgrain.eu/knowledge-base?hsLang=en)
2. [SDK](https://portal.sandgrain.eu/knowledge-base/sdk?hsLang=en)
3. [SandGrain SDK](https://portal.sandgrain.eu/knowledge-base/sdk?hsLang=en#sandgrain-sdk)

October 6, 2026

# Walkthrough: Standalone SDK on Linux & macOS

**Who this is for:** Linux users who want to run the Device, Gateway, and a local Cloud agent on one machine, the fastest way to confirm your hardware and toolchain work.

**What you'll accomplish:** Get a **Mutual Authentication OK** result end to end, without the TrustBridge platform.

**Prerequisites:**

- [*Prerequisites on Linux*](https://portal.sandgrain.eu/knowledge-base/install-prerequisites-on-linux?hsLang=en) completed (build tools, Docker, `dialout` group, logged out and back in).
- [*Get the Code & Run the Setup Script*](https://portal.sandgrain.eu/knowledge-base/get-the-code-run-the-setup-script?hsLang=en) completed (`./setup.sh` has run).
- Your SandGrain Token plugged in and your CyberRock access package on hand.

### Make the scripts executable

```
cd /path/to/SandGrain-SDK chmod +x setup.sh chmod +x run_standalone.sh  
```

### Start the Mosquitto broker

```
For Linux:sudo systemctl enable mosquitto sudo systemctl start mosquittosudo systemctl status mosquitto  For macOS:brew services start mosquittobrew services info mosquitto
```

### Check the serial port

Confirm the serial port is set correctly in both config files:

- `PoC_SDK_v3/poc_sdk_gateway/app/config_poc.h`
- `PoC_SDK_v3/poc_sdk_device/app/config_poc.h`

On Linux, `USB_TTY_PREFIX` and `USB_TTY_PORT` describe your serial device (e.g. `/dev/ttyACM0` → prefix `ACM`, port `0`).

See *USB & Serial Port Setup* if you're unsure.

> **![Terminal showing chmod applied to the setup and run scripts.](https://portal.sandgrain.eu/hs-fs/hubfs/image20-png.png?width=670&height=97&name=image20-png.png)***The scripts made executable with* `chmod +x`*.*

> **![Terminal showing the mosquitto service active.](https://portal.sandgrain.eu/hs-fs/hubfs/image21-png.png?width=670&height=215&name=image21-png.png)***Mosquitto shown active by* `systemctl status mosquitto`*.*

**CRC note:** CRC is disabled by default in this branch (`CRC_ENABLE 0`) for local testing. It's **mandatory outside local testing**, re-enable it with `-DCRC_ENABLE=1`. Don't edit files under `sdk_fw/`.

### Run everything

```
bash run_standalone.sh 
```

The command prompts you for environment variables (CyberRock base URL, Device ID, Cloudflare Access ID/secret, MQTT settings, tenant email/password) and then launches the Gateway, Device, and Cloud agent in separate terminals. These values come from your CyberRock access package, see *Access & Credentials*.

### Grant sudo and watch three terminals open

If the builds succeed, the Gateway and Device need sudo to read the Token's TID. After you provide it, **three terminals open**:

> **![Terminal prompts for environment variables on Linux.](https://portal.sandgrain.eu/hs-fs/hubfs/image22-png.png?width=670&height=285&name=image22-png.png)**The environment-variable prompts from `run_standalone.sh`.

> **![Three Linux terminals running cloud, gateway, and device.](https://portal.sandgrain.eu/hs-fs/hubfs/image23-png.png?width=670&height=315&name=image23-png.png)**The three terminals: Cloud, Gateway, and Device.

- **Left**: the Cloud agent (`sdk_cloud`)
- **Middle**: the Gateway (`poc_sdk_gateway`)
- **Right**: the Device (`poc_sdk_device`)

### Run Mutual Authentication

In the **Device** terminal, enter **Option 1: Mutual Authentication (no fault injection)**.

> **![image](https://portal.sandgrain.eu/hs-fs/hubfs/image.png?width=624&height=349&name=image.png)`Mutual Authentication OK`** in the Device terminal.

### Success shows:

```
Mutual Authentication OK  
```

### Next step

- Want the web UI and device lifecycle? Move on to [*SDK + TrustBridge on Linux & macOS*](https://portal.sandgrain.eu/knowledge-base/walkthrough-sdk-trustbridge-on-linux-macos?hsLang=en).
- Splitting Device and Gateway across machines? See [*Split Deployment on Raspberry Pi*](https://portal.sandgrain.eu/knowledge-base/walkthrough-split-deployment-on-raspberry-pi?hsLang=en).

- [User Documentation](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#main-content)

    - [Quick Starter Guide](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#quick-starter-guide)
    - [User Manual](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#user-manual)
    - [Whitepaper](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#whitepaper)
    - [Token Leaflet](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#token-leaflet)
    - [Claim Token Procedure](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#claim-token-procedure)
    - [Daisy Chain](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#daisy-chain)
    - [Release Note](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#release-note)
    - [Naming Convention](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#naming-convention)
    - [SandGrain SDK](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#sandgrain-sdk)
    - [TrustBridge](https://portal.sandgrain.eu/knowledge-base/user-documentation?hsLang=en#trustbridge)
- [API Documentation](https://portal.sandgrain.eu/knowledge-base/api-documentation?hsLang=en#main-content)

    - [Device API Integration](https://portal.sandgrain.eu/knowledge-base/api-documentation?hsLang=en#device-api-integration)
    - [Daisy Chain and Attestation](https://portal.sandgrain.eu/knowledge-base/api-documentation?hsLang=en#daisy-chain-and-attestation)
- [SDK](https://portal.sandgrain.eu/knowledge-base/sdk?hsLang=en#main-content)

    - [Core Functions](https://portal.sandgrain.eu/knowledge-base/sdk?hsLang=en#core-functions)
    - [SandGrain SDK](https://portal.sandgrain.eu/knowledge-base/sdk?hsLang=en#sandgrain-sdk)

[![SandGrain\_Logo\_RGB\_white-bijgesneden (1)-1](https://portal.sandgrain.eu/hs-fs/hubfs/SandGrain_Logo_RGB_white-bijgesneden%20(1)-1.png?width=427&height=83&name=SandGrain_Logo_RGB_white-bijgesneden%20(1)-1.png "SandGrain_Logo_RGB_white-bijgesneden (1)-1")](https://portal.sandgrain.eu/?hsLang=en)

<https://www.facebook.com/> <https://www.twitter.com/> <https://www.instagram.com/> <https://podcasts.apple.com/> [mailto:email@email.com](mailto:email@email.com)

Copyright © 2026, sandgrain.eu