<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://md5.pw/index.php?action=history&amp;feed=atom&amp;title=Bandwagong%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%83%A8%E7%BD%B22FAuth</id>
	<title>Bandwagong服务器部署2FAuth - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://md5.pw/index.php?action=history&amp;feed=atom&amp;title=Bandwagong%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%83%A8%E7%BD%B22FAuth"/>
	<link rel="alternate" type="text/html" href="https://md5.pw/index.php?title=Bandwagong%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%83%A8%E7%BD%B22FAuth&amp;action=history"/>
	<updated>2026-05-06T13:20:20Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://md5.pw/index.php?title=Bandwagong%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%83%A8%E7%BD%B22FAuth&amp;diff=1320&amp;oldid=prev</id>
		<title>2026年2月1日 (日) 09:08 Feng</title>
		<link rel="alternate" type="text/html" href="https://md5.pw/index.php?title=Bandwagong%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%83%A8%E7%BD%B22FAuth&amp;diff=1320&amp;oldid=prev"/>
		<updated>2026-02-01T09:08:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026年2月1日 (日) 02:08的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;第1行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第1行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{DISPLAYTITLE:Bandwagon服务器部署2FAuth}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;2FAuth 是一款由 PHP (Laravel) 编写的自托管二步验证（2FA）管理工具。相比 Google Authenticator，它最大的优势在于数据完全掌握在自己手中，且支持 Web 端跨设备访问。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;2FAuth 是一款由 PHP (Laravel) 编写的自托管二步验证（2FA）管理工具。相比 Google Authenticator，它最大的优势在于数据完全掌握在自己手中，且支持 Web 端跨设备访问。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key my_wiki:diff:1.41:old-1319:rev-1320:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Feng</name></author>
	</entry>
	<entry>
		<id>https://md5.pw/index.php?title=Bandwagong%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%83%A8%E7%BD%B22FAuth&amp;diff=1319&amp;oldid=prev</id>
		<title>2026年2月1日 (日) 09:06 Feng</title>
		<link rel="alternate" type="text/html" href="https://md5.pw/index.php?title=Bandwagong%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%83%A8%E7%BD%B22FAuth&amp;diff=1319&amp;oldid=prev"/>
		<updated>2026-02-01T09:06:34Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026年2月1日 (日) 02:06的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l115&quot;&gt;第115行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第115行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:9ff84e90-cb5.png|center|thumb|800x800px]]完成后，需要给网站加上HTTPS进行访问的话，可以参考：[[如何搭建Nginx Proxy Manager并使用反向代理和远程桌面加速]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:9ff84e90-cb5.png|center|thumb|800x800px]]完成后，需要给网站加上HTTPS进行访问的话，可以参考：[[如何搭建Nginx Proxy Manager并使用反向代理和远程桌面加速]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;index.php?title=&lt;/del&gt;Category:500 常见应用指南 — Application Guides]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{DEFAULTSORT:Bandwagon服务器部署2FAuth}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:500 常见应用指南 — Application Guides]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Feng</name></author>
	</entry>
	<entry>
		<id>https://md5.pw/index.php?title=Bandwagong%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%83%A8%E7%BD%B22FAuth&amp;diff=1318&amp;oldid=prev</id>
		<title>2026年2月1日 (日) 09:05 Feng</title>
		<link rel="alternate" type="text/html" href="https://md5.pw/index.php?title=Bandwagong%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%83%A8%E7%BD%B22FAuth&amp;diff=1318&amp;oldid=prev"/>
		<updated>2026-02-01T09:05:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026年2月1日 (日) 02:05的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;第1行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第1行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;2FAuth 是一款由 PHP (Laravel) 编写的自托管二步验证（2FA）管理工具。相比 Google Authenticator，它最大的优势在于数据完全掌握在自己手中，且支持 Web 端跨设备访问。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;2FAuth 是一款由 PHP (Laravel) 编写的自托管二步验证（2FA）管理工具。相比 Google Authenticator，它最大的优势在于数据完全掌握在自己手中，且支持 Web 端跨设备访问。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;⚠️ &lt;/del&gt;注意：该项目对文件权限和路径映射非常敏感。网上的旧教程（包括部分官方文档示例）容易导致 &amp;lt;code&amp;gt;Permission denied&amp;lt;/code&amp;gt; 或 &amp;lt;code&amp;gt;500 Server Error&amp;lt;/code&amp;gt;。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;注意：该项目对文件权限和路径映射非常敏感。网上的旧教程（包括部分官方文档示例）容易导致 &amp;lt;code&amp;gt;Permission denied&amp;lt;/code&amp;gt; 或 &amp;lt;code&amp;gt;500 Server Error&amp;lt;/code&amp;gt;。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 0. 环境准备 ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 0. 环境准备 ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l8&quot;&gt;第8行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第8行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* 核心组件：Docker &amp;amp; Docker Compose&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* 核心组件：Docker &amp;amp; Docker Compose&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;如果你是&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;新拿到手&lt;/del&gt;的 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;VPS&lt;/del&gt;，请先执行下面的一键命令安装 Docker：&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;如果你&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;的搬瓦工服务器&lt;/ins&gt;是&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;刚连上SSH客户端&lt;/ins&gt;的&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;话&lt;/ins&gt;，请先执行下面的一键命令安装 Docker：&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  apt update &amp;amp;&amp;amp; apt upgrade -y&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  apt update &amp;amp;&amp;amp; apt upgrade -y&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:1453.png|center|thumb|800x800px]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:1453.png|center|thumb|800x800px]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l21&quot;&gt;第21行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第21行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 1. 建立目录与解决权限（&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;最&lt;/del&gt;关键&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;一步！&lt;/del&gt;） ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 1. 建立目录与解决权限（&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;这里很&lt;/ins&gt;关键） ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;这是大部分人失败的原因：Docker 自动创建的目录属于 &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; 用户，而 2FAuth 容器内部使用 &amp;lt;code&amp;gt;1000&amp;lt;/code&amp;gt; (www-data) 用户，导致没有权限写入数据库。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;这是大部分人失败的原因：Docker 自动创建的目录属于 &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; 用户，而 2FAuth 容器内部使用 &amp;lt;code&amp;gt;1000&amp;lt;/code&amp;gt; (www-data) 用户，导致没有权限写入数据库。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;我们需要先创建目录，并提前授权：&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;我们需要先创建目录，并提前授权&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;（四条命令从上到下依次输入）&lt;/ins&gt;：&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;code&amp;gt;# 1. 创建项目根目录&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;code&amp;gt;# 1. 创建项目根目录&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  mkdir -p /root/data/docker_data/2fauth&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  mkdir -p /root/data/docker_data/2fauth&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l41&quot;&gt;第41行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第41行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 2. 生成 APP_KEY ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 2. 生成 APP_KEY ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Laravel 框架必须有一个 32 位的密钥才能运行。在终端执行以下命令，复制输出的字符串：&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Laravel 框架必须有一个 32 位的密钥才能运行。在终端执行以下命令，&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;&lt;/ins&gt;复制&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039; &lt;/ins&gt;输出的字符串&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;（可以先复制到电脑的记事本上）&lt;/ins&gt;：&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;&amp;#039;&amp;#039;&amp;#039;openssl&amp;#039;&amp;#039;&amp;#039; rand -base64 32&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;code&amp;gt;&amp;#039;&amp;#039;&amp;#039;openssl&amp;#039;&amp;#039;&amp;#039; rand -base64 32&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l109&quot;&gt;第109行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第109行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;#039;&amp;#039;&amp;#039;docker compose logs -f&amp;#039;&amp;#039;&amp;#039;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;#039;&amp;#039;&amp;#039;docker compose logs -f&amp;#039;&amp;#039;&amp;#039;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;部署成功的标志： 你需要耐心等待几秒钟，当你看到日志中出现密密麻麻的 &amp;lt;code&amp;gt;Running migrations&amp;lt;/code&amp;gt;，并且包含 &amp;lt;code&amp;gt;create_users_table&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;create_options_table&amp;lt;/code&amp;gt; 等字样，最后停在：&amp;lt;blockquote&amp;gt;&amp;lt;code&amp;gt;Application key set successfully.&amp;lt;/code&amp;gt;&amp;lt;/blockquote&amp;gt;这说明数据库初始化&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;完美&lt;/del&gt;完成！&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;部署成功的标志： 你需要耐心等待几秒钟，当你看到日志中出现密密麻麻的 &amp;lt;code&amp;gt;Running migrations&amp;lt;/code&amp;gt;，并且包含 &amp;lt;code&amp;gt;create_users_table&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;create_options_table&amp;lt;/code&amp;gt; 等字样，最后停在：&amp;lt;blockquote&amp;gt;&amp;lt;code&amp;gt;Application key set successfully.&amp;lt;/code&amp;gt;&amp;lt;/blockquote&amp;gt;这说明数据库初始化&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;已经&lt;/ins&gt;完成！&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;现在，打开浏览器访问 &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://你的IP:8000&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;，即可看到登录界面。点击 Register 注册你的第一个账号（自动成为管理员）。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;现在，打开浏览器访问 &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://你的IP:8000&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;，即可看到登录界面。点击 Register 注册你的第一个账号（自动成为管理员）。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l115&quot;&gt;第115行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第115行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:9ff84e90-cb5.png|center|thumb|800x800px]]完成后，需要给网站加上HTTPS进行访问的话，可以参考：[[如何搭建Nginx Proxy Manager并使用反向代理和远程桌面加速]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:9ff84e90-cb5.png|center|thumb|800x800px]]完成后，需要给网站加上HTTPS进行访问的话，可以参考：[[如何搭建Nginx Proxy Manager并使用反向代理和远程桌面加速]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:500 常见应用指南 — Application Guides]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;index.php?title=&lt;/ins&gt;Category:500 常见应用指南 — Application Guides]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Feng</name></author>
	</entry>
	<entry>
		<id>https://md5.pw/index.php?title=Bandwagong%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%83%A8%E7%BD%B22FAuth&amp;diff=1289&amp;oldid=prev</id>
		<title>2026年1月29日 (四) 14:43 Feng</title>
		<link rel="alternate" type="text/html" href="https://md5.pw/index.php?title=Bandwagong%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%83%A8%E7%BD%B22FAuth&amp;diff=1289&amp;oldid=prev"/>
		<updated>2026-01-29T14:43:50Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026年1月29日 (四) 07:43的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l115&quot;&gt;第115行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第115行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:9ff84e90-cb5.png|center|thumb|800x800px]]完成后，需要给网站加上HTTPS进行访问的话，可以参考：[[如何搭建Nginx Proxy Manager并使用反向代理和远程桌面加速]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:9ff84e90-cb5.png|center|thumb|800x800px]]完成后，需要给网站加上HTTPS进行访问的话，可以参考：[[如何搭建Nginx Proxy Manager并使用反向代理和远程桌面加速]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;index.php?title=&lt;/del&gt;Category:500 常见应用指南 — Application Guides]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:500 常见应用指南 — Application Guides]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Feng</name></author>
	</entry>
	<entry>
		<id>https://md5.pw/index.php?title=Bandwagong%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%83%A8%E7%BD%B22FAuth&amp;diff=1288&amp;oldid=prev</id>
		<title>2026年1月29日 (四) 14:43 Feng</title>
		<link rel="alternate" type="text/html" href="https://md5.pw/index.php?title=Bandwagong%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%83%A8%E7%BD%B22FAuth&amp;diff=1288&amp;oldid=prev"/>
		<updated>2026-01-29T14:43:05Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026年1月29日 (四) 07:43的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l112&quot;&gt;第112行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第112行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;现在，打开浏览器访问 &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://你的IP:8000&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;，即可看到登录界面。点击 Register 注册你的第一个账号（自动成为管理员）。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;现在，打开浏览器访问 &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://你的IP:8000&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;，即可看到登录界面。点击 Register 注册你的第一个账号（自动成为管理员）。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:9ff84e90-cb5.png|center|thumb|800x800px]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:500 常见应用指南 — Application Guides]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:9ff84e90-cb5.png|center|thumb|800x800px&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]完成后，需要给网站加上HTTPS进行访问的话，可以参考：[[如何搭建Nginx Proxy Manager并使用反向代理和远程桌面加速&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;index.php?title=&lt;/ins&gt;Category:500 常见应用指南 — Application Guides]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Feng</name></author>
	</entry>
	<entry>
		<id>https://md5.pw/index.php?title=Bandwagong%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%83%A8%E7%BD%B22FAuth&amp;diff=1287&amp;oldid=prev</id>
		<title>Feng：​Bandwagong服务器部署2FAuth</title>
		<link rel="alternate" type="text/html" href="https://md5.pw/index.php?title=Bandwagong%E6%9C%8D%E5%8A%A1%E5%99%A8%E9%83%A8%E7%BD%B22FAuth&amp;diff=1287&amp;oldid=prev"/>
		<updated>2026-01-29T10:56:08Z</updated>

		<summary type="html">&lt;p&gt;Bandwagong服务器部署2FAuth&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;2FAuth 是一款由 PHP (Laravel) 编写的自托管二步验证（2FA）管理工具。相比 Google Authenticator，它最大的优势在于数据完全掌握在自己手中，且支持 Web 端跨设备访问。&lt;br /&gt;
