<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Self-Hosted on OHTLY Blog</title>
    <link>https://blog.ohtly.com/tags/self-hosted/</link>
    <description>Recent content in Self-Hosted on OHTLY Blog</description>
    <generator>Hugo</generator>
    <language>zh-cn</language>
    <lastBuildDate>Tue, 23 Jun 2026 11:27:19 +0800</lastBuildDate>
    <atom:link href="https://blog.ohtly.com/tags/self-hosted/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>NetBird 自托管 IDP 密码重置</title>
      <link>https://blog.ohtly.com/posts/2026-06-23-netbird-idp-password-reset/</link>
      <pubDate>Tue, 23 Jun 2026 11:27:19 +0800</pubDate>
      <guid>https://blog.ohtly.com/posts/2026-06-23-netbird-idp-password-reset/</guid>
      <description>&lt;h2 id=&#34;背景&#34;&gt;&#xA;  背景&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e8%83%8c%e6%99%af&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;NetBird 自托管控制平面使用内置 Dex 作为 OIDC Provider。管理员账号在首次部署时通过 config.yaml 的 &lt;code&gt;owner&lt;/code&gt; 字段创建，密码以 bcrypt 哈希存储。&lt;/p&gt;&#xA;&lt;p&gt;长时间没有登录 Dashboard，密码遗忘了。Dashboard 没有提供密码重置功能，需要直接操作数据库恢复。&lt;/p&gt;&#xA;&lt;h2 id=&#34;架构&#34;&gt;&#xA;  架构&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e6%9e%b6%e6%9e%84&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;NetBird 的认证数据分两处存放：&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;位置&lt;/th&gt;&#xA;          &lt;th&gt;文件&lt;/th&gt;&#xA;          &lt;th&gt;作用&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;配置&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;config.yaml&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;server 启动时读取 &lt;code&gt;owner.password&lt;/code&gt;，同步到数据库&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;数据库&lt;/td&gt;&#xA;          &lt;td&gt;Docker volume &lt;code&gt;idp.db&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;Dex 运行时读写的 &lt;code&gt;password&lt;/code&gt; 表&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;Dex 的 &lt;code&gt;password&lt;/code&gt; 表结构：&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;email         - 登录邮箱&#xA;hash          - bcrypt(password)&#xA;username      - 用户名&#xA;user_id       - UUID&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;直接改数据库不行&#34;&gt;&#xA;  直接改数据库？不行&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e7%9b%b4%e6%8e%a5%e6%94%b9%e6%95%b0%e6%8d%ae%e5%ba%93%e4%b8%8d%e8%a1%8c&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;第一个尝试是直接用 Python 更新 idp.db 的 password 表：&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
