Skip to main content

13 posts tagged with "self-hosting"

View all tags
intermediatePart 1

One endpoint, many models: deploy an LLM gateway on a WEC Instance

· 15 min read
Rafael Fernandes
NLP Engineer & Tech Writer at WiLine
Share:
+LiteLLM+
0/4
🎯 Skill path0/4 earned
Self-hosting an LLM gateway
  • 1One endpoint, scoped keys
  • 2Route work to the right model
  • 3Mask PII at the gateway
  • 🏆Budgets and real cost

Here's how it usually goes. One app needs a model, so you paste the API key into its .env. Then a second app needs one. Then a script. Six months later the same key is in five places, nobody remembers which of them is still running, and you can't rotate it without breaking something you'll only find out about when it breaks.

A gateway is the boring fix. One endpoint in front of every model, one place that holds the real credential, and a scoped key per app that you can revoke on its own. This post deploys one on a WEC Instance and points it at the WEC Inference API.

intermediatePart 2

Root by default: hardening container privilege on a self-hosted AI stack

· 8 min read
Rafael Fernandes
NLP Engineer & Tech Writer at WiLine
Share:
+Langfuse
0/3
🎯 Skill path0/3 earned
Hardening self-hosted AI infra

Part 1 of this series audited a live multi-agent box and found every network-exposure question worth asking. One line from that audit didn't get followed up: "the Postgres, ClickHouse and Redis behind Langfuse were published to 127.0.0.1 instead of the world — someone made a good decision there. Hold that thought."

Here's the other half of that thought: getting the network right says nothing about what happens after someone's already inside a container. If the process running in there is root, a compromise starts with the keys to the whole filesystem. So we checked — on the same box, the same Langfuse stack Part 1 already praised — whether "network correct" also meant "privilege correct." It didn't, for two of the six containers. Here's what fixing that actually looked like, including the part that broke.

intermediatePart 1

Your firewall is lying to you: hardening Docker networks for multi-agent systems

· 15 min read
Rafael Fernandes
NLP Engineer & Tech Writer at WiLine
Share:
+
0/3
🎯 Skill path0/3 earned
Hardening self-hosted AI infra

You start with one agent. Then it needs a database. Then you add a second agent, a messaging bridge, an observability stack. Six months later a single WEC Instance is running five compose projects, twenty-something containers, and nobody remembers which ports are open to the world.

That's not a hypothetical — that's the box this tutorial was written on. So instead of theorizing, we probed it: can containers reach each other across stacks? Can they reach the databases? Is the firewall actually protecting anything?

Three of the answers surprised me. One of them was a database sitting there with no password. And the firewall — the firewall was lying.

beginnerPart 2

Migrate OpenClaw's Telegram Bot to Hermes

· 5 min read
Rafael Fernandes
NLP Engineer & Tech Writer at WiLine
Share:
Hermes Agent+
0/2
🎯 Skill path0/2 earned
Self-hosting Hermes

In Part 1 you self-hosted Hermes with persistent memory. This part connects it to the same Telegram bot from the OpenClaw series — the chat your users already know keeps working exactly as it did, just a different agent answering underneath. No new bot to announce, no channel to migrate people to.

intermediatePart 1

Build a WhatsApp AI assistant from scratch with Evolution and the WEC API

· 15 min read
Rafael Fernandes
NLP Engineer & Tech Writer at WiLine
Share:
WhatsApp++Evolution
0/2
🎯 Skill path0/2 earned
WhatsApp automation on WEC
  • 1Self-host a WhatsApp AI bridge
  • 🏆Production delivery via Cloud API

Most "self-host a WhatsApp AI" guides stop at "the container started." This one goes all the way: you deploy a real, programmable WhatsApp gateway (Evolution API), then write the bridge yourself — the ~50 lines that turn an incoming message into an LLM answer and send it back. That bridge (webhook → model → reply) is the reusable pattern behind every chat-AI integration: SMS, Slack, Telegram, voice — swap the channel, the shape is identical.

And because this is a real build, we hit — and fix — every gotcha: an image that moved publishers, a Baileys version loop, an infinite reply loop, group-chat spam, WhatsApp's new LID addressing, and a genuine delivery wall that most tutorials pretend doesn't exist. Every command, error, and output below is from an actual run.

beginnerPart 6

Add a WhatsApp channel to OpenClaw

· 6 min read
Rafael Fernandes
NLP Engineer & Tech Writer at WiLine
Share:
OpenClaw+WhatsApp
0/6
🎯 Skill path0/6 earned
Self-hosting OpenClaw

Telegram (Part 3) gave your agent a bot. WhatsApp gives it a phone line — the app ~3 billion people already use, reachable with zero friction. One catch worth understanding up front: WhatsApp has no bot account, so OpenClaw links to a real number as a companion device (like WhatsApp Web) and the agent acts as that account. Every command and error below is from a real run.

