Related
vLLM + LiteLLM on AMD Strix Halo
Serving Qwen3.8-27B (INT4 AWQ) and Qwen3-4B (FP16) with vLLM on my two-node k3s cluster, fronted by a LiteLLM OpenAI-compatible router.
Popular topics
04 min reading in—DevOpsAutomationPeer-NetworksNetworking
How Open-Chat's Federation Enables Anybody to Host Anything Anywhere
Open-Chat is now in its 7th iteration and fully rewritten in Golang. It now has 'federation' features using libp2p, allowing you to quickly spin up your own network of Open-Chat nodes.
Open-Chat network members can freely communicate with one another and are automatically joined into a completely independent, self-healing overlay network.
Open-Chat networks can be established inside private networks, across public networks or across both. To penetrate across public and private networks, Open-Chat needs to be able to route traffic back to itself through a router, or it needs to have at least one public relay peer available as an alternate path.
On our public node, which we want to use as a 'relay' and 'bootstrap' peer, download the Open-Chat binary from the GitHub release page. Be sure to download the one with the '-federation' build included. E.g.:
wget -O open-chat https://github.com/msgmate-io/open-chat-go/releases/download/build-10/open-chat-federation-0.0.111-linux-amd64
chmod +x open-chat # make it executable
For the 'bootstrapper' node, you'll have to specify basic admin credentials and network credentials.
All of these can simply be specified like this:
./open-chat --default-network-credentials "<network-name>:<password>" --root-credentials "<user>:<password>"
You can also initialize node credentials without revealing them by specifying --root-credentials "<username>:hashed_<pdf-hashed-password>".
Now that our bootstrapper node is available, we can use its peer ID to bootstrap other nodes.
If you want to persist your Open-Chat configuration system-wide, just run it with
--install.
We can extract its peer ID either by logging in to the UI with the admin user or via the Open-Chat CLI:
./open-chat client login # you'll be prompted to enter username and password
./open-chat client identity -b64 # reveals the node ID in a reusable base64 format
eyJpZCI6ICI8TE9DQUxfUEVFUl9JRD4iLCAiY29ubmVjdF9tdWx0aWFkcmVzcyI6IFsiL2lwNC88U09NRV9JUF9BRFJFU1M+L3RjcC8wL3AycC88TE9DQUxfUEVFUl9JRD4iXX0=
The only things you need are the bootstrap peer string and the network credentials.
./open-chat -dnc "<network-name>:<password>" -rc "<different-node-specific-admin-creds>" -bs "<base64-bootstrap-peer-string>"
Now we just need to wait a moment until these nodes find each other and establish connections. Let's see if the nodes are connected.
./open-chat client login # ....
./open-chat client nodes -ls # list all available nodes
Now let's see if we can send requests to the node:
./open-chat client get-metrics --node <remote-peer-id>
Hooray, it works! Now where do we go from here?
When we have a network, we can model its traffic in any way we like. Open-Chat nodes can configure arbitrary routing rules on a per-node basis; every node can only route traffic that goes through itself.
To route traffic through another node, routing rules on that node need to be established, so the admin credentials for that node must be known.
Since we control the full network, we know the admin credentials of every node and can establish any routing rules we want.
Let's use Open-Chat to create an ngrok-like TLS reverse proxy for services behind NAT. To achieve this, we need:
<PUBLIC-IP><HOSTNAME><peer-port>All the steps presented here can also be run from a single node, by using network requests that are built into Open-Chat. For simplicity, we run commands on individual nodes, but there are also workflows that allow controlling routing rule requests to ANY node from a single network member.
./open-chat client tls --hostname "<HOSTNAME>" --key-prefix "<self-defined-certificate-prefix>"
This will automatically start the ACME challenge process and save the obtained certificate in the Open-Chat node's database.
First, we need to tell the public node to accept TLS traffic using the just-obtained certificate.
It should only accept traffic coming from "<HOSTNAME>", and the traffic should be routed to a specific port on the system.
./open-chat client proxy --direction "egress" --traffic-origin "<HOSTNAME>" --traffic-target "<key-prefix>:<peer-port>" --kind "tls" --key-prefix "<self-defined-certificate-prefix>"
This creates an 'egress' proxy that accepts incoming traffic from "<HOSTNAME>" and tunnels it into the network.
./open-chat client proxy --direction "egress" --traffic-origin "<own-peer-id>:<peer-port>" --traffic-target "<remote-peer-id>:<peer-port>" --kind tcp
This establishes a routing rule from the network to the remote peer node.
Now the only thing left to do is for the local node to tunnel network traffic from that peer to the <peer-port> that runs the TCP service.
Traffic is now routed from the domain to the public peer, from there inside the network, and to the remote peer. But currently the remote peer would just drop the traffic because it doesn't know what to do with it. Let's route it to the port that runs our service:
./open-chat client proxy --direction "ingress" --traffic-origin "<own-peer-id>:<peer-port>" --traffic-target "<remote-peer-id>:<peer-port>" --kind tcp
This article merely gives a hint of what Open-Chat Federation is able to do; the options from there go much further. Just as food for thought, the following things are only a few lines of Open-Chat rules away:
Related
Serving Qwen3.8-27B (INT4 AWQ) and Qwen3-4B (FP16) with vLLM on my two-node k3s cluster, fronted by a LiteLLM OpenAI-compatible router.
Related
Attempt at creating my own Master Thesis Topic
Related
A production-style setup to publish private k3s services through a public microk8s edge cluster using the Tailscale Kubernetes Operator.