Overview
The Tembo self-hosted stack runs as a single NixOS machine. All services sit behind nginx on port 80:
Tembo distributes a pre-built NixOS image via an Azure Compute Gallery shared to your subscription. You create a VM from that image, open the required ports, and configure a single JSON file. No OS setup or image building is required on your end.
Step 1: Request Access
To get started with Tembo self-hosted, you will need a license key and access to the Tembo Azure Compute Gallery image. Book a demo with the Tembo team to get set up: Once you have a license key, contact Tembo to have the image shared with your Azure subscription. You will need to provide:- Your license key
- Your Azure Subscription ID
- Your preferred Azure region (e.g.
eastus)
The image contains no embedded secrets. Initial configuration is written to
/var/lib/tembo/config.json at first boot by the tembo-config-seed service.Step 2: Create a Resource Group
Step 3: Create the VM from the Gallery Image
VM requirements
For the best sandbox performance, use a VM size that supports nested virtualization (e.g.
Standard_D8s_v3, Standard_D16s_v3, or any v3/v4/v5 D-series or E-series). This allows sandbox VMs to run with hardware acceleration via KVM.Via the Azure CLI
Note the
IpAddress in the output — you will need it in later steps.
Via the Azure Portal
- Go to Virtual machines > Create
- Select your resource group and region
- Under Image, click See all images, then Shared images and select the Tembo image
- Choose a VM size (
Standard_D8s_v3or larger recommended) - Under Disks, set the OS disk size to at least 256 GiB
- Under Networking, select or create a virtual network
- Create the VM
Step 4: Configure the Network Security Group
By default, Azure VMs block all inbound traffic except SSH. Add inbound rules to allow access to Tembo:
Ports 3999 and 8888 are only needed during initial setup. You can remove those rules after configuration is complete.
Via the Azure CLI
Step 5: Run the Installer and Configure the Instance
5a: Run the install workflow
Once the VM is running, open the installer in your browser:5b: Configure /var/lib/tembo/config.json
After the installer finishes, open the VS Code server to edit the configuration file:
/var/lib/tembo/config.json. You can also see it in the VS Code file explorer on the right as config.json. A few values must be set correctly for the install to work.
Ensure these keys are present and correct:
After saving, restart the API. There is a background service that should restart the API for you on finishing edits, but you can also do this from a terminal in the VS Code server, or via SSH:
tembo-ts-api, tembo-ts-cron, and agent workers on every boot. Manual edits are preserved — the seed only writes values that are missing or empty.
Step 6: Verify the Install
Open a browser and navigate to:tembo-ts-agent-X, depending on how many agents you chose to provision in the install step, X will be that number. (Eg. 3 agents make tembo-ts-agent-1, tembo-ts-agent-2, tembo-ts-agent-3)
Troubleshooting
Auth 404 on sign-up
Symptom:POST http://<vm-ip>:3000/api/auth/sign-up/email returns 404.
Cause: You are hitting the Next.js frontend directly on port 3000, bypassing nginx. The /api/auth/* handler does not exist at that port.
Fix: Access the app through nginx on port 80:
401 after sign-up
Symptom: Sign-up succeeds but all subsequent API requests return 401. Cause: Billing is enabled by default. Without Stripe configured, organization creation fails silently, leaving the user with no active org. Fix: Confirmbilling.enabled: false is set in the API environment in your config.json. Contact Tembo support if this was not set in the distributed image.
Sign-in loops / cookie issues
Symptom: Sign-in redirects back to the login page, or cookies are not set. Cause:api.base or frontend.url in config.json does not match the URL you are accessing the app from. Better Auth uses these for trusted origins and cookie domain validation.
Fix: Edit /var/lib/tembo/config.json and set both keys to the exact origin you are using in the browser. Restart the API:
Services not starting
tembo-config-seed service must complete before the API and agents start. If the API fails immediately at boot, check:
VM not reachable after launch
- Confirm the VM is in a Running state in the Azure portal
- Verify the NSG has an inbound rule for port 80 (and port 22 for SSH)
- If using a virtual network, confirm the subnet has a route to the internet