0
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?

1分でグーグルクラウドにtorrentクライアントを立てる

Last updated at Posted at 2025-04-22

違法ダウンロードダメ絶対

目標

Google Compute Engineにおいてqbittorrentを起動し、ブラウザから操作できる状態を目指す。
torrentとmagnet linkに対応している。

image.png

1. Google Compute Engineから「インスタンスを作成」をクリック

image.png

2. マシン構成を選択

ここはデフォルトのまま進める

image.png

3. OSとストレージを選択

  • オペレーティングシステムはContainer Optimized OSを選択
  • ディスクサイズは30GBを選択(ダウンロードしたいファイルのサイズ以上)

screencapture-console-cloud-google-compute-instancesAdd-2025-04-23-07_09_49.png

4. ネットワーキングを選択

  • HTTPトラフィック許可とHTTPSトラフィック許可にチェック

image.png

5. 詳細タブから自動起動スクリプトを設定

以下のスクリプトをコピペすればよい

image.png

docker run -d --restart=on-failure -it -e PUID=1000 -e PGID=1000 -e TZ=Etc/UTC -e WEBUI_PORT=8080 -e TORRENTING_PORT=6881 -p 80:8080 -p 81:8081 -p 6881:6881 -p 6881:6881/udp --name main lzpel/myqbittorrent

6. 左下の作成ボタンをクリック

7. URLにアクセス

VM一覧に先ほど作成したVMが追加される。

外部IPをコピー(この例では35.238.70.85)

image.png

外部IPの80番ポートにHTTPアクセス(この例ではhttp://35.238.70.85/
直接クリックしたらHTTPSアクセスしてしまうのでURLをHTTPに直すことを忘れない

するとこのようなqBitTorrentのログイン画面が出てくる

ここは Username admin Password adminadmin でログインできる(ようにDockerfileを書いた)

image.png

ログインしたらこんなWebUI

image.png

完成

試しにダウンロードしてみる

LibraOfficeの公式Torrentをダウンロードする

ダウンロード先が/config/Downloadsであることを確認してUpload Torrentsボタンを押す

image.png

一瞬でダウンロードが完了する

image.png

ダウンロードしたファイルをローカルにダウンロード

qbittorrent単体にはファイルサーバーとしての機能が無い

そこで、Dockerfile(lzpel/myqbittorrent)においてベースイメージ(linuxserver/qbittorrent)をハックしてRust製静的ファイルサーバーstatic-web-serverを同居させている

外部IPの81番ポートにHTTPアクセス(この例ではhttp://35.238.70.85:81/

image.png

上記リンクからダウンロードしたファイルを右クリック⇒名前を付けてリンク先を保存 でダウンロードできる

0
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
0
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?