2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

“さくらのAI Engine”と“さくらのVPS”で“OpenHands”を動かしてみた

Last updated at Posted at 2025-10-11

TL;DR

さくらのAI Engine 基盤モデル無償プランを契約させていただくことができたので、さくらのVPS“石狩リージョン”でOpenHandsを動かしてみた。
※このメモは検証環境にて実施しており、常用にはセキュリティ面などの課題があります。

構築手順

  1. さくらのVPSにUbuntu 24.04をインストール (ubuntu-24.04.3-live-server-amd64.iso)

  2. Dockerをインストールする

    $ sudo apt install docker.io
    
  3. OpenHandsをインストールする

    $ sudo -i
    # docker pull docker.all-hands.dev/all-hands-ai/runtime:0.59-nikolaik
    # docker run -it --rm --pull=always \
        -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.59-nikolaik \
        -e LOG_ALL_EVENTS=true \
        -v /var/run/docker.sock:/var/run/docker.sock \
        -v ~/.openhands:/.openhands \
        -p 3000:3000 \
        --add-host host.docker.internal:host-gateway \
        --name openhands-app \
        docker.all-hands.dev/all-hands-ai/openhands:0.59
    
  4. さくらのAI Engineコントロールパネルの「アクセストークンを作成」からAPIキーを取得する
    3.png

  5. 手元のPCからサーバに繋ぐ
    > ssh -L 3000:127.0.0.1:3000 UserName@ServerIpAddress

  6. ウェブブラウザで http://127.0.0.1:3000/ を開き「advanced settings」をクリック
    1.png

  7. さくらのAI Engineを使用する設定を行う。

    • 詳細設定:有効
    • カスタムモデル:openai/gpt-oss-120b
    • ベースURL:https://api.ai.sakura.ad.jp/v1
    • APIキー:さくらのAI Engineコントロールパネルで取得したアカウントトークン
      2.png
  8. Enjoy!
    4.png

感想

  • 類似構成を自宅サーバ(ローカルLLM)に構築しているのですが、“さくらのAI Engine”の速さに驚きました。
  • ファイアウォールを厳しめに設定するとDockerコンテナからの通信が通らなくなって、しばらくハマった・・・
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?