This commit is contained in:
Timothy Jaeryang Baek committed 2026-11-21 20:04:01 +04:00
1 parent 22e86fc807
commit e7406ce2f3
74 files changed
+1369 -589

No files matched your search

+11 -8
View File
@@ -13,6 +13,7 @@ from open_webui.models.config import Config
from open_webui.models.oauth_sessions import OAuthSessions
from open_webui.utils.auth import get_admin_user, get_verified_user
from open_webui.utils.headers import bearer_auth_header, get_custom_headers
from open_webui.utils.machines import MANAGED_SCHEMES
from open_webui.utils.mcp.client import MCPClient
from open_webui.utils.oauth import (
OAUTH_MAX_FIELD_SIZE,
@@ -350,17 +351,19 @@ async def set_terminal_servers_config(
connection.model_dump(exclude={'policy', 'lifecycle'}) for connection in form_data.TERMINAL_SERVER_CONNECTIONS
]
# SSH machines are managed by /api/v1/machines: the browser can rename or disable them,
# but never change where they point or their key.
# Managed machines (SSH, this computer) are run by /api/v1/machines: the browser can rename
# or disable them, but never change where they point or their key.
stored = await Config.get('machines.connections', []) or []
machines = {c['id']: c for c in stored if c.get('ssh') and c.get('id')}
machines = {c['id']: c for c in stored if (c.get('ssh') or c.get('local')) and c.get('id')}
for connection in connections:
machine = machines.get(connection.get('id'))
if machine:
connection.update({k: machine[k] for k in ('url', 'key', 'ssh')})
# ssh:// entries that are not stored machines were removed elsewhere; never re-create them.
connection.pop('ssh', None)
connection.pop('local', None)
connection.update({k: machine[k] for k in ('url', 'key', 'ssh', 'local') if k in machine})
# ssh:// and local:// entries that are not stored machines were removed elsewhere; never re-create them.
connections = [
c for c in connections if c.get('id') in machines or not str(c.get('url') or '').startswith('ssh://')
c for c in connections if c.get('id') in machines or not str(c.get('url') or '').startswith(MANAGED_SCHEMES)
]
# A page opened before a machine was added does not know about it, so keep machines the
# form left out. Removing a machine goes through DELETE /api/v1/machines/{id}.
@@ -405,10 +408,10 @@ async def verify_terminal_server_connection(
headers.update(bearer_auth_header(form_data.key))
timeout = aiohttp.ClientTimeout(total=AIOHTTP_CLIENT_TIMEOUT)
if base_url.startswith('ssh://'):
if base_url.startswith(MANAGED_SCHEMES):
from open_webui.utils.machines import get_machine_client
client = get_machine_client(base_url, timeout=timeout) # through the machine's SSH tunnel
client = get_machine_client(base_url, timeout=timeout) # through the machine's socket
else:
client = aiohttp.ClientSession(trust_env=True, timeout=timeout)
+68 -17
View File
@@ -32,8 +32,8 @@ from open_webui.utils.browser import browser_access, create_browser_token
from open_webui.utils.tether import RelayInterrupted, get_terminal_connections
from open_webui.utils.headers import bearer_auth_header, normalize_bearer_token
from open_webui.utils.json_codec import JSONCodec
from open_webui.utils.machines import ssh as ssh_machines
from open_webui.utils.machines.ssh import MachineError, describe
from open_webui.utils.machines import MachineError, managed, local as local_machines, ssh as ssh_machines
from open_webui.utils.machines.managed import describe
from open_webui.utils.machines import (
get_machine_client,
find_terminal_connection,
@@ -60,7 +60,8 @@ STRIPPED_RESPONSE_HEADERS = frozenset(
# ---------------------------------------------------------------------------
# SSH machines (admin): add a machine by SSH and let Open WebUI install Open Terminal on it.
# Managed machines (admin): Open WebUI installs Open Terminal on a machine it reaches by SSH,
# or on this computer (experimental). /managed/{id}/... works for both kinds.
# Registered before the /{server_id}/... proxy routes so they are not forwarded upstream.
# ---------------------------------------------------------------------------
@@ -96,10 +97,21 @@ class CreateForm(Pinned):
version: str = Field('latest', max_length=20) # 'latest' or an exact Open Terminal version
class LocalForm(BaseModel):
id: str = Field(pattern=SSH_MACHINE_ID) # picked by the browser so it can follow progress from the start
name: str = Field('', max_length=100)
version: str = Field('latest', max_length=20)
folder: str = Field('', max_length=1024) # empty: the project folder Open WebUI picks
class UpgradeForm(BaseModel):
version: str | None = Field(None, max_length=20) # omitted: keep the machine's current choice
class FolderForm(BaseModel):
folder: str = Field('', max_length=1024) # empty: the default (home over SSH)
def _ssh_fail(error: BaseException):
status = 404 if str(error) == 'Unknown machine.' else 400
raise HTTPException(status, describe(error))
@@ -145,56 +157,95 @@ async def install_key(form: InstallKeyForm, user=Depends(get_admin_user)):
@router.post('/ssh')
async def create_machine(request: Request, form: CreateForm, user=Depends(get_admin_user)):
try:
version = ssh_machines.requested_version(form.version)
version = managed.requested_version(form.version)
except MachineError as error:
_ssh_fail(error)
target = form.model_dump(include={'host', 'port', 'username', 'host_key'})
_ssh_start(
ssh_machines.provision(request, form.id, user.id, name=form.name or form.host, ssh=target, version=version)
managed.provision(request, form.id, user.id, name=form.name or form.host, target=target, version=version)
)
return {'id': form.id, 'status': 'installing'}
@router.post('/ssh/{machine_id}/upgrade')
@router.get('/local')
async def get_local_machine_defaults(user=Depends(get_admin_user)):
"""What adding this computer would do: where sessions start by default, and whether it is already added."""
connections = await managed.list_connections()
return {
'folder': local_machines.default_folder(),
'added': any(managed.kind(c) == 'local' for c in connections),
}
@router.post('/local')
async def create_local_machine(request: Request, form: LocalForm, user=Depends(get_admin_user)):
"""Install Open Terminal on the computer Open WebUI runs on. Experimental; single instance only."""
connections = await managed.list_connections()
if any(managed.kind(c) == 'local' for c in connections):
raise HTTPException(409, 'A local machine is already added.')
if any(c.get('id') == form.id for c in connections):
raise HTTPException(409, 'A machine with this id already exists.')
try:
version = managed.requested_version(form.version)
folder = managed.clean_folder(form.folder) or None
except MachineError as error:
_ssh_fail(error)
_ssh_start(
managed.provision(request, form.id, user.id, name=form.name, is_local=True, version=version, folder=folder)
)
return {'id': form.id, 'status': 'installing'}
@router.post('/managed/{machine_id}/upgrade')
async def upgrade_machine(
request: Request, machine_id: str, form: UpgradeForm | None = None, user=Depends(get_admin_user)
):
"""Install the machine's chosen Open Terminal version again ('latest' fetches the newest); also repairs."""
try:
await ssh_machines.get_machine(machine_id)
version = ssh_machines.requested_version(form.version) if form and form.version is not None else None
await managed.get_machine(machine_id)
version = managed.requested_version(form.version) if form and form.version is not None else None
except MachineError as error:
_ssh_fail(error)
_ssh_start(ssh_machines.provision(request, machine_id, user.id, version=version))
_ssh_start(managed.provision(request, machine_id, user.id, version=version))
return {'id': machine_id, 'status': 'installing'}
@router.post('/ssh/{machine_id}/restart')
async def restart_machine(machine_id: str, user=Depends(get_admin_user)):
@router.post('/managed/{machine_id}/folder')
async def set_machine_folder(machine_id: str, form: FolderForm, user=Depends(get_admin_user)):
"""Change where terminal sessions start, then restart Open Terminal there."""
try:
await ssh_machines.restart(machine_id)
await managed.set_folder(machine_id, form.folder)
except Exception as error:
_ssh_fail(error)
return {'status': True}
@router.get('/ssh/{machine_id}/logs')
@router.post('/managed/{machine_id}/restart')
async def restart_machine(machine_id: str, user=Depends(get_admin_user)):
try:
await managed.restart(machine_id)
except Exception as error:
_ssh_fail(error)
return {'status': True}
@router.get('/managed/{machine_id}/logs')
async def machine_logs(machine_id: str, lines: int = 200, user=Depends(get_admin_user)):
try:
return {'logs': await ssh_machines.logs(machine_id, min(max(lines, 1), 2000))}
return {'logs': await managed.logs(machine_id, min(max(lines, 1), 2000))}
except Exception as error:
_ssh_fail(error)
@router.delete('/ssh/{machine_id}')
@router.delete('/managed/{machine_id}')
async def uninstall_machine(machine_id: str, force: bool = False, user=Depends(get_admin_user)):
"""Uninstall from the machine and remove it. With force, remove it even if the machine is unreachable."""
try:
await ssh_machines.uninstall(machine_id)
await managed.uninstall(machine_id)
except Exception as error:
if not force or str(error) == 'Unknown machine.':
_ssh_fail(error)
await ssh_machines.remove(machine_id)
await managed.remove(machine_id)
return {'status': True}
+11 -3
View File
@@ -28,19 +28,27 @@ MAX_AGENTS_MD_BYTES = 32 * 1024
log = logging.getLogger(__name__)
# Machines Open WebUI installed Open Terminal on itself (see managed.py).
MANAGED_SCHEMES = ('ssh://', 'local://')
class MachineError(Exception):
pass
def get_machine_client(url, user_id=None, service='open_terminal', **kwargs):
"""Return an aiohttp-like client for any machine URL.
tether:// goes through the user's device relay, ssh:// through the machine's SSH tunnel,
anything else is a plain aiohttp session. Callers use `await`/`async with` the same way.
local:// to Open Terminal on this computer, anything else is a plain aiohttp session.
Callers use `await`/`async with` the same way.
"""
if str(url).startswith('tether://'):
from open_webui.utils.tether import RelayClient
return RelayClient(user_id, service=service, timeout=kwargs.get('timeout'))
if str(url).startswith('ssh://'):
from open_webui.utils.machines.ssh import MachineClient
if str(url).startswith(MANAGED_SCHEMES):
from open_webui.utils.machines.managed import MachineClient
return MachineClient(urlsplit(str(url)).hostname, **kwargs)
return aiohttp.ClientSession(**kwargs)
+11 -3
View File
@@ -1,7 +1,9 @@
# Sent over SSH stdin by utils/machines/ssh.py. Tokens (__OPEN_WEBUI_*__) are validated before rendering.
# Run by utils/machines/managed.py on stdin, over SSH or on this computer. Tokens (__OPEN_WEBUI_*__) are
# validated before rendering; FOLDER (where sessions start, empty for home) is set on the line above.
# Output lines starting with OPEN_WEBUI: drive the progress UI; everything else is log.
set -eu
ROOT="$HOME/.open-webui/__OPEN_WEBUI_ID__"
ROOT="${OPEN_WEBUI_MACHINES_DIR:-$HOME/.open-webui}/__OPEN_WEBUI_ID__"
FOLDER="${FOLDER:-}"
VERSION="__OPEN_WEBUI_VERSION__"
echo "OPEN_WEBUI:step:detect"
@@ -11,6 +13,7 @@ case "$(uname -s) $(uname -m)" in
esac
command -v curl >/dev/null 2>&1 || { echo "OPEN_WEBUI:error:curl is required on the machine"; exit 2; }
command -v tar >/dev/null 2>&1 || { echo "OPEN_WEBUI:error:tar is required on the machine"; exit 2; }
if [ -n "$FOLDER" ] && [ ! -d "$FOLDER" ]; then echo "OPEN_WEBUI:error:Folder not found: $FOLDER"; exit 2; fi
mkdir -p "$ROOT/run"
chmod 700 "$ROOT" "$ROOT/run"
echo "OPEN_WEBUI:root:$ROOT"
@@ -62,7 +65,8 @@ echo $$ > "$ROOT/start.lock/pid"
trap 'rm -rf "$ROOT/start.lock"' EXIT
if [ -z "$(ours)" ]; then # nothing running: launch (a running server just needs time)
rm -f "$SOCK"
cd "$HOME"
FOLDER="$(cat "$ROOT/folder" 2>/dev/null || true)"
cd "${FOLDER:-$HOME}" 2>/dev/null || cd "$HOME"
OPEN_TERMINAL_API_KEY_FILE="$ROOT/api-key" nohup "$ROOT/bin/open-terminal" run \
--ipc "$SOCK" >>"$ROOT/server.log" 2>&1 </dev/null &
echo $! > "$ROOT/pid"
@@ -86,6 +90,10 @@ exit 0
EOF
chmod 700 "$ROOT/start.sh" "$ROOT/stop.sh"
if [ "$(cat "$ROOT/folder" 2>/dev/null || true)" != "$FOLDER" ]; then
printf '%s' "$FOLDER" > "$ROOT/folder"
"$ROOT/stop.sh" # start.sh below brings it up in the new folder
fi
echo "OPEN_WEBUI:step:start"
"$ROOT/start.sh"
+110
View File
@@ -0,0 +1,110 @@
"""Local machines: Open Terminal on the server Open WebUI runs on (experimental, opt-in).
Like Open WebUI Computer, it serves the machine it runs on and starts in your project
folder. It only makes sense for a single Open WebUI instance.
The install lives in ~/.open-webui/<id>, like SSH machines. In Docker, home is wiped when
the container is recreated, so it lives in the data volume instead.
"""
import asyncio
import os
import signal
from contextlib import suppress
from pathlib import Path
from open_webui.env import DATA_DIR, DOCKER
from open_webui.utils.machines import MachineError
# Not the data folder outside Docker: pip installs keep it deep in site-packages, past the
# ~104-byte limit for Unix socket paths.
BASE = Path(DATA_DIR).resolve() / 'machines' if DOCKER else Path.home() / '.open-webui'
# Only what Open Terminal needs. Open WebUI's own settings (WEBUI_SECRET_KEY, DATABASE_URL,
# OAuth secrets, ...) are not passed down to it.
ENV = {
'HOME': os.environ.get('HOME') or '/root',
'PATH': os.environ.get('PATH') or '/usr/local/bin:/usr/bin:/bin',
'LANG': os.environ.get('LANG') or 'C.UTF-8',
'OPEN_WEBUI_MACHINES_DIR': str(BASE),
}
def root_for(machine_id: str) -> str:
root = str(BASE / machine_id)
if len(root + '/run/api.sock') > 100: # Unix socket paths are capped around 104 bytes
raise MachineError(f'This path is too long for a Unix socket: {BASE}')
return root
def default_folder() -> str:
"""Where sessions start, like Open WebUI Computer: your project, not Open WebUI's own files."""
if Path('/workspace').is_dir():
return '/workspace' # the Docker docs mount the project here
if DOCKER:
path = Path(DATA_DIR).resolve() / 'workspace' # kept across image updates
path.mkdir(parents=True, exist_ok=True)
return str(path)
return os.getcwd() # the folder Open WebUI was started from
class _Process:
def __init__(self, proc: asyncio.subprocess.Process):
self.proc = proc
async def lines(self):
async for line in self.proc.stdout:
yield line.decode(errors='replace')
async def wait(self) -> int:
return await self.proc.wait()
def close(self):
if self.proc.returncode is None: # timed out or failed: stop the whole script
with suppress(ProcessLookupError):
os.killpg(self.proc.pid, signal.SIGKILL)
class LocalHost:
"""Runs a machine's scripts on this computer (see managed.open_host)."""
async def __aenter__(self):
return self
async def __aexit__(self, *_):
pass
async def start(self, script: str) -> _Process:
BASE.mkdir(parents=True, exist_ok=True)
proc = await asyncio.create_subprocess_exec(
'sh',
'-s',
stdin=asyncio.subprocess.PIPE,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.STDOUT,
env=ENV,
# Its own session: Ctrl-C or a reload of Open WebUI leaves Open Terminal running.
start_new_session=True,
)
proc.stdin.write(script.encode()) # stdin, not argv: the API key never shows up in `ps`
await proc.stdin.drain()
proc.stdin.close()
return _Process(proc)
async def sh(self, script: str, *, timeout: float = 60) -> str:
proc = await self.start(script)
try:
async with asyncio.timeout(timeout):
text = (await proc.proc.stdout.read()).decode(errors='replace')
code = await proc.wait()
finally:
proc.close()
if code:
raise MachineError(text.strip()[-2000:] or f'Command failed with exit code {code}.')
return text
def valid_root(self, root: str, machine_id: str) -> bool:
return root == root_for(machine_id)
async def transport(self, root: str) -> None:
return None # Open WebUI connects to the socket directly
@@ -0,0 +1,545 @@
"""Machines Open WebUI installs Open Terminal on itself: over SSH, or on this computer.
Both kinds share one install script (bootstrap.sh) and one lifecycle; only how the script
runs differs: ssh.SSHHost runs it over SSH, local.LocalHost on the computer Open WebUI runs
on. Open Terminal listens on a Unix socket (no TCP port). The machine lives in
machines.connections with url ssh://<id> or local://<id>, so every machine feature works
unchanged.
"""
import asyncio
import logging
import re
import secrets
import shlex
import tempfile
import time
from collections import deque
from contextlib import suppress
from functools import partial
from pathlib import Path
from urllib.parse import urlsplit
import aiohttp
import asyncssh
from open_webui.models.config import Config
from open_webui.utils.machines import MachineError, local, ssh
log = logging.getLogger(__name__)
# Machines install the latest Open Terminal by default, or a version the admin pins.
# This is the oldest one Open WebUI works with (first with `open-terminal bridge`).
MIN_OPEN_TERMINAL_VERSION = '0.17.21'
UV_VERSION = '0.13.9'
CONNECTIONS = 'machines.connections'
SAFE_METHODS = {'GET', 'HEAD', 'OPTIONS'}
TOKENS = {
'ID': re.compile(r'm_[0-9a-f]{8}'),
'VERSION': re.compile(r'latest|\d+\.\d+\.\d+'),
'MIN_VERSION': re.compile(r'\d+\.\d+\.\d+'),
'UV_VERSION': re.compile(r'\d+\.\d+\.\d+'),
'API_KEY': re.compile(r'[A-Za-z0-9_-]{32,64}'),
}
BOOTSTRAP = Path(__file__).with_name('bootstrap.sh').read_text()
# Local ends of SSH tunnels. Unix socket paths max out around 104 characters on macOS, so keep this short.
RUN_DIR = Path(tempfile.mkdtemp(prefix='open-webui-', dir='/tmp'))
def describe(error: BaseException) -> str:
"""Turn failures into something an admin can act on."""
if isinstance(error, asyncssh.HostKeyNotVerifiable):
return "The machine's host key changed. Remove and re-add the machine if this is expected."
if isinstance(error, asyncssh.PermissionDenied):
return 'SSH login was refused. Check that the key is in ~/.ssh/authorized_keys, or the password is right.'
if isinstance(error, asyncio.TimeoutError):
return 'The machine took too long to respond.'
if isinstance(error, OSError):
return f'Could not reach the machine: {error.strerror or error}'
return str(error) or type(error).__name__
def new_id() -> str:
return f'm_{secrets.token_hex(4)}'
def requested_version(value: str | None) -> str:
"""Normalize the admin's choice: 'latest' (default) or an exact version no older than the minimum."""
value = (value or '').strip() or 'latest'
if value == 'latest':
return value
if not re.fullmatch(r'\d+\.\d+\.\d+', value):
raise MachineError('Use "latest" or a version like 0.17.21.')
if tuple(map(int, value.split('.'))) < tuple(map(int, MIN_OPEN_TERMINAL_VERSION.split('.'))):
raise MachineError(f'Open WebUI needs Open Terminal {MIN_OPEN_TERMINAL_VERSION} or newer.')
return value
def clean_folder(value: str | None) -> str:
"""Where terminal sessions start. Empty means the default (home over SSH)."""
value = (value or '').strip()
if value and (not value.startswith('/') or any(c in value for c in '\n\r\0')):
raise MachineError('Use an absolute folder path, like /home/me/project.')
return value
def render(template: str, **values: str) -> str:
for name, value in values.items():
if not TOKENS[name].fullmatch(value):
raise MachineError(f'Refusing to render {name}.')
return re.sub(r'__OPEN_WEBUI_([A-Z_]+)__', lambda m: values[m.group(1)], template)
# ---------------------------------------------------------------------------
# Stored machines
# ---------------------------------------------------------------------------
def kind(c: dict) -> str | None:
return 'local' if c.get('local') is not None else 'ssh' if c.get('ssh') is not None else None
def state(c: dict) -> dict:
return c.get('local') or c.get('ssh') or {}
async def list_connections() -> list[dict]:
return list(await Config.get(CONNECTIONS, []) or [])
async def get_machine(machine_id: str) -> dict:
for c in await list_connections():
if c.get('id') == machine_id and kind(c):
return c
raise MachineError('Unknown machine.')
async def save_machine(entry: dict):
connections = [c for c in await list_connections() if c.get('id') != entry['id']]
await Config.upsert({CONNECTIONS: [*connections, entry]})
async def update_state(machine_id: str, **fields):
connections = await list_connections()
for c in connections:
if c.get('id') == machine_id and kind(c):
c[kind(c)] = {**state(c), **fields}
await Config.upsert({CONNECTIONS: connections})
async def open_host(machine: dict):
"""Where the machine's scripts run: this computer, or over SSH."""
if kind(machine) == 'local':
return local.LocalHost()
return ssh.SSHHost(machine['ssh'], await ssh.machine_key(machine['id']))
# ---------------------------------------------------------------------------
# Install
# ---------------------------------------------------------------------------
async def run_bootstrap(
host, machine_id: str, api_key: str, on_step, version: str = 'latest', folder: str = ''
) -> tuple[str, str]:
"""Install or upgrade Open Terminal and start it. Returns (install root, installed version)."""
script = f'FOLDER={shlex.quote(folder)}\n' + render(
BOOTSTRAP,
ID=machine_id,
VERSION=requested_version(version),
MIN_VERSION=MIN_OPEN_TERMINAL_VERSION,
UV_VERSION=UV_VERSION,
API_KEY=api_key,
)
proc = await host.start(script) # stdin, not argv: the API key never shows up in `ps`
root, installed, error, tail = None, None, None, deque(maxlen=80)
try:
async with asyncio.timeout(900): # a cold install downloads Python and the package
async for line in proc.lines():
line = line.rstrip('\n')
tail.append(line)
if not line.startswith('OPEN_WEBUI:'):
continue
_, name, value = line.split(':', 2)
if name == 'step':
await on_step(value)
elif name == 'root':
root = value
elif name == 'version':
installed = value
elif name == 'error':
error = value
status = await proc.wait()
finally:
proc.close()
if status != 0 or not root:
raise MachineError(error or '\n'.join(tail) or 'Setup failed.')
if not host.valid_root(root, machine_id):
raise MachineError(f'Unexpected install path: {root}')
return root, installed or ''
# ---------------------------------------------------------------------------
# Connections (opened lazily, one per machine per worker process)
# ---------------------------------------------------------------------------
async def _wait_healthy(path: str, seconds: float = 60):
async with aiohttp.ClientSession(connector=aiohttp.UnixConnector(path=path)) as session:
deadline = time.monotonic() + seconds
while time.monotonic() < deadline:
with suppress(aiohttp.ClientError, asyncio.TimeoutError):
async with session.get('http://machine/health', timeout=aiohttp.ClientTimeout(total=5)) as r:
if r.status == 200:
return
await asyncio.sleep(0.5)
raise MachineError('Open Terminal did not become healthy within a minute.')
class Tunnel:
"""The socket Open WebUI talks to: the local end of an SSH tunnel, or (conn None) Open Terminal's own socket."""
def __init__(self, conn, path: str, server=None):
self.conn, self.path, self.server = conn, path, server
@property
def alive(self) -> bool:
if self.conn is None:
return Path(self.path).exists()
return not self.conn.is_closed()
def close(self):
if self.conn is None:
return # Open Terminal's own socket: never delete it
if self.server:
self.server.close()
self.conn.close()
Path(self.path).unlink(missing_ok=True)
class Tunnels:
def __init__(self):
self.open: dict[str, Tunnel] = {}
self.opening: dict[str, asyncio.Task] = {}
async def socket_for(self, machine_id: str) -> str:
tunnel = self.open.get(machine_id)
if tunnel and tunnel.alive:
return tunnel.path
task = self.opening.get(machine_id)
if task is None:
task = asyncio.create_task(self._replace(machine_id))
self.opening[machine_id] = task
task.add_done_callback(partial(self._opened, machine_id))
# Shielded: a caller with a short timeout gives up waiting without aborting the open for everyone.
return await asyncio.shield(task)
def _opened(self, machine_id: str, task: asyncio.Task):
if self.opening.get(machine_id) is task:
del self.opening[machine_id]
if not task.cancelled():
task.exception() # mark retrieved: an open nobody waited for must not log "never retrieved"
async def _replace(self, machine_id: str) -> str:
old = self.open.pop(machine_id, None)
if old:
old.close()
tunnel = await self._open(await get_machine(machine_id))
self.open[machine_id] = tunnel
return tunnel.path
async def _open(self, machine: dict) -> Tunnel:
root = state(machine)['root']
if kind(machine) == 'local':
await local.LocalHost().sh(f'{shlex.quote(root + "/start.sh")}\n') # relaunch after a restart or crash
path = f'{root}/run/api.sock'
await _wait_healthy(path)
return Tunnel(None, path)
path = str(RUN_DIR / f'{machine["id"]}.sock')
Path(path).unlink(missing_ok=True) # a stale file from a dropped tunnel blocks listening
conn, server = await ssh.open_tunnel(machine, path)
tunnel = Tunnel(conn, path, server)
try:
await _wait_healthy(path)
except BaseException:
tunnel.close()
raise
return tunnel
async def drop(self, machine_id: str):
task = self.opening.pop(machine_id, None)
if task:
task.cancel()
await asyncio.wait([task])
tunnel = self.open.pop(machine_id, None)
if tunnel:
tunnel.close()
tunnels = Tunnels()
# ---------------------------------------------------------------------------
# Client used by get_machine_client('ssh://<id>' or 'local://<id>')
# ---------------------------------------------------------------------------
class _Operation:
"""Supports `await op` and `async with op`, like aiohttp's own request objects."""
def __init__(self, coroutine):
self.coroutine, self.value = coroutine, None
def __await__(self):
return self.coroutine.__await__()
async def __aenter__(self):
self.value = await self.coroutine
return self.value
async def __aexit__(self, *_):
if isinstance(self.value, aiohttp.ClientWebSocketResponse):
await self.value.close()
elif self.value is not None:
self.value.release()
class MachineClient:
def __init__(self, machine_id: str, **kwargs):
kwargs.pop('trust_env', None) # HTTP_PROXY must never apply to a local socket
self.machine_id, self.kwargs = machine_id, kwargs
self.session: aiohttp.ClientSession | None = None
self.path: str | None = None
async def _session(self) -> aiohttp.ClientSession:
# Opening the connection counts against the caller's timeout, like a TCP connect would.
timeout = self.kwargs.get('timeout')
limit = getattr(timeout, 'total', None) or getattr(timeout, 'connect', None)
try:
async with asyncio.timeout(limit):
path = await tunnels.socket_for(self.machine_id)
except TimeoutError:
raise
except Exception as error:
# Callers already handle aiohttp connection errors for unreachable servers.
raise aiohttp.ClientConnectionError(f'Machine unavailable: {describe(error)}') from error
if self.session is None or self.session.closed or path != self.path:
await self._reset()
self.session = aiohttp.ClientSession(connector=aiohttp.UnixConnector(path=path), **self.kwargs)
self.path = path
return self.session
async def _reset(self):
if self.session and not self.session.closed:
await self.session.close()
self.session = self.path = None
@staticmethod
def _url(url) -> str:
parts = urlsplit(str(url))
return f'http://machine{parts.path or "/"}' + (f'?{parts.query}' if parts.query else '')
async def _request(self, method: str, url, **kwargs):
replayable = method in SAFE_METHODS and kwargs.get('data') is None
for attempt in (0, 1):
session = await self._session()
try:
return await session.request(method, self._url(url), **kwargs)
except aiohttp.ClientConnectionError as error:
# Reconnect once (which also restarts Open Terminal if it died). Always safe when
# the connect itself failed, since nothing was sent; otherwise only for safe requests.
if attempt or not (replayable or isinstance(error, aiohttp.ClientConnectorError)):
raise
await self._reset()
await tunnels.drop(self.machine_id)
async def _ws_connect(self, url, **kwargs):
kwargs.pop('ssl', None)
for attempt in (0, 1):
session = await self._session()
try:
return await session.ws_connect(self._url(url), **kwargs)
except aiohttp.ClientConnectorError:
if attempt:
raise
await self._reset()
await tunnels.drop(self.machine_id)
def request(self, method, url, **kwargs):
return _Operation(self._request(method.upper(), url, **kwargs))
def ws_connect(self, url, **kwargs):
return _Operation(self._ws_connect(url, **kwargs))
def __getattr__(self, name):
if name in ('get', 'post', 'put', 'patch', 'delete', 'head', 'options'):
return lambda url, **kwargs: self.request(name.upper(), url, **kwargs)
raise AttributeError(name)
@property
def closed(self) -> bool:
return self.session is None or self.session.closed
async def close(self):
await self._reset()
async def __aenter__(self):
return self
async def __aexit__(self, *_):
await self.close()
# ---------------------------------------------------------------------------
# Lifecycle
# ---------------------------------------------------------------------------
async def provision(
request,
machine_id: str,
admin_id: str,
*,
name: str | None = None,
target: dict | None = None,
is_local: bool = False,
version: str | None = None,
folder: str | None = None,
):
"""Create (target given, or is_local) or upgrade/repair (neither) a machine, streaming progress to the admin.
`version` is 'latest' or an exact Open Terminal version, and `folder` is where sessions start.
When omitted, the machine keeps what the admin chose last time.
"""
from open_webui.socket.main import emit_to_users
from open_webui.utils.machines import notify_machines_changed
from open_webui.utils.tools import set_terminal_servers
async def step(value: str, **extra):
await emit_to_users(
'events',
{'data': {'type': 'machines:progress', 'id': machine_id, 'step': value, **extra}},
[admin_id],
)
existing = None
with suppress(MachineError):
existing = await get_machine(machine_id)
if existing:
is_local = kind(existing) == 'local'
elif not is_local and not target:
raise MachineError('Unknown machine.')
current = state(existing) if existing else {}
source = current if existing else (target or {})
api_key = (existing or {}).get('key') or secrets.token_urlsafe(32)
requested = requested_version(version if version is not None else current.get('requested_version'))
if folder is None:
folder = current.get('folder') or ''
if is_local and not folder:
folder = local.default_folder()
try:
if existing:
await update_state(machine_id, status='installing')
await tunnels.drop(machine_id)
await step('connect')
machine = existing or ({'id': machine_id, 'local': {}} if is_local else {'id': machine_id, 'ssh': target})
async with await open_host(machine) as host:
root, installed = await run_bootstrap(host, machine_id, api_key, step, requested, folder)
transport = await host.transport(root)
entry = existing or {
'id': machine_id,
'name': name or ('Local' if is_local else target['host']),
'url': f'{"local" if is_local else "ssh"}://{machine_id}',
'auth_type': 'bearer',
'enabled': True,
'config': {'access_grants': []}, # admins only until shared
}
entry['key'] = api_key
entry['local' if is_local else 'ssh'] = {
**({} if is_local else {k: source[k] for k in ('host', 'port', 'username', 'host_key')}),
'root': root,
'folder': folder,
'version': installed,
'requested_version': requested,
'transport': transport,
'status': 'ready',
'error': None,
}
await save_machine(entry)
if not is_local:
await ssh.attach_secret(machine_id)
await step('health')
await tunnels.socket_for(machine_id)
await set_terminal_servers(request) # load its OpenAPI spec like any other terminal
await notify_machines_changed([admin_id])
await step('ready')
except Exception as error:
log.exception('Provisioning %s failed', machine_id)
message = describe(error)
if existing:
await update_state(machine_id, status='error', error=message)
await step('error', message=message)
async def set_folder(machine_id: str, folder: str):
"""Change where sessions start, then restart Open Terminal there."""
machine = await get_machine(machine_id)
root = state(machine)['root']
folder = clean_folder(folder) or (local.default_folder() if kind(machine) == 'local' else '')
q = shlex.quote
await tunnels.drop(machine_id)
async with await open_host(machine) as host:
await host.sh(
f'F={q(folder)}\n'
'if [ -n "$F" ] && [ ! -d "$F" ]; then echo "Folder not found: $F" >&2; exit 1; fi\n'
f'printf %s "$F" > {q(root + "/folder")}\n'
f'{q(root + "/stop.sh")}\n{q(root + "/start.sh")}\n'
)
await update_state(machine_id, folder=folder)
async def restart(machine_id: str):
machine = await get_machine(machine_id)
root = state(machine)['root']
await tunnels.drop(machine_id)
async with await open_host(machine) as host:
await host.sh(f'{shlex.quote(root + "/stop.sh")}\n{shlex.quote(root + "/start.sh")}\n')
await tunnels.socket_for(machine_id)
async def logs(machine_id: str, lines: int = 200) -> str:
machine = await get_machine(machine_id)
root = state(machine)['root']
async with await open_host(machine) as host:
return await host.sh(f'tail -n {int(lines)} {shlex.quote(root + "/server.log")} 2>/dev/null || true\n')
async def forget(machine_id: str):
"""Drop our own state (connection + key). Leaves the install in place."""
await tunnels.drop(machine_id)
await ssh.delete_secret(machine_id)
async def uninstall(machine_id: str):
"""Stop the server, delete the install, remove the machine and its key."""
machine = await get_machine(machine_id)
root = state(machine)['root']
await tunnels.drop(machine_id)
async with await open_host(machine) as host:
# rmdir only succeeds when the parent folder is empty, so other installs there are kept.
parent = shlex.quote(root.rsplit('/', 1)[0])
await host.sh(
f'{shlex.quote(root + "/stop.sh")} || true\nrm -rf {shlex.quote(root)}\nrmdir {parent} 2>/dev/null || true\n',
)
await remove(machine_id)
async def remove(machine_id: str):
"""Remove the machine from Open WebUI only (for machines that are gone or unreachable)."""
await Config.upsert({CONNECTIONS: [c for c in await list_connections() if c.get('id') != machine_id]})
await forget(machine_id)
+56 -449
View File
@@ -1,26 +1,18 @@
"""SSH-provisioned Open Terminal machines.
"""SSH machines: keys, host-key pinning, running scripts and opening tunnels over SSH.
An admin authorizes a key Open WebUI generated. We install Open Terminal under
~/.open-webui/<id> on the host, run it on a Unix socket (no TCP port), and
reach it through SSH channels. The machine then lives in machines.connections
with url ssh://<id>, so every existing machine feature works unchanged.
An admin authorizes a key Open WebUI generated. managed.py installs Open Terminal under
~/.open-webui/<id> on the host through SSHHost, and reaches its Unix socket through
open_tunnel (sshd's streamlocal forwarding, or `open-terminal bridge` over exec).
"""
import asyncio
import base64
import logging
import re
import secrets
import shlex
import tempfile
import time
from collections import deque
from contextlib import suppress
from functools import partial
from pathlib import Path
from urllib.parse import urlsplit
import aiohttp
import asyncssh
from cryptography.fernet import Fernet
from cryptography.hazmat.primitives import hashes
@@ -28,55 +20,17 @@ from cryptography.hazmat.primitives.kdf.hkdf import HKDF
from open_webui.env import WEBUI_SECRET_KEY
from open_webui.models.config import Config
from open_webui.utils.machines import MachineError
log = logging.getLogger(__name__)
# Machines install the latest Open Terminal by default, or a version the admin pins.
# This is the oldest one Open WebUI works with (first with `open-terminal bridge`).
MIN_OPEN_TERMINAL_VERSION = '0.17.21'
UV_VERSION = '0.13.9'
CONNECTIONS = 'machines.connections'
SECRETS = 'machines.secrets' # never returned to the browser
PENDING_TTL = 3600 # keypairs never attached to a machine are pruned after an hour
SAFE_METHODS = {'GET', 'HEAD', 'OPTIONS'}
ID_RE = re.compile(r'm_[0-9a-f]{8}')
ROOT_RE = re.compile(r'/[A-Za-z0-9._/@+-]+/\.open-webui/m_[0-9a-f]{8}')
TOKENS = {
'ID': ID_RE,
'VERSION': re.compile(r'latest|\d+\.\d+\.\d+'),
'MIN_VERSION': re.compile(r'\d+\.\d+\.\d+'),
'UV_VERSION': re.compile(r'\d+\.\d+\.\d+'),
'API_KEY': re.compile(r'[A-Za-z0-9_-]{32,64}'),
}
# Run scripts under the user's login shell so profile PATH applies (claude, codex, nvm, ...).
LOGIN = (
"""sh -c 'case "$SHELL" in """
"""*/bash|*/zsh|*/ksh|*/fish) exec "$SHELL" -l -c "exec sh -s";; *) exec sh -s;; esac'"""
)
BOOTSTRAP = Path(__file__).with_name('bootstrap.sh').read_text()
# Unix socket paths max out around 104 characters on macOS, so keep this short.
RUN_DIR = Path(tempfile.mkdtemp(prefix='open-webui-', dir='/tmp'))
class MachineError(Exception):
pass
def describe(error: BaseException) -> str:
"""Turn SSH failures into something an admin can act on."""
if isinstance(error, asyncssh.HostKeyNotVerifiable):
return "The machine's host key changed. Remove and re-add the machine if this is expected."
if isinstance(error, asyncssh.PermissionDenied):
return 'SSH login was refused. Check that the key is in ~/.ssh/authorized_keys, or the password is right.'
if isinstance(error, asyncio.TimeoutError):
return 'The machine took too long to respond.'
if isinstance(error, OSError):
return f'Could not reach the machine: {error.strerror or error}'
return str(error) or type(error).__name__
# ---------------------------------------------------------------------------
# Secrets
@@ -111,21 +65,21 @@ async def new_keypair() -> tuple[str, str]:
return machine_id, key.export_public_key().decode().strip()
async def _private_key(machine_id: str) -> asyncssh.SSHKey:
async def machine_key(machine_id: str) -> asyncssh.SSHKey:
entry = (await _load_secrets()).get(machine_id)
if not entry:
raise MachineError('No key is stored for this machine.')
return asyncssh.import_private_key(_cipher().decrypt(entry['private_key'].encode()))
async def _attach_secret(machine_id: str):
async def attach_secret(machine_id: str):
store = await _load_secrets()
if machine_id in store:
store[machine_id]['attached'] = True
await Config.upsert({SECRETS: store})
async def _delete_secret(machine_id: str):
async def delete_secret(machine_id: str):
store = await _load_secrets()
if store.pop(machine_id, None) is not None:
await Config.upsert({SECRETS: store})
@@ -216,69 +170,10 @@ async def install_public_key(
f"(grep -qxF '{public_key}' ~/.ssh/authorized_keys || "
f"printf '%s\\n' '{public_key}' >> ~/.ssh/authorized_keys)",
)
async with await connect(ssh, key=await _private_key(machine_id)):
async with await connect(ssh, key=await machine_key(machine_id)):
pass
def requested_version(value: str | None) -> str:
"""Normalize the admin's choice: 'latest' (default) or an exact version no older than the minimum."""
value = (value or '').strip() or 'latest'
if value == 'latest':
return value
if not re.fullmatch(r'\d+\.\d+\.\d+', value):
raise MachineError('Use "latest" or a version like 0.17.21.')
if tuple(map(int, value.split('.'))) < tuple(map(int, MIN_OPEN_TERMINAL_VERSION.split('.'))):
raise MachineError(f'Open WebUI needs Open Terminal {MIN_OPEN_TERMINAL_VERSION} or newer.')
return value
def render(template: str, **values: str) -> str:
for name, value in values.items():
if not TOKENS[name].fullmatch(value):
raise MachineError(f'Refusing to render {name}.')
return re.sub(r'__OPEN_WEBUI_([A-Z_]+)__', lambda m: values[m.group(1)], template)
async def run_bootstrap(conn, machine_id: str, api_key: str, on_step, version: str = 'latest') -> tuple[str, str]:
"""Install or upgrade Open Terminal and start it. Returns (install root, installed version)."""
script = render(
BOOTSTRAP,
ID=machine_id,
VERSION=requested_version(version),
MIN_VERSION=MIN_OPEN_TERMINAL_VERSION,
UV_VERSION=UV_VERSION,
API_KEY=api_key,
)
proc = await conn.create_process(LOGIN, stderr=asyncssh.STDOUT)
proc.stdin.write(script) # stdin, not argv: the API key never shows up in `ps`
proc.stdin.write_eof()
root, installed, error, tail = None, None, None, deque(maxlen=80)
try:
async with asyncio.timeout(900): # a cold install downloads Python and the package
async for line in proc.stdout:
line = line.rstrip('\n')
tail.append(line)
if not line.startswith('OPEN_WEBUI:'):
continue
_, kind, value = line.split(':', 2)
if kind == 'step':
await on_step(value)
elif kind == 'root':
root = value
elif kind == 'version':
installed = value
elif kind == 'error':
error = value
await proc.wait()
finally:
proc.close()
if proc.exit_status != 0 or not root:
raise MachineError(error or '\n'.join(tail) or 'Setup failed.')
if not ROOT_RE.fullmatch(root):
raise MachineError(f'Unexpected install path: {root}')
return root, installed or ''
async def detect_transport(conn, root: str) -> str:
"""'streamlocal' if sshd forwards to Unix sockets, else 'stdio' (`open-terminal bridge` over exec)."""
try:
@@ -293,40 +188,6 @@ async def detect_transport(conn, root: str) -> str:
raise MachineError('Open Terminal is not listening on the machine.') from error
# ---------------------------------------------------------------------------
# Stored machines
# ---------------------------------------------------------------------------
async def list_connections() -> list[dict]:
return list(await Config.get(CONNECTIONS, []) or [])
async def get_machine(machine_id: str) -> dict:
for c in await list_connections():
if c.get('id') == machine_id and c.get('ssh'):
return c
raise MachineError('Unknown machine.')
async def save_machine(entry: dict):
connections = [c for c in await list_connections() if c.get('id') != entry['id']]
await Config.upsert({CONNECTIONS: [*connections, entry]})
async def update_ssh(machine_id: str, **fields):
connections = await list_connections()
for c in connections:
if c.get('id') == machine_id and c.get('ssh'):
c['ssh'] = {**c['ssh'], **fields}
await Config.upsert({CONNECTIONS: connections})
# ---------------------------------------------------------------------------
# Tunnels (one SSH connection per machine per worker process)
# ---------------------------------------------------------------------------
async def _bridge(conn, root: str, reader, writer):
"""stdio transport: each local connection gets its own `open-terminal bridge` on the machine."""
proc = await conn.create_process(
@@ -350,319 +211,65 @@ async def _bridge(conn, root: str, reader, writer):
writer.close()
async def _wait_healthy(path: str, seconds: float = 60):
async with aiohttp.ClientSession(connector=aiohttp.UnixConnector(path=path)) as session:
deadline = time.monotonic() + seconds
while time.monotonic() < deadline:
with suppress(aiohttp.ClientError, asyncio.TimeoutError):
async with session.get('http://machine/health', timeout=aiohttp.ClientTimeout(total=5)) as r:
if r.status == 200:
return
await asyncio.sleep(0.5)
raise MachineError('Open Terminal did not become healthy within a minute.')
class _Process:
def __init__(self, proc):
self.proc = proc
async def lines(self):
async for line in self.proc.stdout:
yield line
class Tunnel:
def __init__(self, conn, path: str, server=None):
self.conn, self.path, self.server = conn, path, server
@property
def alive(self) -> bool:
return not self.conn.is_closed()
async def wait(self) -> int:
await self.proc.wait()
return self.proc.exit_status
def close(self):
if self.server:
self.server.close()
self.conn.close()
Path(self.path).unlink(missing_ok=True)
self.proc.close()
class Tunnels:
def __init__(self):
self.open: dict[str, Tunnel] = {}
self.opening: dict[str, asyncio.Task] = {}
class SSHHost:
"""Runs a machine's scripts over SSH (see managed.open_host)."""
async def socket_for(self, machine_id: str) -> str:
tunnel = self.open.get(machine_id)
if tunnel and tunnel.alive:
return tunnel.path
task = self.opening.get(machine_id)
if task is None:
task = asyncio.create_task(self._replace(machine_id))
self.opening[machine_id] = task
task.add_done_callback(partial(self._opened, machine_id))
# Shielded: a caller with a short timeout gives up waiting without aborting the open for everyone.
return await asyncio.shield(task)
def _opened(self, machine_id: str, task: asyncio.Task):
if self.opening.get(machine_id) is task:
del self.opening[machine_id]
if not task.cancelled():
task.exception() # mark retrieved: an open nobody waited for must not log "never retrieved"
async def _replace(self, machine_id: str) -> str:
old = self.open.pop(machine_id, None)
if old:
old.close()
tunnel = await self._open(await get_machine(machine_id))
self.open[machine_id] = tunnel
return tunnel.path
async def _open(self, machine: dict) -> Tunnel:
ssh = machine['ssh']
root = ssh['root']
conn = await connect(ssh, key=await _private_key(machine['id']))
try:
await sh(conn, f'{shlex.quote(root + "/start.sh")}\n') # relaunch after a reboot or crash
path = str(RUN_DIR / f'{machine["id"]}.sock')
Path(path).unlink(missing_ok=True) # a stale file from a dropped tunnel blocks listening
server = None
if ssh.get('transport') == 'stdio':
server = await asyncio.start_unix_server(partial(_bridge, conn, root), path=path)
else:
await conn.forward_local_path(path, f'{root}/run/api.sock')
await _wait_healthy(path)
return Tunnel(conn, path, server)
except BaseException:
conn.close()
raise
async def drop(self, machine_id: str):
task = self.opening.pop(machine_id, None)
if task:
task.cancel()
await asyncio.wait([task])
tunnel = self.open.pop(machine_id, None)
if tunnel:
tunnel.close()
tunnels = Tunnels()
# ---------------------------------------------------------------------------
# Client used by get_machine_client('ssh://<id>')
# ---------------------------------------------------------------------------
class _Operation:
"""Supports `await op` and `async with op`, like aiohttp's own request objects."""
def __init__(self, coroutine):
self.coroutine, self.value = coroutine, None
def __await__(self):
return self.coroutine.__await__()
async def __aenter__(self):
self.value = await self.coroutine
return self.value
async def __aexit__(self, *_):
if isinstance(self.value, aiohttp.ClientWebSocketResponse):
await self.value.close()
elif self.value is not None:
self.value.release()
class MachineClient:
def __init__(self, machine_id: str, **kwargs):
kwargs.pop('trust_env', None) # HTTP_PROXY must never apply to a local socket
self.machine_id, self.kwargs = machine_id, kwargs
self.session: aiohttp.ClientSession | None = None
self.path: str | None = None
async def _session(self) -> aiohttp.ClientSession:
# Opening the tunnel counts against the caller's timeout, like a TCP connect would.
timeout = self.kwargs.get('timeout')
limit = getattr(timeout, 'total', None) or getattr(timeout, 'connect', None)
try:
async with asyncio.timeout(limit):
path = await tunnels.socket_for(self.machine_id)
except TimeoutError:
raise
except Exception as error:
# Callers already handle aiohttp connection errors for unreachable servers.
raise aiohttp.ClientConnectionError(f'Machine unavailable: {describe(error)}') from error
if self.session is None or self.session.closed or path != self.path:
await self._reset()
self.session = aiohttp.ClientSession(connector=aiohttp.UnixConnector(path=path), **self.kwargs)
self.path = path
return self.session
async def _reset(self):
if self.session and not self.session.closed:
await self.session.close()
self.session = self.path = None
@staticmethod
def _url(url) -> str:
parts = urlsplit(str(url))
return f'http://machine{parts.path or "/"}' + (f'?{parts.query}' if parts.query else '')
async def _request(self, method: str, url, **kwargs):
replayable = method in SAFE_METHODS and kwargs.get('data') is None
for attempt in (0, 1):
session = await self._session()
try:
return await session.request(method, self._url(url), **kwargs)
except aiohttp.ClientConnectionError:
# The SSH connection dropped before a response: reconnect once for safe requests.
if attempt or not replayable:
raise
await self._reset()
await tunnels.drop(self.machine_id)
async def _ws_connect(self, url, **kwargs):
kwargs.pop('ssl', None)
session = await self._session()
return await session.ws_connect(self._url(url), **kwargs)
def request(self, method, url, **kwargs):
return _Operation(self._request(method.upper(), url, **kwargs))
def ws_connect(self, url, **kwargs):
return _Operation(self._ws_connect(url, **kwargs))
def __getattr__(self, name):
if name in ('get', 'post', 'put', 'patch', 'delete', 'head', 'options'):
return lambda url, **kwargs: self.request(name.upper(), url, **kwargs)
raise AttributeError(name)
@property
def closed(self) -> bool:
return self.session is None or self.session.closed
async def close(self):
await self._reset()
def __init__(self, target: dict, key: asyncssh.SSHKey):
self.target, self.key = target, key
async def __aenter__(self):
self.conn = await connect(self.target, key=self.key)
return self
async def __aexit__(self, *_):
await self.close()
self.conn.close()
await self.conn.wait_closed()
async def start(self, script: str) -> _Process:
proc = await self.conn.create_process(LOGIN, stderr=asyncssh.STDOUT)
proc.stdin.write(script)
proc.stdin.write_eof()
return _Process(proc)
async def sh(self, script: str, *, timeout: float = 60) -> str:
return await sh(self.conn, script, timeout=timeout)
def valid_root(self, root: str, machine_id: str) -> bool:
return bool(ROOT_RE.fullmatch(root)) and root.endswith('/' + machine_id)
async def transport(self, root: str) -> str:
return await detect_transport(self.conn, root)
# ---------------------------------------------------------------------------
# Lifecycle
# ---------------------------------------------------------------------------
async def provision(
request,
machine_id: str,
admin_id: str,
*,
name: str | None = None,
ssh: dict | None = None,
version: str | None = None,
):
"""Create (ssh given) or upgrade/repair (ssh omitted) a machine, streaming progress to the admin.
`version` is 'latest' or an exact Open Terminal version. When omitted, the machine keeps
the version the admin chose last time ('latest' if none).
"""
from open_webui.socket.main import emit_to_users
from open_webui.utils.machines import notify_machines_changed
from open_webui.utils.tools import set_terminal_servers
async def step(value: str, **extra):
await emit_to_users(
'events',
{'data': {'type': 'machines:progress', 'id': machine_id, 'step': value, **extra}},
[admin_id],
)
existing = None
with suppress(MachineError):
existing = await get_machine(machine_id)
ssh = ssh or (existing or {}).get('ssh')
if not ssh:
raise MachineError('Unknown machine.')
api_key = (existing or {}).get('key') or secrets.token_urlsafe(32)
requested = requested_version(version if version is not None else ssh.get('requested_version'))
async def open_tunnel(machine: dict, path: str):
"""Make sure Open Terminal runs, then expose its socket at `path` here. Returns (conn, server)."""
target = machine['ssh']
root = target['root']
conn = await connect(target, key=await machine_key(machine['id']))
try:
if existing:
await update_ssh(machine_id, status='installing')
await tunnels.drop(machine_id)
await step('connect')
async with await connect(ssh, key=await _private_key(machine_id)) as conn:
root, installed = await run_bootstrap(conn, machine_id, api_key, step, requested)
transport = await detect_transport(conn, root)
entry = existing or {
'id': machine_id,
'name': name or ssh['host'],
'url': f'ssh://{machine_id}',
'auth_type': 'bearer',
'enabled': True,
'config': {'access_grants': []},
}
entry['key'] = api_key
entry['ssh'] = {
**{k: ssh[k] for k in ('host', 'port', 'username', 'host_key')},
'root': root,
'version': installed,
'requested_version': requested,
'transport': transport,
'status': 'ready',
'error': None,
}
await save_machine(entry)
await _attach_secret(machine_id)
await step('health')
await tunnels.socket_for(machine_id)
await set_terminal_servers(request) # load its OpenAPI spec like any other terminal
await notify_machines_changed([admin_id])
await step('ready')
except Exception as error:
log.exception('Provisioning %s failed', machine_id)
message = describe(error)
if existing:
await update_ssh(machine_id, status='error', error=message)
await step('error', message=message)
async def restart(machine_id: str):
machine = await get_machine(machine_id)
root = machine['ssh']['root']
await tunnels.drop(machine_id)
async with await connect(machine['ssh'], key=await _private_key(machine_id)) as conn:
await sh(conn, f'{shlex.quote(root + "/stop.sh")}\n{shlex.quote(root + "/start.sh")}\n')
await tunnels.socket_for(machine_id)
async def logs(machine_id: str, lines: int = 200) -> str:
machine = await get_machine(machine_id)
root = machine['ssh']['root']
async with await connect(machine['ssh'], key=await _private_key(machine_id)) as conn:
return await sh(conn, f'tail -n {int(lines)} {shlex.quote(root + "/server.log")} 2>/dev/null || true\n')
async def forget(machine_id: str):
"""Drop our local state (tunnel + key). Leaves the install on the machine."""
await tunnels.drop(machine_id)
await _delete_secret(machine_id)
async def uninstall(machine_id: str):
"""Stop the server, delete the install, remove the machine and its key."""
machine = await get_machine(machine_id)
root = machine['ssh']['root']
await tunnels.drop(machine_id)
async with await connect(machine['ssh'], key=await _private_key(machine_id)) as conn:
# rmdir only succeeds when ~/.open-webui is empty, so other installs there are kept.
parent = shlex.quote(root.rsplit('/', 1)[0])
await sh(
conn,
f'{shlex.quote(root + "/stop.sh")} || true\nrm -rf {shlex.quote(root)}\nrmdir {parent} 2>/dev/null || true\n',
)
await remove(machine_id)
async def remove(machine_id: str):
"""Remove the machine from Open WebUI only (for machines that are gone or unreachable)."""
await Config.upsert({CONNECTIONS: [c for c in await list_connections() if c.get('id') != machine_id]})
await forget(machine_id)
await sh(conn, f'{shlex.quote(root + "/start.sh")}\n') # relaunch after a reboot or crash
server = None
if target.get('transport') == 'stdio':
server = await asyncio.start_unix_server(partial(_bridge, conn, root), path=path)
else:
await conn.forward_local_path(path, f'{root}/run/api.sock')
return conn, server
except BaseException:
conn.close()
raise
+42 -26
View File
@@ -863,23 +863,27 @@ export async function templatesApi(path = '', method = 'GET', body?: unknown) {
return data;
}
// Machines added over SSH: Open WebUI installs and runs Open Terminal on them.
// Managed machines: Open WebUI installs and runs Open Terminal on them, over SSH or on
// this computer (experimental).
export type SSHTarget = { host: string; port: number; username: string };
export type SSHMachineInfo = {
host: string;
port: number;
username: string;
host_key: string;
/** Install state shared by both kinds (`connection.ssh` or `connection.local`). */
export type ManagedMachineInfo = {
root?: string;
folder?: string; // where terminal sessions start; empty is home
version?: string;
requested_version?: string; // 'latest' or an exact version
transport?: 'streamlocal' | 'stdio';
status?: 'installing' | 'ready' | 'error';
error?: string | null;
};
export type SSHMachineInfo = ManagedMachineInfo &
SSHTarget & {
host_key: string;
transport?: 'streamlocal' | 'stdio';
};
/** Parse `ssh://user@host[:port]`. Returns null for anything else. */
export const parseSSHUrl = (value: string): SSHTarget | null => {
const match = value
@@ -896,13 +900,13 @@ export const parseSSHUrl = (value: string): SSHTarget | null => {
export const formatSSHUrl = ({ username, host, port }: SSHTarget) =>
`ssh://${username}@${host.includes(':') ? `[${host}]` : host}${port === 22 ? '' : `:${port}`}`;
const sshRequest = async <T>(
const machineRequest = async <T>(
token: string,
path: string,
method = 'GET',
body?: unknown
): Promise<T> => {
const res = await fetch(`${WEBUI_API_BASE_URL}/machines/ssh${path}`, {
const res = await fetch(`${WEBUI_API_BASE_URL}/machines${path}`, {
method,
headers: {
Authorization: `Bearer ${token}`,
@@ -924,13 +928,15 @@ const sshRequest = async <T>(
return data as T;
};
const managedPath = (id: string, action = '') => `/managed/${encodeURIComponent(id)}${action}`;
/** Fetch the machine's host key without logging in, so the admin can confirm it. */
export const probeSSHMachine = (token: string, target: SSHTarget) =>
sshRequest<{ host_key: string; fingerprint: string }>(token, '/probe', 'POST', target);
machineRequest<{ host_key: string; fingerprint: string }>(token, '/ssh/probe', 'POST', target);
/** Create the machine's id and the key Open WebUI will log in with. */
export const createSSHKeypair = (token: string) =>
sshRequest<{ id: string; public_key: string }>(token, '/keypair', 'POST');
machineRequest<{ id: string; public_key: string }>(token, '/ssh/keypair', 'POST');
/** Log in once with a password or private key to add Open WebUI's key. Neither is stored. */
export const installSSHKey = (
@@ -943,33 +949,43 @@ export const installSSHKey = (
private_key?: string;
passphrase?: string;
}
) => sshRequest<{ status: boolean }>(token, '/install-key', 'POST', form);
) => machineRequest<{ status: boolean }>(token, '/ssh/install-key', 'POST', form);
/** Start installing Open Terminal. Progress arrives as `machines:progress` socket events. */
export const installSSHMachine = (
token: string,
form: SSHTarget & { host_key: string; id: string; name: string; version?: string }
) => sshRequest<{ id: string; status: string }>(token, '', 'POST', form);
) => machineRequest<{ id: string; status: string }>(token, '/ssh', 'POST', form);
/** Where sessions on this computer start by default, and whether it is already added. */
export const getLocalMachineDefaults = (token: string) =>
machineRequest<{ folder: string; added: boolean }>(token, '/local');
/** Install Open Terminal on the computer Open WebUI runs on (experimental). Empty folder: the project folder Open WebUI picks. */
export const installLocalMachine = (
token: string,
form: { id: string; name?: string; version?: string; folder?: string }
) => machineRequest<{ id: string; status: string }>(token, '/local', 'POST', form);
/** Install the machine's Open Terminal again: `version` is 'latest' or an exact version (omit to keep the current choice). */
export const upgradeSSHMachine = (token: string, id: string, version?: string) =>
sshRequest<{ id: string; status: string }>(
export const upgradeMachine = (token: string, id: string, version?: string) =>
machineRequest<{ id: string; status: string }>(
token,
`/${encodeURIComponent(id)}/upgrade`,
managedPath(id, '/upgrade'),
'POST',
version === undefined ? undefined : { version }
);
export const restartSSHMachine = (token: string, id: string) =>
sshRequest<{ status: boolean }>(token, `/${encodeURIComponent(id)}/restart`, 'POST');
/** Change where terminal sessions start, then restart Open Terminal there. */
export const setMachineFolder = (token: string, id: string, folder: string) =>
machineRequest<{ status: boolean }>(token, managedPath(id, '/folder'), 'POST', { folder });
export const getSSHMachineLogs = (token: string, id: string, lines = 200) =>
sshRequest<{ logs: string }>(token, `/${encodeURIComponent(id)}/logs?lines=${lines}`);
export const restartMachine = (token: string, id: string) =>
machineRequest<{ status: boolean }>(token, managedPath(id, '/restart'), 'POST');
export const getMachineLogs = (token: string, id: string, lines = 200) =>
machineRequest<{ logs: string }>(token, managedPath(id, `/logs?lines=${lines}`));
/** Uninstall Open Terminal and remove the machine. `force` removes it even if it is unreachable. */
export const removeSSHMachine = (token: string, id: string, force = false) =>
sshRequest<{ status: boolean }>(
token,
`/${encodeURIComponent(id)}${force ? '?force=true' : ''}`,
'DELETE'
);
export const removeMachine = (token: string, id: string, force = false) =>
machineRequest<{ status: boolean }>(token, managedPath(id, force ? '?force=true' : ''), 'DELETE');
+177 -78
View File
@@ -13,18 +13,23 @@
import SensitiveInput from '$lib/components/common/SensitiveInput.svelte';
import AccessControl from '$lib/components/workspace/common/AccessControl.svelte';
import ConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
import ExperimentalBadge from '$lib/components/common/ExperimentalBadge.svelte';
import { getTerminalServerConnections, verifyTerminalServerConnection } from '$lib/apis/configs';
import {
createSSHKeypair,
formatSSHUrl,
getSSHMachineLogs,
getLocalMachineDefaults,
getMachineLogs,
installLocalMachine,
installSSHKey,
installSSHMachine,
parseSSHUrl,
probeSSHMachine,
removeSSHMachine,
restartSSHMachine,
upgradeSSHMachine,
removeMachine,
restartMachine,
setMachineFolder,
upgradeMachine,
type ManagedMachineInfo,
type SSHMachineInfo
} from '$lib/apis/machines';
import { socket } from '$lib/stores';
@@ -35,6 +40,8 @@
export let connection: any = null;
export let onSubmit: Function = () => {};
export let onDelete: () => void = () => {};
// Offer the Local type (experimental): Open WebUI runs Open Terminal on its own server.
export let allowLocal = true;
let initialized = false;
let url = '';
let key = '';
@@ -58,6 +65,10 @@
let password = '';
let privateKey = '';
let openTerminalVersion = ''; // empty means latest
// Type when adding: Remote (a URL or ssh://) or Local (the server Open WebUI runs on).
let target: 'url' | 'local' = 'url';
let folder = ''; // where terminal sessions start; empty is the default
let localDefaults: { folder: string; added: boolean } | null = null;
let passphrase = '';
let keyFileInput: HTMLInputElement;
let sshPhase: 'form' | 'fingerprint' | 'authorize' | 'installing' = 'form';
@@ -78,9 +89,15 @@
'text-xs text-base-500 transition hover:text-base-800 hover:underline disabled:opacity-50 disabled:no-underline dark:text-base-400 dark:hover:text-base-200';
const button =
'flex h-7 items-center justify-center gap-1.5 rounded-lg px-2.5 text-xs font-normal transition hover:bg-base-100 dark:hover:bg-base-850 disabled:opacity-50';
// Machines Open WebUI installed Open Terminal on: over SSH, or on this computer.
$: managed = (connection?.ssh ?? connection?.local ?? null) as ManagedMachineInfo | null;
$: sshMachine = (connection?.ssh ?? null) as SSHMachineInfo | null;
$: installingSSH = !sshMachine && url.trim().toLowerCase().startsWith('ssh://');
$: localMachine = !!connection?.local;
$: installingLocal = !connection && target === 'local';
$: installingSSH = !managed && !installingLocal && url.trim().toLowerCase().startsWith('ssh://');
$: installing = installingSSH || installingLocal;
$: sshTarget = installingSSH ? parseSSHUrl(url) : null;
$: showLocalOption = allowLocal && !connection && localDefaults !== null && !localDefaults.added;
$: if (show && !initialized) {
url = connection?.url ?? '';
key = connection?.key ?? '';
@@ -92,10 +109,19 @@
serverType = connection?.server_type ?? null;
accessGrants = connection?.config?.access_grants ?? [];
chatUploads = connection ? (connection.config?.chat_uploads ?? 'default') : 'filesystem';
const current = connection?.ssh ?? connection?.local;
openTerminalVersion =
connection?.ssh?.requested_version && connection.ssh.requested_version !== 'latest'
? connection.ssh.requested_version
current?.requested_version && current.requested_version !== 'latest'
? current.requested_version
: '';
folder = current?.folder ?? '';
target = 'url';
localDefaults = null;
if (allowLocal && !connection) {
getLocalMachineDefaults(localStorage.token)
.then((defaults) => (localDefaults = defaults))
.catch(() => {});
}
workingDirectoryContext = connection?.config?.working_directory_context ?? true;
userShellTools = connection?.config?.user_shell_tools ?? 'auto';
error = '';
@@ -197,6 +223,9 @@
busy = true;
error = '';
try {
if (managed && folder.trim() !== (managed.folder ?? '')) {
await setMachineFolder(localStorage.token, connection.id, folder.trim());
}
const result = {
...(connection ?? {}),
url: url.trim().replace(/\/$/, ''),
@@ -220,6 +249,7 @@
}
}
async function submit() {
if (installingLocal) return startLocalInstall();
if (!installingSSH) return save();
if (sshPhase === 'form') return hostKey ? authorize() : checkHost();
if (sshPhase === 'fingerprint') return authorize();
@@ -278,9 +308,36 @@
async function startInstall() {
if (!sshTarget || !hostKey || !keypair) return;
const machine = keypair;
await install(machine.id, 'ssh', () =>
installSSHMachine(localStorage.token, {
...sshTarget!,
host_key: hostKey!.host_key,
id: machine.id,
name: name.trim(),
version: openTerminalVersion.trim() || 'latest'
})
);
}
// Local: no sign-in, install right away.
async function startLocalInstall() {
const machineId = `m_${uuidv4().replace(/-/g, '').slice(0, 8)}`;
await install(machineId, 'local', () =>
installLocalMachine(localStorage.token, {
id: machineId,
name: name.trim(),
version: openTerminalVersion.trim() || 'latest',
folder: folder.trim()
})
);
}
async function install(
machineId: string,
kind: 'ssh' | 'local',
request: () => Promise<unknown>
) {
sshPhase = 'installing';
error = '';
follow(machine.id, async (ok, message) => {
follow(machineId, async (ok, message) => {
if (!ok) {
error = message ?? $i18n.t('Installation failed');
sshPhase = 'form';
@@ -289,8 +346,8 @@
try {
// The machine is saved; apply the rest of this form to it.
await onSubmit({
id: machine.id,
url: `ssh://${machine.id}`,
id: machineId,
url: `${kind}://${machineId}`,
name: name.trim(),
path: '/openapi.json',
auth_type: 'bearer',
@@ -298,7 +355,7 @@
forward_cookies: forwardCookies,
server_type: 'terminal',
config: configuration(),
ssh: {}
[kind]: {}
});
show = false;
} catch (e) {
@@ -307,13 +364,7 @@
}
});
try {
await installSSHMachine(localStorage.token, {
...sshTarget,
host_key: hostKey.host_key,
id: machine.id,
name: name.trim(),
version: openTerminalVersion.trim() || 'latest'
});
await request();
} catch (e) {
stopListening?.();
error = e instanceof Error ? e.message : String(e);
@@ -322,7 +373,7 @@
}
const authorizeCommand = (publicKey: string) =>
`mkdir -p ~/.ssh && chmod 700 ~/.ssh && echo '${publicKey}' >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys`;
// Existing SSH machines
// Existing machines Open WebUI installed (SSH or this computer)
const upgrade = () =>
run(async () => {
follow(connection.id, async (ok, message) => {
@@ -335,9 +386,10 @@
const res = await getTerminalServerConnections(localStorage.token).catch(() => null);
const updated = res?.TERMINAL_SERVER_CONNECTIONS?.find((c: any) => c.id === connection.id);
if (updated?.ssh) connection = { ...connection, ssh: updated.ssh };
if (updated?.local) connection = { ...connection, local: updated.local };
});
try {
await upgradeSSHMachine(
await upgradeMachine(
localStorage.token,
connection.id,
openTerminalVersion.trim() || 'latest'
@@ -349,21 +401,20 @@
});
const restart = () =>
run(async () => {
await restartSSHMachine(localStorage.token, connection.id);
await restartMachine(localStorage.token, connection.id);
toast.success($i18n.t('Machine restarted'));
});
const toggleLogs = () =>
run(async () => {
logs =
logs === null ? (await getSSHMachineLogs(localStorage.token, connection.id)).logs : null;
logs = logs === null ? (await getMachineLogs(localStorage.token, connection.id)).logs : null;
await tick();
if (logsElement) logsElement.scrollTop = logsElement.scrollHeight; // show the newest lines
});
const remove = (force = false) =>
run(async () => {
if (sshMachine) {
if (managed) {
try {
await removeSSHMachine(localStorage.token, connection.id, force);
await removeMachine(localStorage.token, connection.id, force);
} catch (e) {
if (force) throw e;
showForceDelete = true;
@@ -392,6 +443,28 @@
on:submit|preventDefault={submit}
>
{#if error}<p role="alert" class="text-sm text-base-700 dark:text-base-300">{error}</p>{/if}
{#if showLocalOption || localMachine}
<div class="flex items-center justify-between">
<div class="text-xs text-base-500">{$i18n.t('Type')}</div>
<button
type="button"
class="flex items-center gap-1.5 text-xs text-base-700 dark:text-base-300"
disabled={localMachine || sshPhase !== 'form'}
on:click={() => {
target = target === 'local' ? 'url' : 'local';
error = '';
resetSSH();
}}
>
{#if localMachine || target === 'local'}
{$i18n.t('Local')}
<ExperimentalBadge />
{:else}
{$i18n.t('Remote')}
{/if}
</button>
</div>
{/if}
<div class="flex gap-2">
<div class="min-w-0 flex-1">
<label for="terminal-name" class="mb-0.5 block text-xs text-base-500"
@@ -401,11 +474,11 @@
id="terminal-name"
class={input}
bind:value={name}
placeholder={$i18n.t('My Machine')}
required
placeholder={installingLocal ? $i18n.t('Local') : $i18n.t('My Machine')}
required={!installingLocal}
/>
</div>
{#if !installingSSH && !sshMachine}
{#if !installing && !managed}
<div class="min-w-0 flex-1">
<label for="terminal-id" class="mb-0.5 block text-xs text-base-500">
{$i18n.t('ID')} <span class="opacity-50">({$i18n.t('optional')})</span>
@@ -421,43 +494,46 @@
</div>
{/if}
</div>
<div class="flex items-end gap-2">
<div class="min-w-0 flex-1">
<label for="terminal-url" class="mb-0.5 block text-xs text-base-500">{$i18n.t('URL')}</label
>
{#if sshMachine}
<input id="terminal-url" class={input} value={formatSSHUrl(sshMachine)} disabled />
{:else}
<input
id="terminal-url"
class={input}
bind:value={url}
type="url"
placeholder="https://terminal.example.com or ssh://user@host"
required
disabled={sshPhase !== 'form'}
on:input={() => {
serverType = null;
resetSSH();
}}
/>
{#if !installingLocal && !localMachine}
<div class="flex items-end gap-2">
<div class="min-w-0 flex-1">
<label for="terminal-url" class="mb-0.5 block text-xs text-base-500"
>{$i18n.t('URL')}</label
>
{#if sshMachine}
<input id="terminal-url" class={input} value={formatSSHUrl(sshMachine)} disabled />
{:else}
<input
id="terminal-url"
class={input}
bind:value={url}
type="url"
placeholder="https://terminal.example.com or ssh://user@host"
required
disabled={sshPhase !== 'form'}
on:input={() => {
serverType = null;
resetSSH();
}}
/>
{/if}
</div>
{#if !installingSSH}
<Tooltip content={$i18n.t('Verify Connection')}>
<button
type="button"
class="rounded-lg p-1 transition hover:bg-base-100 disabled:opacity-50 dark:hover:bg-base-850"
disabled={busy || !url}
on:click={() => verify(true)}
aria-label={$i18n.t('Verify Connection')}
>{#if busy}<Spinner className="size-4" />{:else}<ArrowPath
className="size-4"
/>{/if}</button
>
</Tooltip>
{/if}
</div>
{#if !installingSSH}
<Tooltip content={$i18n.t('Verify Connection')}>
<button
type="button"
class="rounded-lg p-1 transition hover:bg-base-100 disabled:opacity-50 dark:hover:bg-base-850"
disabled={busy || !url}
on:click={() => verify(true)}
aria-label={$i18n.t('Verify Connection')}
>{#if busy}<Spinner className="size-4" />{:else}<ArrowPath
className="size-4"
/>{/if}</button
>
</Tooltip>
{/if}
</div>
{/if}
{#if installingSSH}
{#if sshPhase === 'form'}
<div>
@@ -553,27 +629,27 @@
>
</div>
{/if}
{:else if sshMachine}
{:else if managed}
<div>
<div class="mb-0.5 text-xs text-base-500">{$i18n.t('Status')}</div>
<div class="flex items-center justify-between gap-3">
<div class="flex min-w-0 items-center gap-1.5 py-0.5 text-sm">
<span
class="size-1.5 shrink-0 rounded-full {sshMachine.status === 'error'
class="size-1.5 shrink-0 rounded-full {managed.status === 'error'
? 'bg-red-500'
: running || sshMachine.status === 'installing'
: running || managed.status === 'installing'
? 'bg-yellow-500'
: 'bg-green-500'}"
></span>
<span
>{sshMachine.status === 'error'
>{managed.status === 'error'
? $i18n.t('Error')
: running || sshMachine.status === 'installing'
: running || managed.status === 'installing'
? $i18n.t('Installing')
: $i18n.t('Ready')}</span
>
<span class="truncate text-xs text-base-500"
>{$i18n.t('Open Terminal {{version}}', { version: sshMachine.version ?? '' })}</span
>{$i18n.t('Open Terminal {{version}}', { version: managed.version ?? '' })}</span
>
</div>
<div class="flex shrink-0 items-center gap-3">
@@ -589,8 +665,8 @@
>
</div>
</div>
{#if sshMachine.status === 'error' && sshMachine.error}
<p class="mt-0.5 text-xs text-base-700 dark:text-base-300">{sshMachine.error}</p>
{#if managed.status === 'error' && managed.error}
<p class="mt-0.5 text-xs text-base-700 dark:text-base-300">{managed.error}</p>
{/if}
{#if logs !== null}
<pre
@@ -599,7 +675,7 @@
$i18n.t('No logs yet.')}</pre>
{/if}
</div>
{:else}
{:else if !installingLocal}
<div>
<label for="terminal-auth-type" class="mb-0.5 block text-xs text-base-500"
>{$i18n.t('Auth')}</label
@@ -628,7 +704,23 @@
</div>
</div>
{/if}
{#if (installingSSH && sshPhase === 'form') || sshMachine}
{#if (installing && sshPhase === 'form') || managed}
<div>
<label for="machine-folder" class="mb-0.5 block text-xs text-base-500"
>{$i18n.t('Folder')}</label
>
<input
id="machine-folder"
class={input}
bind:value={folder}
placeholder={installingLocal || localMachine
? (localDefaults?.folder ?? $i18n.t('Project folder'))
: $i18n.t('Home folder')}
autocomplete="off"
spellcheck="false"
/>
<p class="mt-1 text-xs text-base-500">{$i18n.t('Where terminal sessions start.')}</p>
</div>
<div>
<label for="open-terminal-version" class="mb-0.5 block text-xs text-base-500"
>{$i18n.t('Open Terminal version')}</label
@@ -642,11 +734,18 @@
autocomplete="off"
/>
<p class="mt-1 text-xs text-base-500">
{sshMachine
{managed
? $i18n.t('Leave empty for the latest release. Upgrade installs this version.')
: $i18n.t('Leave empty for the latest release.')}
</p>
</div>
{#if installingLocal || localMachine}
<p class="text-xs text-base-500">
{$i18n.t(
'Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.'
)}
</p>
{/if}
{/if}
{#if sshPhase === 'installing' || running || steps.length}
<ol class="space-y-1 text-xs" aria-live="polite">
@@ -752,7 +851,7 @@
bind:state={forwardCookies}
/>
</div>
{#if !installingSSH && !sshMachine}
{#if !installing && !managed}
<div>
<label for="openapi-path" class="mb-0.5 block text-xs font-medium"
>{$i18n.t('OpenAPI Spec')}</label
@@ -792,9 +891,9 @@
</div>
<button
class="{button} bg-base-900 text-base-0 hover:bg-base-1000 dark:bg-base-100 dark:text-base-900 dark:hover:bg-base-0"
disabled={busy || !url || sshPhase === 'installing'}
disabled={busy || (!url && !installingLocal) || sshPhase === 'installing'}
>
{#if !installingSSH}
{#if !installing}
{$i18n.t('Save')}
{:else if sshPhase === 'fingerprint'}
{$i18n.t('Trust and install')}
@@ -812,7 +911,7 @@
</Modal>
<ConfirmDialog
bind:show={showDelete}
message={sshMachine
message={managed
? $i18n.t('Remove this machine? This also uninstalls Open Terminal from it.')
: $i18n.t('Delete this connection?')}
confirmLabel={$i18n.t('Delete')}
@@ -100,14 +100,24 @@
};
const addTerminalConnection = async (server: TerminalConnection) => {
if (String(server.url ?? '').startsWith('ssh://')) {
// Installed over SSH: the backend already saved the machine. Reload the list,
// then apply the rest of the form (name, access, options) to it.
if (/^(ssh|local):\/\//.test(String(server.url ?? ''))) {
// Installed over SSH or on this computer: the backend already saved the machine.
// Reload the list, then apply the rest of the form (name, access, options) to it.
const res = await getTerminalServerConnections(localStorage.token).catch(() => null);
terminalConnections = (res?.TERMINAL_SERVER_CONNECTIONS ??
terminalConnections) as TerminalConnection[];
terminalConnections = terminalConnections.map((c) =>
c.id === server.id ? { ...c, ...server, url: c.url, key: c.key, ssh: c.ssh } : c
c.id === server.id
? {
...c,
...server,
name: server.name || c.name, // an empty Name keeps the default the backend picked
url: c.url,
key: c.key,
ssh: c.ssh,
local: c.local
}
: c
);
await saveTerminalServers();
return;
@@ -161,6 +171,7 @@
bind:show={showAddTerminalModal}
edit={editTerminalIdx !== null}
connection={editTerminalIdx !== null ? terminalConnections[editTerminalIdx] : null}
allowLocal={!terminalConnections.some((c) => c.local)}
onSubmit={(c: TerminalConnection) => {
if (editTerminalIdx !== null) {
updateTerminalConnection(editTerminalIdx, c);
@@ -312,7 +323,9 @@
for={`terminal-${idx}-control`}
class="outline-hidden w-full bg-transparent text-xs text-base-600 dark:text-base-400 transition-colors duration-150 group-hover/setting-row:text-base-900 group-focus-within/setting-row:text-base-900 dark:group-hover/setting-row:text-white dark:group-focus-within/setting-row:text-white group-has-[button[id$=-control]:enabled]/setting-row:cursor-pointer group-has-[button[id$=-control]:disabled]/setting-row:cursor-not-allowed"
>
{connection.name || connection.url || $i18n.t('New Machine')}
{connection.name ||
(connection.local ? $i18n.t('Local') : connection.url) ||
$i18n.t('New Machine')}
</label>
</div>
</div>
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 لعدم وجود حد، أو عدد صحيح موجب لحد معين",
"(latest)": "(الأخير)",
"(leave blank for to use commercial endpoint)": "(اتركه فارغًا لاستخدام نقطة النهاية التجارية)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[يوم] dddd [الماضي الساعة] h:mm A",
"[Today at] h:mm A": "[اليوم الساعة] h:mm A",
+5
View File
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 لعدم وجود حد، أو عدد صحيح موجب لحد معين",
"(latest)": "(أحدث)",
"(leave blank for to use commercial endpoint)": "(اتركه فارغًا لاستخدام نقطة النهاية التجارية)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[يوم] dddd [الماضي الساعة] h:mm A",
"[Today at] h:mm A": "[اليوم الساعة] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "Limitsiz üçün -1, yaxud konkret limit üçün müsbət tam ədəd daxil edin",
"(latest)": "(ən sonuncu)",
"(leave blank for to use commercial endpoint)": "(kommersiya son nöqtəsindən istifadə etmək üçün boş buraxın)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Sonuncu] dddd [saat] h:mm A",
"[Today at] h:mm A": "[Bu gün saat] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 за липса на ограничение или положително цяло число за определено ограничение",
"(latest)": "(последна)",
"(leave blank for to use commercial endpoint)": "(оставете празно, за да използвате търговската крайна точка)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Миналата седмица:] dddd [в] h:mm A",
"[Today at] h:mm A": "[Днес в] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "সীমাহীন করতে -1, অথবা নির্দিষ্ট সীমার জন্য একটি ধনাত্মক পূর্ণসংখ্যা",
"(latest)": "(সর্বশেষ)",
"(leave blank for to use commercial endpoint)": "(বাণিজ্যিক এন্ডপয়েন্ট ব্যবহার করতে ফাঁকা রাখুন)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[গত] dddd h:mm A",
"[Today at] h:mm A": "[আজ] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 ནི་ཚད་མེད་པའི་ཆེད་དམ། ཡང་ན་ཧྲིལ་གྲངས་དགོས་ངེས་ཤིག་ཚད་བཀག་ངེས་ཅན་ཞིག་གི་ཆེད་དུ།",
"(latest)": "(ཆེས་གསར།)",
"(leave blank for to use commercial endpoint)": "(ཚོང་ལས་མཇུག་མཐུད་སྤྱོད་པར་སྟོང་པར་འཇོག་རོགས།)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[གཟའ་འཁོར་སྔོན་མའི་] dddd [ཆུ་ཚོད་] h:mm A",
"[Today at] h:mm A": "[དེ་རིང་ཆུ་ཚོད་] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 za neograničeno ili pozitivan cijeli broj za određeno ograničenje",
"(latest)": "(najnovije)",
"(leave blank for to use commercial endpoint)": "(ostavite prazno za korištenje komercijalne krajnje tačke)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Prošle sedmice:] dddd [u] h:mm A",
"[Today at] h:mm A": "[Danas u] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 per a cap límit, o un nombre positiu per a un límit específic",
"(latest)": "(últim)",
"(leave blank for to use commercial endpoint)": "(deixa-ho buit per utilitzar un punt d'accés comercial)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Darrer] dddd [a] h:mm A",
"[Today at] h:mm A": "[Avui a les] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 alang sa walay limitasyon, o positibong tibuok numero alang sa piho nga limitasyon",
"(latest)": "(pinakabag-o)",
"(leave blank for to use commercial endpoint)": "(ibiling blangko aron gamiton ang komersiyal nga endpoint)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Sa miaging semana:] dddd [sa] h:mm A",
"[Today at] h:mm A": "[Karong adlawa sa] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 pro žádný limit, nebo kladné celé číslo pro specifický limit",
"(latest)": "(nejnovější)",
"(leave blank for to use commercial endpoint)": "(ponechte prázdné pro použití komerčního koncového bodu)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Naposledy] dddd [v] h:mm A",
"[Today at] h:mm A": "[Dnes v] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 for ingen grænse, eller et positivt heltal for en specifik grænse",
"(latest)": "(seneste)",
"(leave blank for to use commercial endpoint)": "(lad stå tom for at bruge kommercielt endpoint)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Sidste] dddd [kl.] h:mm A",
"[Today at] h:mm A": "[I dag kl.] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 für kein Limit oder eine positive ganze Zahl für ein spezifisches Limit",
"(latest)": "(neueste)",
"(leave blank for to use commercial endpoint)": "(leer lassen, um kommerziellen Endpunkt zu verwenden)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Letzten] dddd [um] HH:mm",
"[Today at] h:mm A": "[Heute um] HH:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 for no limit, or very positive integer for a specific limit",
"(latest)": "(so latest)",
"(leave blank for to use commercial endpoint)": "(leave blank for to use such commercial endpoint)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Last] dddd [at] h:mm A",
"[Today at] h:mm A": "[Today at] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 για απεριόριστο, ή έναν θετικό ακέραιο για ένα συγκεκριμένο όριο",
"(latest)": "(τελευταία)",
"(leave blank for to use commercial endpoint)": "(αφήστε κενό για να χρησιμοποιήσετε εμπορικό endpoint)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "dddd [που πέρασε, στις] HH:mm",
"[Today at] h:mm A": "[Σήμερα στις] HH:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "",
"(latest)": "",
"(leave blank for to use commercial endpoint)": "",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "",
"[Today at] h:mm A": "",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "",
"(latest)": "",
"(leave blank for to use commercial endpoint)": "",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "",
"[Today at] h:mm A": "",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 para ilimitado, o un número entero positivo para un límite específico.",
"(latest)": "(la última)",
"(leave blank for to use commercial endpoint)": "(dejar vacío para usar el endpoint comercial)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Último] dddd [a las] h:mm A",
"[Today at] h:mm A": "[Hoy a las] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 piirangu puudumisel või positiivne täisarv konkreetse piirangu jaoks",
"(latest)": "(uusim)",
"(leave blank for to use commercial endpoint)": "(jäta tühjaks, et kasutada kommertslõpp-punkti)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Eelmisel] dddd [kell] h:mm A",
"[Today at] h:mm A": "[Täna kell] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 mugarik ez ezartzeko, edo zenbaki oso positibo bat muga zehatz bat ezartzeko",
"(latest)": "(azkena)",
"(leave blank for to use commercial endpoint)": "(utzi hutsik amaiera-puntu komertziala erabiltzeko)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Joan den] dddd[,] h:mm A",
"[Today at] h:mm A": "[Gaur,] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 برای بدون محدودیت، یا یک عدد مثبت برای محدودیت مشخص",
"(latest)": "(آخرین)",
"(leave blank for to use commercial endpoint)": "(برای استفاده از نقطه پایانی تجاری خالی بگذارید)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[آخرین] dddd [در] h:mm A",
"[Today at] h:mm A": "[امروز در] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 rajoituksetta tai positiivinen kokonaisluku enimmäismääräksi",
"(latest)": "(uusin)",
"(leave blank for to use commercial endpoint)": "(Jätä tyhjäksi, jos haluat käyttää kaupallista päätettä)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Viimeisin] dddd h:mm A",
"[Today at] h:mm A": "[Tänään] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 para walang limitasyon, o isang positibong integer para sa partikular na limitasyon",
"(latest)": "(pinakabago)",
"(leave blank for to use commercial endpoint)": "(iwanang blangko para gamitin ang commercial na endpoint)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Noong nakaraang] dddd [nang] h:mm A",
"[Today at] h:mm A": "[Ngayon nang] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 fyri einki mark, ella eitt positivt heiltal fyri eitt ávíst mark",
"(latest)": "(nýggjasta)",
"(leave blank for to use commercial endpoint)": "(lat standa tómt fyri at brúka handilsliga endapunktið)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Seinasta] dddd [kl.] h:mm A",
"[Today at] h:mm A": "[Í dag kl.] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 pour aucune limite, ou un entier positif pour une limite spécifique",
"(latest)": "(dernière version)",
"(leave blank for to use commercial endpoint)": "laisser vide pour l'utilisation d'un point d'extension commercial",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "dddd [dernier à] H [h] mm",
"[Today at] h:mm A": "[Aujourd'hui à] H [h] mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 pour aucune limite, ou un entier positif pour une limite spécifique",
"(latest)": "(dernière version)",
"(leave blank for to use commercial endpoint)": "laisser vide pour l'utilisation d'un point d'extension commercial",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "dddd [dernier] à H[h]mm",
"[Today at] h:mm A": "[Aujourd'hui à] H[h]mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 para ilimitado, ou un número enteiro positivo para un límite específico",
"(latest)": "(O mais recente)",
"(leave blank for to use commercial endpoint)": "(deixe en branco para usar o punto final comercial)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "dddd [pasado ás] H:mm",
"[Today at] h:mm A": "[Hoxe ás] H:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 ללא הגבלה, או מספר שלם חיובי להגבלה מסוימת",
"(latest)": "(האחרון)",
"(leave blank for to use commercial endpoint)": "(השאר ריק כדי להשתמש בנקודת הקצה המסחרית)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[ביום] dddd [שעבר בשעה] HH:mm",
"[Today at] h:mm A": "[היום בשעה] HH:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "असीमित के लिए -1, या किसी निश्चित सीमा के लिए धनात्मक पूर्णांक",
"(latest)": "(नवीनतम)",
"(leave blank for to use commercial endpoint)": "(व्यावसायिक एंडपॉइंट का उपयोग करने के लिए खाली छोड़ें)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[पिछले] dddd [को] h:mm A",
"[Today at] h:mm A": "[आज] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 za neograničeno ili pozitivan cijeli broj za određeno ograničenje",
"(latest)": "(najnovije)",
"(leave blank for to use commercial endpoint)": "(ostavite prazno za korištenje komercijalne krajnje točke)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Prošlog tjedna:] dddd [u] h:mm A",
"[Today at] h:mm A": "[Danas u] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 a korlátlanhoz, vagy pozitív egész szám egy konkrét limithoz",
"(latest)": "(legújabb)",
"(leave blank for to use commercial endpoint)": "(hagyd üresen a kereskedelmi végpont használatához)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Múlt] dddd H:mm",
"[Today at] h:mm A": "[Ma] H:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 untuk tanpa batas, atau bilangan bulat positif untuk batas tertentu",
"(latest)": "(terbaru)",
"(leave blank for to use commercial endpoint)": "(kosongkan untuk menggunakan endpoint komersial)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "dddd [lalu pukul] h:mm A",
"[Today at] h:mm A": "[Hari ini pukul] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 gan teorainn, nó slánuimhir dheimhneach le haghaidh teorann sonrach",
"(latest)": "(is déanaí)",
"(leave blank for to use commercial endpoint)": "(fág bán le haghaidh críochphointe tráchtála a úsáid)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Deireanach] dddd [ag] h:mm A",
"[Today at] h:mm A": "[Inniu ag] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 per nessun limite, o un numero intero positivo per un limite specifico",
"(latest)": "(ultima)",
"(leave blank for to use commercial endpoint)": "(lascia vuoto per utilizzare l'endpoint commerciale)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Ultimo] dddd [alle] h:mm A",
"[Today at] h:mm A": "[Oggi alle] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1で無制限、または正の整数で制限を指定",
"(latest)": "(最新)",
"(leave blank for to use commercial endpoint)": "(商用エンドポイントを使用する場合は空欄のままにしてください)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[先週の] dddd A h:mm",
"[Today at] h:mm A": "[今日] A h:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 ლიმიტის გამოსართავად, ან დადებითი მთელი რიცხვი კონკრეტული ლიმიტისთვის",
"(latest)": "(უახლესი)",
"(leave blank for to use commercial endpoint)": "(დატოვეთ ცარიელი ფასიანი ბოლოწერტილის გამოსაყენებლად)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[გასული] dddd, H:mm",
"[Today at] h:mm A": "[დღეს,] H:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 war talast, neɣ aɣerwaḍ ilaw i talast tusdidt",
"(latest)": "(Lqem aneggaru)",
"(leave blank for to use commercial endpoint)": "(eǧǧ-it d ilem i useqdec n wagaz n taggara aznuzan)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Aneggaru] dddd [ɣef] h:mm A",
"[Today at] h:mm A": "[Ass-a ɣef] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1은 제한 없음을 의미하며, 양의 정수는 특정 제한을 나타냅니다",
"(latest)": "(최신)",
"(leave blank for to use commercial endpoint)": "(상용 엔드포인트를 사용하시려면 비워두세요)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[지난] dddd A h:mm",
"[Today at] h:mm A": "[오늘] A h:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1, kad ribos nebūtų, arba teigiamas sveikasis skaičius konkrečiai ribai nustatyti",
"(latest)": "(naujausias)",
"(leave blank for to use commercial endpoint)": "(palikite tuščią, kad būtų naudojamas komercinis galinis taškas)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Praėjusios savaitės] dddd, HH:mm",
"[Today at] h:mm A": "[Šiandien] HH:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 — bez ierobežojuma, vai pozitīvs vesels skaitlis konkrētam ierobežojumam",
"(latest)": "(jaunākā)",
"(leave blank for to use commercial endpoint)": "(atstājiet tukšu, lai izmantotu komerciālo galapunktu)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Pagājušā] dddd [plkst.] H:mm",
"[Today at] h:mm A": "[Šodien plkst.] H:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 untuk tanpa had, atau integer positif untuk had tertentu",
"(latest)": "(terkini)",
"(leave blank for to use commercial endpoint)": "(biarkan kosong untuk menggunakan titik akhir komersial)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Terakhir] dddd [pada] h:mm A",
"[Today at] h:mm A": "[Hari ini pada] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 angir ingen grense, eller angi et positivt heltall for en bestemt grense",
"(latest)": "(siste)",
"(leave blank for to use commercial endpoint)": "(la stå tomt for å bruke det kommersielle endepunktet)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Sist] dddd [kl.] HH:mm",
"[Today at] h:mm A": "[I dag kl.] HH:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 voor geen limiet, of een positief getal voor een specifieke limiet",
"(latest)": "(nieuwste)",
"(leave blank for to use commercial endpoint)": "(laat leeg om een commercieel endpoint te gebruiken)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Vorige] dddd [om] h:mm A",
"[Today at] h:mm A": "[Vandaag om] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "ਕੋਈ ਸੀਮਾ ਨਾ ਰੱਖਣ ਲਈ -1, ਜਾਂ ਇੱਕ ਖਾਸ ਸੀਮਾ ਲਈ ਇੱਕ ਧਨਾਤਮਕ ਪੂਰਨ ਅੰਕ",
"(latest)": "(ਤਾਜ਼ਾ)",
"(leave blank for to use commercial endpoint)": "(ਵਪਾਰਕ ਐਂਡਪੁਆਇੰਟ ਵਰਤਣ ਲਈ ਖਾਲੀ ਛੱਡੋ)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[ਪਿਛਲੇ] dddd h:mm A",
"[Today at] h:mm A": "[ਅੱਜ] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 oznacza brak limitu, liczba dodatnia oznacza konkretny limit",
"(latest)": "(najnowszy)",
"(leave blank for to use commercial endpoint)": "(pozostaw puste, aby użyć komercyjnego punktu końcowego)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Ostatnio] dddd [o] H:mm",
"[Today at] h:mm A": "[Dziś o] H:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 para nenhum limite ou um inteiro positivo para um limite específico",
"(latest)": "(mais recente)",
"(leave blank for to use commercial endpoint)": "(deixe em branco para usar o endpoint comercial)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Último] dddd [em] h:mm A",
"[Today at] h:mm A": "[Hoje às] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 para sem limite, ou um inteiro positivo para um limite específico",
"(latest)": "(mais recente)",
"(leave blank for to use commercial endpoint)": "deixe em branco para utilizar o endpoint comercial",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "dddd [da semana passada, às] HH:mm",
"[Today at] h:mm A": "[Hoje às] HH:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 pentru nelimitat sau un număr întreg pozitiv pentru o limită specifică",
"(latest)": "(ultimul)",
"(leave blank for to use commercial endpoint)": "(lăsați necompletat pentru a folosi endpoint-ul comercial)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "dddd[, săptămâna trecută, la] HH:mm",
"[Today at] h:mm A": "[Astăzi la] HH:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 для отсутствия ограничений или положительное целое число для определенного ограничения.",
"(latest)": "(последняя)",
"(leave blank for to use commercial endpoint)": "(оставьте пустым поле для использования коммерческой конечной точки)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[На прошлой неделе,] dddd[, в] H:mm",
"[Today at] h:mm A": "[Сегодня в] H:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 znamená bez obmedzenia, kladné celé číslo nastaví konkrétny limit",
"(latest)": "Najnovšie",
"(leave blank for to use commercial endpoint)": "(nechajte prázdne pre použitie komerčného koncového bodu)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Minulý týždeň,] dddd [o] H:mm",
"[Today at] h:mm A": "[Dnes o] H:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 za brez omejitve ali pozitivno celo število za določeno omejitev",
"(latest)": "(najnovejše)",
"(leave blank for to use commercial endpoint)": "(pustite prazno za uporabo komercialne končne točke)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Prejšnji teden,] dddd [ob] H:mm",
"[Today at] h:mm A": "[Danes ob] H:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 за бесконачно или позитивни број за одређено ограничење",
"(latest)": "(најновије)",
"(leave blank for to use commercial endpoint)": "(оставите празно за коришћење комерцијалне крајње тачке)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "dddd [у] H:mm",
"[Today at] h:mm A": "[Данас у] H:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 för ingen gräns, eller ett positivt heltal för en specifik gräns",
"(latest)": "(senaste)",
"(leave blank for to use commercial endpoint)": "(lämna tomt för att använda kommersiell endpoint)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Senaste] dddd [kl] h:mm A",
"[Today at] h:mm A": "[Idag kl] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 வரம்பு இல்லை, அல்லது ஒரு குறிப்பிட்ட வரம்பிற்கு நேர்மறை முழு எண்",
"(latest)": "(சமீபத்திய)",
"(leave blank for to use commercial endpoint)": "(வணிக முனைப்புள்ளியைப் பயன்படுத்துவதற்கு காலியாக விடவும்)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[கடந்த] dddd [அன்று] h:mm A",
"[Today at] h:mm A": "[இன்று] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 สำหรับไม่จำกัด หรือจำนวนเต็มบวกสำหรับจำกัดค่าเฉพาะ",
"(latest)": "(ล่าสุด)",
"(leave blank for to use commercial endpoint)": "(เว้นว่างไว้เพื่อใช้ endpoint เชิงพาณิชย์)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "dddd[ที่แล้ว เวลา] h:mm A",
"[Today at] h:mm A": "[วันนี้ เวลา] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "Çäksiz bolmagy üçin -1 ýa-da belli bir çäk üçin oňyn bitin san",
"(latest)": "(iň soňky)",
"(leave blank for to use commercial endpoint)": "(täjirçilik ahyrky nokadyny ulanmak üçin boş goýuň)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Geçen] dddd [sagat] h:mm A",
"[Today at] h:mm A": "[Şu gün sagat] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "Sınır yoksa -1, belirli bir sınır için pozitif bir tamsayı.",
"(latest)": "(en son)",
"(leave blank for to use commercial endpoint)": "Ticari uç noktayı kullanmak için boş bırakın",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Geçen] dddd [saat] HH:mm",
"[Today at] h:mm A": "[Bugün saat] HH:mm",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "چەك قويماسلىق ئۈچۈن 1-، ياكى بەلگىلىك بىر چەك ئۈچۈن مۇسبەت پۈتۈن سان كىرگۈزۈڭ",
"(latest)": "(ئەڭ يېڭىسى)",
"(leave blank for to use commercial endpoint)": "(تجارەتلىك ئۇلانمىنى ئىشلىتىش ئۈچۈن بوش قالدۇرۇڭ)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[ئالدىنقى] dddd [سائەت] h:mm A",
"[Today at] h:mm A": "[بۈگۈن سائەت] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 для без обмежень або додатне ціле число для конкретного обмеження",
"(latest)": "(остання)",
"(leave blank for to use commercial endpoint)": "(залиште порожнім, щоб використовувати комерційну кінцеву точку)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Минулого тижня,] dddd [о] h:mm A",
"[Today at] h:mm A": "[Сьогодні о] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "کوئی حد نہ رکھنے کے لیے -1، یا مخصوص حد کے لیے ایک مثبت صحیح عدد",
"(latest)": "(تازہ ترین)",
"(leave blank for to use commercial endpoint)": "(تجارتی اینڈ پوائنٹ استعمال کرنے کے لیے خالی چھوڑیں)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[پچھلے] dddd [بوقت] h:mm A",
"[Today at] h:mm A": "[آج بوقت] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "Чексиз учун -1 ёки маълум чегара учун мусбат бутун сон",
"(latest)": "(охирги)",
"(leave blank for to use commercial endpoint)": "(тижорий сўнгги нуқтадан фойдаланиш учун бўш қолдиринг)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "",
"[Today at] h:mm A": "",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "Cheksiz uchun -1 yoki ma'lum chegara uchun musbat butun son",
"(latest)": "(oxirgi)",
"(leave blank for to use commercial endpoint)": "(tijoriy so'nggi nuqtadan foydalanish uchun bo'sh qoldiring)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "",
"[Today at] h:mm A": "",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 không giới hạn, hoặc một số nguyên dương cho giới hạn cụ thể",
"(latest)": "(mới nhất)",
"(leave blank for to use commercial endpoint)": "(để trống để dùng endpoint thương mại)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[Vào] dddd [tuần trước lúc] h:mm A",
"[Today at] h:mm A": "[Hôm nay lúc] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 表示无限制,正整数表示具体限制额度",
"(latest)": "(最新版)",
"(leave blank for to use commercial endpoint)": "(留空以使用商用端点)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[上次] dddd [于] h:mm A",
"[Today at] h:mm A": "[今天] h:mm A",
@@ -4,7 +4,11 @@
"-1 for no limit, or a positive integer for a specific limit": "-1 表示無限制,正整數表示特定限制",
"(latest)": "(最新版)",
"(leave blank for to use commercial endpoint)": "(留空以使用商業端點)",
"Home folder": "",
"Ongoing chat": "",
"Project folder": "",
"Remote": "",
"Runs on the server Open WebUI runs on. Anyone you share it with can run commands there.": "",
"Start each run in new chat": "",
"Start each run in new thread": "",
"Add Machine": "",
@@ -49,6 +53,7 @@
"Upgrade failed": "",
"Use ssh://user@host or ssh://user@host:port": "",
"Used once to authorize Open WebUI, never stored.": "",
"Where terminal sessions start.": "",
"You will get a command to run on the machine.": "",
"[Last] dddd [at] h:mm A": "[上次] dddd [於] h:mm A",
"[Today at] h:mm A": "[今天] h:mm A",