Setting Up Hrida Terminal for a Team
| Built-in multi-user mode | Separate instances | |
|---|---|---|
| How | One container, separate accounts inside | One Hrida Terminal container per user or team |
| Isolation | Files are separate, but they share the same system | Fully isolated — separate files, processes, and network |
| Setup | One extra setting | One connection per instance, restricted with access grants |
| Best for | Small teams you trust | Untrusted users, teams that need hard separation |
If your Hrida.ai instance has more than one user account and the same terminal-server connection is shared across users, you must use one of the two options below. A single Hrida Terminal container without HRIDA_TERMINAL_MULTI_USER=true places every user inside the same shell, the same filesystem, and the same network namespace — which means any user can read, modify, or replace any other user's files, run commands as the shared user, and bind shared ports. This is not a supported configuration for multi-user Hrida.ai.
For deployments with untrusted users (open signup, public-facing portals, mixed-tenant setups), Option 1 is also insufficient on its own — file isolation does not extend to network namespace, so users can still reach each other through bound ports on the shared container. Use Option 2 (separate instances) for these deployments, or layer TERMINAL_PROXY_HEADERS on top of Option 1 to restrict what proxied responses can do in the user's browser.
Option 1: Built-in Multi-user Mode
The simplest approach. Add one setting and each person automatically gets a separate workspace.
docker run -d --name hrida-terminal -p 8000:8000 \
-v hrida-terminal:/home \
-e HRIDA_TERMINAL_MULTI_USER=true \
-e HRIDA_TERMINAL_API_KEY=your-secret-key \
ghcr.io/hrida-ai/hrida-terminalRequirements
Multi-user mode creates Linux accounts with sudo useradd, so the container needs working sudo:
-
Use the standard
latestimage.slim,alpineand the OpenShift image don't support multi-user mode. -
Turn off
no-new-privileges. Docker'sno-new-privilegesoption blockssudo. The bundled Compose files turn it on by default, so add this to the.envnext to your Compose file:.envHRIDA_TERMINAL_MULTI_USER=true HRIDA_TERMINAL_NO_NEW_PRIVILEGES=falseThen recreate the container with
docker compose up -d --force-recreate. A restart keeps the old setting.
If these aren't met, Hrida Terminal stops at startup with a message explaining what to change. See troubleshooting.
What happens
When someone uses the terminal through Hrida.ai, Hrida Terminal automatically:
- Creates a personal account for that user (based on their Hrida.ai user ID)
- Sets up a private home folder at
/home/{user-id} - Runs all their commands under their own account
- Restricts their file access to their own folder
Each user sees only their own files in the file browser.
What's shared vs. separate
| Separate per user | Shared | |
|---|---|---|
| Home folder and files | ✔ | |
| Running commands | ✔ | |
| System packages | ✔ | |
| CPU and memory | ✔ | |
| Network access | ✔ |
This mode gives everyone their own workspace, but they're all running inside the same container. Resource pressure (memory, CPU) is shared, and so is the network namespace — a user who binds a port (e.g. python -m http.server 8080) is reachable from any other user's terminal-server proxy URL on that port. Per-user file isolation does not extend to per-user network isolation in this mode.
Use this for small, trusted groups — not for wide-open deployments. For untrusted multi-user deployments, run a separate Hrida Terminal instance per user or team, or layer the TERMINAL_PROXY_HEADERS configuration on top to lock proxied responses into a sandbox CSP.
Troubleshooting
| Symptom | Fix |
|---|---|
Startup error: requires sudo, but the container runs with no-new-privileges | Set HRIDA_TERMINAL_NO_NEW_PRIVILEGES=false in .env and recreate the container. Confirm with docker inspect hrida-terminal --format '{{.HostConfig.SecurityOpt}}' (expect [no-new-privileges:false]). |
Still no-new-privileges:true after changing .env | The Compose file on the server is an older copy with true hard-coded. Copy the current Compose file over, or change the line to - no-new-privileges:false. |
Terminal requests fail with useradd ... returned non-zero exit status | The log now shows the reason after stderr:. The usual cause is the one above; on older versions, upgrade to get the startup check. |
| Account names collide with existing system users | Set HRIDA_TERMINAL_USER_PREFIX (e.g. hrida_) |
Option 2: Separate Instances per User or Team
For hard isolation, run one Hrida Terminal container per user or team and give each its own admin-configured connection. Restrict each connection with access_grants so only the intended group can use it:
[
{
"id": "terminal-data-science",
"url": "http://hrida-terminal-ds:8000",
"key": "ds-api-key",
"name": "Data Science Terminal",
"auth_type": "bearer",
"config": {
"access_grants": [
{"principal_type": "group", "principal_id": "<group-id>", "permission": "read"}
]
}
}
]Set this in TERMINAL_SERVER_CONNECTIONS or add the connections under Admin Panel → Settings → Integrations → Manage Terminal. Each container has its own filesystem, processes, CPU/memory limits, and network namespace.