&lt;br /&gt;
⚠️ 注意：该项目对文件权限和路径映射非常敏感。网上的旧教程（包括部分官方文档示例）容易导致 &amp;lt;code&amp;gt;Permission denied&amp;lt;/code&amp;gt; 或 &amp;lt;code&amp;gt;500 Server Error&amp;lt;/code&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
== 0. 环境准备 ==&lt;br /&gt;
&lt;br /&gt;
* 服务器系统：Debian 11/12 或 Ubuntu 20.04+&lt;br /&gt;
* 核心组件：Docker &amp;amp; Docker Compose&lt;br /&gt;
&lt;br /&gt;
如果你是新拿到手的 VPS，请先执行下面的一键命令安装 Docker：&lt;br /&gt;
 apt update &amp;amp;&amp;amp; apt upgrade -y&lt;br /&gt;
[[File:1453.png|center|thumb|800x800px]]&lt;br /&gt;
 curl -fsSL &amp;lt;nowiki&amp;gt;https://get.docker.com&amp;lt;/nowiki&amp;gt; -o get-docker.sh&lt;br /&gt;
 sudo sh get-docker.sh&lt;br /&gt;
 sudo systemctl enable --now docker&lt;br /&gt;
[[File:79f956.png|center|thumb|800x800px]]&lt;br /&gt;
[[File:45678.png|center|thumb|800x800px]]&lt;br /&gt;
执行完上面的命令，再输入&amp;lt;code&amp;gt;systemctl status docker&amp;lt;/code&amp;gt; 并回车。&lt;br /&gt;
&lt;br /&gt;
看到&amp;lt;code&amp;gt;Active: active&amp;lt;/code&amp;gt; 就说明docker已经成功安装并正在运行中了。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 1. 建立目录与解决权限（最关键一步！） ==&lt;br /&gt;
这是大部分人失败的原因：Docker 自动创建的目录属于 &amp;lt;code&amp;gt;root&amp;lt;/code&amp;gt; 用户，而 2FAuth 容器内部使用 &amp;lt;code&amp;gt;1000&amp;lt;/code&amp;gt; (www-data) 用户，导致没有权限写入数据库。&lt;br /&gt;
&lt;br /&gt;
我们需要先创建目录，并提前授权：&lt;br /&gt;
 &amp;lt;code&amp;gt;# 1. 创建项目根目录&lt;br /&gt;
 mkdir -p /root/data/docker_data/2fauth&lt;br /&gt;
 &lt;br /&gt;
 # 2. 创建核心数据目录&lt;br /&gt;
 mkdir -p /root/data/docker_data/2fauth/data&lt;br /&gt;
 &lt;br /&gt;
 # 3. 【核心步骤】修改权限&lt;br /&gt;
 # 将 data 目录的所有权赋予容器内的用户（ID 1000）&lt;br /&gt;
 # 如果不做这一步，容器会因无法生成数据库文件而无限重启&lt;br /&gt;
 chown -R 1000:1000 /root/data/docker_data/2fauth/data&lt;br /&gt;
 &lt;br /&gt;
 # 4. 进入项目目录&lt;br /&gt;
 cd /root/data/docker_data/2fauth&amp;lt;/code&amp;gt;&lt;br /&gt;
