Docs / Valkey and server groups

Valkey and server groups

Valkey is a Redis-compatible in-memory data store for caches, counters, and pub/sub. Saka installs it on your own servers, secures it with TLS and a password, and only lets in the servers you choose. Data and the password are not stored at Saka.

Creating a Valkey

  1. Open Databases, then Valkey.
  2. Pick 1 to 3 connected servers with a public IP. Dedicated servers are best. Docker is installed automatically if missing.
  3. Choose a mode (see below) and a memory limit per node.
  4. Decide who may connect: server groups, IP addresses, or both.
  5. Press Create Valkey. Save the password shown once in the dialog. Saka does not store it and never shows it again.

Setup takes 1 to 3 minutes. Data is temporary: it is not written to disk and is lost when a node restarts, so do not keep data here that must not be lost.

Two modes

Connecting from your app

Connection addresses use TLS, for example rediss://203.0.113.21:6380. Each node has its own certificate. Copy the TLS certificate from the Valkey card, save it as a .pem file, and set it as the CA in your Redis client. It is a public key, safe to share with your team.

Test the connection
REDISCLI_AUTH='your-password' redis-cli --tls --cacert valkey.pem -h 203.0.113.21 -p 6380 PING

Server groups

A server group is a label for a set of servers, for example app-nodes. Open Servers, then Server groups. A server can be in many groups. Groups are used in two places:

Shared firewall between groups

One rule says: the source group may reach a given port on the target group, and other addresses are rejected. Saka installs the rule on each target server and keeps it in place after a reboot. When group members change, every target server is updated, so adding an app node is a single step.

Ports 22, 80, and 443 cannot be restricted here because SSH and sites use them. Rules use the servers' public IPs, IPv4, and TCP.

Through the API and AI agents

API
POST   /api/v1/valkey              {"server_id": ["srv_..."], "mode": "mandiri", "izin_grup": ["grp..."]}
GET    /api/v1/valkey/<id>
PUT    /api/v1/valkey/<id>/izin    {"izin": ["203.0.113.10"], "izin_grup": ["grp..."]}
DELETE /api/v1/valkey/<id>
POST   /api/v1/grup                {"nama": "app-nodes", "server_id": ["srv_..."]}
PUT    /api/v1/grup/<id>/anggota   {"server_id": ["srv_..."]}
POST   /api/v1/grup-aturan         {"sumber": "grp...", "tujuan": "grp...", "port": 7880}

AI agents use the MCP tools valkey_buat, valkey_status, valkey_izin, grup_buat, grup_anggota, and grup_aturan_buat. Creating or deleting a Valkey and creating a firewall rule ask for your approval when Telegram approval is on.