advancedPart 4

Catch what your tests miss: observe and score your WEC app in production with Langfuse

· 18 min read
Rafael Fernandes
NLP Engineer & Tech Writer at WiLine
Share:
Langfuse+
0/8
🎯 Skill path0/8 earned
AI evals & observability

A customer says your support bot promised them a refund policy that doesn't exist. Your feature made two LLM calls — classify, then reply. Which one invented it? If you can't answer that, your app is a black box — and this guide fixes exactly that.

You can now prove a model works (part 1), make its output machine-reliable (part 2), and generate a real test set to check it against (part 3). But all of that runs offline, in CI, on inputs you chose. Production doesn't play along.

This guide closes the gap. We'll self-host Langfuse — the open-source, self-hostable alternative to LangSmith — trace every real call, auto-score live traffic with an LLM judge, drill into the exact step that breaks, and feed failures back so your part-3 dataset gets stronger. Offline eval tells you it worked on your test set; this tells you it works in the wild.

beginnerPart 5

Run OpenClaw on WEC Models

· 7 min read
Rafael Fernandes
NLP Engineer & Tech Writer at WiLine
Share:
0/6
🎯 Skill path0/6 earned
Self-hosting OpenClaw
OpenClaw+

Through Parts 1–4 you deployed OpenClaw, secured it with HTTPS, added Telegram, and made it private over a NetBird mesh — all pointed at OpenAI. This part swaps the model out from under it: point the same agent at WEC Models — WiLine's own OpenAI-compatible inference — and run it on an open-weight model, Llama 3.1 8B Instruct. Same box, no rebuild — just a base-URL, key, and model change via the OpenClaw CLI.

intermediatePart 1

Self-host the Hermes Agent with persistent memory

· 14 min read
Rafael Fernandes
NLP Engineer & Tech Writer at WiLine
Share:
Hermes Agent+SQLite
0/2
🎯 Skill path0/2 earned
Self-hosting Hermes

Hermes Agent is Nous Research's open-source (MIT) AI agent — "the agent that grows with you." Its standout feature is persistent memory: it learns your projects and doesn't forget across restarts. This guide deploys it on the same WEC Instance you already use for OpenClaw, points it at a model, and proves the memory survives a full reboot.

intermediatePart 4

Make OpenClaw private with a NetBird mesh VPN

· 18 min read
Rafael Fernandes
NLP Engineer & Tech Writer at WiLine
Share:
OpenClaw+NetBird
0/6
🎯 Skill path0/6 earned
Self-hosting OpenClaw

In Article 2 we put Caddy in front of OpenClaw for HTTPS, and in Article 3 we added a Telegram channel. The gateway works — but Caddy is still listening on 0.0.0.0, reachable by anything that can route to the box. This is the capstone of the series: we join the server and your laptop to a NetBird mesh, repoint openclaw.local at the mesh IP, and close the public ports. The same https://openclaw.local/chat URL keeps working — but only for your devices. Every command and error below is from the actual run.

beginnerPart 3

Add a Telegram channel to OpenClaw

· 6 min read
Rafael Fernandes
NLP Engineer & Tech Writer at WiLine
Share:
OpenClaw+
0/6
🎯 Skill path0/6 earned
Self-hosting OpenClaw

You've deployed OpenClaw and secured it behind HTTPS. Now make it usable — talk to your agent from your phone via Telegram. We create a bot, connect it, clear OpenClaw's pairing gate, and get a real reply. Every command and gotcha below is from an actual run.

intermediatePart 2

Secure OpenClaw with a Caddy reverse proxy + HTTPS

· 9 min read
Rafael Fernandes
NLP Engineer & Tech Writer at WiLine
Share:
OpenClaw+
0/6
🎯 Skill path0/6 earned
Self-hosting OpenClaw

In Article 1 we got OpenClaw running — but only over plain HTTP, with an allowInsecureAuth workaround. Here we put Caddy in front of it as a reverse proxy: real HTTPS, device-paired auth, and the gateway's raw ports closed so the proxy is the only way in. Every command and error below is from the actual deploy.

beginnerPart 1

Deploy OpenClaw on a WEC Instance via Docker Compose

· 12 min read
Rafael Fernandes
NLP Engineer & Tech Writer at WiLine
Share:
OpenClaw++
0/6
🎯 Skill path0/6 earned
Self-hosting OpenClaw

Your AI assistant doesn't have to live in someone else's cloud.

Deploy a self-hosted OpenClaw AI agent on a WEC Instance with Docker Compose — from spinning up the VM to an agent that actually answers, using your own model API key. Every command, version, and error below was captured from a real deployment on a WEC Instance.