Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Deployment

Run a Telys server durably in production — private networking, systemd or supervisor management, auto-restart, timed saves, and store backups on the self-host Team tier.

A Telys server is a single long-lived process that owns one store directory and answers clients over a socket. Deploying it is ordinary service hygiene: keep it on a private network, run it under a process manager, persist on a timer, and back up the store. These practices apply to the telys_team self-host tier.

Serving is the telys_team tier. Start the server with --require-license so it verifies a products.telys license offline on boot and refuses to run without one. See Plans & licensing and Offline licenses & verification.

Network placement

  • Prefer a Unix socket when clients share the host. It is trusted (0600) and needs no token — the simplest and safest option. See Auth & network model.

  • For cross-host access, use TCP with an access token on a private network. Bind to an internal interface, restrict the port with a firewall or security group, and never expose the server to the public internet. The token authenticates callers but does not encrypt traffic.

  • The server makes no outbound connections, so egress can stay closed. Only inbound access to your chosen socket or port is required.

Run under a process manager

Because telys serve blocks in the foreground, it slots into systemd, a container entrypoint, or a supervisor. Add --supervise so the server restarts its worker automatically if it exits; the process manager restarts the whole unit if the process itself dies.

Keep the token out of the unit file by loading it from a 0600 environment file.

/etc/telys/telys.env
TELYS_ACCESS_TOKEN=replace-with-a-long-random-token
TELYS_LICENSE=your-products-telys-license-jwt
/etc/systemd/system/telys.service
[Unit]
Description=Telys memory server
After=network-online.target

[Service]
Type=simple
User=telys
EnvironmentFile=/etc/telys/telys.env
ExecStart=/usr/local/bin/telys serve \
  --path /var/lib/telys/memory \
  --host 127.0.0.1 --port 9099 \
  --require-license \
  --save-interval 30 \
  --supervise
Restart=on-failure
RestartSec=2

[Install]
WantedBy=multi-user.target

--access-token and --license fall back to $TELYS_ACCESS_TOKEN and $TELYS_LICENSE, which the EnvironmentFile supplies.

Durability

By default a collection persists only when a client calls save(). In a shared deployment, set --save-interval so the server also flushes open collections on a timer, bounding how much recent work an unclean shutdown could lose:

A save writes the id_map.npy sidecar first and collection.json last as the commit point, so a partial save is detectable rather than silently corrupt. Clients can still call save() after important batches; the interval is a floor. See Snapshots & persistence.

Backups

Everything a collection needs lives in files under the store directory — collection.json (the commit point), the id_map.npy sidecar, and the runtime vector slab files. Back up the store directory and you back up the collections. See On-disk layout for what each file is.

1

Reach a consistent point

Take the backup when the store is not mid-write: stop the unit briefly, use a filesystem or volume snapshot, or copy right after a --save-interval flush. collection.json present and newest indicates a committed collection.

2

Copy the store directory

3

Restore by unpacking to a fresh path

Point a server at the restored directory and connect to verify with client.collections() and col.stats().

Upgrades

Upgrade the server the same way you upgrade Telys anywhere: install the new version, then restart the service. Stop the unit, upgrade, run telys runtime verify, and start it again. The on-disk FORMAT_VERSION is stable within a release line; keep a backup from before the upgrade. See Upgrade Telys.

Next steps

Last updated

Was this helpful?