PageSourceSearch

https://www.hestudio.net/assets/build-a-kms-server-yourself.html-w9xi9uPq.js

js hestudio.net collected 2026-09-24 10:35:59 UTC 11,779 bytes, 10 lines download raw bytes

1import{_ as s,c as n,f as a,o as t}from"./app-D7CCjthX.js";const i={};function p(r,e){return t(),n("div",null,[...e[0]||(e[0]=[a(`<div class="hint-container caution"><p class="hint-container-title">阅读前提示</p><p>本文仅适合个人用户,商业用户使用该程序可能会面临法律风险!!!</p><p>建议有经济能力的读者支持正版。</p></div><p>知周所众,Windows 和 Office 不是免费软件。如果是新购买的品牌机,则应该预装有正版的 Windows 家庭版,部分用户还附赠 Office。但是,我相信我的读者一大部分用的是自己组装的电脑。</p><blockquote><p>像我一样的穷*用户应该有不少。</p></blockquote><figure><img src="https://img.hestudio.net/i/2023/07/28/64c3426e411f4.png" alt="今天晚上的饭应该怎么办??" tabindex="0" loading="lazy"><figcaption>今天晚上的饭应该怎么办??</figcaption></figure><p>像我这样的经常赶稿的忠实的巨硬用户虽说讨厌巨硬,但是也不能不用啊!!</p><p>(软件仅支持 windows,臣不得不用啊!!!)</p><p>然后再问一下,你们在遇到这种憋屈的情况都是怎么处理的??评论区见。</p><figure><img src="https://img.hestudio.net/i/2023/07/28/64c342d6bd794.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><p>很想支持正版 Windows 和 Office,但是经济实力不允许的个人用户看过来。</p><figure><img src="https://img.hestudio.net/i/2023/07/28/64c342fb61a84.png" alt="这玩意都快赶上我服务器了。。。" tabindex="0" loading="lazy"><figcaption>这玩意都快赶上我服务器了。。。</figcaption></figure><p>对于这种不得不用的软件,我们肯定得想办法。对于网上的 kms 工具,它们需要我们的管理员权限。有的带自动续期的(kms 激活每 180 天验证一次)的又需要常驻后台。这在降低设备安全性(指不定给你塞什么东西 了)的前提下又影响设备性能,非常不划算。如果使用其他的 kms 服务器,又怕突然停服跑路。</p><p>有服务器的我们可以自己搭建一个 kms 服务器(免费的),这种自己的东西才用的放心。当然没有服务器可以用 linux 挂着用。</p><p>这里用到全球最大同性交友网站 Github 的一个开源项目 vlmcsd 项目地址是:<a href="https://github.com/Wind4/vlmcsd" target="_blank" rel="noopener noreferrer">https://github.com/Wind4/vlmcsd</a></p><p>为了保证我们服务器的稳定运行,我们将在 Docker 里运行这个项目。vlmcsd 项目的 Docker 仓库在<a href="https://github.com/Wind4/vlmcsd-docker" target="_blank" rel="noopener noreferrer">https://github.com/Wind4/vlmcsd-docker</a></p><figure><img src="https://img.hestudio.net/i/2023/07/28/64c3432ebfd7e.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><p>官网给了我们运行的命令,我们跟着它一起完成。</p><hr><p>首先,你的服务器需要安装 Git,Docker,Docker-Compose,Vim(可选)。然后我们找一个合适的位置克隆仓库。</p><div class="language-bash line-numbers-mode" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">git</span> clone https://github.com/Wind4/vlmcsd-docker.git vlmcsd</span>
2<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>当然大陆服务器可能克隆不下来。我们可以借助镜像站克隆。</p><div class="language-bash line-numbers-mode" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">git</span> clone https://gitclone.com/github.com/Wind4/vlmcsd-docker.git vlmcsd</span>
3<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>克隆完成后,我们进入该文件夹,会发现三个文件。此时如果你æ
3˜¯å¢ƒå¤–的服务器,我们直接按照官网上的步骤进行。如果你是大陆服务器,请忽略这里,并查看图片底下的内容。</p><div class="language-bash line-numbers-mode" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">docker-compose</span> up <span class="token parameter variable">-d</span></span>
4<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>或者</p><div class="language-bash line-numbers-mode" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">docker</span> build <span class="token parameter variable">-t</span> vlmcsd <span class="token builtin class-name">.</span></span>
5<span class="line"><span class="token function">docker</span> run <span class="token parameter variable">-idt</span> <span class="token parameter variable">-p</span> <span class="token number">1688</span>:1688 vlmcsd</span>
6<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div></div></div><p>当然你也可以借助宝塔面板等第三方管理工具进行管理。在利用第三方工具时需要开放 1688 的 TCP 端口。</p><figure><img src="https://img.hestudio.net/i/2023/07/28/64c34369bdb01.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><p>如果你是大陆服务器,Github 可能无法访问。我们还需要向上面那样修改为 Github 镜像。</p><div class="language-bash line-numbers-mode" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">vim</span> Dockerfile</span>
7<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>打开后,我们将划线位置修改成图片的这样。</p><figure><img src="https://img.hestudio.net/i/2023/07/28/64c3436b3fff8.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><p>然后<code>:wq</code>保存并退出,再执行</p><div class="language-bash line-numbers-mode" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">docker-compose</span> up <span class="token parameter variable">-d</span></span>
8<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>或者</p><div class="language-bash line-numbers-mode" data-highlighter="prismjs" data-ext="sh"><pre><code class="language-bash"><span class="line"><span class="token function">docker</span> build <span class="token parameter variable">-t</span> vlmcsd <span class="token builtin class-name">.</span></span>
9<span class="line"><span class="token function">docker</span> run <span class="token parameter variable">-idt</span> <span class="token parameter variable">-p</span> <span class="token number">1688</span>:1688 vlmcsd</span>
10<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div></div></div><p>当然你也可以借助宝塔面板等第三方管理工具进行管理。在利用第三方工具时需要开放 1688 的 TCP 端口。</p><p>现在程序应该启动了,但是部分云服务器需要到服务商的控制台开启安全组。查看如何使用 KMS,请访问 <a href="https://www.hestudio.net/posts/how-to-use-kms.html" target="_blank" rel="noopener noreferrer">https://www.hestudio.net/posts/how-to-use-kms.html</a></p>`,37)])])}const c=s(i,[["render",p]]),o=JSON.parse('{"path":"/posts/build-a-kms-server-yourself.html","title":"自己搭建一个KMS服务器","lang":"zh-CN","frontmatter":{"title":"自己搭建一个KMS服务器","tag":["Windows","Office","KMS","Linux","Docker"],"category":["Windows"],"description":"阅读前提示 本文仅适合个人用户,商业用户使用该程序可能会面临法律风险!!! 建议有经济能力的读者支持正版。 知周所众,Windows 和 Office 不是免费软件。如果是新购买的品牌机,则应该预装有正版的 Windows 家庭版,部分用户还附赠 Office。但是,我相信我的读者一大部分用的是自己组装的电脑。 像我一样的穷*用户应该有不少。 今天晚上...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"自己搭建一个KMS服务器\\",\\"image\\":[\\"https://img.hestudio.net/i/2023/07/28/64c3426e411f4.png\\",\\"https://img.hestudio.net/i/2023/07/28/64c342d6bd794.png\\",\\"https://img.hestudio.net/i/2023/07/28/64c342fb61a84.png\\",\\"https://img.hestudio.net/i/2023/07/28/64c3432ebfd7e.png\\",\\"https://img.hestudio.net/i/2023/07/28/64c34369bdb01.png\\",\\"https://img.hestudio.net/i/2023/07/28/64c3436b3fff8.png\\"],\\"dateModified\\":\\"2025-03-13T06:15:20.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"undefined\\",\\"url\\":\\"https://www.hestudio.net/about/\\",\\"email\\":\\"[email protected]\\"}]}"],["meta",{"property":"og:url","content":"https://www.hestudio.net/posts/build-a-kms-server-yourself.html"}],["meta",{"property":"og:site_name","content":"heStudio"}],["meta",{"property":"og:title","content":"自己搭建一个KMS服务器"}],["meta",{"property":"og:description","content":"阅读前提示 本文仅适合个人用户,商业用户使用该程序可能会面临法律风险!!! 建议有经济能力的读者支持正版。 知周所众,Windows 和 Office 不是免费软件。如果是新购买的品牌机,则应该预装有正版的 Windows 家庭版,部分用户还附赠 Office。但是,我相信我的读者一大部分用的是自己组装的电脑。 像我一样的穷*用户应该有不少。 今天晚上..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:image","content":"https://img.hestudio.net/i/2023/07/28/64c3426e411f4.png"}],["meta",{"property":"og:locale","content":"zh-CN"}
10],["meta",{"property":"og:updated_time","content":"2025-03-13T06:15:20.000Z"}],["meta",{"property":"article:tag","content":"Docker"}],["meta",{"property":"article:tag","content":"Linux"}],["meta",{"property":"article:tag","content":"KMS"}],["meta",{"property":"article:tag","content":"Office"}],["meta",{"property":"article:tag","content":"Windows"}],["meta",{"property":"article:modified_time","content":"2025-03-13T06:15:20.000Z"}]]},"git":{"createdTime":1690523269000,"updatedTime":1741846520000},"readingTime":{"minutes":3.04,"words":912},"filePathRelative":"posts/build-a-kms-server-yourself.md","excerpt":"<div class=\\"hint-container caution\\">\\n<p class=\\"hint-container-title\\">阅读前提示</p>\\n<p>本文仅适合个人用户,商业用户使用该程序可能会面临法律风险!!!</p>\\n<p>建议有经济能力的读者支持正版。</p>\\n</div>\\n<p>知周所众,Windows 和 Office 不是免费软件。如果是新购买的品牌机,则应该预装有正版的 Windows 家庭版,部分用户还附赠 Office。但是,我相信我的读者一大部分用的是自己组装的电脑。</p>\\n<blockquote>\\n<p>像我一样的穷*用户应该有不少。</p>\\n</blockquote>","autoDesc":true}');export{c as comp,o as data};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.