In a detailed 4-part series, I have been describing the prerequisites that you would need to run Oasis nodes. In the earlier parts, we have covered hardware and cloud providers, stake requirements and node installation, and system configuration steps. In this final part, I will walk you through the process of setting up a Trusted Execution Environment (TEE).

The preferred privacy-preserving technique used by Oasis in paratimes (parallel runtimes) and ROFL (runtime off-chain logic) is the hardware-based TEE.

Intel SGX — used in most Oasis paratimes as well as ROFL SGX appsIntel TDX — used by the ROFL TDX raw and container-based apps

Note: For the differences between these ROFL app types, see ROFL flavors.

Before you can configure your nodes to run in a TEE, you need to ensure that your setup meets the 4 basic requirements to run SGX/TDX enclaves.

SGX/TDX support for the hardwareLatest BIOS updates installedSGX/TDX enabled in the BIOSLinux kernel, drivers, and software components properly installed and running

Note: Step 1 here has been covered in part 1 of this prerequisites series, so we will proceed here with the subsequent steps.

Software Guard Extensions (SGX)

BIOS configuration

Let’s start with steps 2 and 3 from above. First, update your BIOS to the latest version with the latest microcode. You can then proceed with the following BIOS configuration. It is possible that some settings may not apply to all BIOS versions. In that case, configure only the relevant ones.

SGX: ENABLEHyper-Threading: DISABLEIntel SpeedStep: DISABLETurbo Mode: DISABLECPU AES: ENABLESGX Auto MP Registration: ENABLE

Clock synchronization

This is a minor but important step. The node’s local clock needs to be synchronized, for example using Network Time Protocol (NTP), because of additional sanity checks within runtime enclaves. If it is off by more than half a second, unexpected runtime aborts may occur.

SGX device permissions

Ensuring proper device permissions is essential. The user running the Oasis Node binary must have access to the SGX device (/dev/sgx_enclave). This can usually be done by adding that user to the right group. For example, if the permissions of the device look like this:

crw-rw—- 1 root sgx 10, 125 Oct 28 09:28 /dev/sgx_enclave

In this example, the group is sgx. If the user running the Oasis Node is oasis, add it to that group:

sudo adduser oasis sgx

Missing this step may result in the runtime error showing “permission denied OS error 13” during setup. Also, if you wish to run your node from an interactive session, then you will need to log out once for the permissions to take effect.

AESM service

SGX enclave execution involves several Architectural Enclaves (AE):

Launch EnclaveProvisioning EnclaveProvisioning Certificate EnclaveQuoting EnclavePlatform Services Enclaves

Communication between SGX enclaves launched by applications and Intel-provided AE takes place through the Application Enclave Service Manager (AESM). AESM runs as a daemon and provides the socket through which applications can facilitate various SGX services such as launch approval, remote attestation quote signing, etc.

Running your Oasis node will also require DCAP attestation, that is, Data Center Attestation Primitives. A quick check to ensure that your system supports this:

cpuid -1 | grep “SGX”

Look for the following line in the output:

SGX_LC: SGX launch config supported = true

DCAP attestation

The official Intel SGX APT repository is a convenient way to install the AESM service on Ubuntu 24.04 and newer systems.

Add the Intel SGX APT repository to your system.