[[File:4345313.png|center|thumb|800x800px]]&lt;br /&gt;
&lt;br /&gt;
== 2. 生成 APP_KEY ==&lt;br /&gt;
Laravel 框架必须有一个 32 位的密钥才能运行。在终端执行以下命令，复制输出的字符串：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;#039;&amp;#039;&amp;#039;openssl&amp;#039;&amp;#039;&amp;#039; rand -base64 32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;输出示例：&amp;lt;code&amp;gt;base64:xgT+...（一长串字符）...=&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== 3. 配置文件编写 ==&lt;br /&gt;
我们需要创建两个文件：&amp;lt;code&amp;gt;.env&amp;lt;/code&amp;gt; 和 &amp;lt;code&amp;gt;docker-compose.yml&amp;lt;/code&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
=== 第一步：创建 .env 文件 ===&lt;br /&gt;
这里我们移除了容易引发冲突的数据库路径配置，直接使用容器默认值。&lt;br /&gt;
&lt;br /&gt;
 vim .env&lt;br /&gt;
&lt;br /&gt;
粘贴以下内容（请务必替换你的 APP_KEY）：&lt;br /&gt;
 &amp;lt;code&amp;gt;# --- 基础配置 ---&lt;br /&gt;
 APP_NAME=2FAuth&lt;br /&gt;
 APP_ENV=production&lt;br /&gt;
 APP_DEBUG=false&lt;br /&gt;
 APP_URL=&amp;lt;nowiki&amp;gt;http://你的服务器IP:8000&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 # --- 密钥配置 (必须修改) ---&lt;br /&gt;
 # 将第2步生成的 base64 字符串完整粘贴在这里&lt;br /&gt;
 APP_KEY=base64:你刚刚生成的密钥&lt;br /&gt;
 &lt;br /&gt;
 # --- 数据库配置 ---&lt;br /&gt;
 # 仅保留连接类型，不要手动指定 DB_DATABASE 路径！&lt;br /&gt;
 # 让容器自动使用默认的 /2fauth/database.sqlite&lt;br /&gt;
 DB_CONNECTION=sqlite&amp;lt;/code&amp;gt;&lt;br /&gt;
