> For the complete documentation index, see [llms.txt](https://nodersua.gitbook.io/about-nodersua/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nodersua.gitbook.io/about-nodersua/archive/taiko/enable-an-sgx-prover.md).

# Enable an SGX prover

Run `cpuid` and `grep` for SGX:

```bash
cpuid | grep -i sgx
```

<figure><img src="/files/213SmpZGYJq0KijhXQJG" alt=""><figcaption></figcaption></figure>

#### Modern Linux kernel

Starting with Linux kernel version [`5.11`](https://www.intel.com/content/www/us/en/developer/tools/software-guard-extensions/linux-overview.html), the kernel provides out-of-the-box support for SGX. However, it doesn't support [EDMM](https://gramine.readthedocs.io/en/stable/manifest-syntax.html#edmm) (Enclave Dynamic Memory Management), which Raiko requires. EDMM support first appeared in Linux `6.0`, so ensure that you have Linux kernel `6.0` or above.

To check version of your kernel run:

```
uname -a
```

## Update ubuntu and kernel

```bash
# Update the repositories
apt update && apt upgrade -y
```

```bash
reboot
```

```bash
ufw allow 1022
```

```bash
sudo do-release-upgrade
```

```bash
sudo apt install linux-image-unsigned-6.5.0-15-generic
sudo update-initramfs -u -k 6.5.0-15-generic
```

```bash
reboot
```

## Raiko Docker

```bash
# Update or install rust
if command -v rustup &> /dev/null; then
    rustup update
else
    curl https://sh.rustup.rs -sSf | sh
    source $HOME/.cargo/env
fi
rustc --version # Verify Rust installation by displaying the version
```

```bash
git clone https://github.com/johntaiko/zeth.git
cd zeth
sed -i 's/sgx.edmm_enable = true/sgx.edmm_enable = false/' raiko-guest/config/raiko-guest.manifest.template
DOCKER_BUILDKIT=0 docker build -t raiko:v1 . 
```

```bash
cd docker
sed -i 's/image: gcr\.io\/evmchain\/raiko:latest/image: raiko:v1/' docker-compose.yml
sed -i 's/8080:8080/8585:8585/' docker-compose.yml
docker compose run --rm raiko --init
docker compose up raiko -d
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nodersua.gitbook.io/about-nodersua/archive/taiko/enable-an-sgx-prover.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
