<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Remote Access · AtomCode Docs</title>
<meta name="description" content="Reach the AtomCode webui from your phone over the 蒲公英 (Oray PGY) private network — install, bind the virtual IP, scan to connect, and security notes.">
<link rel="icon" type="image/png" href="https://cdn-static.gitcode.host/static/images/logo-favicon.png">
<link rel="stylesheet" href="../docs.css">
<script>(function(){try{var s=localStorage.getItem('atomcode_theme')||localStorage.getItem('atomcode-theme');if(s==='light'){document.documentElement.classList.add('light');document.documentElement.setAttribute('data-theme','light')}}catch(e){}})();</script>
</head>
<body data-page="webui-remote-access">
<header class="dhdr" id="dhdr">
<a class="dhdr-logo" href="../../index.html">
<img src="https://cdn-news.gitcode.com/news/atomcode-icon1.png" alt="AtomCode">
<span>AtomCode</span>
<span class="dhdr-badge" data-i18n="badge.docs">DOCS</span>
<span class="dhdr-ver">v4.25.0</span>
</a>
<div class="dhdr-right">
<button class="search-trigger" data-open-search data-i18n-aria="aria.search" aria-label="搜索文档">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><path d="M21 21l-4.3-4.3"/></svg>
<span data-i18n="search.trigger.text">搜索文档…</span>
<span class="kbd">⌘K</span>
</button>
<button class="icon-btn" id="themeBtn" data-i18n-aria="aria.theme" aria-label="切换主题"></button>
<button class="icon-btn" id="langBtn" data-i18n-aria="aria.lang" aria-label="切换语言">中</button>
<a class="dhdr-link" href="https://atomgit.com/atomgit_atomcode/atomcode" target="_blank" rel="noopener" data-i18n="hdr.repo">仓库 →</a>
<button class="icon-btn sb-toggle" id="sbToggle" data-i18n-aria="aria.sidebar" aria-label="目录">☰</button>
</div>
</header>
<div class="dlayout">
<aside class="dside" id="dside">
<div class="dside-group">
<div class="dside-group-t" data-i18n="side.g.overview">概览</div>
<a class="dside-link" href="./index.html" data-slug="index" data-i18n="side.index">文档首页</a>
</div>
<div class="dside-group">
<div class="dside-group-t" data-i18n="side.g.start">开始</div>
<a class="dside-link" href="./getting-started.html" data-slug="getting-started" data-i18n="side.getting-started">快速开始</a>
<a class="dside-link" href="./login.html" data-slug="login" data-i18n="side.login">登录方式</a>
<a class="dside-link" href="./configuration.html" data-slug="configuration" data-i18n="side.configuration">配置文件</a>
</div>
<div class="dside-group">
<div class="dside-group-t" data-i18n="side.g.usage">使用</div>
<a class="dside-link" href="./basic-usage.html" data-slug="basic-usage" data-i18n="side.basic-usage">基本使用</a>
<a class="dside-link" href="./slash-commands.html" data-slug="slash-commands" data-i18n="side.slash-commands">斜杠命令</a>
<a class="dside-link" href="./keybindings.html" data-slug="keybindings" data-i18n="side.keybindings">快捷键</a>
<a class="dside-link" href="./sessions.html" data-slug="sessions" data-i18n="side.sessions">会话与撤销</a>
</div>
<div class="dside-group">
<div class="dside-group-t" data-i18n="side.g.advanced">进阶</div>
<a class="dside-link" href="./tools.html" data-slug="tools" data-i18n="side.tools">内置工具</a>
<a class="dside-link" href="./approvals.html" data-slug="approvals" data-i18n="side.approvals">权限审批</a>
<a class="dside-link" href="./skills.html" data-slug="skills" data-i18n="side.skills">Skills 扩展</a>
<a class="dside-link" href="./mcp.html" data-slug="mcp" data-i18n="side.mcp">MCP 集成</a>
<a class="dside-link" href="./plugins.html" data-slug="plugins" data-i18n="side.plugins">Plugin 系统</a>
<a class="dside-link" href="./memory.html" data-slug="memory" data-i18n="side.memory">永久记忆</a>
<a class="dside-link" href="./project-instructions.html" data-slug="project-instructions" data-i18n="side.project-instructions">项目指令文件</a>
<a class="dside-link" href="./webui.html" data-slug="webui" data-i18n="side.webui">WebUI 界面</a>
<a class="dside-link" href="./webui-remote-access.html" data-slug="webui-remote-access" data-i18n="side.webui-remote-access">远程访问指南</a>
</div>
<div class="dside-group">
<div class="dside-group-t" data-i18n="side.g.ops">问题</div>
<a class="dside-link" href="./faq.html" data-slug="faq" data-i18n="side.faq">常见问题</a>
</div>
</aside>
<main class="dmain prose-docs">
<h1>Remote Access</h1>
<p class="lede">By default the AtomCode webui only listens on loopback (<code>127.0.0.1</code>), so your phone and other devices can't reach it. With a virtual LAN built by <strong>蒲公英 (Oray PGY)</strong> you can open the webui from a phone or tablet securely — no public IP, nothing exposed to the internet. This page walks through the full connection flow and the security notes.</p>
<h2>How it works</h2>
<p>蒲公英 is a remote-networking tool. Once it's installed on both this machine and your phone, signed into the <strong>same account</strong> and joined to the <strong>same network</strong>, the two devices sit on one virtual LAN and can talk over a <code>蒲公英 virtual IP</code>. As long as the webui is bound to that virtual IP, your phone can reach it. The whole link is a private peer-to-peer network — <strong>your machine is never exposed to the public internet</strong>.</p>
<div class="callout callout-warn">
<strong>Why not just open it to the internet</strong>
<p>The webui / daemon has no built-in authentication; whoever reaches it effectively gains execution rights for every tool on your machine (including <code>bash</code>, <code>write</code>, <code>edit</code>). So do <strong>not</strong> use <code>--host 0.0.0.0</code> to expose it to the public internet or an open LAN. The 蒲公英 virtual LAN plus a one-time access token is the safe remote path intended for regular users.</p>
</div>
<h2>Prerequisites</h2>
<ul>
<li>You can already launch the AtomCode webui on this machine.</li>
<li><strong>蒲公英</strong> is installed on both this machine and your phone: <a href="https://pgy.oray.com" target="_blank" rel="noopener">https://pgy.oray.com</a>.</li>
<li>Both devices are signed into the <strong>same 蒲公英 account</strong> and joined to the <strong>same network</strong>.</li>
</ul>
<h2>Steps</h2>
<h3>1. Connect 蒲公英 and get the virtual IP</h3>
<p>Sign in and join the network in the 蒲公英 client on this machine, then note the <strong>virtual IP</strong> assigned to it (looks like <code>10.x.x.x</code>). On the phone, just sign into the same account and join the same network — no IP to remember.</p>
<h3>2. Bind the webui to the virtual IP</h3>
<p>By default the webui binds loopback only, which your phone can't reach. In the AtomCode TUI, relaunch the webui with <code>--host</code> pointed at the 蒲公英 virtual IP:</p>
<pre><code>/webui --host 10.x.x.x</code></pre>
<p>Replace <code>10.x.x.x</code> with the virtual IP you noted above. Once bound, the webui is reachable from any device on the same virtual LAN.</p>
<h3>3. Scan to connect from the Remote Access panel</h3>
<p>Open the <strong>Remote Access</strong> panel (the phone icon) in the top-right of the webui. AtomCode detects the 蒲公英 status and produces:</p>
<ul>
<li>a ready-to-open <strong>remote URL</strong> (already carrying the access token);</li>
<li>a matching <strong>QR code</strong>.</li>
</ul>
<p>Scan the QR with your phone, or copy the URL into the phone's browser. The phone must be signed into the same 蒲公英 account and on the same network.</p>
<div class="callout callout-warn">
<strong>The access token is a password</strong>
<p>The remote URL carries a one-time access token (<code>?token=…</code>) that is <strong>equivalent to a password</strong>: anyone who gets the full link can operate your machine. Don't post it in chats, screenshot it out, or paste it on a public page.</p>
</div>
<h2>Troubleshooting</h2>
<p>The Remote Access panel shows different hints depending on what it detects. Map them as follows:</p>
<table>
<thead>
<tr><th>Panel hint</th><th>Meaning</th><th>What to do</th></tr>
</thead>
<tbody>
<tr>
<td>蒲公英 not detected</td>
<td>蒲公英 isn't installed, or the client isn't running.</td>
<td>Install and sign into 蒲公英 on both machine and phone, join the same network, then hit "Re-check".</td>
</tr>
<tr>
<td>No virtual IP yet</td>
<td>蒲公英 is installed but hasn't joined a network.</td>
<td>Connect / join the network in the 蒲公英 client, get a virtual IP, then "Re-check".</td>
</tr>
<tr>
<td>webui bound to localhost only</td>
<td>蒲公英 is detected, but the webui still listens on loopback.</td>
<td>Relaunch with <code>/webui --host <virtual IP></code> as in step 2, then refresh this page.</td>
</tr>
<tr>
<td>Phone can't open it / hangs</td>
<td>The two ends aren't on the same network, or a firewall blocks it.</td>
<td>Confirm both devices share the same 蒲公英 account and network; check that the machine's firewall allows the webui port.</td>
</tr>
</tbody>
</table>
<h2>Next</h2>
<ul>
<li><a href="./headless-daemon.html">Headless & Daemon</a> — the daemon and HTTP/SSE API behind the webui</li>
<li><a href="./faq.html">FAQ</a> — common remote / login gotchas</li>
</ul>
<footer class="dftr">
<span data-i18n="ftr.copy">© 2026 AtomCode · MIT</span>
<a href="https://atomgit.com/atomgit_atomcode/atomcode/issues" target="_blank" rel="noopener" data-i18n="ftr.issue">报告问题</a>
</footer>
</main>
</div>
<div class="search-modal" id="searchModal" role="dialog" data-i18n-aria="aria.search" aria-label="搜索文档">
<div class="search-modal-bg"></div>
<div class="search-modal-box">
<div class="search-input-wrap">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><path d="M21 21l-4.3-4.3"/></svg>
<input id="searchInput" type="search" data-i18n-placeholder="search.placeholder" placeholder="搜索文档…" autocomplete="off">
<span class="search-esc">ESC</span>
</div>
<div class="search-results" id="searchResults"></div>
</div>
</div>
<script src="../docs.js"></script>
</body>
</html>