[[File:4353.png|center|thumb|800x800px]]&lt;br /&gt;
&lt;br /&gt;
=== 第二步：创建 docker-compose.yml ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;#039;&amp;#039;&amp;#039;vim&amp;#039;&amp;#039;&amp;#039; docker-compose.yml&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
粘贴以下内容。注意：我们将整个 &amp;lt;code&amp;gt;./data&amp;lt;/code&amp;gt; 挂载到了容器的 &amp;lt;code&amp;gt;/2fauth&amp;lt;/code&amp;gt; 目录，这样可以确保存储、日志和数据库都能正确持久化且互不冲突。&lt;br /&gt;
 &amp;lt;code&amp;gt;&amp;#039;&amp;#039;&amp;#039;version&amp;#039;&amp;#039;&amp;#039;: &amp;quot;3&amp;quot;&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;services&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
   &amp;#039;&amp;#039;&amp;#039;2fauth&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
     &amp;#039;&amp;#039;&amp;#039;image&amp;#039;&amp;#039;&amp;#039;: 2fauth/2fauth:latest&lt;br /&gt;
     &amp;#039;&amp;#039;&amp;#039;container_name&amp;#039;&amp;#039;&amp;#039;: 2fauth&lt;br /&gt;
     &amp;#039;&amp;#039;&amp;#039;restart&amp;#039;&amp;#039;&amp;#039;: unless-stopped&lt;br /&gt;
     &amp;#039;&amp;#039;&amp;#039;ports&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
       - 8000:8000/tcp&lt;br /&gt;
     &amp;#039;&amp;#039;&amp;#039;env_file&amp;#039;&amp;#039;&amp;#039;: .env&lt;br /&gt;
     &amp;#039;&amp;#039;&amp;#039;volumes&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
       # 【核心修改】直接挂载应用根目录&lt;br /&gt;
       # 这样 database.sqlite 会自动生成在宿主机的 ./data 目录下&lt;br /&gt;
       - ./data:/2fauth&amp;lt;/code&amp;gt;&lt;br /&gt;
