---
title: Get the Code & Run the Setup Script
description: Get the Code & Run the Setup Script, SDK Code Access
---

[Skip to content](https://portal.sandgrain.eu/knowledge-base/get-the-code-run-the-setup-script#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

# Get the Code & Run the Setup Script

**Who this is for:** Everyone, on every platform, after installing prerequisites.

**What you'll accomplish:** Clone the repository on the correct branch, confirm the folder layout, and run the one-time setup script that prepares your machine.

**Prerequisites:** Finish *Prerequisites on [Windows](https://portal.sandgrain.eu/knowledge-base/install-prerequisites-on-windows?hsLang=en) / [Linux](https://portal.sandgrain.eu/knowledge-base/install-prerequisites-on-linux?hsLang=en) / [macOS](https://portal.sandgrain.eu/knowledge-base/install-prerequisites-on-macos?hsLang=en)* first. You'll also need your repository URL from your team and (soon) your CyberRock access package.

### Clone the repository

Pick a working directory and clone the [**`release/v3.6.0`**](https://github.com/SandGrain-CyberRock/SandGrain-TrustBridgeSDK/tree/release/v3.6.0) & [**`release/v3.6.1`**](https://github.com/SandGrain-CyberRock/SandGrain-TrustBridgeSDK/tree/release/v3.6.1) (For BLE) branch of the `SandGrain-TrustBridgeSDK` repository. When prompted, log in to Git with your username and a **personal access token** (not a password).

#### **Windows (PowerShell):**

```
mkdir C:\dev\trustbridge cd C:\dev\trustbridge git clone -b release/v3.6.(0/1) <SandGrain-TrustBridgeSDK-repo-url>
```

#### **Linux / macOS / Raspberry Pi:**

```
mkdir -p ~/dev/trustbridge cd ~/dev/trustbridge git clone -b release/v3.6.(0/1) <SandGrain-TrustBridgeSDK-repo-url>
```

Replace `<SandGrain-TrustBridgeSDK-repo-url>` with the actual URL from your team.

### Confirm the folder layout

The repository is a single repo containing both the SDK and the TrustBridge platform. It should look like this:

```
SandGrain-TrustBridgeSDK/ ├── SandGrain-SDK/ └── TrustBridge/         ├── TrustBridge-BE/         └── TrustBridge-FE/
```

**If you downloaded a ZIP instead of cloning:** extraction produces a double-nested folder with a branch-name suffix (e.g. `SandGrain-TrustBridgeSDK-release-v3.6.0/SandGrain-TrustBridgeSDK-release-v3.6.0/`). Move the inner folder up one level and remove the `-release-v3.6.0` suffix so the names match the listing above, otherwise the scripts can't find `docker-compose.yml`.

### Confirm you're on the right branch bash

```
git branch    # should show: release/v3.6.(0/1)
```

### Run the setup script (once per clone)

The setup script prepares your machine: it installs the C build tools, the Mosquitto MQTT broker, and tmux at the system level, then builds an isolated Python environment for the Cloud SDK. **It does not build the firmware or run anything**, it just gets the machine ready so the launchers can run.

#### **Windows (PowerShell):**

```
cd "\path\to\SandGrain-SDK" .\setup.ps1
```

`setup.ps1` is a thin wrapper that invokes `setup.sh` inside WSL.

If PowerShell blocks it with *"running scripts is disabled"*, allow it for the session: `Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass`

#### **Linux / macOS / Raspberry Pi:**

```
cd /path/to/SandGrain-SDK chmod +x setup.sh          Run:./setup.sh           ->for Linux / Raspberry Pi./setup.sh --no-apt  ->for macOS
```

**What the setup script installs**

- **System packages (via apt):** `build-essential`, `libmosquitto-dev`, `mosquitto`, `mosquitto-clients`, `python3` / `python3-venv` / `python3-pip`, and `tmux` (used to run processes in panes).
- **Python virtual environment:** created at `PoC_SDK_v3/sdk_cloud/venv`.
- **Python dependencies:** `python-dotenv`, `paho-mqtt`, `aiohttp`, `cryptography`, plus the local Cloud SDK as an editable install (`pip install -e`), so changes to the SDK source take effect without reinstalling.

The script is **re-runnable**. Pass `--no-apt` to skip installing system packages (useful if you installed equivalents manually).

### Make the launcher scripts executable (Linux / macOS / Pi)

Most clones preserve the executable bit; this is a belt-and-braces step:

```
chmod +x setup.sh run_device.sh run_gateway.sh run_all.sh run_standalone.sh
```

### Next step

Pick your walkthrough from [*Choosing Your Setup Path*](https://portal.sandgrain.eu/knowledge-base/choosing-your-setup-path?hsLang=en):

- [*Standalone SDK on Windows* / *on Linux*](https://portal.sandgrain.eu/knowledge-base/walkthrough-standalone-sdk-on-linux?hsLang=en)
- [*SDK + TrustBridge on Windows* / *on Linux & macOS*](https://portal.sandgrain.eu/knowledge-base/walkthrough-sdk-trustbridge-on-linux-macos?hsLang=en)
- [*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