Tutorial: How to Secure Access to OpenClaw (AI Agent) with Access Server on Linux⁠

Overview⁠

This tutorial explains how to secure access to OpenClaw, an AI agent gateway, using Access Server on any Linux server. By routing traffic through Access Server, you can ensure that users can access the OpenClaw service only while connected to the VPN.

In this example scenario:

OpenClaw is an AI agent gateway that connects chat applications (such as WhatsApp, Telegram, Discord, and iMessage) to AI agents like GPT-4o or Claude.

This tutorial shows how to:

  • Deploy OpenClaw.

  • Configure its web gateway.

  • Deploy Caddy.

  • Restrict access using Access Server routing rules.

  • Verify that access works only through the VPN.

Prerequisites⁠

  • Access Server (recommended 3.1.0 or newer to use Domain Routing)

  • A Linux server where OpenClaw will be installed

  • SSH access to your OpenClaw server

  • A VPN client for connecting to Access Server