Initial import of Hugo site to Forgejo
This commit is contained in:
commit
cb1ba0317f
1259 changed files with 236349 additions and 0 deletions
14
public/categories/devops/index.html
Normal file
14
public/categories/devops/index.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<!doctype html><html lang=en dir=auto><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name=robots content="index, follow"><title>DevOps | AlipourIm journeys</title>
|
||||
<meta name=keywords content><meta name=description content><meta name=author content="Iman Alipour"><link rel=canonical href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/devops/><link crossorigin=anonymous href=/assets/css/stylesheet.51e3b550fcc0c3f3a10e2d7b70445c6cb21171bed36521d66dc7427208cafbf9.css integrity="sha256-UeO1UPzAw/OhDi17cERcbLIRcb7TZSHWbcdCcgjK+/k=" rel="preload stylesheet" as=style><link rel=icon href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/favicon.ico><link rel=icon type=image/png sizes=16x16 href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/favicon-16x16.png><link rel=icon type=image/png sizes=32x32 href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/favicon-32x32.png><link rel=apple-touch-icon href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/apple-touch-icon.png><link rel=mask-icon href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/safari-pinned-tab.svg><meta name=theme-color content="#2e2e33"><meta name=msapplication-TileColor content="#2e2e33"><link rel=alternate type=application/rss+xml href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/devops/index.xml><link rel=alternate hreflang=en href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/devops/><noscript><style>#theme-toggle,.top-link{display:none}</style><style>@media(prefers-color-scheme:dark){:root{--theme:rgb(29, 30, 32);--entry:rgb(46, 46, 51);--primary:rgb(218, 218, 219);--secondary:rgb(155, 156, 157);--tertiary:rgb(65, 66, 68);--content:rgb(196, 196, 197);--code-block-bg:rgb(46, 46, 51);--code-bg:rgb(55, 56, 62);--border:rgb(51, 51, 51)}.list{background:var(--theme)}.list:not(.dark)::-webkit-scrollbar-track{background:0 0}.list:not(.dark)::-webkit-scrollbar-thumb{border-color:var(--theme)}}</style></noscript><meta property="og:url" content="http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/devops/"><meta property="og:site_name" content="AlipourIm journeys"><meta property="og:title" content="DevOps"><meta property="og:locale" content="en"><meta property="og:type" content="website"><meta name=twitter:card content="summary"><meta name=twitter:title content="DevOps"><meta name=twitter:description content></head><body class=list id=top><script>localStorage.getItem("pref-theme")==="dark"?document.body.classList.add("dark"):localStorage.getItem("pref-theme")==="light"?document.body.classList.remove("dark"):window.matchMedia("(prefers-color-scheme: dark)").matches&&document.body.classList.add("dark")</script><header class=header><nav class=nav><div class=logo><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/ accesskey=h title="AlipourIm journeys (Alt + H)">AlipourIm journeys</a><div class=logo-switches><button id=theme-toggle accesskey=t title="(Alt + T)" aria-label="Toggle theme"><svg id="moon" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg><svg id="sun" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg></button></div></div><ul id=menu><li><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/ title=Posts><span>Posts</span></a></li><li><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/phd_journey/ title=PhD_journey><span>PhD_journey</span></a></li><li><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/about/ title=About><span>About</span></a></li></ul></nav></header><main class=main><header class=page-header><div class=breadcrumbs><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/>Home</a> » <a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/>Categories</a></div><h1>DevOps
|
||||
<a href=/categories/devops/index.xml title=RSS aria-label=RSS><svg viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" height="23"><path d="M4 11a9 9 0 019 9"/><path d="M4 4a16 16 0 0116 16"/><circle cx="5" cy="19" r="1"/></svg></a></h1></header><article class="post-entry tag-entry"><header class=entry-header><h2 class=entry-hint-parent>Running my blog on Tor (.onion) and the Clearnet with Hugo + PaperMod</h2></header><div class=entry-content><p>TL;DR — The site is built once (Hugo project), published twice:
|
||||
Onion: http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/ via Tor, no TLS/HSTS, bound to 127.0.0.1:3301. Clearnet: https://blog.alipourimjourneys.ir behind Cloudflare, Let’s Encrypt cert, Onion-Location header pointing to the onion mirror. 1) Tor hidden service (onion) basics I used Tor’s v3 onion services and mapped onion port 80 → my local web server on 127.0.0.1:3301.
|
||||
Install & configure Tor (Debian/Ubuntu):
|
||||
sudo apt update && sudo apt install -y tor sudoedit /etc/tor/torrc Add:
|
||||
...</p></div><footer class=entry-footer><span title='2025-09-19 00:00:00 +0000 UTC'>September 19, 2025</span> · 6 min · Iman Alipour
|
||||
<span class=post-meta-item><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/tor_clearnet_blog/#isso-thread class=isso-comments-link>Comments</a></span></footer><a class=entry-link aria-label="post link to Running my blog on Tor (.onion) and the Clearnet with Hugo + PaperMod" href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/tor_clearnet_blog/></a></article></main><footer class=footer><span>© 2025 <a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/>AlipourIm journeys</a></span> ·
|
||||
<span>Powered by
|
||||
<a href=https://gohugo.io/ rel="noopener noreferrer" target=_blank>Hugo</a> &
|
||||
<a href=https://github.com/adityatelange/hugo-PaperMod/ rel=noopener target=_blank>PaperMod</a></span></footer><a href=#top aria-label="go to top" title="Go to Top (Alt + G)" class=top-link id=top-link accesskey=g><svg viewBox="0 0 12 6" fill="currentcolor"><path d="M12 6H0l6-6z"/></svg>
|
||||
</a><script src=/isso/js/count.min.js data-isso=/isso async></script><a href=/index.xml rel=alternate type=application/rss+xml title=RSS class=rss-link><svg viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 11a9 9 0 019 9"/><path d="M4 4a16 16 0 0116 16"/><circle cx="5" cy="19" r="1"/></svg>
|
||||
<span>RSS</span>
|
||||
</a><script>let menu=document.getElementById("menu");menu&&(menu.scrollLeft=localStorage.getItem("menu-scroll-position"),menu.onscroll=function(){localStorage.setItem("menu-scroll-position",menu.scrollLeft)}),document.querySelectorAll('a[href^="#"]').forEach(e=>{e.addEventListener("click",function(e){e.preventDefault();var t=this.getAttribute("href").substr(1);window.matchMedia("(prefers-reduced-motion: reduce)").matches?document.querySelector(`[id='${decodeURIComponent(t)}']`).scrollIntoView():document.querySelector(`[id='${decodeURIComponent(t)}']`).scrollIntoView({behavior:"smooth"}),t==="top"?history.replaceState(null,null," "):history.pushState(null,null,`#${t}`)})})</script><script>var mybutton=document.getElementById("top-link");window.onscroll=function(){document.body.scrollTop>800||document.documentElement.scrollTop>800?(mybutton.style.visibility="visible",mybutton.style.opacity="1"):(mybutton.style.visibility="hidden",mybutton.style.opacity="0")}</script><script>document.getElementById("theme-toggle").addEventListener("click",()=>{document.body.className.includes("dark")?(document.body.classList.remove("dark"),localStorage.setItem("pref-theme","light")):(document.body.classList.add("dark"),localStorage.setItem("pref-theme","dark"))})</script></body></html>
|
||||
422
public/categories/devops/index.xml
Normal file
422
public/categories/devops/index.xml
Normal file
|
|
@ -0,0 +1,422 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>DevOps on AlipourIm journeys</title><link>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/devops/</link><description>Recent content in DevOps on AlipourIm journeys</description><generator>Hugo -- 0.146.0</generator><language>en</language><lastBuildDate>Fri, 19 Sep 2025 00:00:00 +0000</lastBuildDate><atom:link href="http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/devops/index.xml" rel="self" type="application/rss+xml"/><item><title>Running my blog on Tor (.onion) and the Clearnet with Hugo + PaperMod</title><link>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/tor_clearnet_blog/</link><pubDate>Fri, 19 Sep 2025 00:00:00 +0000</pubDate><guid>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/tor_clearnet_blog/</guid><description>How I hosted a Hugo + PaperMod site both as a Tor onion service and a normal HTTPS site behind Cloudflare, with clean configs, dual builds, and a one-command deploy.</description><content:encoded><![CDATA[<blockquote>
|
||||
<p>TL;DR — The site is built once (Hugo project), <strong>published twice</strong>:</p>
|
||||
<ul>
|
||||
<li><strong>Onion</strong>: <code>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/</code> via Tor, no TLS/HSTS, bound to <code>127.0.0.1:3301</code>.</li>
|
||||
<li><strong>Clearnet</strong>: <code>https://blog.alipourimjourneys.ir</code> behind Cloudflare, Let’s Encrypt cert, <code>Onion-Location</code> header pointing to the onion mirror.</li>
|
||||
</ul></blockquote>
|
||||
<hr>
|
||||
<h2 id="1-tor-hidden-service-onion-basics">1) Tor hidden service (onion) basics</h2>
|
||||
<p>I used Tor’s v3 onion services and mapped onion port 80 → my local web server on <code>127.0.0.1:3301</code>.</p>
|
||||
<p><strong>Install & configure Tor (Debian/Ubuntu):</strong></p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo apt update <span style="color:#f92672">&&</span> sudo apt install -y tor
|
||||
</span></span><span style="display:flex;"><span>sudoedit /etc/tor/torrc
|
||||
</span></span></code></pre></div><p>Add:</p>
|
||||
|
||||
|
||||
|
||||
<div class="goat svg-container ">
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
font-family="Menlo,Lucida Console,monospace"
|
||||
|
||||
viewBox="0 0 344 41"
|
||||
>
|
||||
<g transform='translate(8,16)'>
|
||||
<path d='M 132,8 L 124,40' fill='none' stroke='currentColor'></path>
|
||||
<path d='M 196,8 L 188,40' fill='none' stroke='currentColor'></path>
|
||||
<path d='M 228,8 L 220,40' fill='none' stroke='currentColor'></path>
|
||||
<text text-anchor='middle' x='0' y='4' fill='currentColor' style='font-size:1em'>H</text>
|
||||
<text text-anchor='middle' x='0' y='20' fill='currentColor' style='font-size:1em'>H</text>
|
||||
<text text-anchor='middle' x='8' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='8' y='20' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='16' y='4' fill='currentColor' style='font-size:1em'>d</text>
|
||||
<text text-anchor='middle' x='16' y='20' fill='currentColor' style='font-size:1em'>d</text>
|
||||
<text text-anchor='middle' x='24' y='4' fill='currentColor' style='font-size:1em'>d</text>
|
||||
<text text-anchor='middle' x='24' y='20' fill='currentColor' style='font-size:1em'>d</text>
|
||||
<text text-anchor='middle' x='32' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='32' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='40' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='40' y='20' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='48' y='4' fill='currentColor' style='font-size:1em'>S</text>
|
||||
<text text-anchor='middle' x='48' y='20' fill='currentColor' style='font-size:1em'>S</text>
|
||||
<text text-anchor='middle' x='56' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='56' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='64' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='64' y='20' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='72' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='72' y='20' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='80' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='80' y='20' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='88' y='4' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='88' y='20' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='96' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='96' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='104' y='4' fill='currentColor' style='font-size:1em'>D</text>
|
||||
<text text-anchor='middle' x='104' y='20' fill='currentColor' style='font-size:1em'>P</text>
|
||||
<text text-anchor='middle' x='112' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='112' y='20' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='120' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='120' y='20' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='128' y='20' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='144' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='144' y='20' fill='currentColor' style='font-size:1em'>8</text>
|
||||
<text text-anchor='middle' x='152' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='152' y='20' fill='currentColor' style='font-size:1em'>0</text>
|
||||
<text text-anchor='middle' x='160' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='168' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='168' y='20' fill='currentColor' style='font-size:1em'>1</text>
|
||||
<text text-anchor='middle' x='176' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='176' y='20' fill='currentColor' style='font-size:1em'>2</text>
|
||||
<text text-anchor='middle' x='184' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='184' y='20' fill='currentColor' style='font-size:1em'>7</text>
|
||||
<text text-anchor='middle' x='192' y='4' fill='currentColor' style='font-size:1em'>b</text>
|
||||
<text text-anchor='middle' x='192' y='20' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='200' y='20' fill='currentColor' style='font-size:1em'>0</text>
|
||||
<text text-anchor='middle' x='208' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='208' y='20' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='216' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='216' y='20' fill='currentColor' style='font-size:1em'>0</text>
|
||||
<text text-anchor='middle' x='224' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='224' y='20' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='232' y='20' fill='currentColor' style='font-size:1em'>1</text>
|
||||
<text text-anchor='middle' x='240' y='4' fill='currentColor' style='font-size:1em'>h</text>
|
||||
<text text-anchor='middle' x='240' y='20' fill='currentColor' style='font-size:1em'>:</text>
|
||||
<text text-anchor='middle' x='248' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='248' y='20' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='256' y='4' fill='currentColor' style='font-size:1em'>d</text>
|
||||
<text text-anchor='middle' x='256' y='20' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='264' y='4' fill='currentColor' style='font-size:1em'>d</text>
|
||||
<text text-anchor='middle' x='264' y='20' fill='currentColor' style='font-size:1em'>0</text>
|
||||
<text text-anchor='middle' x='272' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='272' y='20' fill='currentColor' style='font-size:1em'>1</text>
|
||||
<text text-anchor='middle' x='280' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='288' y='4' fill='currentColor' style='font-size:1em'>_</text>
|
||||
<text text-anchor='middle' x='296' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='304' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='312' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='320' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='328' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
</g>
|
||||
|
||||
</svg>
|
||||
|
||||
</div>
|
||||
<p>Make sure the directory is owned by Tor’s user and private:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo mkdir -p /var/lib/tor/hidden_site
|
||||
</span></span><span style="display:flex;"><span>sudo chown -R debian-tor:debian-tor /var/lib/tor/hidden_site
|
||||
</span></span><span style="display:flex;"><span>sudo chmod <span style="color:#ae81ff">700</span> /var/lib/tor/hidden_site
|
||||
</span></span></code></pre></div><p><strong>Important:</strong> use the right systemd unit:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e"># validate as the Tor user</span>
|
||||
</span></span><span style="display:flex;"><span>sudo -u debian-tor tor -f /etc/tor/torrc --verify-config
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># (re)start the real service</span>
|
||||
</span></span><span style="display:flex;"><span>sudo systemctl enable --now tor@default
|
||||
</span></span><span style="display:flex;"><span>sudo systemctl restart tor@default
|
||||
</span></span></code></pre></div><p>Get the onion address:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo cat /var/lib/tor/hidden_site/hostname
|
||||
</span></span></code></pre></div><p>Quick check (do remote DNS via SOCKS):</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -I --socks5-hostname 127.0.0.1:9050 <span style="color:#e6db74">"http://</span><span style="color:#66d9ef">$(</span>sudo cat /var/lib/tor/hidden_site/hostname<span style="color:#66d9ef">)</span><span style="color:#e6db74">"</span>
|
||||
</span></span></code></pre></div><hr>
|
||||
<h2 id="2-nginx-for-the-onion-localhost-only">2) Nginx for the onion (localhost-only)</h2>
|
||||
<p>I keep the onion site strictly on localhost: <strong>no HTTPS, no redirects, no HSTS</strong>. Tor already provides e2e encryption and authenticity.</p>
|
||||
<p><code>/etc/nginx/sites-available/onion-blog</code>:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-nginx" data-lang="nginx"><span style="display:flex;"><span><span style="color:#66d9ef">server</span> {
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">listen</span> 127.0.0.1:<span style="color:#ae81ff">3301</span> <span style="color:#e6db74">default_server</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">server_name</span> <span style="color:#e6db74"><your-56-char>.onion</span> 127.0.0.1 <span style="color:#e6db74">localhost</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#75715e"># keep onion simple; no HSTS/redirects here
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span> <span style="color:#f92672">add_header</span> <span style="color:#e6db74">Referrer-Policy</span> <span style="color:#e6db74">no-referrer</span> <span style="color:#e6db74">always</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">add_header</span> <span style="color:#e6db74">X-Content-Type-Options</span> <span style="color:#e6db74">nosniff</span> <span style="color:#e6db74">always</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">add_header</span> <span style="color:#e6db74">X-Frame-Options</span> <span style="color:#e6db74">SAMEORIGIN</span> <span style="color:#e6db74">always</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#75715e"># (optional) strict CSP so nothing leaks to clearnet
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span> <span style="color:#75715e"># add_header Content-Security-Policy "default-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; script-src 'self'" always;
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">root</span> <span style="color:#e6db74">/srv/hugo/mysite/public-onion</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">index</span> <span style="color:#e6db74">index.html</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">location</span> <span style="color:#e6db74">/</span> { <span style="color:#f92672">try_files</span> $uri $uri/ <span style="color:#e6db74">/index.html</span>; }
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">location</span> ~<span style="color:#e6db74">*</span> <span style="color:#e6db74">\.(css|js|ico|png|jpg|jpeg|gif|svg|webp|txt|xml)</span>$ {
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">access_log</span> <span style="color:#66d9ef">off</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">add_header</span> <span style="color:#e6db74">Cache-Control</span> <span style="color:#e6db74">"public,</span> <span style="color:#e6db74">max-age=31536000,</span> <span style="color:#e6db74">immutable"</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">try_files</span> $uri =<span style="color:#ae81ff">404</span>;
|
||||
</span></span><span style="display:flex;"><span> }
|
||||
</span></span><span style="display:flex;"><span>}
|
||||
</span></span></code></pre></div><p>Enable/reload:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo ln -sf /etc/nginx/sites-available/onion-blog /etc/nginx/sites-enabled/onion-blog
|
||||
</span></span><span style="display:flex;"><span>sudo nginx -t <span style="color:#f92672">&&</span> sudo systemctl reload nginx
|
||||
</span></span></code></pre></div><blockquote>
|
||||
<p>Gotcha I hit: I had <strong>two</strong> server blocks on <code>127.0.0.1:3301</code>, which caused 404s via onion. Make sure only the intended vhost listens there (or mark it <code>default_server</code>). Also, if you ever use a regex in <code>server_name</code>, the syntax is <code>server_name ~* \.onion$</code> (note the space after <code>~*</code>).</p></blockquote>
|
||||
<hr>
|
||||
<h2 id="3-hugo--papermod-setup-and-version-bumps">3) Hugo + PaperMod setup (and version bumps)</h2>
|
||||
<p>PaperMod now requires <strong>Hugo Extended ≥ 0.146.0</strong>. I installed the extended binary from the official tarball to avoid Snap’s sandbox limitations (Snap can’t read <code>/srv</code> paths by default).</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e"># install Hugo extended (example)</span>
|
||||
</span></span><span style="display:flex;"><span>VER<span style="color:#f92672">=</span>0.146.0
|
||||
</span></span><span style="display:flex;"><span>cd /tmp
|
||||
</span></span><span style="display:flex;"><span>wget https://github.com/gohugoio/hugo/releases/download/v<span style="color:#e6db74">${</span>VER<span style="color:#e6db74">}</span>/hugo_extended_<span style="color:#e6db74">${</span>VER<span style="color:#e6db74">}</span>_Linux-amd64.tar.gz
|
||||
</span></span><span style="display:flex;"><span>tar -xzf hugo_extended_<span style="color:#e6db74">${</span>VER<span style="color:#e6db74">}</span>_Linux-amd64.tar.gz
|
||||
</span></span><span style="display:flex;"><span>sudo mv hugo /usr/local/bin/hugo
|
||||
</span></span><span style="display:flex;"><span>hugo version <span style="color:#75715e"># should say "extended" and >= 0.146.0</span>
|
||||
</span></span></code></pre></div><p>Create the site and theme:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo mkdir -p /srv/hugo <span style="color:#f92672">&&</span> sudo chown -R <span style="color:#e6db74">"</span>$USER<span style="color:#e6db74">"</span>:<span style="color:#e6db74">"</span>$USER<span style="color:#e6db74">"</span> /srv/hugo
|
||||
</span></span><span style="display:flex;"><span>cd /srv/hugo
|
||||
</span></span><span style="display:flex;"><span>hugo new site mysite
|
||||
</span></span><span style="display:flex;"><span>cd mysite
|
||||
</span></span><span style="display:flex;"><span>git init
|
||||
</span></span><span style="display:flex;"><span>git submodule add https://github.com/adityatelange/hugo-PaperMod themes/PaperMod
|
||||
</span></span></code></pre></div><p><strong>Config updates:</strong> in newer Hugo, <code>paginate</code> is deprecated → use:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#75715e"># config/_default/hugo.toml</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">title</span> = <span style="color:#e6db74">"My Blog"</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">theme</span> = <span style="color:#e6db74">"PaperMod"</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">enableRobotsTXT</span> = <span style="color:#66d9ef">true</span>
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span>[<span style="color:#a6e22e">pagination</span>]
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">pagerSize</span> = <span style="color:#ae81ff">10</span>
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span>[<span style="color:#a6e22e">params</span>]
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">defaultTheme</span> = <span style="color:#e6db74">"auto"</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">showReadingTime</span> = <span style="color:#66d9ef">true</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">showPostNavLinks</span> = <span style="color:#66d9ef">true</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">showBreadCrumbs</span> = <span style="color:#66d9ef">true</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">showCodeCopyButtons</span> = <span style="color:#66d9ef">true</span>
|
||||
</span></span></code></pre></div><p>I added per-environment overrides so I can build two outputs with different <code>baseURL</code>s:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#75715e"># config/clearnet/hugo.toml</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">baseURL</span> = <span style="color:#e6db74">"https://blog.alipourimjourneys.ir/"</span>
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># config/onion/hugo.toml</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">baseURL</span> = <span style="color:#e6db74">"http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/"</span>
|
||||
</span></span></code></pre></div><hr>
|
||||
<h2 id="4-dual-builds-clearnet--onion-and-one-command-deploy">4) Dual builds (clearnet + onion) and one-command deploy</h2>
|
||||
<p>I publish the same content twice—once for each base URL and docroot:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>cd /srv/hugo/mysite
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># clearnet build (served over HTTPS)</span>
|
||||
</span></span><span style="display:flex;"><span>hugo --minify --environment clearnet -d public-clearnet
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># onion build (served via Tor)</span>
|
||||
</span></span><span style="display:flex;"><span>hugo --minify --environment onion -d public-onion
|
||||
</span></span><span style="display:flex;"><span>sudo systemctl reload nginx
|
||||
</span></span></code></pre></div><p>Helper script I use:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo tee /usr/local/bin/build-both >/dev/null <span style="color:#e6db74"><<'EOF'
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">#!/usr/bin/env bash
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">set -euo pipefail
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">cd /srv/hugo/mysite
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">hugo --minify --environment clearnet -d public-clearnet
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">hugo --minify --environment onion -d public-onion
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">sudo systemctl reload nginx
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">echo "Deployed both at $(date)"
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">EOF</span>
|
||||
</span></span><span style="display:flex;"><span>sudo chmod +x /usr/local/bin/build-both
|
||||
</span></span></code></pre></div><p>While editing, I sometimes auto-rebuild on file save:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo apt install -y entr
|
||||
</span></span><span style="display:flex;"><span>cd /srv/hugo/mysite
|
||||
</span></span><span style="display:flex;"><span>find content layouts assets static config -type f | entr -r build-both
|
||||
</span></span></code></pre></div><hr>
|
||||
<h2 id="5-clearnet-behind-cloudflare--lets-encrypt-manual-dns-01">5) Clearnet behind Cloudflare + Let’s Encrypt (manual DNS-01)</h2>
|
||||
<p>Cloudflare is set to <strong>Full (strict)</strong>. I issued a public cert for <code>blog.alipourimjourneys.ir</code> using <strong>manual DNS-01</strong> (no API token):</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo snap install --classic certbot
|
||||
</span></span><span style="display:flex;"><span>sudo certbot certonly --manual --preferred-challenges dns -d blog.alipourimjourneys.ir --agree-tos -m you@example.com --no-eff-email
|
||||
</span></span></code></pre></div><p>Certbot tells you to add a TXT record <code>_acme-challenge.blog.alipourimjourneys.ir</code>. Add it in Cloudflare DNS, verify with <code>dig</code>, then continue. Cert ends up at:</p>
|
||||
|
||||
|
||||
|
||||
<div class="goat svg-container ">
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
font-family="Menlo,Lucida Console,monospace"
|
||||
|
||||
viewBox="0 0 496 41"
|
||||
>
|
||||
<g transform='translate(8,16)'>
|
||||
<text text-anchor='middle' x='0' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='0' y='20' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='8' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='8' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='16' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='16' y='20' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='24' y='4' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='24' y='20' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='32' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='32' y='20' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='40' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='40' y='20' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='48' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='48' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='56' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='56' y='20' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='64' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='64' y='20' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='72' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='72' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='80' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='80' y='20' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='88' y='4' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='88' y='20' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='96' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='96' y='20' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='104' y='4' fill='currentColor' style='font-size:1em'>y</text>
|
||||
<text text-anchor='middle' x='104' y='20' fill='currentColor' style='font-size:1em'>y</text>
|
||||
<text text-anchor='middle' x='112' y='4' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='112' y='20' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='120' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='120' y='20' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='128' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='128' y='20' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='136' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='136' y='20' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='144' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='144' y='20' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='152' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='152' y='20' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='160' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='160' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='168' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='168' y='20' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='176' y='4' fill='currentColor' style='font-size:1em'>b</text>
|
||||
<text text-anchor='middle' x='176' y='20' fill='currentColor' style='font-size:1em'>b</text>
|
||||
<text text-anchor='middle' x='184' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='184' y='20' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='192' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='192' y='20' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='200' y='4' fill='currentColor' style='font-size:1em'>g</text>
|
||||
<text text-anchor='middle' x='200' y='20' fill='currentColor' style='font-size:1em'>g</text>
|
||||
<text text-anchor='middle' x='208' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='208' y='20' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='216' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='216' y='20' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='224' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='224' y='20' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='232' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='232' y='20' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='240' y='4' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='240' y='20' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='248' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='248' y='20' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='256' y='4' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='256' y='20' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='264' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='264' y='20' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='272' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='272' y='20' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='280' y='4' fill='currentColor' style='font-size:1em'>m</text>
|
||||
<text text-anchor='middle' x='280' y='20' fill='currentColor' style='font-size:1em'>m</text>
|
||||
<text text-anchor='middle' x='288' y='4' fill='currentColor' style='font-size:1em'>j</text>
|
||||
<text text-anchor='middle' x='288' y='20' fill='currentColor' style='font-size:1em'>j</text>
|
||||
<text text-anchor='middle' x='296' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='296' y='20' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='304' y='4' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='304' y='20' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='312' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='312' y='20' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='320' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='320' y='20' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='328' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='328' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='336' y='4' fill='currentColor' style='font-size:1em'>y</text>
|
||||
<text text-anchor='middle' x='336' y='20' fill='currentColor' style='font-size:1em'>y</text>
|
||||
<text text-anchor='middle' x='344' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='344' y='20' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='352' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='352' y='20' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='360' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='360' y='20' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='368' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='368' y='20' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='376' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='376' y='20' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='384' y='4' fill='currentColor' style='font-size:1em'>f</text>
|
||||
<text text-anchor='middle' x='384' y='20' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='392' y='4' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='392' y='20' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='400' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='400' y='20' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='408' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='408' y='20' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='416' y='4' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='416' y='20' fill='currentColor' style='font-size:1em'>k</text>
|
||||
<text text-anchor='middle' x='424' y='4' fill='currentColor' style='font-size:1em'>h</text>
|
||||
<text text-anchor='middle' x='424' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='432' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='432' y='20' fill='currentColor' style='font-size:1em'>y</text>
|
||||
<text text-anchor='middle' x='440' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='440' y='20' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='448' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='448' y='20' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='456' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='456' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='464' y='4' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='464' y='20' fill='currentColor' style='font-size:1em'>m</text>
|
||||
<text text-anchor='middle' x='472' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='480' y='4' fill='currentColor' style='font-size:1em'>m</text>
|
||||
</g>
|
||||
|
||||
</svg>
|
||||
|
||||
</div>
|
||||
<p>Clearnet Nginx vhosts:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-nginx" data-lang="nginx"><span style="display:flex;"><span><span style="color:#75715e"># HTTP → HTTPS redirect (optional; CF usually talks HTTPS to origin anyway)
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">server</span> {
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">listen</span> <span style="color:#ae81ff">80</span>; <span style="color:#f92672">listen</span> <span style="color:#e6db74">[::]:80</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">server_name</span> <span style="color:#e6db74">blog.alipourimjourneys.ir</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">return</span> <span style="color:#ae81ff">301</span> <span style="color:#e6db74">https://blog.alipourimjourneys.ir</span>$request_uri;
|
||||
</span></span><span style="display:flex;"><span>}
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># HTTPS origin (behind Cloudflare)
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">server</span> {
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">listen</span> <span style="color:#ae81ff">443</span> <span style="color:#e6db74">ssl</span> <span style="color:#e6db74">http2</span>; <span style="color:#f92672">listen</span> <span style="color:#e6db74">[::]:443</span> <span style="color:#e6db74">ssl</span> <span style="color:#e6db74">http2</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">server_name</span> <span style="color:#e6db74">blog.alipourimjourneys.ir</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">ssl_certificate</span> <span style="color:#e6db74">/etc/letsencrypt/live/blog.alipourimjourneys.ir/fullchain.pem</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">ssl_certificate_key</span> <span style="color:#e6db74">/etc/letsencrypt/live/blog.alipourimjourneys.ir/privkey.pem</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#75715e"># HSTS on clearnet only
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span> <span style="color:#f92672">add_header</span> <span style="color:#e6db74">Strict-Transport-Security</span> <span style="color:#e6db74">"max-age=31536000</span>; <span style="color:#f92672">includeSubDomains</span>; <span style="color:#f92672">preload"</span> <span style="color:#e6db74">always</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#75715e"># Help Tor Browser discover the onion mirror (safe on clearnet)
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span> <span style="color:#f92672">add_header</span> <span style="color:#e6db74">Onion-Location</span> <span style="color:#e6db74">"http://<your-56-char>.onion</span>$request_uri" <span style="color:#e6db74">always</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">root</span> <span style="color:#e6db74">/srv/hugo/mysite/public-clearnet</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">index</span> <span style="color:#e6db74">index.html</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">location</span> <span style="color:#e6db74">/</span> { <span style="color:#f92672">try_files</span> $uri $uri/ <span style="color:#e6db74">/index.html</span>; }
|
||||
</span></span><span style="display:flex;"><span>}
|
||||
</span></span></code></pre></div><blockquote>
|
||||
<p>Note: don’t add HSTS or HTTPS redirects to the <strong>onion</strong> vhost. Keep onion pure HTTP on localhost.</p></blockquote>
|
||||
<hr>
|
||||
<h2 id="6-troubleshooting-i-ran-into-and-fixes">6) Troubleshooting I ran into (and fixes)</h2>
|
||||
<ul>
|
||||
<li><strong>Tor unit confusion:</strong> <code>tor.service</code> is a tiny master; the real daemon is <code>tor@default</code>. Use that unit and verify config as <code>debian-tor</code>.</li>
|
||||
<li><strong>Permissions:</strong> <code>HiddenServiceDir</code> must be owned by <code>debian-tor</code> and mode <code>700</code>.</li>
|
||||
<li><strong>Mapping mismatch:</strong> If <code>HiddenServicePort 80 127.0.0.1:3301</code> is set, visit <code>http://<onion>/</code> (no <code>:3301</code>). If you set <code>HiddenServicePort 3301 127.0.0.1:3301</code>, you must use <code>http://<onion>:3301/</code>.</li>
|
||||
<li><strong>Curl & .onion:</strong> modern curl refuses <code>.onion</code> unless you use remote DNS via SOCKS:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -I --socks5-hostname 127.0.0.1:9050 <span style="color:#e6db74">"http://<onion>/"</span>
|
||||
</span></span></code></pre></div></li>
|
||||
<li><strong>Two Nginx vhosts on the same port:</strong> I had a duplicate server on <code>127.0.0.1:3301</code> pointing somewhere else, which caused onion 404s. Keep only one (or mark one <code>default_server</code>).</li>
|
||||
<li><strong>Regex in <code>server_name</code>:</strong> if you use it, write <code>server_name ~* \.onion$</code> (space after <code>~*</code>). I fixed an <code>invalid variable name</code> error caused by a missing space.</li>
|
||||
<li><strong>PaperMod with old Hugo:</strong> upgraded to <strong>extended ≥ 0.146.0</strong>. Also updated <code>paginate</code> → <code>[pagination].pagerSize</code>.</li>
|
||||
<li><strong>Snap confinement:</strong> Snap’s <code>hugo</code> couldn’t read <code>/srv</code> (<code>.../void: permission denied</code>). Switched to the tarball build in <code>/usr/local/bin</code>.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h2 id="7-not-secure-in-tor-browser">7) “Not secure” in Tor Browser?</h2>
|
||||
<p>That message can appear because onion uses <strong>HTTP</strong>. It’s OK: Tor provides e2e encryption + onion auth. If you enable HTTPS-Only Mode, add an exception for the site. Also ensure the onion build doesn’t reference <strong>clearnet</strong> resources (scan the built HTML for <code>http(s)://</code> links that aren’t your onion).</p>
|
||||
<hr>
|
||||
<h2 id="8-day-to-day-workflow">8) Day-to-day workflow</h2>
|
||||
<ul>
|
||||
<li>Create content:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>hugo new posts/my-first-post.md <span style="color:#75715e"># then set draft: false</span>
|
||||
</span></span></code></pre></div></li>
|
||||
<li>Publish both:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>build-both
|
||||
</span></span></code></pre></div></li>
|
||||
<li>(Optional) Auto on save:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>find content layouts assets static config -type f | entr -r build-both
|
||||
</span></span></code></pre></div></li>
|
||||
<li>(Optional) Git push-to-deploy with a bare repo + post-receive hook that runs <code>build-both</code>.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h2 id="final-notes">Final notes</h2>
|
||||
<ul>
|
||||
<li>Clearnet gets <strong>HTTPS + HSTS</strong> and an <code>Onion-Location</code> header.</li>
|
||||
<li>Onion gets <strong>no HSTS/redirects</strong>, and all assets are self-hosted to avoid mixed content.</li>
|
||||
<li>Serving both worlds from one Hugo repo is easy: <strong>two builds, two vhosts, one workflow</strong>.</li>
|
||||
</ul>
|
||||
]]></content:encoded></item></channel></rss>
|
||||
2
public/categories/devops/page/1/index.html
Normal file
2
public/categories/devops/page/1/index.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<!doctype html><html lang=en><head><title>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/devops/</title>
|
||||
<link rel=canonical href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/devops/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/devops/"></head></html>
|
||||
10
public/categories/games/index.html
Normal file
10
public/categories/games/index.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<!doctype html><html lang=en dir=auto><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name=robots content="index, follow"><title>Games | AlipourIm journeys</title>
|
||||
<meta name=keywords content><meta name=description content><meta name=author content="Iman Alipour"><link rel=canonical href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/games/><link crossorigin=anonymous href=/assets/css/stylesheet.51e3b550fcc0c3f3a10e2d7b70445c6cb21171bed36521d66dc7427208cafbf9.css integrity="sha256-UeO1UPzAw/OhDi17cERcbLIRcb7TZSHWbcdCcgjK+/k=" rel="preload stylesheet" as=style><link rel=icon href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/favicon.ico><link rel=icon type=image/png sizes=16x16 href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/favicon-16x16.png><link rel=icon type=image/png sizes=32x32 href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/favicon-32x32.png><link rel=apple-touch-icon href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/apple-touch-icon.png><link rel=mask-icon href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/safari-pinned-tab.svg><meta name=theme-color content="#2e2e33"><meta name=msapplication-TileColor content="#2e2e33"><link rel=alternate type=application/rss+xml href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/games/index.xml><link rel=alternate hreflang=en href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/games/><noscript><style>#theme-toggle,.top-link{display:none}</style><style>@media(prefers-color-scheme:dark){:root{--theme:rgb(29, 30, 32);--entry:rgb(46, 46, 51);--primary:rgb(218, 218, 219);--secondary:rgb(155, 156, 157);--tertiary:rgb(65, 66, 68);--content:rgb(196, 196, 197);--code-block-bg:rgb(46, 46, 51);--code-bg:rgb(55, 56, 62);--border:rgb(51, 51, 51)}.list{background:var(--theme)}.list:not(.dark)::-webkit-scrollbar-track{background:0 0}.list:not(.dark)::-webkit-scrollbar-thumb{border-color:var(--theme)}}</style></noscript><meta property="og:url" content="http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/games/"><meta property="og:site_name" content="AlipourIm journeys"><meta property="og:title" content="Games"><meta property="og:locale" content="en"><meta property="og:type" content="website"><meta name=twitter:card content="summary"><meta name=twitter:title content="Games"><meta name=twitter:description content></head><body class=list id=top><script>localStorage.getItem("pref-theme")==="dark"?document.body.classList.add("dark"):localStorage.getItem("pref-theme")==="light"?document.body.classList.remove("dark"):window.matchMedia("(prefers-color-scheme: dark)").matches&&document.body.classList.add("dark")</script><header class=header><nav class=nav><div class=logo><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/ accesskey=h title="AlipourIm journeys (Alt + H)">AlipourIm journeys</a><div class=logo-switches><button id=theme-toggle accesskey=t title="(Alt + T)" aria-label="Toggle theme"><svg id="moon" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg><svg id="sun" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg></button></div></div><ul id=menu><li><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/ title=Posts><span>Posts</span></a></li><li><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/phd_journey/ title=PhD_journey><span>PhD_journey</span></a></li><li><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/about/ title=About><span>About</span></a></li></ul></nav></header><main class=main><header class=page-header><div class=breadcrumbs><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/>Home</a> » <a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/>Categories</a></div><h1>Games
|
||||
<a href=/categories/games/index.xml title=RSS aria-label=RSS><svg viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" height="23"><path d="M4 11a9 9 0 019 9"/><path d="M4 4a16 16 0 0116 16"/><circle cx="5" cy="19" r="1"/></svg></a></h1></header><article class="post-entry tag-entry"><header class=entry-header><h2 class=entry-hint-parent>Dockerizing my Minecraft Server + Geyser: from 'no space left' to stable releases</h2></header><div class=entry-content><p>How I containerized a Java Minecraft server with Geyser, hit a /var space wall, and locked the server to the latest stable release.</p></div><footer class=entry-footer><span title='2025-09-29 09:06:29 +0000 UTC'>September 29, 2025</span> · 3 min · Iman Alipour
|
||||
<span class=post-meta-item><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/minecraft_server/#isso-thread class=isso-comments-link>Comments</a></span></footer><a class=entry-link aria-label="post link to Dockerizing my Minecraft Server + Geyser: from 'no space left' to stable releases" href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/minecraft_server/></a></article></main><footer class=footer><span>© 2025 <a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/>AlipourIm journeys</a></span> ·
|
||||
<span>Powered by
|
||||
<a href=https://gohugo.io/ rel="noopener noreferrer" target=_blank>Hugo</a> &
|
||||
<a href=https://github.com/adityatelange/hugo-PaperMod/ rel=noopener target=_blank>PaperMod</a></span></footer><a href=#top aria-label="go to top" title="Go to Top (Alt + G)" class=top-link id=top-link accesskey=g><svg viewBox="0 0 12 6" fill="currentcolor"><path d="M12 6H0l6-6z"/></svg>
|
||||
</a><script src=/isso/js/count.min.js data-isso=/isso async></script><a href=/index.xml rel=alternate type=application/rss+xml title=RSS class=rss-link><svg viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 11a9 9 0 019 9"/><path d="M4 4a16 16 0 0116 16"/><circle cx="5" cy="19" r="1"/></svg>
|
||||
<span>RSS</span>
|
||||
</a><script>let menu=document.getElementById("menu");menu&&(menu.scrollLeft=localStorage.getItem("menu-scroll-position"),menu.onscroll=function(){localStorage.setItem("menu-scroll-position",menu.scrollLeft)}),document.querySelectorAll('a[href^="#"]').forEach(e=>{e.addEventListener("click",function(e){e.preventDefault();var t=this.getAttribute("href").substr(1);window.matchMedia("(prefers-reduced-motion: reduce)").matches?document.querySelector(`[id='${decodeURIComponent(t)}']`).scrollIntoView():document.querySelector(`[id='${decodeURIComponent(t)}']`).scrollIntoView({behavior:"smooth"}),t==="top"?history.replaceState(null,null," "):history.pushState(null,null,`#${t}`)})})</script><script>var mybutton=document.getElementById("top-link");window.onscroll=function(){document.body.scrollTop>800||document.documentElement.scrollTop>800?(mybutton.style.visibility="visible",mybutton.style.opacity="1"):(mybutton.style.visibility="hidden",mybutton.style.opacity="0")}</script><script>document.getElementById("theme-toggle").addEventListener("click",()=>{document.body.className.includes("dark")?(document.body.classList.remove("dark"),localStorage.setItem("pref-theme","light")):(document.body.classList.add("dark"),localStorage.setItem("pref-theme","dark"))})</script></body></html>
|
||||
259
public/categories/games/index.xml
Normal file
259
public/categories/games/index.xml
Normal file
|
|
@ -0,0 +1,259 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Games on AlipourIm journeys</title><link>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/games/</link><description>Recent content in Games on AlipourIm journeys</description><generator>Hugo -- 0.146.0</generator><language>en</language><lastBuildDate>Mon, 29 Sep 2025 09:06:29 +0000</lastBuildDate><atom:link href="http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/games/index.xml" rel="self" type="application/rss+xml"/><item><title>Dockerizing my Minecraft Server + Geyser: from 'no space left' to stable releases</title><link>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/minecraft_server/</link><pubDate>Mon, 29 Sep 2025 09:06:29 +0000</pubDate><guid>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/minecraft_server/</guid><description>How I containerized a Java Minecraft server with Geyser, hit a /var space wall, and locked the server to the latest stable release.</description><content:encoded><![CDATA[<h2 id="why">Why</h2>
|
||||
<p>I’ve been running a Java Minecraft world (with Bedrock players via <strong>Geyser</strong>) in <code>tmux</code>. I moved it to Docker for easier updates, backups, and restarts. Along the way I hit:</p>
|
||||
<ul>
|
||||
<li><code>failed to register layer: ... no space left on device</code></li>
|
||||
<li>Client saying: <strong>“Outdated client, please use 1.21.9 Pre-Release 2”</strong></li>
|
||||
<li>Wanting config in a neat <code>.env</code> and <strong>no whitelist</strong></li>
|
||||
</ul>
|
||||
<p>Here’s exactly what I did.</p>
|
||||
<hr>
|
||||
<h2 id="folder-layout">Folder layout</h2>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>~/minecraft/
|
||||
</span></span><span style="display:flex;"><span>├─ docker-compose.yml
|
||||
</span></span><span style="display:flex;"><span>├─ .env
|
||||
</span></span><span style="display:flex;"><span>└─ plugins/
|
||||
</span></span></code></pre></div><hr>
|
||||
<h2 id="env-secrets--knobs"><code>.env</code> (secrets & knobs)</h2>
|
||||
<p>Use the <strong>latest stable</strong> (not snapshots/pre-releases) by setting <code>VERSION=LATEST</code>.</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-env" data-lang="env"><span style="display:flex;"><span><span style="color:#75715e"># Minecraft server configuration</span>
|
||||
</span></span><span style="display:flex;"><span>EULA<span style="color:#f92672">=</span>TRUE
|
||||
</span></span><span style="display:flex;"><span>TYPE<span style="color:#f92672">=</span>PAPER
|
||||
</span></span><span style="display:flex;"><span>VERSION<span style="color:#f92672">=</span>LATEST
|
||||
</span></span><span style="display:flex;"><span>MEMORY<span style="color:#f92672">=</span>4G
|
||||
</span></span><span style="display:flex;"><span>USE_AIKAR_FLAGS<span style="color:#f92672">=</span>true
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># RCON (remote console)</span>
|
||||
</span></span><span style="display:flex;"><span>ENABLE_RCON<span style="color:#f92672">=</span>true
|
||||
</span></span><span style="display:flex;"><span>RCON_PASSWORD<span style="color:#f92672">=</span>superSecretPassword123
|
||||
</span></span></code></pre></div><blockquote>
|
||||
<p>I don’t use a whitelist, so no <code>WHITELIST</code>/<code>ENFORCE_WHITELIST</code> variables.</p></blockquote>
|
||||
<hr>
|
||||
<h2 id="docker-composeyml"><code>docker-compose.yml</code></h2>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">services</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">mc</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">image</span>: <span style="color:#ae81ff">itzg/minecraft-server:latest</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">container_name</span>: <span style="color:#ae81ff">mc</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">restart</span>: <span style="color:#ae81ff">unless-stopped</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">ports</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#e6db74">"25565:25565"</span> <span style="color:#75715e"># Java</span>
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#e6db74">"19132:19132/udp"</span> <span style="color:#75715e"># Bedrock via Geyser plugin</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">env_file</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#ae81ff">.env</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">volumes</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#ae81ff">mc-data:/data</span>
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#ae81ff">./plugins:/plugins:ro</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#f92672">volumes</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">mc-data</span>: {}
|
||||
</span></span></code></pre></div><blockquote>
|
||||
<p>The <code>version:</code> key in Compose is obsolete now, so I dropped it.</p></blockquote>
|
||||
<hr>
|
||||
<h2 id="add-geyser-and-optional-floodgate-as-plugins">Add Geyser (and optional Floodgate) as plugins</h2>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>mkdir -p ~/minecraft/plugins
|
||||
</span></span><span style="display:flex;"><span>cd ~/minecraft/plugins
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Geyser (Spigot/Paper)</span>
|
||||
</span></span><span style="display:flex;"><span>wget https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot -O Geyser-Spigot.jar
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Floodgate (optional: Bedrock accounts without Java linking)</span>
|
||||
</span></span><span style="display:flex;"><span>wget https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot -O Floodgate-Spigot.jar
|
||||
</span></span></code></pre></div><p>Start it up:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>docker compose up -d
|
||||
</span></span></code></pre></div><p>On first run, Geyser writes its config to <code>/data/plugins/Geyser-Spigot/</code>. Open UDP <strong>19132</strong> on your firewall.</p>
|
||||
<hr>
|
||||
<h2 id="hit-a-wall-var-ran-out-of-space">Hit a wall: <code>/var</code> ran out of space</h2>
|
||||
<p>Docker stores layers at <code>/var/lib/docker</code> by default. My <code>/var</code> LV was tiny:</p>
|
||||
|
||||
|
||||
|
||||
<div class="goat svg-container ">
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
font-family="Menlo,Lucida Console,monospace"
|
||||
|
||||
viewBox="0 0 448 25"
|
||||
>
|
||||
<g transform='translate(8,16)'>
|
||||
<path d='M 404,8 L 404,24' fill='none' stroke='currentColor'></path>
|
||||
<text text-anchor='middle' x='0' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='8' y='4' fill='currentColor' style='font-size:1em'>d</text>
|
||||
<text text-anchor='middle' x='16' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='24' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='32' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='40' y='4' fill='currentColor' style='font-size:1em'>m</text>
|
||||
<text text-anchor='middle' x='48' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='56' y='4' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='64' y='4' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='72' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='80' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='88' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='96' y='4' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='104' y='4' fill='currentColor' style='font-size:1em'>b</text>
|
||||
<text text-anchor='middle' x='112' y='4' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='120' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='128' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='136' y='4' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='144' y='4' fill='currentColor' style='font-size:1em'>-</text>
|
||||
<text text-anchor='middle' x='152' y='4' fill='currentColor' style='font-size:1em'>-</text>
|
||||
<text text-anchor='middle' x='160' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='168' y='4' fill='currentColor' style='font-size:1em'>g</text>
|
||||
<text text-anchor='middle' x='176' y='4' fill='currentColor' style='font-size:1em'>-</text>
|
||||
<text text-anchor='middle' x='184' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='192' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='200' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='232' y='4' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='240' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='248' y='4' fill='currentColor' style='font-size:1em'>9</text>
|
||||
<text text-anchor='middle' x='256' y='4' fill='currentColor' style='font-size:1em'>G</text>
|
||||
<text text-anchor='middle' x='280' y='4' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='288' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='296' y='4' fill='currentColor' style='font-size:1em'>4</text>
|
||||
<text text-anchor='middle' x='304' y='4' fill='currentColor' style='font-size:1em'>G</text>
|
||||
<text text-anchor='middle' x='328' y='4' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='336' y='4' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='344' y='4' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='352' y='4' fill='currentColor' style='font-size:1em'>M</text>
|
||||
<text text-anchor='middle' x='376' y='4' fill='currentColor' style='font-size:1em'>9</text>
|
||||
<text text-anchor='middle' x='384' y='4' fill='currentColor' style='font-size:1em'>2</text>
|
||||
<text text-anchor='middle' x='392' y='4' fill='currentColor' style='font-size:1em'>%</text>
|
||||
<text text-anchor='middle' x='416' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='424' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='432' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
</g>
|
||||
|
||||
</svg>
|
||||
|
||||
</div>
|
||||
<h3 id="quick-cleanup">Quick cleanup</h3>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>docker system df
|
||||
</span></span><span style="display:flex;"><span>docker system prune -f
|
||||
</span></span><span style="display:flex;"><span>docker builder prune -af
|
||||
</span></span><span style="display:flex;"><span>sudo apt-get clean
|
||||
</span></span><span style="display:flex;"><span>sudo journalctl --vacuum-size<span style="color:#f92672">=</span>100M
|
||||
</span></span></code></pre></div><p>If that’s not enough, you have two good options:</p>
|
||||
<h3 id="option-a--move-dockers-data-off-var">Option A — Move Docker’s data off <code>/var</code></h3>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo systemctl stop docker
|
||||
</span></span><span style="display:flex;"><span>sudo mkdir -p /home/docker
|
||||
</span></span><span style="display:flex;"><span>sudo rsync -aHAX --info<span style="color:#f92672">=</span>progress2 /var/lib/docker/ /home/docker/
|
||||
</span></span><span style="display:flex;"><span>echo <span style="color:#e6db74">'{ "data-root": "/home/docker" }'</span> | sudo tee /etc/docker/daemon.json
|
||||
</span></span><span style="display:flex;"><span>sudo systemctl start docker
|
||||
</span></span><span style="display:flex;"><span>docker info | grep <span style="color:#e6db74">"Docker Root Dir"</span>
|
||||
</span></span></code></pre></div><p>If all looks good, free the old space:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo rm -rf /var/lib/docker/*
|
||||
</span></span></code></pre></div><h3 id="option-b--grow-var-lvm">Option B — Grow <code>/var</code> (LVM)</h3>
|
||||
<p>Check free space in the VG:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo vgdisplay <span style="color:#75715e"># look for "Free PE / Size"</span>
|
||||
</span></span></code></pre></div><p>If available, extend <code>/var</code> by +5G:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo lvextend -L +5G /dev/mapper/ubuntu--vg-var
|
||||
</span></span><span style="display:flex;"><span>sudo resize2fs /dev/mapper/ubuntu--vg-var
|
||||
</span></span></code></pre></div><hr>
|
||||
<h2 id="the-version-mismatch-pre-release-vs-stable">The version mismatch: pre-release vs stable</h2>
|
||||
<p>My logs showed:</p>
|
||||
|
||||
|
||||
|
||||
<div class="goat svg-container ">
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
font-family="Menlo,Lucida Console,monospace"
|
||||
|
||||
viewBox="0 0 440 25"
|
||||
>
|
||||
<g transform='translate(8,16)'>
|
||||
<text text-anchor='middle' x='0' y='4' fill='currentColor' style='font-size:1em'>S</text>
|
||||
<text text-anchor='middle' x='8' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='16' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='24' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='32' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='40' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='48' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='56' y='4' fill='currentColor' style='font-size:1em'>g</text>
|
||||
<text text-anchor='middle' x='72' y='4' fill='currentColor' style='font-size:1em'>m</text>
|
||||
<text text-anchor='middle' x='80' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='88' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='96' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='104' y='4' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='112' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='120' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='128' y='4' fill='currentColor' style='font-size:1em'>f</text>
|
||||
<text text-anchor='middle' x='136' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='152' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='160' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='168' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='176' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='184' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='192' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='208' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='216' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='224' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='232' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='240' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='248' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='256' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='272' y='4' fill='currentColor' style='font-size:1em'>1</text>
|
||||
<text text-anchor='middle' x='280' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='288' y='4' fill='currentColor' style='font-size:1em'>2</text>
|
||||
<text text-anchor='middle' x='296' y='4' fill='currentColor' style='font-size:1em'>1</text>
|
||||
<text text-anchor='middle' x='304' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='312' y='4' fill='currentColor' style='font-size:1em'>9</text>
|
||||
<text text-anchor='middle' x='328' y='4' fill='currentColor' style='font-size:1em'>P</text>
|
||||
<text text-anchor='middle' x='336' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='344' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='352' y='4' fill='currentColor' style='font-size:1em'>-</text>
|
||||
<text text-anchor='middle' x='360' y='4' fill='currentColor' style='font-size:1em'>R</text>
|
||||
<text text-anchor='middle' x='368' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='376' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='384' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='392' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='400' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='408' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='424' y='4' fill='currentColor' style='font-size:1em'>2</text>
|
||||
</g>
|
||||
|
||||
</svg>
|
||||
|
||||
</div>
|
||||
<p>That happens if the server pulls a pre-release build (or if <code>VERSION=LATEST</code>). Fix:</p>
|
||||
<ol>
|
||||
<li>Ensure <code>.env</code> has:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-env" data-lang="env"><span style="display:flex;"><span>VERSION<span style="color:#f92672">=</span>LATEST_RELEASE
|
||||
</span></span></code></pre></div></li>
|
||||
<li>Recreate:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>docker compose down
|
||||
</span></span><span style="display:flex;"><span>docker compose pull
|
||||
</span></span><span style="display:flex;"><span>docker compose up -d
|
||||
</span></span></code></pre></div></li>
|
||||
<li>Verify:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>docker logs mc | grep <span style="color:#e6db74">"Starting minecraft server version"</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># -> Starting minecraft server version 1.21.1 (example)</span>
|
||||
</span></span></code></pre></div></li>
|
||||
</ol>
|
||||
<blockquote>
|
||||
<p>Tip: If you <strong>want to pin</strong> and avoid auto-updates entirely, set <code>VERSION=1.21.1</code> (or whatever stable you’ve validated).</p></blockquote>
|
||||
<hr>
|
||||
<h2 id="no-whitelist">No whitelist</h2>
|
||||
<p>Because I don’t set <code>WHITELIST</code>/<code>ENFORCE_WHITELIST</code>, anyone can join (subject to online-mode, bans, and Geyser/Floodgate auth settings). Manage ops/permissions via:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>docker exec -it mc rcon-cli <span style="color:#e6db74">"op YourJavaIGN"</span>
|
||||
</span></span></code></pre></div><p>(or edit <code>/data/ops.json</code>).</p>
|
||||
<hr>
|
||||
<h2 id="backup--updates">Backup & updates</h2>
|
||||
<ul>
|
||||
<li>World/data live under the <code>mc-data</code> volume → back up <code>/data</code> regularly.</li>
|
||||
<li>Update cleanly:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>docker compose pull <span style="color:#f92672">&&</span> docker compose up -d
|
||||
</span></span></code></pre></div></li>
|
||||
<li>Watch space:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>watch -n5 <span style="color:#e6db74">'df -h /var; docker system df'</span>
|
||||
</span></span></code></pre></div></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h2 id="tldr">TL;DR</h2>
|
||||
<ul>
|
||||
<li>Put <strong>Geyser/Floodgate</strong> jars in <code>./plugins</code> and expose <strong>19132/udp</strong>.</li>
|
||||
<li>Keep configs in <code>.env</code>.</li>
|
||||
<li>Fix <code>/var</code> space by pruning, <strong>moving Docker’s data-root</strong>, or <strong>extending <code>/var</code></strong> via LVM.</li>
|
||||
<li>Verify version in logs after each change.</li>
|
||||
</ul>
|
||||
<p>Happy block-breaking! 🧱🚀</p>
|
||||
]]></content:encoded></item></channel></rss>
|
||||
2
public/categories/games/page/1/index.html
Normal file
2
public/categories/games/page/1/index.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<!doctype html><html lang=en><head><title>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/games/</title>
|
||||
<link rel=canonical href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/games/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/games/"></head></html>
|
||||
17
public/categories/guides/index.html
Normal file
17
public/categories/guides/index.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<!doctype html><html lang=en dir=auto><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name=robots content="index, follow"><title>Guides | AlipourIm journeys</title>
|
||||
<meta name=keywords content><meta name=description content><meta name=author content="Iman Alipour"><link rel=canonical href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/guides/><link crossorigin=anonymous href=/assets/css/stylesheet.51e3b550fcc0c3f3a10e2d7b70445c6cb21171bed36521d66dc7427208cafbf9.css integrity="sha256-UeO1UPzAw/OhDi17cERcbLIRcb7TZSHWbcdCcgjK+/k=" rel="preload stylesheet" as=style><link rel=icon href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/favicon.ico><link rel=icon type=image/png sizes=16x16 href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/favicon-16x16.png><link rel=icon type=image/png sizes=32x32 href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/favicon-32x32.png><link rel=apple-touch-icon href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/apple-touch-icon.png><link rel=mask-icon href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/safari-pinned-tab.svg><meta name=theme-color content="#2e2e33"><meta name=msapplication-TileColor content="#2e2e33"><link rel=alternate type=application/rss+xml href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/guides/index.xml><link rel=alternate hreflang=en href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/guides/><noscript><style>#theme-toggle,.top-link{display:none}</style><style>@media(prefers-color-scheme:dark){:root{--theme:rgb(29, 30, 32);--entry:rgb(46, 46, 51);--primary:rgb(218, 218, 219);--secondary:rgb(155, 156, 157);--tertiary:rgb(65, 66, 68);--content:rgb(196, 196, 197);--code-block-bg:rgb(46, 46, 51);--code-bg:rgb(55, 56, 62);--border:rgb(51, 51, 51)}.list{background:var(--theme)}.list:not(.dark)::-webkit-scrollbar-track{background:0 0}.list:not(.dark)::-webkit-scrollbar-thumb{border-color:var(--theme)}}</style></noscript><meta property="og:url" content="http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/guides/"><meta property="og:site_name" content="AlipourIm journeys"><meta property="og:title" content="Guides"><meta property="og:locale" content="en"><meta property="og:type" content="website"><meta name=twitter:card content="summary"><meta name=twitter:title content="Guides"><meta name=twitter:description content></head><body class=list id=top><script>localStorage.getItem("pref-theme")==="dark"?document.body.classList.add("dark"):localStorage.getItem("pref-theme")==="light"?document.body.classList.remove("dark"):window.matchMedia("(prefers-color-scheme: dark)").matches&&document.body.classList.add("dark")</script><header class=header><nav class=nav><div class=logo><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/ accesskey=h title="AlipourIm journeys (Alt + H)">AlipourIm journeys</a><div class=logo-switches><button id=theme-toggle accesskey=t title="(Alt + T)" aria-label="Toggle theme"><svg id="moon" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg><svg id="sun" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg></button></div></div><ul id=menu><li><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/ title=Posts><span>Posts</span></a></li><li><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/phd_journey/ title=PhD_journey><span>PhD_journey</span></a></li><li><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/about/ title=About><span>About</span></a></li></ul></nav></header><main class=main><header class=page-header><div class=breadcrumbs><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/>Home</a> » <a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/>Categories</a></div><h1>Guides
|
||||
<a href=/categories/guides/index.xml title=RSS aria-label=RSS><svg viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" height="23"><path d="M4 11a9 9 0 019 9"/><path d="M4 4a16 16 0 0116 16"/><circle cx="5" cy="19" r="1"/></svg></a></h1></header><article class="post-entry tag-entry"><header class=entry-header><h2 class=entry-hint-parent>Stealth Trojan VPN Behind Cloudflare Guide</h2></header><div class=entry-content><p>Introduction So you want a VPN that doesn’t scream “I am a VPN” to every censor and firewall out there?
|
||||
Welcome to the world of Trojan over WebSocket + TLS behind Cloudflare.
|
||||
This guide not only shows you how to set it up but also sprinkles in some debugging magic so you can figure out why things break (and they will break, trust me).
|
||||
We’ll anonymise domains and secrets, so substitute with your own:
|
||||
...</p></div><footer class=entry-footer><span title='2025-09-09 11:05:00 +0200 +0200'>September 9, 2025</span> · 4 min · Iman Alipour
|
||||
<span class=post-meta-item><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/vpn/#isso-thread class=isso-comments-link>Comments</a></span></footer><a class=entry-link aria-label="post link to Stealth Trojan VPN Behind Cloudflare Guide" href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/vpn/></a></article><article class="post-entry tag-entry"><figure class=entry-cover><img loading=lazy src=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/images/hedgedoc-cover.png alt="HedgeDoc collaborative editing"></figure><header class=entry-header><h2 class=entry-hint-parent>Self-Hosting HedgeDoc with Docker + Nginx + Let's Encrypt</h2></header><div class=entry-content><p>HedgeDoc is an open-source collaborative Markdown editor. Think Google Docs for Markdown: multiple people can edit the same note in real-time, with support for diagrams, math, polls, and slide decks. In this post we’ll walk through setting up your own instance on a server, secured with HTTPS.
|
||||
Prerequisites A Linux server with Docker and Docker Compose A domain name pointing to your server (e.g. notes.alipourimjourneys.ir) Nginx installed for reverse proxying Certbot for Let’s Encrypt certificates 1. Create the project directory mkdir ~/hedgedoc && cd ~/hedgedoc 2. Create .env POSTGRES_PASSWORD=ChangeThisStrongPassword HD_DOMAIN=notes.alipourimjourneys.ir Generate a strong password with:
|
||||
...</p></div><footer class=entry-footer><span title='2025-08-29 00:00:00 +0000 UTC'>August 29, 2025</span> · 2 min · Iman Alipour
|
||||
<span class=post-meta-item><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/hedge_doc/#isso-thread class=isso-comments-link>Comments</a></span></footer><a class=entry-link aria-label="post link to Self-Hosting HedgeDoc with Docker + Nginx + Let's Encrypt" href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/hedge_doc/></a></article></main><footer class=footer><span>© 2025 <a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/>AlipourIm journeys</a></span> ·
|
||||
<span>Powered by
|
||||
<a href=https://gohugo.io/ rel="noopener noreferrer" target=_blank>Hugo</a> &
|
||||
<a href=https://github.com/adityatelange/hugo-PaperMod/ rel=noopener target=_blank>PaperMod</a></span></footer><a href=#top aria-label="go to top" title="Go to Top (Alt + G)" class=top-link id=top-link accesskey=g><svg viewBox="0 0 12 6" fill="currentcolor"><path d="M12 6H0l6-6z"/></svg>
|
||||
</a><script src=/isso/js/count.min.js data-isso=/isso async></script><a href=/index.xml rel=alternate type=application/rss+xml title=RSS class=rss-link><svg viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 11a9 9 0 019 9"/><path d="M4 4a16 16 0 0116 16"/><circle cx="5" cy="19" r="1"/></svg>
|
||||
<span>RSS</span>
|
||||
</a><script>let menu=document.getElementById("menu");menu&&(menu.scrollLeft=localStorage.getItem("menu-scroll-position"),menu.onscroll=function(){localStorage.setItem("menu-scroll-position",menu.scrollLeft)}),document.querySelectorAll('a[href^="#"]').forEach(e=>{e.addEventListener("click",function(e){e.preventDefault();var t=this.getAttribute("href").substr(1);window.matchMedia("(prefers-reduced-motion: reduce)").matches?document.querySelector(`[id='${decodeURIComponent(t)}']`).scrollIntoView():document.querySelector(`[id='${decodeURIComponent(t)}']`).scrollIntoView({behavior:"smooth"}),t==="top"?history.replaceState(null,null," "):history.pushState(null,null,`#${t}`)})})</script><script>var mybutton=document.getElementById("top-link");window.onscroll=function(){document.body.scrollTop>800||document.documentElement.scrollTop>800?(mybutton.style.visibility="visible",mybutton.style.opacity="1"):(mybutton.style.visibility="hidden",mybutton.style.opacity="0")}</script><script>document.getElementById("theme-toggle").addEventListener("click",()=>{document.body.className.includes("dark")?(document.body.classList.remove("dark"),localStorage.setItem("pref-theme","light")):(document.body.classList.add("dark"),localStorage.setItem("pref-theme","dark"))})</script></body></html>
|
||||
508
public/categories/guides/index.xml
Normal file
508
public/categories/guides/index.xml
Normal file
|
|
@ -0,0 +1,508 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Guides on AlipourIm journeys</title><link>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/guides/</link><description>Recent content in Guides on AlipourIm journeys</description><generator>Hugo -- 0.146.0</generator><language>en</language><lastBuildDate>Tue, 09 Sep 2025 11:05:00 +0200</lastBuildDate><atom:link href="http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/guides/index.xml" rel="self" type="application/rss+xml"/><item><title>Stealth Trojan VPN Behind Cloudflare Guide</title><link>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/vpn/</link><pubDate>Tue, 09 Sep 2025 11:05:00 +0200</pubDate><guid>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/vpn/</guid><description><h2 id="introduction">Introduction</h2>
|
||||
<p>So you want a VPN that <strong>doesn&rsquo;t scream &ldquo;I am a VPN&rdquo;</strong> to every censor and firewall out there?<br>
|
||||
Welcome to the world of <strong>Trojan over WebSocket + TLS behind Cloudflare</strong>.</p>
|
||||
<p>This guide not only shows you how to set it up but also sprinkles in some <strong>debugging magic</strong> so you can figure out why things break (and they <em>will</em> break, trust me).</p>
|
||||
<p>We’ll anonymise domains and secrets, so substitute with your own:</p></description><content:encoded><![CDATA[<h2 id="introduction">Introduction</h2>
|
||||
<p>So you want a VPN that <strong>doesn’t scream “I am a VPN”</strong> to every censor and firewall out there?<br>
|
||||
Welcome to the world of <strong>Trojan over WebSocket + TLS behind Cloudflare</strong>.</p>
|
||||
<p>This guide not only shows you how to set it up but also sprinkles in some <strong>debugging magic</strong> so you can figure out why things break (and they <em>will</em> break, trust me).</p>
|
||||
<p>We’ll anonymise domains and secrets, so substitute with your own:</p>
|
||||
<ul>
|
||||
<li>VPN domain: <code>web.example.com</code></li>
|
||||
<li>Panel domain: <code>panel.example.com</code></li>
|
||||
<li>Secret WS path: <code>/stealth-path_abcd1234</code></li>
|
||||
<li>Password: <code><PASSWORD></code></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h2 id="architecture-at-a-glance">Architecture at a Glance</h2>
|
||||
<p>Think of it as a disguise party:</p>
|
||||
<ul>
|
||||
<li><strong>Trojan</strong> = the shy guest (your VPN protocol)</li>
|
||||
<li><strong>Nginx</strong> = the bouncer checking IDs (reverse proxy)</li>
|
||||
<li><strong>Cloudflare</strong> = the doorman who makes sure nobody sees who’s inside (CDN & proxy)</li>
|
||||
<li><strong>Your fake website</strong> = the mask (camouflage page)</li>
|
||||
</ul>
|
||||
<p>Traffic flow:</p>
|
||||
|
||||
|
||||
|
||||
<div class="goat svg-container ">
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
font-family="Menlo,Lucida Console,monospace"
|
||||
|
||||
viewBox="0 0 536 25"
|
||||
>
|
||||
<g transform='translate(8,16)'>
|
||||
<text text-anchor='middle' x='0' y='4' fill='currentColor' style='font-size:1em'>C</text>
|
||||
<text text-anchor='middle' x='8' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='16' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='24' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='32' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='40' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='56' y='4' fill='currentColor' style='font-size:1em'>→</text>
|
||||
<text text-anchor='middle' x='72' y='4' fill='currentColor' style='font-size:1em'>C</text>
|
||||
<text text-anchor='middle' x='80' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='88' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='96' y='4' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='104' y='4' fill='currentColor' style='font-size:1em'>d</text>
|
||||
<text text-anchor='middle' x='112' y='4' fill='currentColor' style='font-size:1em'>f</text>
|
||||
<text text-anchor='middle' x='120' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='128' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='136' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='144' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='160' y='4' fill='currentColor' style='font-size:1em'>(</text>
|
||||
<text text-anchor='middle' x='168' y='4' fill='currentColor' style='font-size:1em'>4</text>
|
||||
<text text-anchor='middle' x='176' y='4' fill='currentColor' style='font-size:1em'>4</text>
|
||||
<text text-anchor='middle' x='184' y='4' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='192' y='4' fill='currentColor' style='font-size:1em'>)</text>
|
||||
<text text-anchor='middle' x='208' y='4' fill='currentColor' style='font-size:1em'>→</text>
|
||||
<text text-anchor='middle' x='224' y='4' fill='currentColor' style='font-size:1em'>N</text>
|
||||
<text text-anchor='middle' x='232' y='4' fill='currentColor' style='font-size:1em'>g</text>
|
||||
<text text-anchor='middle' x='240' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='248' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='256' y='4' fill='currentColor' style='font-size:1em'>x</text>
|
||||
<text text-anchor='middle' x='272' y='4' fill='currentColor' style='font-size:1em'>(</text>
|
||||
<text text-anchor='middle' x='280' y='4' fill='currentColor' style='font-size:1em'>4</text>
|
||||
<text text-anchor='middle' x='288' y='4' fill='currentColor' style='font-size:1em'>4</text>
|
||||
<text text-anchor='middle' x='296' y='4' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='304' y='4' fill='currentColor' style='font-size:1em'>)</text>
|
||||
<text text-anchor='middle' x='320' y='4' fill='currentColor' style='font-size:1em'>→</text>
|
||||
<text text-anchor='middle' x='336' y='4' fill='currentColor' style='font-size:1em'>T</text>
|
||||
<text text-anchor='middle' x='344' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='352' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='360' y='4' fill='currentColor' style='font-size:1em'>j</text>
|
||||
<text text-anchor='middle' x='368' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='376' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='392' y='4' fill='currentColor' style='font-size:1em'>(</text>
|
||||
<text text-anchor='middle' x='400' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='408' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='416' y='4' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='424' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='432' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='440' y='4' fill='currentColor' style='font-size:1em'>h</text>
|
||||
<text text-anchor='middle' x='448' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='456' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='464' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='472' y='4' fill='currentColor' style='font-size:1em'>:</text>
|
||||
<text text-anchor='middle' x='480' y='4' fill='currentColor' style='font-size:1em'>5</text>
|
||||
<text text-anchor='middle' x='488' y='4' fill='currentColor' style='font-size:1em'>4</text>
|
||||
<text text-anchor='middle' x='496' y='4' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='504' y='4' fill='currentColor' style='font-size:1em'>2</text>
|
||||
<text text-anchor='middle' x='512' y='4' fill='currentColor' style='font-size:1em'>1</text>
|
||||
<text text-anchor='middle' x='520' y='4' fill='currentColor' style='font-size:1em'>)</text>
|
||||
</g>
|
||||
|
||||
</svg>
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
<h2 id="step-1-panel-setup-panelexamplecom">Step 1: Panel Setup (<code>panel.example.com</code>)</h2>
|
||||
<ul>
|
||||
<li>Bind the 3x-ui panel to localhost (e.g., <code>127.0.0.1:46309</code>).</li>
|
||||
<li>Choose a funky <strong>web base path</strong> like <code>/panel-bananas_42/</code>.</li>
|
||||
<li>Proxy it through Nginx with HTTPS + Basic Auth.</li>
|
||||
<li>Test it at <code>https://panel.example.com/panel-bananas_42/</code>.</li>
|
||||
</ul>
|
||||
<p><strong>Pro tip:</strong> If you see a blank page → your base path is mismatched or Nginx is eating it. Check logs!</p>
|
||||
<hr>
|
||||
<h2 id="step-2-trojan-inbound">Step 2: Trojan Inbound</h2>
|
||||
<p>In 3x-ui, create a Trojan inbound:</p>
|
||||
<ul>
|
||||
<li>Local port: <code>54321</code></li>
|
||||
<li>Transport: WebSocket</li>
|
||||
<li>Path: <code>/stealth-path_abcd1234</code></li>
|
||||
<li>Security: none</li>
|
||||
<li>Password: <code><PASSWORD></code></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h2 id="step-3-nginx-for-vpn-domain-webexamplecom">Step 3: Nginx for VPN Domain (<code>web.example.com</code>)</h2>
|
||||
<p>Your Nginx is the gatekeeper. Sample config:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-nginx" data-lang="nginx"><span style="display:flex;"><span><span style="color:#66d9ef">server</span> {
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">listen</span> <span style="color:#ae81ff">443</span> <span style="color:#e6db74">ssl</span> <span style="color:#e6db74">http2</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">server_name</span> <span style="color:#e6db74">web.example.com</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">ssl_certificate</span> <span style="color:#e6db74">/etc/letsencrypt/live/web.example.com/fullchain.pem</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">ssl_certificate_key</span> <span style="color:#e6db74">/etc/letsencrypt/live/web.example.com/privkey.pem</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#75715e"># Fake website at root
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span> <span style="color:#f92672">location</span> <span style="color:#e6db74">/</span> {
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">root</span> <span style="color:#e6db74">/var/www/html</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">index</span> <span style="color:#e6db74">index.html</span>;
|
||||
</span></span><span style="display:flex;"><span> }
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#75715e"># Real VPN under secret WS path
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span> <span style="color:#f92672">location</span> <span style="color:#e6db74">/stealth-path_abcd1234</span> {
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">proxy_pass</span> <span style="color:#e6db74">http://127.0.0.1:54321</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">proxy_http_version</span> <span style="color:#ae81ff">1</span><span style="color:#e6db74">.1</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">proxy_set_header</span> <span style="color:#e6db74">Upgrade</span> $http_upgrade;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">proxy_set_header</span> <span style="color:#e6db74">Connection</span> <span style="color:#e6db74">"upgrade"</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">proxy_set_header</span> <span style="color:#e6db74">Host</span> $host;
|
||||
</span></span><span style="display:flex;"><span> }
|
||||
</span></span><span style="display:flex;"><span>}
|
||||
</span></span></code></pre></div><hr>
|
||||
<h2 id="step-4-firewall-rules">Step 4: Firewall Rules</h2>
|
||||
<p>Lock things down! Only Cloudflare should reach you:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>ufw allow 22/tcp
|
||||
</span></span><span style="display:flex;"><span>ufw allow 80/tcp
|
||||
</span></span><span style="display:flex;"><span>ufw allow 443/tcp
|
||||
</span></span><span style="display:flex;"><span>ufw deny 54321/tcp
|
||||
</span></span></code></pre></div><hr>
|
||||
<h2 id="step-5-client-config">Step 5: Client Config</h2>
|
||||
<p>Trojan URI:</p>
|
||||
|
||||
|
||||
|
||||
<div class="goat svg-container ">
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
font-family="Menlo,Lucida Console,monospace"
|
||||
|
||||
viewBox="0 0 1160 25"
|
||||
>
|
||||
<g transform='translate(8,16)'>
|
||||
<text text-anchor='middle' x='0' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='8' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='16' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='24' y='4' fill='currentColor' style='font-size:1em'>j</text>
|
||||
<text text-anchor='middle' x='32' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='40' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='48' y='4' fill='currentColor' style='font-size:1em'>:</text>
|
||||
<text text-anchor='middle' x='56' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='64' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='72' y='4' fill='currentColor' style='font-size:1em'><</text>
|
||||
<text text-anchor='middle' x='80' y='4' fill='currentColor' style='font-size:1em'>P</text>
|
||||
<text text-anchor='middle' x='88' y='4' fill='currentColor' style='font-size:1em'>A</text>
|
||||
<text text-anchor='middle' x='96' y='4' fill='currentColor' style='font-size:1em'>S</text>
|
||||
<text text-anchor='middle' x='104' y='4' fill='currentColor' style='font-size:1em'>S</text>
|
||||
<text text-anchor='middle' x='112' y='4' fill='currentColor' style='font-size:1em'>W</text>
|
||||
<text text-anchor='middle' x='120' y='4' fill='currentColor' style='font-size:1em'>O</text>
|
||||
<text text-anchor='middle' x='128' y='4' fill='currentColor' style='font-size:1em'>R</text>
|
||||
<text text-anchor='middle' x='136' y='4' fill='currentColor' style='font-size:1em'>D</text>
|
||||
<text text-anchor='middle' x='144' y='4' fill='currentColor' style='font-size:1em'>></text>
|
||||
<text text-anchor='middle' x='152' y='4' fill='currentColor' style='font-size:1em'>@</text>
|
||||
<text text-anchor='middle' x='160' y='4' fill='currentColor' style='font-size:1em'>w</text>
|
||||
<text text-anchor='middle' x='168' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='176' y='4' fill='currentColor' style='font-size:1em'>b</text>
|
||||
<text text-anchor='middle' x='184' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='192' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='200' y='4' fill='currentColor' style='font-size:1em'>x</text>
|
||||
<text text-anchor='middle' x='208' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='216' y='4' fill='currentColor' style='font-size:1em'>m</text>
|
||||
<text text-anchor='middle' x='224' y='4' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='232' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='240' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='248' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='256' y='4' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='264' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='272' y='4' fill='currentColor' style='font-size:1em'>m</text>
|
||||
<text text-anchor='middle' x='280' y='4' fill='currentColor' style='font-size:1em'>:</text>
|
||||
<text text-anchor='middle' x='288' y='4' fill='currentColor' style='font-size:1em'>4</text>
|
||||
<text text-anchor='middle' x='296' y='4' fill='currentColor' style='font-size:1em'>4</text>
|
||||
<text text-anchor='middle' x='304' y='4' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='312' y='4' fill='currentColor' style='font-size:1em'>?</text>
|
||||
<text text-anchor='middle' x='320' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='328' y='4' fill='currentColor' style='font-size:1em'>y</text>
|
||||
<text text-anchor='middle' x='336' y='4' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='344' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='352' y='4' fill='currentColor' style='font-size:1em'>=</text>
|
||||
<text text-anchor='middle' x='360' y='4' fill='currentColor' style='font-size:1em'>w</text>
|
||||
<text text-anchor='middle' x='368' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='376' y='4' fill='currentColor' style='font-size:1em'>&</text>
|
||||
<text text-anchor='middle' x='384' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='392' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='400' y='4' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='408' y='4' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='416' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='424' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='432' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='440' y='4' fill='currentColor' style='font-size:1em'>y</text>
|
||||
<text text-anchor='middle' x='448' y='4' fill='currentColor' style='font-size:1em'>=</text>
|
||||
<text text-anchor='middle' x='456' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='464' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='472' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='480' y='4' fill='currentColor' style='font-size:1em'>&</text>
|
||||
<text text-anchor='middle' x='488' y='4' fill='currentColor' style='font-size:1em'>h</text>
|
||||
<text text-anchor='middle' x='496' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='504' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='512' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='520' y='4' fill='currentColor' style='font-size:1em'>=</text>
|
||||
<text text-anchor='middle' x='528' y='4' fill='currentColor' style='font-size:1em'>w</text>
|
||||
<text text-anchor='middle' x='536' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='544' y='4' fill='currentColor' style='font-size:1em'>b</text>
|
||||
<text text-anchor='middle' x='552' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='560' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='568' y='4' fill='currentColor' style='font-size:1em'>x</text>
|
||||
<text text-anchor='middle' x='576' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='584' y='4' fill='currentColor' style='font-size:1em'>m</text>
|
||||
<text text-anchor='middle' x='592' y='4' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='600' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='608' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='616' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='624' y='4' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='632' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='640' y='4' fill='currentColor' style='font-size:1em'>m</text>
|
||||
<text text-anchor='middle' x='648' y='4' fill='currentColor' style='font-size:1em'>&</text>
|
||||
<text text-anchor='middle' x='656' y='4' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='664' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='672' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='680' y='4' fill='currentColor' style='font-size:1em'>h</text>
|
||||
<text text-anchor='middle' x='688' y='4' fill='currentColor' style='font-size:1em'>=</text>
|
||||
<text text-anchor='middle' x='696' y='4' fill='currentColor' style='font-size:1em'>%</text>
|
||||
<text text-anchor='middle' x='704' y='4' fill='currentColor' style='font-size:1em'>2</text>
|
||||
<text text-anchor='middle' x='712' y='4' fill='currentColor' style='font-size:1em'>F</text>
|
||||
<text text-anchor='middle' x='720' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='728' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='736' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='744' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='752' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='760' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='768' y='4' fill='currentColor' style='font-size:1em'>h</text>
|
||||
<text text-anchor='middle' x='776' y='4' fill='currentColor' style='font-size:1em'>-</text>
|
||||
<text text-anchor='middle' x='784' y='4' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='792' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='800' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='808' y='4' fill='currentColor' style='font-size:1em'>h</text>
|
||||
<text text-anchor='middle' x='816' y='4' fill='currentColor' style='font-size:1em'>_</text>
|
||||
<text text-anchor='middle' x='824' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='832' y='4' fill='currentColor' style='font-size:1em'>b</text>
|
||||
<text text-anchor='middle' x='840' y='4' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='848' y='4' fill='currentColor' style='font-size:1em'>d</text>
|
||||
<text text-anchor='middle' x='856' y='4' fill='currentColor' style='font-size:1em'>1</text>
|
||||
<text text-anchor='middle' x='864' y='4' fill='currentColor' style='font-size:1em'>2</text>
|
||||
<text text-anchor='middle' x='872' y='4' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='880' y='4' fill='currentColor' style='font-size:1em'>4</text>
|
||||
<text text-anchor='middle' x='888' y='4' fill='currentColor' style='font-size:1em'>&</text>
|
||||
<text text-anchor='middle' x='896' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='904' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='912' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='920' y='4' fill='currentColor' style='font-size:1em'>=</text>
|
||||
<text text-anchor='middle' x='928' y='4' fill='currentColor' style='font-size:1em'>w</text>
|
||||
<text text-anchor='middle' x='936' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='944' y='4' fill='currentColor' style='font-size:1em'>b</text>
|
||||
<text text-anchor='middle' x='952' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='960' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='968' y='4' fill='currentColor' style='font-size:1em'>x</text>
|
||||
<text text-anchor='middle' x='976' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='984' y='4' fill='currentColor' style='font-size:1em'>m</text>
|
||||
<text text-anchor='middle' x='992' y='4' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='1000' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='1008' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='1016' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='1024' y='4' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='1032' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='1040' y='4' fill='currentColor' style='font-size:1em'>m</text>
|
||||
<text text-anchor='middle' x='1048' y='4' fill='currentColor' style='font-size:1em'>#</text>
|
||||
<text text-anchor='middle' x='1056' y='4' fill='currentColor' style='font-size:1em'>M</text>
|
||||
<text text-anchor='middle' x='1064' y='4' fill='currentColor' style='font-size:1em'>y</text>
|
||||
<text text-anchor='middle' x='1072' y='4' fill='currentColor' style='font-size:1em'>S</text>
|
||||
<text text-anchor='middle' x='1080' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='1088' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='1096' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='1104' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='1112' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='1120' y='4' fill='currentColor' style='font-size:1em'>h</text>
|
||||
<text text-anchor='middle' x='1128' y='4' fill='currentColor' style='font-size:1em'>V</text>
|
||||
<text text-anchor='middle' x='1136' y='4' fill='currentColor' style='font-size:1em'>P</text>
|
||||
<text text-anchor='middle' x='1144' y='4' fill='currentColor' style='font-size:1em'>N</text>
|
||||
</g>
|
||||
|
||||
</svg>
|
||||
|
||||
</div>
|
||||
<p>iOS clients: Shadowrocket, Stash, FoXray<br>
|
||||
Android clients: v2rayNG, Clash Meta, NekoBox</p>
|
||||
<hr>
|
||||
<h2 id="debugging-time-aka-why-the-heck-doesnt-it-work">Debugging Time (a.k.a. “Why the heck doesn’t it work?!”)</h2>
|
||||
<h3 id="symptom-520-unknown-error-cloudflare">Symptom: <strong>520 Unknown Error (Cloudflare)</strong></h3>
|
||||
<ul>
|
||||
<li>Likely cause: Nginx couldn’t talk to Trojan.</li>
|
||||
<li>Check Nginx error log:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>tail -n <span style="color:#ae81ff">50</span> /var/log/nginx/error.log
|
||||
</span></span></code></pre></div></li>
|
||||
<li>If you see <code>upstream sent no valid HTTP/1.0 header</code> → you’re mixing HTTPS/HTTP between Nginx and Trojan.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h3 id="symptom-526-invalid-ssl-certificate">Symptom: <strong>526 Invalid SSL certificate</strong></h3>
|
||||
<ul>
|
||||
<li>Cloudflare → Nginx cert mismatch.</li>
|
||||
<li>Run:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>openssl s_client -connect web.example.com:443 -servername web.example.com -showcerts
|
||||
</span></span></code></pre></div></li>
|
||||
<li>Make sure CN = <code>web.example.com</code>. If not, fix your cert.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h3 id="symptom-blank-page-on-panel">Symptom: <strong>Blank page on panel</strong></h3>
|
||||
<ul>
|
||||
<li>Check if the base path matches exactly (case-sensitive, slash-sensitive).</li>
|
||||
<li>Watch for sneaky trailing spaces!</li>
|
||||
<li>Test locally:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -s -D- http://127.0.0.1:46309/panel-bananas_42/
|
||||
</span></span></code></pre></div></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h3 id="symptom-client-wont-connect">Symptom: <strong>Client won’t connect</strong></h3>
|
||||
<ul>
|
||||
<li>Run a WebSocket test:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -i -k -H <span style="color:#e6db74">"Connection: Upgrade"</span> -H <span style="color:#e6db74">"Upgrade: websocket"</span> https://web.example.com/stealth-path_abcd1234
|
||||
</span></span></code></pre></div>Expect <code>101 Switching Protocols</code>. If not, check Nginx config.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h3 id="symptom-censor-still-blocks-you">Symptom: <strong>Censor still blocks you</strong></h3>
|
||||
<ul>
|
||||
<li>Did you expose another service (like SSH, Matrix, or Minecraft) on the same IP?<br>
|
||||
→ They’ll find your origin IP. Use a second VPS or lock those ports down.</li>
|
||||
<li>Did you use an obvious path like <code>/ws</code>?<br>
|
||||
→ Use a random-looking one like <code>/cdn-assets-329df/</code>.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h2 id="pro-tips--fun-tricks">Pro Tips & Fun Tricks</h2>
|
||||
<ul>
|
||||
<li>Serve a fake blog or portfolio at root so your domain looks legit.</li>
|
||||
<li>Rotate WebSocket paths occasionally.</li>
|
||||
<li>Use Cloudflare <strong>Page Rules</strong> to disable Rocket Loader & Minify for your VPN domain.</li>
|
||||
<li>Make friends with your Nginx error.log — it will roast you but it tells the truth.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h2 id="conclusion">Conclusion</h2>
|
||||
<p>By putting Trojan behind Cloudflare, you’ve given your VPN a shiny new disguise:</p>
|
||||
<ul>
|
||||
<li>Looks like normal HTTPS.</li>
|
||||
<li>Hides your origin IP.</li>
|
||||
<li>Forces censors into a tough choice: block Cloudflare (and half the web) or let you pass.</li>
|
||||
</ul>
|
||||
<p>Congrats — you’ve built a VPN with both <strong>style</strong> and <strong>stealth</strong>. 🥷</p>
|
||||
]]></content:encoded></item><item><title>Self-Hosting HedgeDoc with Docker + Nginx + Let's Encrypt</title><link>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/hedge_doc/</link><pubDate>Fri, 29 Aug 2025 00:00:00 +0000</pubDate><guid>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/hedge_doc/</guid><description><p>HedgeDoc is an open-source collaborative Markdown editor. Think <em>Google Docs for Markdown</em>: multiple people can edit the same note in real-time, with support for diagrams, math, polls, and slide decks. In this post we’ll walk through setting up your own instance on a server, secured with HTTPS.</p>
|
||||
<hr>
|
||||
<h2 id="prerequisites">Prerequisites</h2>
|
||||
<ul>
|
||||
<li>A Linux server with <strong>Docker</strong> and <strong>Docker Compose</strong></li>
|
||||
<li>A domain name pointing to your server (e.g. <code>notes.alipourimjourneys.ir</code>)</li>
|
||||
<li><strong>Nginx</strong> installed for reverse proxying</li>
|
||||
<li><strong>Certbot</strong> for Let’s Encrypt certificates</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h2 id="1-create-the-project-directory">1. Create the project directory</h2>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>mkdir ~/hedgedoc <span style="color:#f92672">&amp;&amp;</span> cd ~/hedgedoc</span></span></code></pre></div>
|
||||
<hr>
|
||||
<h2 id="2-create-env">2. Create <code>.env</code></h2>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-env" data-lang="env"><span style="display:flex;"><span>POSTGRES_PASSWORD<span style="color:#f92672">=</span>ChangeThisStrongPassword
|
||||
</span></span><span style="display:flex;"><span>HD_DOMAIN<span style="color:#f92672">=</span>notes.alipourimjourneys.ir</span></span></code></pre></div>
|
||||
<p>Generate a strong password with:</p></description><content:encoded><![CDATA[<p>HedgeDoc is an open-source collaborative Markdown editor. Think <em>Google Docs for Markdown</em>: multiple people can edit the same note in real-time, with support for diagrams, math, polls, and slide decks. In this post we’ll walk through setting up your own instance on a server, secured with HTTPS.</p>
|
||||
<hr>
|
||||
<h2 id="prerequisites">Prerequisites</h2>
|
||||
<ul>
|
||||
<li>A Linux server with <strong>Docker</strong> and <strong>Docker Compose</strong></li>
|
||||
<li>A domain name pointing to your server (e.g. <code>notes.alipourimjourneys.ir</code>)</li>
|
||||
<li><strong>Nginx</strong> installed for reverse proxying</li>
|
||||
<li><strong>Certbot</strong> for Let’s Encrypt certificates</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h2 id="1-create-the-project-directory">1. Create the project directory</h2>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>mkdir ~/hedgedoc <span style="color:#f92672">&&</span> cd ~/hedgedoc</span></span></code></pre></div>
|
||||
<hr>
|
||||
<h2 id="2-create-env">2. Create <code>.env</code></h2>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-env" data-lang="env"><span style="display:flex;"><span>POSTGRES_PASSWORD<span style="color:#f92672">=</span>ChangeThisStrongPassword
|
||||
</span></span><span style="display:flex;"><span>HD_DOMAIN<span style="color:#f92672">=</span>notes.alipourimjourneys.ir</span></span></code></pre></div>
|
||||
<p>Generate a strong password with:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>openssl rand -base64 <span style="color:#ae81ff">32</span></span></span></code></pre></div>
|
||||
<hr>
|
||||
<h2 id="3-create-docker-composeyml">3. Create <code>docker-compose.yml</code></h2>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">version</span>: <span style="color:#e6db74">"3.9"</span>
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#f92672">services</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">db</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">image</span>: <span style="color:#ae81ff">postgres:16</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">environment</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">POSTGRES_USER</span>: <span style="color:#ae81ff">hedgedoc</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">POSTGRES_PASSWORD</span>: <span style="color:#ae81ff">${POSTGRES_PASSWORD}</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">POSTGRES_DB</span>: <span style="color:#ae81ff">hedgedoc</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">volumes</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#ae81ff">db:/var/lib/postgresql/data</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">restart</span>: <span style="color:#ae81ff">unless-stopped</span>
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">hedgedoc</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">image</span>: <span style="color:#ae81ff">quay.io/hedgedoc/hedgedoc:1.10.2</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">depends_on</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#ae81ff">db</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">environment</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">CMD_DB_URL</span>: <span style="color:#ae81ff">postgres://hedgedoc:${POSTGRES_PASSWORD}@db:5432/hedgedoc</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">CMD_DOMAIN</span>: <span style="color:#ae81ff">${HD_DOMAIN}</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">CMD_PROTOCOL_USESSL</span>: <span style="color:#e6db74">"true"</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">CMD_URL_ADDPORT</span>: <span style="color:#e6db74">"false"</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">CMD_PORT</span>: <span style="color:#e6db74">"3000"</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">CMD_EMAIL</span>: <span style="color:#e6db74">"true"</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">CMD_ALLOW_EMAIL_REGISTER</span>: <span style="color:#e6db74">"false"</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">volumes</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#ae81ff">uploads:/hedgedoc/public/uploads</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">ports</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#e6db74">"127.0.0.1:3000:3000"</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">restart</span>: <span style="color:#ae81ff">unless-stopped</span>
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#f92672">volumes</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">db</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#ae81ff">uploads:</span></span></span></code></pre></div>
|
||||
<p>Bring it up:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>docker compose up -d</span></span></code></pre></div>
|
||||
<hr>
|
||||
<h2 id="4-get-a-lets-encrypt-certificate">4. Get a Let’s Encrypt certificate</h2>
|
||||
<p>Request a cert with a <strong>DNS challenge</strong>:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo certbot certonly --manual --preferred-challenges dns -d notes.alipourimjourneys.ir -m you@example.com --agree-tos --no-eff-email</span></span></code></pre></div>
|
||||
<p>Add the TXT record certbot asks for, wait for DNS to propagate, then continue.<br>
|
||||
Certificates will be in:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>/etc/letsencrypt/live/notes.alipourimjourneys.ir/</span></span></code></pre></div>
|
||||
<hr>
|
||||
<h2 id="5-configure-nginx">5. Configure Nginx</h2>
|
||||
<p>Create <code>/etc/nginx/sites-available/notes.alipourimjourneys.ir</code>:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-nginx" data-lang="nginx"><span style="display:flex;"><span><span style="color:#66d9ef">server</span> {
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">server_name</span> <span style="color:#e6db74">notes.alipourimjourneys.ir</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">listen</span> <span style="color:#ae81ff">80</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">listen</span> <span style="color:#e6db74">[::]:80</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">return</span> <span style="color:#ae81ff">301</span> <span style="color:#e6db74">https://</span>$host$request_uri;
|
||||
</span></span><span style="display:flex;"><span>}
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">server</span> {
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">server_name</span> <span style="color:#e6db74">notes.alipourimjourneys.ir</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">listen</span> <span style="color:#ae81ff">443</span> <span style="color:#e6db74">ssl</span> <span style="color:#e6db74">http2</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">listen</span> <span style="color:#e6db74">[::]:443</span> <span style="color:#e6db74">ssl</span> <span style="color:#e6db74">http2</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">ssl_certificate</span> <span style="color:#e6db74">/etc/letsencrypt/live/notes.alipourimjourneys.ir/fullchain.pem</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">ssl_certificate_key</span> <span style="color:#e6db74">/etc/letsencrypt/live/notes.alipourimjourneys.ir/privkey.pem</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">location</span> <span style="color:#e6db74">/</span> {
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">proxy_pass</span> <span style="color:#e6db74">http://127.0.0.1:3000</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">proxy_set_header</span> <span style="color:#e6db74">Host</span> $host;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">proxy_set_header</span> <span style="color:#e6db74">X-Real-IP</span> $remote_addr;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">proxy_set_header</span> <span style="color:#e6db74">X-Forwarded-For</span> $proxy_add_x_forwarded_for;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">proxy_set_header</span> <span style="color:#e6db74">X-Forwarded-Proto</span> <span style="color:#e6db74">https</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">proxy_http_version</span> <span style="color:#ae81ff">1</span><span style="color:#e6db74">.1</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">proxy_set_header</span> <span style="color:#e6db74">Upgrade</span> $http_upgrade;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">proxy_set_header</span> <span style="color:#e6db74">Connection</span> <span style="color:#e6db74">"upgrade"</span>;
|
||||
</span></span><span style="display:flex;"><span> }
|
||||
</span></span><span style="display:flex;"><span>}</span></span></code></pre></div>
|
||||
<p>Enable the config and reload Nginx:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo ln -s /etc/nginx/sites-available/notes.alipourimjourneys.ir /etc/nginx/sites-enabled/
|
||||
</span></span><span style="display:flex;"><span>sudo nginx -t <span style="color:#f92672">&&</span> sudo systemctl reload nginx</span></span></code></pre></div>
|
||||
<hr>
|
||||
<h2 id="6-create-users">6. Create users</h2>
|
||||
<p>Because we disabled self-registration, create accounts manually:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>docker compose exec hedgedoc ./bin/manage_users --add alice@example.com</span></span></code></pre></div>
|
||||
<p>You’ll be prompted for a password.<br>
|
||||
To reset a password later:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>docker compose exec hedgedoc ./bin/manage_users --reset alice@example.com</span></span></code></pre></div>
|
||||
<hr>
|
||||
<h2 id="7-done">7. Done!</h2>
|
||||
<p>Visit <a href="https://notes.alipourimjourneys.ir">https://notes.alipourimjourneys.ir</a> and log in with the user you created. You now have your own collaborative Markdown editor 🎉</p>
|
||||
<hr>
|
||||
<p><strong>Extras:</strong></p>
|
||||
<ul>
|
||||
<li>Backups: dump the PostgreSQL database and save the <code>uploads</code> volume.</li>
|
||||
<li>Upgrades: <code>docker pull quay.io/hedgedoc/hedgedoc:latest && docker compose up -d</code>.</li>
|
||||
<li>Integrations: HedgeDoc supports S3/MinIO image storage, GitHub/GitLab/Google login, and more.</li>
|
||||
</ul>
|
||||
]]></content:encoded></item></channel></rss>
|
||||
2
public/categories/guides/page/1/index.html
Normal file
2
public/categories/guides/page/1/index.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<!doctype html><html lang=en><head><title>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/guides/</title>
|
||||
<link rel=canonical href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/guides/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/guides/"></head></html>
|
||||
10
public/categories/homelab/index.html
Normal file
10
public/categories/homelab/index.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<!doctype html><html lang=en dir=auto><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name=robots content="index, follow"><title>Homelab | AlipourIm journeys</title>
|
||||
<meta name=keywords content><meta name=description content><meta name=author content="Iman Alipour"><link rel=canonical href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/homelab/><link crossorigin=anonymous href=/assets/css/stylesheet.51e3b550fcc0c3f3a10e2d7b70445c6cb21171bed36521d66dc7427208cafbf9.css integrity="sha256-UeO1UPzAw/OhDi17cERcbLIRcb7TZSHWbcdCcgjK+/k=" rel="preload stylesheet" as=style><link rel=icon href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/favicon.ico><link rel=icon type=image/png sizes=16x16 href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/favicon-16x16.png><link rel=icon type=image/png sizes=32x32 href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/favicon-32x32.png><link rel=apple-touch-icon href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/apple-touch-icon.png><link rel=mask-icon href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/safari-pinned-tab.svg><meta name=theme-color content="#2e2e33"><meta name=msapplication-TileColor content="#2e2e33"><link rel=alternate type=application/rss+xml href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/homelab/index.xml><link rel=alternate hreflang=en href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/homelab/><noscript><style>#theme-toggle,.top-link{display:none}</style><style>@media(prefers-color-scheme:dark){:root{--theme:rgb(29, 30, 32);--entry:rgb(46, 46, 51);--primary:rgb(218, 218, 219);--secondary:rgb(155, 156, 157);--tertiary:rgb(65, 66, 68);--content:rgb(196, 196, 197);--code-block-bg:rgb(46, 46, 51);--code-bg:rgb(55, 56, 62);--border:rgb(51, 51, 51)}.list{background:var(--theme)}.list:not(.dark)::-webkit-scrollbar-track{background:0 0}.list:not(.dark)::-webkit-scrollbar-thumb{border-color:var(--theme)}}</style></noscript><meta property="og:url" content="http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/homelab/"><meta property="og:site_name" content="AlipourIm journeys"><meta property="og:title" content="Homelab"><meta property="og:locale" content="en"><meta property="og:type" content="website"><meta name=twitter:card content="summary"><meta name=twitter:title content="Homelab"><meta name=twitter:description content></head><body class=list id=top><script>localStorage.getItem("pref-theme")==="dark"?document.body.classList.add("dark"):localStorage.getItem("pref-theme")==="light"?document.body.classList.remove("dark"):window.matchMedia("(prefers-color-scheme: dark)").matches&&document.body.classList.add("dark")</script><header class=header><nav class=nav><div class=logo><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/ accesskey=h title="AlipourIm journeys (Alt + H)">AlipourIm journeys</a><div class=logo-switches><button id=theme-toggle accesskey=t title="(Alt + T)" aria-label="Toggle theme"><svg id="moon" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg><svg id="sun" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg></button></div></div><ul id=menu><li><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/ title=Posts><span>Posts</span></a></li><li><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/phd_journey/ title=PhD_journey><span>PhD_journey</span></a></li><li><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/about/ title=About><span>About</span></a></li></ul></nav></header><main class=main><header class=page-header><div class=breadcrumbs><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/>Home</a> » <a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/>Categories</a></div><h1>Homelab
|
||||
<a href=/categories/homelab/index.xml title=RSS aria-label=RSS><svg viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" height="23"><path d="M4 11a9 9 0 019 9"/><path d="M4 4a16 16 0 0116 16"/><circle cx="5" cy="19" r="1"/></svg></a></h1></header><article class="post-entry tag-entry"><header class=entry-header><h2 class=entry-hint-parent>Dockerizing my Minecraft Server + Geyser: from 'no space left' to stable releases</h2></header><div class=entry-content><p>How I containerized a Java Minecraft server with Geyser, hit a /var space wall, and locked the server to the latest stable release.</p></div><footer class=entry-footer><span title='2025-09-29 09:06:29 +0000 UTC'>September 29, 2025</span> · 3 min · Iman Alipour
|
||||
<span class=post-meta-item><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/minecraft_server/#isso-thread class=isso-comments-link>Comments</a></span></footer><a class=entry-link aria-label="post link to Dockerizing my Minecraft Server + Geyser: from 'no space left' to stable releases" href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/minecraft_server/></a></article></main><footer class=footer><span>© 2025 <a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/>AlipourIm journeys</a></span> ·
|
||||
<span>Powered by
|
||||
<a href=https://gohugo.io/ rel="noopener noreferrer" target=_blank>Hugo</a> &
|
||||
<a href=https://github.com/adityatelange/hugo-PaperMod/ rel=noopener target=_blank>PaperMod</a></span></footer><a href=#top aria-label="go to top" title="Go to Top (Alt + G)" class=top-link id=top-link accesskey=g><svg viewBox="0 0 12 6" fill="currentcolor"><path d="M12 6H0l6-6z"/></svg>
|
||||
</a><script src=/isso/js/count.min.js data-isso=/isso async></script><a href=/index.xml rel=alternate type=application/rss+xml title=RSS class=rss-link><svg viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 11a9 9 0 019 9"/><path d="M4 4a16 16 0 0116 16"/><circle cx="5" cy="19" r="1"/></svg>
|
||||
<span>RSS</span>
|
||||
</a><script>let menu=document.getElementById("menu");menu&&(menu.scrollLeft=localStorage.getItem("menu-scroll-position"),menu.onscroll=function(){localStorage.setItem("menu-scroll-position",menu.scrollLeft)}),document.querySelectorAll('a[href^="#"]').forEach(e=>{e.addEventListener("click",function(e){e.preventDefault();var t=this.getAttribute("href").substr(1);window.matchMedia("(prefers-reduced-motion: reduce)").matches?document.querySelector(`[id='${decodeURIComponent(t)}']`).scrollIntoView():document.querySelector(`[id='${decodeURIComponent(t)}']`).scrollIntoView({behavior:"smooth"}),t==="top"?history.replaceState(null,null," "):history.pushState(null,null,`#${t}`)})})</script><script>var mybutton=document.getElementById("top-link");window.onscroll=function(){document.body.scrollTop>800||document.documentElement.scrollTop>800?(mybutton.style.visibility="visible",mybutton.style.opacity="1"):(mybutton.style.visibility="hidden",mybutton.style.opacity="0")}</script><script>document.getElementById("theme-toggle").addEventListener("click",()=>{document.body.className.includes("dark")?(document.body.classList.remove("dark"),localStorage.setItem("pref-theme","light")):(document.body.classList.add("dark"),localStorage.setItem("pref-theme","dark"))})</script></body></html>
|
||||
259
public/categories/homelab/index.xml
Normal file
259
public/categories/homelab/index.xml
Normal file
|
|
@ -0,0 +1,259 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Homelab on AlipourIm journeys</title><link>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/homelab/</link><description>Recent content in Homelab on AlipourIm journeys</description><generator>Hugo -- 0.146.0</generator><language>en</language><lastBuildDate>Mon, 29 Sep 2025 09:06:29 +0000</lastBuildDate><atom:link href="http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/homelab/index.xml" rel="self" type="application/rss+xml"/><item><title>Dockerizing my Minecraft Server + Geyser: from 'no space left' to stable releases</title><link>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/minecraft_server/</link><pubDate>Mon, 29 Sep 2025 09:06:29 +0000</pubDate><guid>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/minecraft_server/</guid><description>How I containerized a Java Minecraft server with Geyser, hit a /var space wall, and locked the server to the latest stable release.</description><content:encoded><![CDATA[<h2 id="why">Why</h2>
|
||||
<p>I’ve been running a Java Minecraft world (with Bedrock players via <strong>Geyser</strong>) in <code>tmux</code>. I moved it to Docker for easier updates, backups, and restarts. Along the way I hit:</p>
|
||||
<ul>
|
||||
<li><code>failed to register layer: ... no space left on device</code></li>
|
||||
<li>Client saying: <strong>“Outdated client, please use 1.21.9 Pre-Release 2”</strong></li>
|
||||
<li>Wanting config in a neat <code>.env</code> and <strong>no whitelist</strong></li>
|
||||
</ul>
|
||||
<p>Here’s exactly what I did.</p>
|
||||
<hr>
|
||||
<h2 id="folder-layout">Folder layout</h2>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>~/minecraft/
|
||||
</span></span><span style="display:flex;"><span>├─ docker-compose.yml
|
||||
</span></span><span style="display:flex;"><span>├─ .env
|
||||
</span></span><span style="display:flex;"><span>└─ plugins/
|
||||
</span></span></code></pre></div><hr>
|
||||
<h2 id="env-secrets--knobs"><code>.env</code> (secrets & knobs)</h2>
|
||||
<p>Use the <strong>latest stable</strong> (not snapshots/pre-releases) by setting <code>VERSION=LATEST</code>.</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-env" data-lang="env"><span style="display:flex;"><span><span style="color:#75715e"># Minecraft server configuration</span>
|
||||
</span></span><span style="display:flex;"><span>EULA<span style="color:#f92672">=</span>TRUE
|
||||
</span></span><span style="display:flex;"><span>TYPE<span style="color:#f92672">=</span>PAPER
|
||||
</span></span><span style="display:flex;"><span>VERSION<span style="color:#f92672">=</span>LATEST
|
||||
</span></span><span style="display:flex;"><span>MEMORY<span style="color:#f92672">=</span>4G
|
||||
</span></span><span style="display:flex;"><span>USE_AIKAR_FLAGS<span style="color:#f92672">=</span>true
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># RCON (remote console)</span>
|
||||
</span></span><span style="display:flex;"><span>ENABLE_RCON<span style="color:#f92672">=</span>true
|
||||
</span></span><span style="display:flex;"><span>RCON_PASSWORD<span style="color:#f92672">=</span>superSecretPassword123
|
||||
</span></span></code></pre></div><blockquote>
|
||||
<p>I don’t use a whitelist, so no <code>WHITELIST</code>/<code>ENFORCE_WHITELIST</code> variables.</p></blockquote>
|
||||
<hr>
|
||||
<h2 id="docker-composeyml"><code>docker-compose.yml</code></h2>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">services</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">mc</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">image</span>: <span style="color:#ae81ff">itzg/minecraft-server:latest</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">container_name</span>: <span style="color:#ae81ff">mc</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">restart</span>: <span style="color:#ae81ff">unless-stopped</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">ports</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#e6db74">"25565:25565"</span> <span style="color:#75715e"># Java</span>
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#e6db74">"19132:19132/udp"</span> <span style="color:#75715e"># Bedrock via Geyser plugin</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">env_file</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#ae81ff">.env</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">volumes</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#ae81ff">mc-data:/data</span>
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#ae81ff">./plugins:/plugins:ro</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#f92672">volumes</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">mc-data</span>: {}
|
||||
</span></span></code></pre></div><blockquote>
|
||||
<p>The <code>version:</code> key in Compose is obsolete now, so I dropped it.</p></blockquote>
|
||||
<hr>
|
||||
<h2 id="add-geyser-and-optional-floodgate-as-plugins">Add Geyser (and optional Floodgate) as plugins</h2>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>mkdir -p ~/minecraft/plugins
|
||||
</span></span><span style="display:flex;"><span>cd ~/minecraft/plugins
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Geyser (Spigot/Paper)</span>
|
||||
</span></span><span style="display:flex;"><span>wget https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot -O Geyser-Spigot.jar
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Floodgate (optional: Bedrock accounts without Java linking)</span>
|
||||
</span></span><span style="display:flex;"><span>wget https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot -O Floodgate-Spigot.jar
|
||||
</span></span></code></pre></div><p>Start it up:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>docker compose up -d
|
||||
</span></span></code></pre></div><p>On first run, Geyser writes its config to <code>/data/plugins/Geyser-Spigot/</code>. Open UDP <strong>19132</strong> on your firewall.</p>
|
||||
<hr>
|
||||
<h2 id="hit-a-wall-var-ran-out-of-space">Hit a wall: <code>/var</code> ran out of space</h2>
|
||||
<p>Docker stores layers at <code>/var/lib/docker</code> by default. My <code>/var</code> LV was tiny:</p>
|
||||
|
||||
|
||||
|
||||
<div class="goat svg-container ">
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
font-family="Menlo,Lucida Console,monospace"
|
||||
|
||||
viewBox="0 0 448 25"
|
||||
>
|
||||
<g transform='translate(8,16)'>
|
||||
<path d='M 404,8 L 404,24' fill='none' stroke='currentColor'></path>
|
||||
<text text-anchor='middle' x='0' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='8' y='4' fill='currentColor' style='font-size:1em'>d</text>
|
||||
<text text-anchor='middle' x='16' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='24' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='32' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='40' y='4' fill='currentColor' style='font-size:1em'>m</text>
|
||||
<text text-anchor='middle' x='48' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='56' y='4' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='64' y='4' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='72' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='80' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='88' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='96' y='4' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='104' y='4' fill='currentColor' style='font-size:1em'>b</text>
|
||||
<text text-anchor='middle' x='112' y='4' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='120' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='128' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='136' y='4' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='144' y='4' fill='currentColor' style='font-size:1em'>-</text>
|
||||
<text text-anchor='middle' x='152' y='4' fill='currentColor' style='font-size:1em'>-</text>
|
||||
<text text-anchor='middle' x='160' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='168' y='4' fill='currentColor' style='font-size:1em'>g</text>
|
||||
<text text-anchor='middle' x='176' y='4' fill='currentColor' style='font-size:1em'>-</text>
|
||||
<text text-anchor='middle' x='184' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='192' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='200' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='232' y='4' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='240' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='248' y='4' fill='currentColor' style='font-size:1em'>9</text>
|
||||
<text text-anchor='middle' x='256' y='4' fill='currentColor' style='font-size:1em'>G</text>
|
||||
<text text-anchor='middle' x='280' y='4' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='288' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='296' y='4' fill='currentColor' style='font-size:1em'>4</text>
|
||||
<text text-anchor='middle' x='304' y='4' fill='currentColor' style='font-size:1em'>G</text>
|
||||
<text text-anchor='middle' x='328' y='4' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='336' y='4' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='344' y='4' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='352' y='4' fill='currentColor' style='font-size:1em'>M</text>
|
||||
<text text-anchor='middle' x='376' y='4' fill='currentColor' style='font-size:1em'>9</text>
|
||||
<text text-anchor='middle' x='384' y='4' fill='currentColor' style='font-size:1em'>2</text>
|
||||
<text text-anchor='middle' x='392' y='4' fill='currentColor' style='font-size:1em'>%</text>
|
||||
<text text-anchor='middle' x='416' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='424' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='432' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
</g>
|
||||
|
||||
</svg>
|
||||
|
||||
</div>
|
||||
<h3 id="quick-cleanup">Quick cleanup</h3>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>docker system df
|
||||
</span></span><span style="display:flex;"><span>docker system prune -f
|
||||
</span></span><span style="display:flex;"><span>docker builder prune -af
|
||||
</span></span><span style="display:flex;"><span>sudo apt-get clean
|
||||
</span></span><span style="display:flex;"><span>sudo journalctl --vacuum-size<span style="color:#f92672">=</span>100M
|
||||
</span></span></code></pre></div><p>If that’s not enough, you have two good options:</p>
|
||||
<h3 id="option-a--move-dockers-data-off-var">Option A — Move Docker’s data off <code>/var</code></h3>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo systemctl stop docker
|
||||
</span></span><span style="display:flex;"><span>sudo mkdir -p /home/docker
|
||||
</span></span><span style="display:flex;"><span>sudo rsync -aHAX --info<span style="color:#f92672">=</span>progress2 /var/lib/docker/ /home/docker/
|
||||
</span></span><span style="display:flex;"><span>echo <span style="color:#e6db74">'{ "data-root": "/home/docker" }'</span> | sudo tee /etc/docker/daemon.json
|
||||
</span></span><span style="display:flex;"><span>sudo systemctl start docker
|
||||
</span></span><span style="display:flex;"><span>docker info | grep <span style="color:#e6db74">"Docker Root Dir"</span>
|
||||
</span></span></code></pre></div><p>If all looks good, free the old space:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo rm -rf /var/lib/docker/*
|
||||
</span></span></code></pre></div><h3 id="option-b--grow-var-lvm">Option B — Grow <code>/var</code> (LVM)</h3>
|
||||
<p>Check free space in the VG:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo vgdisplay <span style="color:#75715e"># look for "Free PE / Size"</span>
|
||||
</span></span></code></pre></div><p>If available, extend <code>/var</code> by +5G:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo lvextend -L +5G /dev/mapper/ubuntu--vg-var
|
||||
</span></span><span style="display:flex;"><span>sudo resize2fs /dev/mapper/ubuntu--vg-var
|
||||
</span></span></code></pre></div><hr>
|
||||
<h2 id="the-version-mismatch-pre-release-vs-stable">The version mismatch: pre-release vs stable</h2>
|
||||
<p>My logs showed:</p>
|
||||
|
||||
|
||||
|
||||
<div class="goat svg-container ">
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
font-family="Menlo,Lucida Console,monospace"
|
||||
|
||||
viewBox="0 0 440 25"
|
||||
>
|
||||
<g transform='translate(8,16)'>
|
||||
<text text-anchor='middle' x='0' y='4' fill='currentColor' style='font-size:1em'>S</text>
|
||||
<text text-anchor='middle' x='8' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='16' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='24' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='32' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='40' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='48' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='56' y='4' fill='currentColor' style='font-size:1em'>g</text>
|
||||
<text text-anchor='middle' x='72' y='4' fill='currentColor' style='font-size:1em'>m</text>
|
||||
<text text-anchor='middle' x='80' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='88' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='96' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='104' y='4' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='112' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='120' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='128' y='4' fill='currentColor' style='font-size:1em'>f</text>
|
||||
<text text-anchor='middle' x='136' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='152' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='160' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='168' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='176' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='184' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='192' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='208' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='216' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='224' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='232' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='240' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='248' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='256' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='272' y='4' fill='currentColor' style='font-size:1em'>1</text>
|
||||
<text text-anchor='middle' x='280' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='288' y='4' fill='currentColor' style='font-size:1em'>2</text>
|
||||
<text text-anchor='middle' x='296' y='4' fill='currentColor' style='font-size:1em'>1</text>
|
||||
<text text-anchor='middle' x='304' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='312' y='4' fill='currentColor' style='font-size:1em'>9</text>
|
||||
<text text-anchor='middle' x='328' y='4' fill='currentColor' style='font-size:1em'>P</text>
|
||||
<text text-anchor='middle' x='336' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='344' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='352' y='4' fill='currentColor' style='font-size:1em'>-</text>
|
||||
<text text-anchor='middle' x='360' y='4' fill='currentColor' style='font-size:1em'>R</text>
|
||||
<text text-anchor='middle' x='368' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='376' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='384' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='392' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='400' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='408' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='424' y='4' fill='currentColor' style='font-size:1em'>2</text>
|
||||
</g>
|
||||
|
||||
</svg>
|
||||
|
||||
</div>
|
||||
<p>That happens if the server pulls a pre-release build (or if <code>VERSION=LATEST</code>). Fix:</p>
|
||||
<ol>
|
||||
<li>Ensure <code>.env</code> has:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-env" data-lang="env"><span style="display:flex;"><span>VERSION<span style="color:#f92672">=</span>LATEST_RELEASE
|
||||
</span></span></code></pre></div></li>
|
||||
<li>Recreate:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>docker compose down
|
||||
</span></span><span style="display:flex;"><span>docker compose pull
|
||||
</span></span><span style="display:flex;"><span>docker compose up -d
|
||||
</span></span></code></pre></div></li>
|
||||
<li>Verify:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>docker logs mc | grep <span style="color:#e6db74">"Starting minecraft server version"</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># -> Starting minecraft server version 1.21.1 (example)</span>
|
||||
</span></span></code></pre></div></li>
|
||||
</ol>
|
||||
<blockquote>
|
||||
<p>Tip: If you <strong>want to pin</strong> and avoid auto-updates entirely, set <code>VERSION=1.21.1</code> (or whatever stable you’ve validated).</p></blockquote>
|
||||
<hr>
|
||||
<h2 id="no-whitelist">No whitelist</h2>
|
||||
<p>Because I don’t set <code>WHITELIST</code>/<code>ENFORCE_WHITELIST</code>, anyone can join (subject to online-mode, bans, and Geyser/Floodgate auth settings). Manage ops/permissions via:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>docker exec -it mc rcon-cli <span style="color:#e6db74">"op YourJavaIGN"</span>
|
||||
</span></span></code></pre></div><p>(or edit <code>/data/ops.json</code>).</p>
|
||||
<hr>
|
||||
<h2 id="backup--updates">Backup & updates</h2>
|
||||
<ul>
|
||||
<li>World/data live under the <code>mc-data</code> volume → back up <code>/data</code> regularly.</li>
|
||||
<li>Update cleanly:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>docker compose pull <span style="color:#f92672">&&</span> docker compose up -d
|
||||
</span></span></code></pre></div></li>
|
||||
<li>Watch space:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>watch -n5 <span style="color:#e6db74">'df -h /var; docker system df'</span>
|
||||
</span></span></code></pre></div></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h2 id="tldr">TL;DR</h2>
|
||||
<ul>
|
||||
<li>Put <strong>Geyser/Floodgate</strong> jars in <code>./plugins</code> and expose <strong>19132/udp</strong>.</li>
|
||||
<li>Keep configs in <code>.env</code>.</li>
|
||||
<li>Fix <code>/var</code> space by pruning, <strong>moving Docker’s data-root</strong>, or <strong>extending <code>/var</code></strong> via LVM.</li>
|
||||
<li>Verify version in logs after each change.</li>
|
||||
</ul>
|
||||
<p>Happy block-breaking! 🧱🚀</p>
|
||||
]]></content:encoded></item></channel></rss>
|
||||
2
public/categories/homelab/page/1/index.html
Normal file
2
public/categories/homelab/page/1/index.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<!doctype html><html lang=en><head><title>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/homelab/</title>
|
||||
<link rel=canonical href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/homelab/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/homelab/"></head></html>
|
||||
8
public/categories/index.html
Normal file
8
public/categories/index.html
Normal file
File diff suppressed because one or more lines are too long
1
public/categories/index.xml
Normal file
1
public/categories/index.xml
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Categories on AlipourIm journeys</title><link>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/</link><description>Recent content in Categories on AlipourIm journeys</description><generator>Hugo -- 0.146.0</generator><language>en</language><lastBuildDate>Mon, 29 Sep 2025 09:06:29 +0000</lastBuildDate><atom:link href="http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/index.xml" rel="self" type="application/rss+xml"/><item><title>Games</title><link>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/games/</link><pubDate>Mon, 29 Sep 2025 09:06:29 +0000</pubDate><guid>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/games/</guid><description/></item><item><title>Homelab</title><link>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/homelab/</link><pubDate>Mon, 29 Sep 2025 09:06:29 +0000</pubDate><guid>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/homelab/</guid><description/></item><item><title>DevOps</title><link>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/devops/</link><pubDate>Fri, 19 Sep 2025 00:00:00 +0000</pubDate><guid>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/devops/</guid><description/></item><item><title>Notes</title><link>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/notes/</link><pubDate>Fri, 19 Sep 2025 00:00:00 +0000</pubDate><guid>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/notes/</guid><description/></item><item><title>Guides</title><link>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/guides/</link><pubDate>Tue, 09 Sep 2025 11:05:00 +0200</pubDate><guid>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/guides/</guid><description/></item></channel></rss>
|
||||
14
public/categories/notes/index.html
Normal file
14
public/categories/notes/index.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<!doctype html><html lang=en dir=auto><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name=robots content="index, follow"><title>Notes | AlipourIm journeys</title>
|
||||
<meta name=keywords content><meta name=description content><meta name=author content="Iman Alipour"><link rel=canonical href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/notes/><link crossorigin=anonymous href=/assets/css/stylesheet.51e3b550fcc0c3f3a10e2d7b70445c6cb21171bed36521d66dc7427208cafbf9.css integrity="sha256-UeO1UPzAw/OhDi17cERcbLIRcb7TZSHWbcdCcgjK+/k=" rel="preload stylesheet" as=style><link rel=icon href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/favicon.ico><link rel=icon type=image/png sizes=16x16 href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/favicon-16x16.png><link rel=icon type=image/png sizes=32x32 href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/favicon-32x32.png><link rel=apple-touch-icon href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/apple-touch-icon.png><link rel=mask-icon href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/safari-pinned-tab.svg><meta name=theme-color content="#2e2e33"><meta name=msapplication-TileColor content="#2e2e33"><link rel=alternate type=application/rss+xml href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/notes/index.xml><link rel=alternate hreflang=en href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/notes/><noscript><style>#theme-toggle,.top-link{display:none}</style><style>@media(prefers-color-scheme:dark){:root{--theme:rgb(29, 30, 32);--entry:rgb(46, 46, 51);--primary:rgb(218, 218, 219);--secondary:rgb(155, 156, 157);--tertiary:rgb(65, 66, 68);--content:rgb(196, 196, 197);--code-block-bg:rgb(46, 46, 51);--code-bg:rgb(55, 56, 62);--border:rgb(51, 51, 51)}.list{background:var(--theme)}.list:not(.dark)::-webkit-scrollbar-track{background:0 0}.list:not(.dark)::-webkit-scrollbar-thumb{border-color:var(--theme)}}</style></noscript><meta property="og:url" content="http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/notes/"><meta property="og:site_name" content="AlipourIm journeys"><meta property="og:title" content="Notes"><meta property="og:locale" content="en"><meta property="og:type" content="website"><meta name=twitter:card content="summary"><meta name=twitter:title content="Notes"><meta name=twitter:description content></head><body class=list id=top><script>localStorage.getItem("pref-theme")==="dark"?document.body.classList.add("dark"):localStorage.getItem("pref-theme")==="light"?document.body.classList.remove("dark"):window.matchMedia("(prefers-color-scheme: dark)").matches&&document.body.classList.add("dark")</script><header class=header><nav class=nav><div class=logo><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/ accesskey=h title="AlipourIm journeys (Alt + H)">AlipourIm journeys</a><div class=logo-switches><button id=theme-toggle accesskey=t title="(Alt + T)" aria-label="Toggle theme"><svg id="moon" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg><svg id="sun" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg></button></div></div><ul id=menu><li><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/ title=Posts><span>Posts</span></a></li><li><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/phd_journey/ title=PhD_journey><span>PhD_journey</span></a></li><li><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/about/ title=About><span>About</span></a></li></ul></nav></header><main class=main><header class=page-header><div class=breadcrumbs><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/>Home</a> » <a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/>Categories</a></div><h1>Notes
|
||||
<a href=/categories/notes/index.xml title=RSS aria-label=RSS><svg viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" height="23"><path d="M4 11a9 9 0 019 9"/><path d="M4 4a16 16 0 0116 16"/><circle cx="5" cy="19" r="1"/></svg></a></h1></header><article class="post-entry tag-entry"><header class=entry-header><h2 class=entry-hint-parent>Running my blog on Tor (.onion) and the Clearnet with Hugo + PaperMod</h2></header><div class=entry-content><p>TL;DR — The site is built once (Hugo project), published twice:
|
||||
Onion: http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/ via Tor, no TLS/HSTS, bound to 127.0.0.1:3301. Clearnet: https://blog.alipourimjourneys.ir behind Cloudflare, Let’s Encrypt cert, Onion-Location header pointing to the onion mirror. 1) Tor hidden service (onion) basics I used Tor’s v3 onion services and mapped onion port 80 → my local web server on 127.0.0.1:3301.
|
||||
Install & configure Tor (Debian/Ubuntu):
|
||||
sudo apt update && sudo apt install -y tor sudoedit /etc/tor/torrc Add:
|
||||
...</p></div><footer class=entry-footer><span title='2025-09-19 00:00:00 +0000 UTC'>September 19, 2025</span> · 6 min · Iman Alipour
|
||||
<span class=post-meta-item><a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/tor_clearnet_blog/#isso-thread class=isso-comments-link>Comments</a></span></footer><a class=entry-link aria-label="post link to Running my blog on Tor (.onion) and the Clearnet with Hugo + PaperMod" href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/tor_clearnet_blog/></a></article></main><footer class=footer><span>© 2025 <a href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/>AlipourIm journeys</a></span> ·
|
||||
<span>Powered by
|
||||
<a href=https://gohugo.io/ rel="noopener noreferrer" target=_blank>Hugo</a> &
|
||||
<a href=https://github.com/adityatelange/hugo-PaperMod/ rel=noopener target=_blank>PaperMod</a></span></footer><a href=#top aria-label="go to top" title="Go to Top (Alt + G)" class=top-link id=top-link accesskey=g><svg viewBox="0 0 12 6" fill="currentcolor"><path d="M12 6H0l6-6z"/></svg>
|
||||
</a><script src=/isso/js/count.min.js data-isso=/isso async></script><a href=/index.xml rel=alternate type=application/rss+xml title=RSS class=rss-link><svg viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 11a9 9 0 019 9"/><path d="M4 4a16 16 0 0116 16"/><circle cx="5" cy="19" r="1"/></svg>
|
||||
<span>RSS</span>
|
||||
</a><script>let menu=document.getElementById("menu");menu&&(menu.scrollLeft=localStorage.getItem("menu-scroll-position"),menu.onscroll=function(){localStorage.setItem("menu-scroll-position",menu.scrollLeft)}),document.querySelectorAll('a[href^="#"]').forEach(e=>{e.addEventListener("click",function(e){e.preventDefault();var t=this.getAttribute("href").substr(1);window.matchMedia("(prefers-reduced-motion: reduce)").matches?document.querySelector(`[id='${decodeURIComponent(t)}']`).scrollIntoView():document.querySelector(`[id='${decodeURIComponent(t)}']`).scrollIntoView({behavior:"smooth"}),t==="top"?history.replaceState(null,null," "):history.pushState(null,null,`#${t}`)})})</script><script>var mybutton=document.getElementById("top-link");window.onscroll=function(){document.body.scrollTop>800||document.documentElement.scrollTop>800?(mybutton.style.visibility="visible",mybutton.style.opacity="1"):(mybutton.style.visibility="hidden",mybutton.style.opacity="0")}</script><script>document.getElementById("theme-toggle").addEventListener("click",()=>{document.body.className.includes("dark")?(document.body.classList.remove("dark"),localStorage.setItem("pref-theme","light")):(document.body.classList.add("dark"),localStorage.setItem("pref-theme","dark"))})</script></body></html>
|
||||
422
public/categories/notes/index.xml
Normal file
422
public/categories/notes/index.xml
Normal file
|
|
@ -0,0 +1,422 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Notes on AlipourIm journeys</title><link>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/notes/</link><description>Recent content in Notes on AlipourIm journeys</description><generator>Hugo -- 0.146.0</generator><language>en</language><lastBuildDate>Fri, 19 Sep 2025 00:00:00 +0000</lastBuildDate><atom:link href="http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/notes/index.xml" rel="self" type="application/rss+xml"/><item><title>Running my blog on Tor (.onion) and the Clearnet with Hugo + PaperMod</title><link>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/tor_clearnet_blog/</link><pubDate>Fri, 19 Sep 2025 00:00:00 +0000</pubDate><guid>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/posts/tor_clearnet_blog/</guid><description>How I hosted a Hugo + PaperMod site both as a Tor onion service and a normal HTTPS site behind Cloudflare, with clean configs, dual builds, and a one-command deploy.</description><content:encoded><![CDATA[<blockquote>
|
||||
<p>TL;DR — The site is built once (Hugo project), <strong>published twice</strong>:</p>
|
||||
<ul>
|
||||
<li><strong>Onion</strong>: <code>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/</code> via Tor, no TLS/HSTS, bound to <code>127.0.0.1:3301</code>.</li>
|
||||
<li><strong>Clearnet</strong>: <code>https://blog.alipourimjourneys.ir</code> behind Cloudflare, Let’s Encrypt cert, <code>Onion-Location</code> header pointing to the onion mirror.</li>
|
||||
</ul></blockquote>
|
||||
<hr>
|
||||
<h2 id="1-tor-hidden-service-onion-basics">1) Tor hidden service (onion) basics</h2>
|
||||
<p>I used Tor’s v3 onion services and mapped onion port 80 → my local web server on <code>127.0.0.1:3301</code>.</p>
|
||||
<p><strong>Install & configure Tor (Debian/Ubuntu):</strong></p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo apt update <span style="color:#f92672">&&</span> sudo apt install -y tor
|
||||
</span></span><span style="display:flex;"><span>sudoedit /etc/tor/torrc
|
||||
</span></span></code></pre></div><p>Add:</p>
|
||||
|
||||
|
||||
|
||||
<div class="goat svg-container ">
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
font-family="Menlo,Lucida Console,monospace"
|
||||
|
||||
viewBox="0 0 344 41"
|
||||
>
|
||||
<g transform='translate(8,16)'>
|
||||
<path d='M 132,8 L 124,40' fill='none' stroke='currentColor'></path>
|
||||
<path d='M 196,8 L 188,40' fill='none' stroke='currentColor'></path>
|
||||
<path d='M 228,8 L 220,40' fill='none' stroke='currentColor'></path>
|
||||
<text text-anchor='middle' x='0' y='4' fill='currentColor' style='font-size:1em'>H</text>
|
||||
<text text-anchor='middle' x='0' y='20' fill='currentColor' style='font-size:1em'>H</text>
|
||||
<text text-anchor='middle' x='8' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='8' y='20' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='16' y='4' fill='currentColor' style='font-size:1em'>d</text>
|
||||
<text text-anchor='middle' x='16' y='20' fill='currentColor' style='font-size:1em'>d</text>
|
||||
<text text-anchor='middle' x='24' y='4' fill='currentColor' style='font-size:1em'>d</text>
|
||||
<text text-anchor='middle' x='24' y='20' fill='currentColor' style='font-size:1em'>d</text>
|
||||
<text text-anchor='middle' x='32' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='32' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='40' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='40' y='20' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='48' y='4' fill='currentColor' style='font-size:1em'>S</text>
|
||||
<text text-anchor='middle' x='48' y='20' fill='currentColor' style='font-size:1em'>S</text>
|
||||
<text text-anchor='middle' x='56' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='56' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='64' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='64' y='20' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='72' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='72' y='20' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='80' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='80' y='20' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='88' y='4' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='88' y='20' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='96' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='96' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='104' y='4' fill='currentColor' style='font-size:1em'>D</text>
|
||||
<text text-anchor='middle' x='104' y='20' fill='currentColor' style='font-size:1em'>P</text>
|
||||
<text text-anchor='middle' x='112' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='112' y='20' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='120' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='120' y='20' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='128' y='20' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='144' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='144' y='20' fill='currentColor' style='font-size:1em'>8</text>
|
||||
<text text-anchor='middle' x='152' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='152' y='20' fill='currentColor' style='font-size:1em'>0</text>
|
||||
<text text-anchor='middle' x='160' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='168' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='168' y='20' fill='currentColor' style='font-size:1em'>1</text>
|
||||
<text text-anchor='middle' x='176' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='176' y='20' fill='currentColor' style='font-size:1em'>2</text>
|
||||
<text text-anchor='middle' x='184' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='184' y='20' fill='currentColor' style='font-size:1em'>7</text>
|
||||
<text text-anchor='middle' x='192' y='4' fill='currentColor' style='font-size:1em'>b</text>
|
||||
<text text-anchor='middle' x='192' y='20' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='200' y='20' fill='currentColor' style='font-size:1em'>0</text>
|
||||
<text text-anchor='middle' x='208' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='208' y='20' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='216' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='216' y='20' fill='currentColor' style='font-size:1em'>0</text>
|
||||
<text text-anchor='middle' x='224' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='224' y='20' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='232' y='20' fill='currentColor' style='font-size:1em'>1</text>
|
||||
<text text-anchor='middle' x='240' y='4' fill='currentColor' style='font-size:1em'>h</text>
|
||||
<text text-anchor='middle' x='240' y='20' fill='currentColor' style='font-size:1em'>:</text>
|
||||
<text text-anchor='middle' x='248' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='248' y='20' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='256' y='4' fill='currentColor' style='font-size:1em'>d</text>
|
||||
<text text-anchor='middle' x='256' y='20' fill='currentColor' style='font-size:1em'>3</text>
|
||||
<text text-anchor='middle' x='264' y='4' fill='currentColor' style='font-size:1em'>d</text>
|
||||
<text text-anchor='middle' x='264' y='20' fill='currentColor' style='font-size:1em'>0</text>
|
||||
<text text-anchor='middle' x='272' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='272' y='20' fill='currentColor' style='font-size:1em'>1</text>
|
||||
<text text-anchor='middle' x='280' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='288' y='4' fill='currentColor' style='font-size:1em'>_</text>
|
||||
<text text-anchor='middle' x='296' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='304' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='312' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='320' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='328' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
</g>
|
||||
|
||||
</svg>
|
||||
|
||||
</div>
|
||||
<p>Make sure the directory is owned by Tor’s user and private:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo mkdir -p /var/lib/tor/hidden_site
|
||||
</span></span><span style="display:flex;"><span>sudo chown -R debian-tor:debian-tor /var/lib/tor/hidden_site
|
||||
</span></span><span style="display:flex;"><span>sudo chmod <span style="color:#ae81ff">700</span> /var/lib/tor/hidden_site
|
||||
</span></span></code></pre></div><p><strong>Important:</strong> use the right systemd unit:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e"># validate as the Tor user</span>
|
||||
</span></span><span style="display:flex;"><span>sudo -u debian-tor tor -f /etc/tor/torrc --verify-config
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># (re)start the real service</span>
|
||||
</span></span><span style="display:flex;"><span>sudo systemctl enable --now tor@default
|
||||
</span></span><span style="display:flex;"><span>sudo systemctl restart tor@default
|
||||
</span></span></code></pre></div><p>Get the onion address:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo cat /var/lib/tor/hidden_site/hostname
|
||||
</span></span></code></pre></div><p>Quick check (do remote DNS via SOCKS):</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -I --socks5-hostname 127.0.0.1:9050 <span style="color:#e6db74">"http://</span><span style="color:#66d9ef">$(</span>sudo cat /var/lib/tor/hidden_site/hostname<span style="color:#66d9ef">)</span><span style="color:#e6db74">"</span>
|
||||
</span></span></code></pre></div><hr>
|
||||
<h2 id="2-nginx-for-the-onion-localhost-only">2) Nginx for the onion (localhost-only)</h2>
|
||||
<p>I keep the onion site strictly on localhost: <strong>no HTTPS, no redirects, no HSTS</strong>. Tor already provides e2e encryption and authenticity.</p>
|
||||
<p><code>/etc/nginx/sites-available/onion-blog</code>:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-nginx" data-lang="nginx"><span style="display:flex;"><span><span style="color:#66d9ef">server</span> {
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">listen</span> 127.0.0.1:<span style="color:#ae81ff">3301</span> <span style="color:#e6db74">default_server</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">server_name</span> <span style="color:#e6db74"><your-56-char>.onion</span> 127.0.0.1 <span style="color:#e6db74">localhost</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#75715e"># keep onion simple; no HSTS/redirects here
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span> <span style="color:#f92672">add_header</span> <span style="color:#e6db74">Referrer-Policy</span> <span style="color:#e6db74">no-referrer</span> <span style="color:#e6db74">always</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">add_header</span> <span style="color:#e6db74">X-Content-Type-Options</span> <span style="color:#e6db74">nosniff</span> <span style="color:#e6db74">always</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">add_header</span> <span style="color:#e6db74">X-Frame-Options</span> <span style="color:#e6db74">SAMEORIGIN</span> <span style="color:#e6db74">always</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#75715e"># (optional) strict CSP so nothing leaks to clearnet
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span> <span style="color:#75715e"># add_header Content-Security-Policy "default-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; script-src 'self'" always;
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">root</span> <span style="color:#e6db74">/srv/hugo/mysite/public-onion</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">index</span> <span style="color:#e6db74">index.html</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">location</span> <span style="color:#e6db74">/</span> { <span style="color:#f92672">try_files</span> $uri $uri/ <span style="color:#e6db74">/index.html</span>; }
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">location</span> ~<span style="color:#e6db74">*</span> <span style="color:#e6db74">\.(css|js|ico|png|jpg|jpeg|gif|svg|webp|txt|xml)</span>$ {
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">access_log</span> <span style="color:#66d9ef">off</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">add_header</span> <span style="color:#e6db74">Cache-Control</span> <span style="color:#e6db74">"public,</span> <span style="color:#e6db74">max-age=31536000,</span> <span style="color:#e6db74">immutable"</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">try_files</span> $uri =<span style="color:#ae81ff">404</span>;
|
||||
</span></span><span style="display:flex;"><span> }
|
||||
</span></span><span style="display:flex;"><span>}
|
||||
</span></span></code></pre></div><p>Enable/reload:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo ln -sf /etc/nginx/sites-available/onion-blog /etc/nginx/sites-enabled/onion-blog
|
||||
</span></span><span style="display:flex;"><span>sudo nginx -t <span style="color:#f92672">&&</span> sudo systemctl reload nginx
|
||||
</span></span></code></pre></div><blockquote>
|
||||
<p>Gotcha I hit: I had <strong>two</strong> server blocks on <code>127.0.0.1:3301</code>, which caused 404s via onion. Make sure only the intended vhost listens there (or mark it <code>default_server</code>). Also, if you ever use a regex in <code>server_name</code>, the syntax is <code>server_name ~* \.onion$</code> (note the space after <code>~*</code>).</p></blockquote>
|
||||
<hr>
|
||||
<h2 id="3-hugo--papermod-setup-and-version-bumps">3) Hugo + PaperMod setup (and version bumps)</h2>
|
||||
<p>PaperMod now requires <strong>Hugo Extended ≥ 0.146.0</strong>. I installed the extended binary from the official tarball to avoid Snap’s sandbox limitations (Snap can’t read <code>/srv</code> paths by default).</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e"># install Hugo extended (example)</span>
|
||||
</span></span><span style="display:flex;"><span>VER<span style="color:#f92672">=</span>0.146.0
|
||||
</span></span><span style="display:flex;"><span>cd /tmp
|
||||
</span></span><span style="display:flex;"><span>wget https://github.com/gohugoio/hugo/releases/download/v<span style="color:#e6db74">${</span>VER<span style="color:#e6db74">}</span>/hugo_extended_<span style="color:#e6db74">${</span>VER<span style="color:#e6db74">}</span>_Linux-amd64.tar.gz
|
||||
</span></span><span style="display:flex;"><span>tar -xzf hugo_extended_<span style="color:#e6db74">${</span>VER<span style="color:#e6db74">}</span>_Linux-amd64.tar.gz
|
||||
</span></span><span style="display:flex;"><span>sudo mv hugo /usr/local/bin/hugo
|
||||
</span></span><span style="display:flex;"><span>hugo version <span style="color:#75715e"># should say "extended" and >= 0.146.0</span>
|
||||
</span></span></code></pre></div><p>Create the site and theme:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo mkdir -p /srv/hugo <span style="color:#f92672">&&</span> sudo chown -R <span style="color:#e6db74">"</span>$USER<span style="color:#e6db74">"</span>:<span style="color:#e6db74">"</span>$USER<span style="color:#e6db74">"</span> /srv/hugo
|
||||
</span></span><span style="display:flex;"><span>cd /srv/hugo
|
||||
</span></span><span style="display:flex;"><span>hugo new site mysite
|
||||
</span></span><span style="display:flex;"><span>cd mysite
|
||||
</span></span><span style="display:flex;"><span>git init
|
||||
</span></span><span style="display:flex;"><span>git submodule add https://github.com/adityatelange/hugo-PaperMod themes/PaperMod
|
||||
</span></span></code></pre></div><p><strong>Config updates:</strong> in newer Hugo, <code>paginate</code> is deprecated → use:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#75715e"># config/_default/hugo.toml</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">title</span> = <span style="color:#e6db74">"My Blog"</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">theme</span> = <span style="color:#e6db74">"PaperMod"</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">enableRobotsTXT</span> = <span style="color:#66d9ef">true</span>
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span>[<span style="color:#a6e22e">pagination</span>]
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">pagerSize</span> = <span style="color:#ae81ff">10</span>
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span>[<span style="color:#a6e22e">params</span>]
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">defaultTheme</span> = <span style="color:#e6db74">"auto"</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">showReadingTime</span> = <span style="color:#66d9ef">true</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">showPostNavLinks</span> = <span style="color:#66d9ef">true</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">showBreadCrumbs</span> = <span style="color:#66d9ef">true</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#a6e22e">showCodeCopyButtons</span> = <span style="color:#66d9ef">true</span>
|
||||
</span></span></code></pre></div><p>I added per-environment overrides so I can build two outputs with different <code>baseURL</code>s:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#75715e"># config/clearnet/hugo.toml</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">baseURL</span> = <span style="color:#e6db74">"https://blog.alipourimjourneys.ir/"</span>
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># config/onion/hugo.toml</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">baseURL</span> = <span style="color:#e6db74">"http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/"</span>
|
||||
</span></span></code></pre></div><hr>
|
||||
<h2 id="4-dual-builds-clearnet--onion-and-one-command-deploy">4) Dual builds (clearnet + onion) and one-command deploy</h2>
|
||||
<p>I publish the same content twice—once for each base URL and docroot:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>cd /srv/hugo/mysite
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># clearnet build (served over HTTPS)</span>
|
||||
</span></span><span style="display:flex;"><span>hugo --minify --environment clearnet -d public-clearnet
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># onion build (served via Tor)</span>
|
||||
</span></span><span style="display:flex;"><span>hugo --minify --environment onion -d public-onion
|
||||
</span></span><span style="display:flex;"><span>sudo systemctl reload nginx
|
||||
</span></span></code></pre></div><p>Helper script I use:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo tee /usr/local/bin/build-both >/dev/null <span style="color:#e6db74"><<'EOF'
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">#!/usr/bin/env bash
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">set -euo pipefail
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">cd /srv/hugo/mysite
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">hugo --minify --environment clearnet -d public-clearnet
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">hugo --minify --environment onion -d public-onion
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">sudo systemctl reload nginx
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">echo "Deployed both at $(date)"
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">EOF</span>
|
||||
</span></span><span style="display:flex;"><span>sudo chmod +x /usr/local/bin/build-both
|
||||
</span></span></code></pre></div><p>While editing, I sometimes auto-rebuild on file save:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo apt install -y entr
|
||||
</span></span><span style="display:flex;"><span>cd /srv/hugo/mysite
|
||||
</span></span><span style="display:flex;"><span>find content layouts assets static config -type f | entr -r build-both
|
||||
</span></span></code></pre></div><hr>
|
||||
<h2 id="5-clearnet-behind-cloudflare--lets-encrypt-manual-dns-01">5) Clearnet behind Cloudflare + Let’s Encrypt (manual DNS-01)</h2>
|
||||
<p>Cloudflare is set to <strong>Full (strict)</strong>. I issued a public cert for <code>blog.alipourimjourneys.ir</code> using <strong>manual DNS-01</strong> (no API token):</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo snap install --classic certbot
|
||||
</span></span><span style="display:flex;"><span>sudo certbot certonly --manual --preferred-challenges dns -d blog.alipourimjourneys.ir --agree-tos -m you@example.com --no-eff-email
|
||||
</span></span></code></pre></div><p>Certbot tells you to add a TXT record <code>_acme-challenge.blog.alipourimjourneys.ir</code>. Add it in Cloudflare DNS, verify with <code>dig</code>, then continue. Cert ends up at:</p>
|
||||
|
||||
|
||||
|
||||
<div class="goat svg-container ">
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
font-family="Menlo,Lucida Console,monospace"
|
||||
|
||||
viewBox="0 0 496 41"
|
||||
>
|
||||
<g transform='translate(8,16)'>
|
||||
<text text-anchor='middle' x='0' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='0' y='20' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='8' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='8' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='16' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='16' y='20' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='24' y='4' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='24' y='20' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='32' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='32' y='20' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='40' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='40' y='20' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='48' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='48' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='56' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='56' y='20' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='64' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='64' y='20' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='72' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='72' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='80' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='80' y='20' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='88' y='4' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='88' y='20' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='96' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='96' y='20' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='104' y='4' fill='currentColor' style='font-size:1em'>y</text>
|
||||
<text text-anchor='middle' x='104' y='20' fill='currentColor' style='font-size:1em'>y</text>
|
||||
<text text-anchor='middle' x='112' y='4' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='112' y='20' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='120' y='4' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='120' y='20' fill='currentColor' style='font-size:1em'>t</text>
|
||||
<text text-anchor='middle' x='128' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='128' y='20' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='136' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='136' y='20' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='144' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='144' y='20' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='152' y='4' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='152' y='20' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='160' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='160' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='168' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='168' y='20' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='176' y='4' fill='currentColor' style='font-size:1em'>b</text>
|
||||
<text text-anchor='middle' x='176' y='20' fill='currentColor' style='font-size:1em'>b</text>
|
||||
<text text-anchor='middle' x='184' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='184' y='20' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='192' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='192' y='20' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='200' y='4' fill='currentColor' style='font-size:1em'>g</text>
|
||||
<text text-anchor='middle' x='200' y='20' fill='currentColor' style='font-size:1em'>g</text>
|
||||
<text text-anchor='middle' x='208' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='208' y='20' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='216' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='216' y='20' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='224' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='224' y='20' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='232' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='232' y='20' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='240' y='4' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='240' y='20' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='248' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='248' y='20' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='256' y='4' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='256' y='20' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='264' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='264' y='20' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='272' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='272' y='20' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='280' y='4' fill='currentColor' style='font-size:1em'>m</text>
|
||||
<text text-anchor='middle' x='280' y='20' fill='currentColor' style='font-size:1em'>m</text>
|
||||
<text text-anchor='middle' x='288' y='4' fill='currentColor' style='font-size:1em'>j</text>
|
||||
<text text-anchor='middle' x='288' y='20' fill='currentColor' style='font-size:1em'>j</text>
|
||||
<text text-anchor='middle' x='296' y='4' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='296' y='20' fill='currentColor' style='font-size:1em'>o</text>
|
||||
<text text-anchor='middle' x='304' y='4' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='304' y='20' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='312' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='312' y='20' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='320' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='320' y='20' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='328' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='328' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='336' y='4' fill='currentColor' style='font-size:1em'>y</text>
|
||||
<text text-anchor='middle' x='336' y='20' fill='currentColor' style='font-size:1em'>y</text>
|
||||
<text text-anchor='middle' x='344' y='4' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='344' y='20' fill='currentColor' style='font-size:1em'>s</text>
|
||||
<text text-anchor='middle' x='352' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='352' y='20' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='360' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='360' y='20' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='368' y='4' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='368' y='20' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='376' y='4' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='376' y='20' fill='currentColor' style='font-size:1em'>/</text>
|
||||
<text text-anchor='middle' x='384' y='4' fill='currentColor' style='font-size:1em'>f</text>
|
||||
<text text-anchor='middle' x='384' y='20' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='392' y='4' fill='currentColor' style='font-size:1em'>u</text>
|
||||
<text text-anchor='middle' x='392' y='20' fill='currentColor' style='font-size:1em'>r</text>
|
||||
<text text-anchor='middle' x='400' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='400' y='20' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='408' y='4' fill='currentColor' style='font-size:1em'>l</text>
|
||||
<text text-anchor='middle' x='408' y='20' fill='currentColor' style='font-size:1em'>v</text>
|
||||
<text text-anchor='middle' x='416' y='4' fill='currentColor' style='font-size:1em'>c</text>
|
||||
<text text-anchor='middle' x='416' y='20' fill='currentColor' style='font-size:1em'>k</text>
|
||||
<text text-anchor='middle' x='424' y='4' fill='currentColor' style='font-size:1em'>h</text>
|
||||
<text text-anchor='middle' x='424' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='432' y='4' fill='currentColor' style='font-size:1em'>a</text>
|
||||
<text text-anchor='middle' x='432' y='20' fill='currentColor' style='font-size:1em'>y</text>
|
||||
<text text-anchor='middle' x='440' y='4' fill='currentColor' style='font-size:1em'>i</text>
|
||||
<text text-anchor='middle' x='440' y='20' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='448' y='4' fill='currentColor' style='font-size:1em'>n</text>
|
||||
<text text-anchor='middle' x='448' y='20' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='456' y='4' fill='currentColor' style='font-size:1em'>.</text>
|
||||
<text text-anchor='middle' x='456' y='20' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='464' y='4' fill='currentColor' style='font-size:1em'>p</text>
|
||||
<text text-anchor='middle' x='464' y='20' fill='currentColor' style='font-size:1em'>m</text>
|
||||
<text text-anchor='middle' x='472' y='4' fill='currentColor' style='font-size:1em'>e</text>
|
||||
<text text-anchor='middle' x='480' y='4' fill='currentColor' style='font-size:1em'>m</text>
|
||||
</g>
|
||||
|
||||
</svg>
|
||||
|
||||
</div>
|
||||
<p>Clearnet Nginx vhosts:</p>
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-nginx" data-lang="nginx"><span style="display:flex;"><span><span style="color:#75715e"># HTTP → HTTPS redirect (optional; CF usually talks HTTPS to origin anyway)
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">server</span> {
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">listen</span> <span style="color:#ae81ff">80</span>; <span style="color:#f92672">listen</span> <span style="color:#e6db74">[::]:80</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">server_name</span> <span style="color:#e6db74">blog.alipourimjourneys.ir</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">return</span> <span style="color:#ae81ff">301</span> <span style="color:#e6db74">https://blog.alipourimjourneys.ir</span>$request_uri;
|
||||
</span></span><span style="display:flex;"><span>}
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># HTTPS origin (behind Cloudflare)
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span><span style="color:#66d9ef">server</span> {
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">listen</span> <span style="color:#ae81ff">443</span> <span style="color:#e6db74">ssl</span> <span style="color:#e6db74">http2</span>; <span style="color:#f92672">listen</span> <span style="color:#e6db74">[::]:443</span> <span style="color:#e6db74">ssl</span> <span style="color:#e6db74">http2</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">server_name</span> <span style="color:#e6db74">blog.alipourimjourneys.ir</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">ssl_certificate</span> <span style="color:#e6db74">/etc/letsencrypt/live/blog.alipourimjourneys.ir/fullchain.pem</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">ssl_certificate_key</span> <span style="color:#e6db74">/etc/letsencrypt/live/blog.alipourimjourneys.ir/privkey.pem</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#75715e"># HSTS on clearnet only
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span> <span style="color:#f92672">add_header</span> <span style="color:#e6db74">Strict-Transport-Security</span> <span style="color:#e6db74">"max-age=31536000</span>; <span style="color:#f92672">includeSubDomains</span>; <span style="color:#f92672">preload"</span> <span style="color:#e6db74">always</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#75715e"># Help Tor Browser discover the onion mirror (safe on clearnet)
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span> <span style="color:#f92672">add_header</span> <span style="color:#e6db74">Onion-Location</span> <span style="color:#e6db74">"http://<your-56-char>.onion</span>$request_uri" <span style="color:#e6db74">always</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">root</span> <span style="color:#e6db74">/srv/hugo/mysite/public-clearnet</span>;
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">index</span> <span style="color:#e6db74">index.html</span>;
|
||||
</span></span><span style="display:flex;"><span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">location</span> <span style="color:#e6db74">/</span> { <span style="color:#f92672">try_files</span> $uri $uri/ <span style="color:#e6db74">/index.html</span>; }
|
||||
</span></span><span style="display:flex;"><span>}
|
||||
</span></span></code></pre></div><blockquote>
|
||||
<p>Note: don’t add HSTS or HTTPS redirects to the <strong>onion</strong> vhost. Keep onion pure HTTP on localhost.</p></blockquote>
|
||||
<hr>
|
||||
<h2 id="6-troubleshooting-i-ran-into-and-fixes">6) Troubleshooting I ran into (and fixes)</h2>
|
||||
<ul>
|
||||
<li><strong>Tor unit confusion:</strong> <code>tor.service</code> is a tiny master; the real daemon is <code>tor@default</code>. Use that unit and verify config as <code>debian-tor</code>.</li>
|
||||
<li><strong>Permissions:</strong> <code>HiddenServiceDir</code> must be owned by <code>debian-tor</code> and mode <code>700</code>.</li>
|
||||
<li><strong>Mapping mismatch:</strong> If <code>HiddenServicePort 80 127.0.0.1:3301</code> is set, visit <code>http://<onion>/</code> (no <code>:3301</code>). If you set <code>HiddenServicePort 3301 127.0.0.1:3301</code>, you must use <code>http://<onion>:3301/</code>.</li>
|
||||
<li><strong>Curl & .onion:</strong> modern curl refuses <code>.onion</code> unless you use remote DNS via SOCKS:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -I --socks5-hostname 127.0.0.1:9050 <span style="color:#e6db74">"http://<onion>/"</span>
|
||||
</span></span></code></pre></div></li>
|
||||
<li><strong>Two Nginx vhosts on the same port:</strong> I had a duplicate server on <code>127.0.0.1:3301</code> pointing somewhere else, which caused onion 404s. Keep only one (or mark one <code>default_server</code>).</li>
|
||||
<li><strong>Regex in <code>server_name</code>:</strong> if you use it, write <code>server_name ~* \.onion$</code> (space after <code>~*</code>). I fixed an <code>invalid variable name</code> error caused by a missing space.</li>
|
||||
<li><strong>PaperMod with old Hugo:</strong> upgraded to <strong>extended ≥ 0.146.0</strong>. Also updated <code>paginate</code> → <code>[pagination].pagerSize</code>.</li>
|
||||
<li><strong>Snap confinement:</strong> Snap’s <code>hugo</code> couldn’t read <code>/srv</code> (<code>.../void: permission denied</code>). Switched to the tarball build in <code>/usr/local/bin</code>.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h2 id="7-not-secure-in-tor-browser">7) “Not secure” in Tor Browser?</h2>
|
||||
<p>That message can appear because onion uses <strong>HTTP</strong>. It’s OK: Tor provides e2e encryption + onion auth. If you enable HTTPS-Only Mode, add an exception for the site. Also ensure the onion build doesn’t reference <strong>clearnet</strong> resources (scan the built HTML for <code>http(s)://</code> links that aren’t your onion).</p>
|
||||
<hr>
|
||||
<h2 id="8-day-to-day-workflow">8) Day-to-day workflow</h2>
|
||||
<ul>
|
||||
<li>Create content:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>hugo new posts/my-first-post.md <span style="color:#75715e"># then set draft: false</span>
|
||||
</span></span></code></pre></div></li>
|
||||
<li>Publish both:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>build-both
|
||||
</span></span></code></pre></div></li>
|
||||
<li>(Optional) Auto on save:
|
||||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>find content layouts assets static config -type f | entr -r build-both
|
||||
</span></span></code></pre></div></li>
|
||||
<li>(Optional) Git push-to-deploy with a bare repo + post-receive hook that runs <code>build-both</code>.</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h2 id="final-notes">Final notes</h2>
|
||||
<ul>
|
||||
<li>Clearnet gets <strong>HTTPS + HSTS</strong> and an <code>Onion-Location</code> header.</li>
|
||||
<li>Onion gets <strong>no HSTS/redirects</strong>, and all assets are self-hosted to avoid mixed content.</li>
|
||||
<li>Serving both worlds from one Hugo repo is easy: <strong>two builds, two vhosts, one workflow</strong>.</li>
|
||||
</ul>
|
||||
]]></content:encoded></item></channel></rss>
|
||||
2
public/categories/notes/page/1/index.html
Normal file
2
public/categories/notes/page/1/index.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<!doctype html><html lang=en><head><title>http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/notes/</title>
|
||||
<link rel=canonical href=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/notes/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=http://fjthpp2h3mj2rup25r3psmqamutnkbvxbpltlohdthw6fscgo3t6bpad.onion/categories/notes/"></head></html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue