public_notes/content/20240211202623 Raspi4 Cloudflare tunnel経由でhttpsサーバーを公開する.md
2024-02-12 19:30:09 +09:00

1.9 KiB
Executable file

20240211202623 Raspi4 Cloudflare tunnel経由でhttpsサーバーを公開する

#raspi #cloudflare #server

前提となる作業

あたりかな。

WEBサーバーの設定

作ったWEBサーバーをcloudflareのトンネルに登録

cloudflare@saipi4$ vim ~/.cloudflared/config/yaml

で、中身はこんな感じ。

url: https//localhost
tunnel: ******
credentials-file: /var/lib/cloudflare/.cloudflared/******.json

**** の所はトンネルを作ったときの token(or UUID or TunnelID). 20240212183159 cloudflare トンネルのtoken

cloudflare@saipi4:~ $ cloudflared tunnel route dns ***** notes.kinoshita-lab.org
2024-02-12T10:20:56Z INF Added CNAME notes.kinoshita-lab.org which will route to this tunnel tunnelID=****
cloudflare@saipi4:~ $ cloudflared tunnel --config ~/.cloudflared/config/yaml run

cf.