Documentation Index
Fetch the complete documentation index at: https://test-8862363a-chore-changelog-update-20260521071817.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Tembo self-hosted stack runs as a single NixOS machine. All services sit behind nginx on port 80:| Service | Path | Port (internal) |
|---|---|---|
| tembo-web (Next.js frontend) | / | 3000 |
| tembo-ts-api (REST API) | /api/* | 3001 |
| Admin UI | /admin/ | 3002 |
| Installer / setup wizard | /installer/ | 3999 |
| PostgreSQL 16 | — | 5432 |
| PGAdmin Console | — | 5050 |
| Redis | — | 6379 |
| Prometheus | — | 9090 |
Step 1: Request Access
To get started with Tembo self-hosted, you will need a license key and access to the Tembo AMI. Book a demo with the Tembo team to get set up: Once you have a license key, contact Tembo to have the AMI shared with your AWS account. You will need to provide:- Your license key
- Your AWS Account ID (12-digit number, found in the AWS Console under your account menu or via
aws sts get-caller-identity --query Account --output text) - Your preferred AWS region (e.g.
us-east-1)
ami-0abc1234def56789) once sharing is confirmed.
The AMI 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: Launch an EC2 Instance
Instance requirements
| Resource | Minimum | Recommended |
|---|---|---|
| vCPUs | 4 | 8 |
| RAM | 16 GB | 32 GB |
| Disk | 128 GB | 256 GB |
We recommend
c5.metal for the best experience more than any other instance type. The other .metal instances are also good choices.
Instances that have 8th-gen Intel Nitro will also work (Eg. m8i.*), just slower than metal. We also support virtualization.
All other instance types are not fully supported.Via the AWS Console
- Go to EC2 > Instances > Launch instances
- Under Application and OS Images, choose My AMIs and select the AMI shared by Tembo
- Choose an instance type (
c5.metalrecommended, orm8i.xlargeor equivalent) - Under Key pair, select an existing key pair or create a new one — you will need this to SSH in
- Under Network settings, create or select a security group (you will configure inbound rules in the next step)
- Under Configure storage, set the root volume to at least 128 GiB
- Expand Advanced details and enable Nested virtualization
- Launch the instance
Via the AWS CLI
CoreCount with the number of physical cores for your instance type. For c5.metal this is 48.
Nested virtualization is required for Tembo’s sandbox execution environment. Without it, agent task sandboxes will fail to start.
Step 3: Configure the Security Group
By default, EC2 instances block all inbound traffic. Add inbound rules to allow access to Tembo:| Type | Protocol | Port | Source | Purpose |
|---|---|---|---|---|
| Custom TCP | TCP | 80 | 0.0.0.0/0 (or your IP range) | Tembo web UI and API |
| Custom TCP | TCP | 3999 | Your IP | Installer / setup wizard |
| Custom TCP | TCP | 8888 | Your IP | VS Code server (config editing) |
| SSH | TCP | 22 | Your IP | SSH access |
Via the AWS Console
- Go to EC2 > Security Groups
- Select the security group attached to your instance
- Click Inbound rules > Edit inbound rules
- Add the rules above, then save
Via the AWS CLI
Step 4: Run the Installer and Configure the Instance
4a: Run the install workflow
Once the instance is running, open the installer in your browser:4b: 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:
| Key | Notes |
|---|---|
betterAuth.secret | Auto-generated on first boot if missing. Leave it if it is already set. |
api.base | Must match the public URL of the API. Must end with a trailing /. |
frontend.url | Defaults to http://localhost:3000, which breaks auth on a remote VM. Set this to the actual public IP or hostname. |
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 5: 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-agent3)
Troubleshooting
Auth 404 on sign-up
Symptom:POST http://<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 NixOS configuration. 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:
Instance not reachable after launch
- Confirm the instance is in a Running state in the EC2 console
- Verify the security group has an inbound rule for port 80 (and port 22 for SSH)
- If using a VPC, confirm the instance is in a public subnet with an Internet Gateway attached, or that you have a route to reach it
- If using an Elastic IP, ensure it is associated with the instance