[[File:99f13.png|center|thumb|800x800px]]&lt;br /&gt;
&lt;br /&gt;
== 4. 启动服务 ==&lt;br /&gt;
确认当前目录结构如下：&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/2fauth&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;.env&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;docker-compose.yml&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; (权限已改为 1000:1000)&lt;br /&gt;
[[File:7e8913e2.png|center|thumb|800x800px]]&lt;br /&gt;
执行启动命令：&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;docker compose up -d&amp;#039;&amp;#039;&amp;#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
[[File:9bef1ff45.png|center|thumb|800x800px]]&lt;br /&gt;
&lt;br /&gt;
== 5. 验证部署 ==&lt;br /&gt;
查看实时日志：&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;docker compose logs -f&amp;#039;&amp;#039;&amp;#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
部署成功的标志： 你需要耐心等待几秒钟，当你看到日志中出现密密麻麻的 &amp;lt;code&amp;gt;Running migrations&amp;lt;/code&amp;gt;，并且包含 &amp;lt;code&amp;gt;create_users_table&amp;lt;/code&amp;gt;、&amp;lt;code&amp;gt;create_options_table&amp;lt;/code&amp;gt; 等字样，最后停在：&amp;lt;blockquote&amp;gt;&amp;lt;code&amp;gt;Application key set successfully.&amp;lt;/code&amp;gt;&amp;lt;/blockquote&amp;gt;这说明数据库初始化完美完成！&lt;br /&gt;
&lt;br /&gt;
现在，打开浏览器访问 &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://你的IP:8000&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;，即可看到登录界面。点击 Register 注册你的第一个账号（自动成为管理员）。&lt;br /&gt;
[[File:9ff84e90-cb5.png|center|thumb|800x800px]]&lt;br /&gt;
[[Category:500 常见应用指南 — Application Guides]]&lt;/div&gt;</summary>
		<author><name>Feng</name></author>
	</entry>
</feed>