DevOps

Self-hosted AI Code Assistant Setup Guide

Tutorial on setting up a self-hosted AI code assistant using 1Panel, Ubuntu VPS, and Openclaw with Kimi Code integration.

February 23, 2026
6 min read
By ClawList Team

How to Self-Host an AI Code Assistant with 1Panel, Ubuntu VPS, and OpenClaw + Kimi Code

A clean, no-nonsense setup guide for developers who want full control over their AI coding environment.


Running an AI code assistant that you actually own — no rate limits, no data leakage concerns, no monthly SaaS bills — is no longer a weekend project reserved for Linux wizards. Thanks to the combination of 1Panel, OpenClaw, and Kimi Code, you can have a production-ready, self-hosted AI development environment running on a budget VPS in a single afternoon.

This guide distills a minimal, battle-tested stack shared by developer @CuiMao, who calls it the "lobster moon-landing combo" — a tongue-in-cheek name for a seriously practical setup. Let's break down exactly what it is, why it works, and how to replicate it.


Why Self-Host an AI Code Assistant?

Before jumping into commands, it is worth being honest about the trade-offs.

Reasons this setup makes sense:

  • Privacy and data control. Your source code never touches a third-party SaaS pipeline you cannot audit.
  • Cost predictability. A Singapore VPS at ~$25/year is a fixed expense. Metered API costs on hosted platforms can surprise you.
  • No vendor lock-in. Swapping the underlying model (Kimi Code today, something else tomorrow) is a configuration change, not a migration project.
  • Latency. A VPS in a region close to you or your team often beats routing through a US-based SaaS product.

Honest caveats:

  • You are responsible for updates, backups, and uptime.
  • Initial setup requires basic Linux familiarity.
  • The original author notes that running certain tools directly ("lobster" = running powerful AI tooling without containment) carries risk — hence the VPS isolation strategy rather than running everything on a local machine.

If those trade-offs work for you, read on.


The Stack at a Glance

| Layer | Tool | Purpose | |---|---|---| | Infrastructure | Ubuntu VPS (2 vCPU, 40 GB disk, 1 TB bandwidth) | Isolated compute | | Server management | 1Panel | Web-based Linux panel, app store, reverse proxy | | AI skill runtime | OpenClaw | OpenClaw skill execution engine | | AI model integration | Kimi Code | Code-capable LLM via OpenClaw config |

The minimum viable VPS spec used here is 2 vCPU / 40 GB storage / 1 TB monthly transfer, available from providers like RackNerd, BandwagonHost, or Vultr for roughly $20–30/year in Singapore region. Singapore is a popular choice for low-latency access across Southeast Asia and reasonable proximity to East Asia and Australia.


Step-by-Step Setup

1. Provision Your Ubuntu VPS

Spin up a fresh Ubuntu 22.04 LTS instance. Once you have SSH access:

# Update the system first
sudo apt update && sudo apt upgrade -y

# Set a hostname (optional but clean)
sudo hostnamectl set-hostname openclaw-server

Use a non-root user with sudo privileges for anything beyond initial provisioning. This is basic hardening, but worth stating explicitly.

2. Install 1Panel

1Panel is an open-source Linux server management panel that provides a clean web UI, a built-in app store, SSL via Let's Encrypt, and a reverse proxy manager. It dramatically reduces the operational overhead of running services on a VPS.

curl -sSL https://resource.fit2cloud.com/1panel/package/quick_install.sh -o install.sh
sudo bash install.sh

The installer will prompt you for a port, panel path, and admin credentials. After installation, access the panel via:

http://<your-vps-ip>:<chosen-port>/<chosen-path>

Security note: Immediately configure the firewall to restrict panel access to your own IP, and enable HTTPS using the built-in SSL tools. Do not leave the admin panel exposed to the public internet.

3. Install OpenClaw from the 1Panel App Store

Once inside 1Panel:

  1. Navigate to App Store in the left sidebar.
  2. Search for OpenClaw.
  3. Click Install and follow the default prompts.

1Panel handles the container orchestration, port binding, and volume mapping automatically. OpenClaw will be running as a managed Docker container — isolated, restartable, and easy to update.

4. Configure Kimi Code Integration

With OpenClaw running, connect it to Kimi Code by following the official OpenClaw documentation. The general pattern is:

# Example OpenClaw model config (structure may vary by version)
model:
  provider: kimi
  api_key: YOUR_KIMI_API_KEY
  model_id: kimi-code-latest
  base_url: https://api.moonshot.cn/v1

Key configuration steps:

  • Obtain your Kimi API key from the Moonshot AI platform.
  • Paste the key into the OpenClaw model settings via its web UI or config file.
  • Select kimi-code as the active model.
  • Run a test prompt to confirm the integration is live.

OpenClaw's documentation covers model switching, context window settings, and skill configuration in detail — defer to that for anything version-specific.

5. Connect Your Editor

OpenClaw exposes a compatible API endpoint that most editors can talk to. In VS Code, install the Continue extension and point it at your self-hosted instance:

// .continue/config.json
{
  "models": [
    {
      "title": "Self-Hosted Kimi Code",
      "provider": "openai",
      "model": "kimi-code-latest",
      "apiBase": "http://<your-vps-ip>:<openclaw-port>/v1",
      "apiKey": "not-needed-if-local-auth"
    }
  ]
}

For Cursor or Windsurf users, the same apiBase override applies in the model settings panel.


Practical Use Cases

Once the stack is running, common workflows include:

  • Code review automation. Pipe a diff to OpenClaw via the API and get structured feedback before a PR.
  • Documentation generation. Point it at a module and generate JSDoc, Python docstrings, or README sections.
  • Codebase Q&A. Use OpenClaw's context tools to ask questions about an unfamiliar repository during onboarding.
  • CI integration. Trigger AI-assisted lint or security review as a GitHub Actions step, calling your own endpoint rather than a third-party service.

Conclusion

The "lobster moon-landing" stack — Ubuntu VPS, 1Panel, OpenClaw, Kimi Code — is a pragmatic answer to the question of how to run a capable AI code assistant without giving up control or writing a large recurring check. The total infrastructure cost sits well under $30/year, setup is straightforward enough to complete in a single session, and the architecture is modular: swap Kimi Code for any OpenAI-compatible model endpoint whenever something better arrives.

The real value is the isolation. Running powerful AI tooling on a dedicated VPS, managed through 1Panel's container layer, keeps risk away from your local machine and your production systems. That is not paranoia — it is sensible engineering hygiene.

If you found this useful, the original concept credit goes to @CuiMao on X. Follow them for more concise, practical AI tooling takes.


Published on ClawList.io — your developer resource hub for AI automation and OpenClaw skills.

Tags: self-hosted AI, OpenClaw, 1Panel, Kimi Code, VPS setup, AI code assistant, DevOps, Ubuntu

Tags

#self-hosted#ai-tools#1panel#openclaw#devops

Related Articles