ttyd
🗎 Refs: Github Repo
- Quick action
ttyd + Cloudflare Zero Trust + Cloudflare Tunnel
Create dedicated user
Install
Create per-connection tmux wrapper
/home/ttyd/start-tmux.sh
Add tmux auto-cleanup
/home/ttyd/.tmux.conf
- Restart
Create systemd service
/etc/systemd/system/ttyd.service
- Apply:
- Check:
Install Cloudflare Tunnel
- Install:
- Login:
- Create tunnel
- Check
cloudflaredlocation & tunnel ID
- Config:
/etc/cloudflared/config.yml
- Install Cloudflare’s official systemd service and enable:
- Config DNS: Check Cloudflare’s
DNSpage ->CNAMErule with the target is TUNNEL_ID.cfargotunnel.com
Setup Zero Trust
Create policy
-
Access controls->Policies->Add a policy -
Input
Policy name,ActionasAllow,Session DurationasSame as... -
Add rules Include with
SelectorisEmailsand input whitelisted emails - Save policy
Create App Launcher
-
Access controls->Access settings->Manage your App Launcher -
Tab
Policies->Select existing policies-> Choose the created policy -
Tab
Login methods-> Enable PIN - Save App Launcher
Create App Launcher
-
Access controls->Applications->Add an application -
Choose
Self-hosted, enterApplication name,Session Duration -
Add public hostname, input subdomain configured before -
Access policies->Select existing policies-> Choose the policy created before -
Login methods->Accept all...
Add Google Auth
Integrations->Identity providers->Add an identity provider