curl -fsSL https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | sudo gpg –dearmor -o /usr/share/keyrings/intel-sgx-deb.gpg
echo “deb [arch=amd64 signed-by=/usr/share/keyrings/intel-sgx-deb.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu $(lsb_release -cs) main” | sudo tee /etc/apt/sources.list.d/intel-sgx.list > /dev/null

Next, install the sgx-aesm-service, libsgx-aesm-ecdsa-plugin, libsgx-aesm-quote-ex-plugin, and libsgx-dcap-default-qpl packages.

sudo apt update
sudo apt install sgx-aesm-service libsgx-aesm-ecdsa-plugin libsgx-aesm-quote-ex-plugin libsgx-dcap-default-qpl

You can confirm the AESM service is running via a simple command.

sudo systemctl status aesmd.service

Quote provider configuration

Whether you use Intel Provisioning Certification Service (PCS), the Provisioning Certificate Caching Service (PCCS) of your cloud service provider, or your own PCCS, you will need to configure the Intel quote provider ( libsgx-dcap-default-qpl). You can find the configuration file at /etc/sgx_default_qcnl.conf. Also, you will need to always restart the aesmd.service after updating the configuration.

sudo systemctl restart aesmd.service

Let’s now go through, one by one, how to proceed based on the quote provider.

Intel PCS

Using Intel PCS is the simplest and most generic way, but it may be less reliable than using your own PCCS. Some cloud providers require you to use their own PCCS (described later).

If you are going with Intel PCS, you will need to update the pccs_url value in /etc/sgx_default_qcnl.conf to the Intel PCS API URL.

//PCCS server address
“pccs_url”: “https://api.trustedservices.intel.com/sgx/certification/v4/”

If you encounter an error in the Intel Quote Provider Library (QPL) configuration file, attestation will not work, and the AESM service may produce unhelpful errors, e.g.

Couldn’t find the platform library. (null)

In that case, the only thing that needs to be changed is the pccs_url value mentioned above.
Note: Do not add any comments and/or change punctuation, as that might result in an invalid configuration file.

Cloud service provider’s PCCS

As mentioned above, some cloud providers require you to use their own PCCS. Here is the configuration guidance for three of them:

Azure — Refer to the Azure documentation for details on how to configure this quote provider. Here, you will find an example of an Intel QPL configuration file that can be used.Alibaba — Refer to the Alibaba Cloud documentation for details on how to configure this quote provider. Here, you will find the required sgx_default_qcnl.conf changes.IBM — Refer to the IBM Cloud documentation for details on how to configure this quote provider. Here, too, you will find the required sgx_default_qcnl.conf changes.

If you go with a different cloud service provider, it is essential to consult their specific documentation for the appropriate configuration guidance.

Own PCCS

Some users prefer running their own PCCS to choosing from cloud service providers. The official Intel instructions will guide you through the setup.

DCAP attestation Docker

Oasis also offers an easy alternative to install and run the AESM service on a Docker-enabled system. Start the process by using the AESM container image.

Next, execute the following command so that it pulls the latest version of the AESMD Docker container. This will also map the SGX devices and /var/run/aesmd directory, while ensuring AESM is running in the background. All this will then start automatically on boot.

docker run
–pull always
–detach
–restart always
–device /dev/sgx_enclave
–device /dev/sgx_provision
–volume /var/run/aesmd:/var/run/aesmd
–name aesmd
ghcr.io/oasisprotocol/aesmd-dcap:master

The Intel Quote Provider (QP) in the Docker container is configured to use the Intel PCS endpoint by default. To use an alternative to Intel PCS, you can override the Intel QP configuration here within the container. Use the volume flag to mount your customized configuration.

docker run
–pull always
–detach
–restart always
–device /dev/sgx_enclave
–device /dev/sgx_provision
–volume /var/run/aesmd:/var/run/aesmd
–volume /etc/sgx_default_qcnl.conf:/etc/sgx_default_qcnl.conf
–name aesmd
ghcr.io/oasisprotocol/aesmd-dcap:master

You can find the default Intel QP config in the Intel SGX GitHub repository.

Multi-socket systems

For a platform with multi-socket systems (e.g. systems with multiple CPUs), the whole process is more complex, especially if you use a hypervisor and run SGX workloads inside guest VMs. In such a case, additional provisioning will likely be required.

Also, the system must be booted in UEFI mode for provisioning to work. This is an important step as the provisioning process uses UEFI variables to communicate with the BIOS. Moreover, you have to enable the SGX Auto Multi-Package (MP) Registration BIOS configuration setting.

Ubuntu 24.04+

After you have added Intel’s SGX apt repository as discussed previously, you can now install the Intel SGX MP Registration Agent Service to provision and register your multi-socket system.

sudo apt install sgx-ra-service

After boot, the log in /var/log/mpa_registration.log should indicate successful registration. In case of an error, the first step is to ensure that the SGX Auto MP Registration is enabled in the BIOS. You can also re-provision by rebooting and setting the SGX Factory Reset option to enabled.

VMware vSphere 8.0+

To enable SGX remote attestation on VMware vSphere-based systems, following the vSphere guide is recommended.

Setup check

The final step in SGX TEE setup is to test the settings. To test remote attestation against Intel SGX’s development server, you can use the Oasis attestation tool ( binary).

Trust Domain Extensions (TDX)

Note: TDX requires proper SGX installation to be in place first. So, before proceeding through the next steps, you must ensure there is a working SGX environment established in accordance with the SGX installation steps discussed above.

BIOS configuration

SGX: ENABLESGX memory: at least 256MBSGX Auto MP Registration: ENABLEHyper-Threading: DISABLEIntel SpeedStep: DISABLESecureBoot: DISABLEAll Internal Graphics: DISABLETurbo Mode: DISABLECPU AES: ENABLETDX: ENABLEMemory Encryption (TME): ENABLETotal Memory Encryption Bypass: ENABLETotal Memory Encryption Multi-Tenant (TME-MT): ENABLETME-MT memory integrity: DISABLETDX Secure Arbitration Mode Loader (SEAM Loader): ENABLETME-MT/TDX key split: non-zero valueACPI S3 and deeper power states: DISABLED

Host OS setup

The instructions here are summarized to help you set up an environment for running the ROFL node and other TDX services on Ubuntu 26.04 or newer versions. For details, you can refer to the official Canonical TDX how-to documentation.

First, install the TDX quote generation service from Intel’s SGX APT repository. Next, install the Quick Emulator (QEMU) for running guest virtual machines.

sudo apt install tdx-qgs qemu-utils qemu-system-x86

Then, disable ACPI S3 and enable TDX. Also, add kernel parameters nohibernate kvm_intel.tdx=1.

sed -i -E “s/GRUB_CMDLINE_LINUX=”(.*)”/GRUB_CMDLINE_LINUX=”1 nohibernate kvm_intel.tdx=1″/g” /etc/default/grub
update-grub

Now, ensure that the non-root user running Oasis Node is a member of sgx, sgx_prv, and kvm groups on the host. There should also be access to /dev/sgx*, /dev/kvm*, and /dev/*vsock* devices.

Finally, reboot the system for all this to take effect.

Setup check

The last step is to check that your system is ready to launch TDX VMs. An example output:

sudo dmesg | grep -i tdx[ 1.368184] virt/tdx: BIOS enabled: private KeyID range [32, 64)
[ 1.368188] virt/tdx: Disable ACPI S3. Turn off TDX in the BIOS to use ACPI S3.
[ 9.483666] virt/tdx: TDX module: attributes 0x0, vendor_id 0x8086, major_version 1, minor_version 5, build_date 20240725, build_num 784
[ 9.483672] virt/tdx: CMR: [0x100000, 0x77800000)
[ 9.483674] virt/tdx: CMR: [0x100000000, 0x3ffe000000)
[ 10.587167] virt/tdx: 1042424 KB allocated for PAMT
[ 10.587173] virt/tdx: module initializedls -al /dev/*kvm*crw-rw—- 1 root kvm 10, 232 Apr 10 09:56 /dev/kvm

Note: As this is an example, the dmesg timestamps and build numbers in your output can vary.

If any of the above is missing, you will need the following debug tools.

apt install msr-tools
git clone https://github.com/canonical/tdx && ./tdx/system-report.sh### Model specific registers (MSRs)
MK_TME_ENABLED bit: 1 (expected value: 1)
SEAM_RR bit: 1 (expected value: 1)
NUM_TDX_PRIV_KEYS: 20
SGX_AND_MCHECK_STATUS: 0 (expected value: 0)
Production platform: Production (expected value: Production)sudo rdmsr 0x5030 # 0 if SGX in production mode

Troubleshooting

Troubleshooting while preparing for and running Oasis nodes is a subject on its own, and I will cover the details later. For now, you can check out the relevant steps in the TEE troubleshooting section. It should cover most of the common errors and solutions.

For direct support on specific issues, the Oasis engineering team and other node operators are available in the node-operators channel on the official Discord.

This concludes the multi-part series on prerequisites for running Oasis nodes. In subsequent articles, I will go through in detail various types of Oasis nodes that were mentioned briefly in the introduction article.

Originally published at https://dev.to on November 20, 2026.

Your Guide to the Prerequisites for Running Nodes on Oasis (Part 4): TEE Setup was originally published in Coinmonks on Medium, where people are continuing the conversation by highlighting and responding to this story.

By

Leave a Reply

Your email address will not be published. Required fields are marked *