<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Alexey</title>
    <description>The latest articles on DEV Community by Alexey (@anxi0uz).</description>
    <link>https://dev.to/anxi0uz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3931418%2Fc542fda7-5e8e-4015-9f7c-16728c480054.jpg</url>
      <title>DEV Community: Alexey</title>
      <link>https://dev.to/anxi0uz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anxi0uz"/>
    <language>en</language>
    <item>
      <title>My Backend Looked Serious But Nothing Worked</title>
      <dc:creator>Alexey</dc:creator>
      <pubDate>Sat, 30 May 2026 11:16:46 +0000</pubDate>
      <link>https://dev.to/anxi0uz/my-backend-looked-serious-but-nothing-worked-55fm</link>
      <guid>https://dev.to/anxi0uz/my-backend-looked-serious-but-nothing-worked-55fm</guid>
      <description>&lt;p&gt;Yesterday I opened my project and just stared at it.&lt;/p&gt;

&lt;p&gt;Not in a dramatic way. More like: I opened Zed, looked at the file tree, and immediately wanted to close it.&lt;/p&gt;

&lt;p&gt;On the left it looked like a real backend already: &lt;code&gt;auth.go&lt;/code&gt;, &lt;code&gt;tickets.go&lt;/code&gt;, &lt;code&gt;invitations.go&lt;/code&gt;, &lt;code&gt;users.go&lt;/code&gt;, migrations, models, storage, configs. The kind of tree that makes you think: okay, something serious is happening here.&lt;/p&gt;

&lt;p&gt;Then you open the files.&lt;/p&gt;

&lt;p&gt;Half of the handlers are stubs.&lt;/p&gt;

&lt;p&gt;Some things are wired. Some things are half-wired. Some names already feel too permanent. And in my head there is this stupid list growing by itself:&lt;/p&gt;

&lt;p&gt;mobile API later, admin panel, roles, tenants, deployment, maybe Kubernetes, maybe not, what if we need events, what if the permissions model becomes ugly, what if I build this wrong from the start.&lt;/p&gt;

&lt;p&gt;The feature still doesn’t exist.&lt;/p&gt;

&lt;p&gt;Nothing works end to end.&lt;/p&gt;

&lt;p&gt;But the project already feels heavy.&lt;/p&gt;

&lt;p&gt;That specific moment kills me more than debugging does.&lt;/p&gt;

&lt;p&gt;Debugging at least means something exists.&lt;/p&gt;

&lt;h2&gt;
  
  
  I let Codex write the first real piece
&lt;/h2&gt;

&lt;p&gt;Today I didn’t try to be heroic.&lt;/p&gt;

&lt;p&gt;I gave Codex a small task: implement auth and invitations.&lt;/p&gt;

&lt;p&gt;Not the whole project. Not the perfect architecture. Not “build the startup”. Just one piece I could actually run.&lt;/p&gt;

&lt;p&gt;Before that I gave it rules. Handlers stay thin. Business logic does not live in HTTP handlers. Use the existing &lt;code&gt;storage.go&lt;/code&gt; pattern. Don’t invent a second way to talk to the database just because it is convenient right now.&lt;/p&gt;

&lt;p&gt;It generated a large commit. Around 1200 lines.&lt;/p&gt;

&lt;p&gt;Auth, invites, some Podman setup, a bunch of files.&lt;/p&gt;

&lt;p&gt;And this is exactly where AI coding can become dangerous, because the temptation is strong: big diff, code compiles, endpoint responds, nice, accept everything.&lt;/p&gt;

&lt;p&gt;I didn’t.&lt;/p&gt;

&lt;p&gt;I read the diff.&lt;/p&gt;

&lt;p&gt;Pretty quickly I found raw SQL inside a handler.&lt;/p&gt;

&lt;p&gt;The endpoint worked. That’s the annoying part. It wasn’t broken code. It was worse: working code in the wrong place.&lt;/p&gt;

&lt;p&gt;I already had a storage layer. I don’t want a handler to suddenly become aware of database details just because the agent took the shortest path.&lt;/p&gt;

&lt;p&gt;So I moved it.&lt;/p&gt;

&lt;p&gt;Cleaned it up.&lt;/p&gt;

&lt;p&gt;Made it fit the project instead of letting the project fit the generated patch.&lt;/p&gt;

&lt;p&gt;That was the first moment where I thought: okay, this is not the same thing as being an AI operator.&lt;/p&gt;

&lt;p&gt;An operator would stop at “it works”.&lt;/p&gt;

&lt;p&gt;I didn’t want to.&lt;/p&gt;

&lt;p&gt;Then I opened Apidog. Register worked. The response had a user, tenant, institution, access token. On the right side Apidog complained that it expected &lt;code&gt;201&lt;/code&gt; but got &lt;code&gt;200&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Stupid little detail.&lt;/p&gt;

&lt;p&gt;But I felt good.&lt;/p&gt;

&lt;p&gt;Not because Codex wrote 1200 lines.&lt;/p&gt;

&lt;p&gt;Because I sent a request and something real answered.&lt;/p&gt;

&lt;p&gt;That is the part I missed.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;gofro&lt;/code&gt; was a hint, but I misunderstood it
&lt;/h2&gt;

&lt;p&gt;After one coursework project, I built &lt;code&gt;gofro&lt;/code&gt; — a CLI that generates Go projects. I already wrote about it here: &lt;a href="https://dev.to/anxi0uz/i-got-tired-of-setting-up-go-projects-from-scratch-so-i-built-a-scaffolding-cli-33je"&gt;I got tired of setting up Go projects from scratch, so I built a scaffolding CLI&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The reason was simple: I was tired of starting every Go backend with the same boring ritual.&lt;/p&gt;

&lt;p&gt;Configs. Dockerfile. Compose. Postgres. Redis. Migrations. Graceful shutdown. Database connection. Environment variables. All of that before touching the actual feature.&lt;/p&gt;

&lt;p&gt;At some point I thought: maybe scaffolding is the thing I hate.&lt;/p&gt;

&lt;p&gt;So I built a scaffolder.&lt;/p&gt;

&lt;p&gt;And to be honest, &lt;code&gt;gofro&lt;/code&gt; itself was mostly vibe-coded with Claude Code. I’m not going to pretend I hand-crafted every line in a cave with Vim and discipline. I wanted to remove a boring part of my workflow, and Claude Code was very good for that at the time.&lt;/p&gt;

&lt;p&gt;It helped.&lt;/p&gt;

&lt;p&gt;But it didn’t fix the whole problem.&lt;/p&gt;

&lt;p&gt;Because you can generate a nice skeleton in seconds and still sit there thinking:&lt;/p&gt;

&lt;p&gt;okay, now what?&lt;/p&gt;

&lt;p&gt;Folders exist.&lt;/p&gt;

&lt;p&gt;Compose exists.&lt;/p&gt;

&lt;p&gt;Migrations exist.&lt;/p&gt;

&lt;p&gt;But there is still nothing to call.&lt;/p&gt;

&lt;p&gt;No endpoint that proves the project is alive.&lt;/p&gt;

&lt;p&gt;That was the part I missed with &lt;code&gt;gofro&lt;/code&gt;. I thought I hated setting up projects. I did. But what I hated even more was spending hours before the first visible result.&lt;/p&gt;

&lt;p&gt;Scaffolding is not the same as a working flow.&lt;/p&gt;

&lt;p&gt;Annoyingly obvious now. Was not obvious to me then.&lt;/p&gt;

&lt;h2&gt;
  
  
  Coursework was the opposite feeling
&lt;/h2&gt;

&lt;p&gt;The funny thing is that my coursework had already shown me what kind of work actually motivates me.&lt;/p&gt;

&lt;p&gt;I worked on it with a friend. And I remember being genuinely happy after pushes.&lt;/p&gt;

&lt;p&gt;Not “good, task done”. More like I wrote a few endpoints, ran the whole flow, found a bug, fixed it, opened an MR/PR, and felt like I had built something.&lt;/p&gt;

&lt;p&gt;The strongest memory is geocoding.&lt;/p&gt;

&lt;p&gt;Coordinates finally processed correctly. A route got built. Data started going through WebSocket.&lt;/p&gt;

&lt;p&gt;I was sitting there happy like an idiot.&lt;/p&gt;

&lt;p&gt;Not because it was some genius engineering. It was just alive.&lt;/p&gt;

&lt;p&gt;Code → run → result.&lt;/p&gt;

&lt;p&gt;Very simple.&lt;/p&gt;

&lt;p&gt;And in the same project there was the other part: configs, migrations, wiring, setup, all the stuff around the feature.&lt;/p&gt;

&lt;p&gt;That part felt like mud.&lt;/p&gt;

&lt;p&gt;You work for hours and the only thing you can say afterwards is: “I prepared the foundation.”&lt;/p&gt;

&lt;p&gt;Cool.&lt;/p&gt;

&lt;p&gt;I hate that sentence.&lt;/p&gt;

&lt;p&gt;I want to say: “you can run this now.”&lt;/p&gt;

&lt;h2&gt;
  
  
  I also overdid system design
&lt;/h2&gt;

&lt;p&gt;Another problem: at some point I went too deep into system design.&lt;/p&gt;

&lt;p&gt;I thought my weakness was not coding. I thought my weakness was designing things properly.&lt;/p&gt;

&lt;p&gt;So I watched lectures, went to meetups, attended UWDC, listened to a talk about EDA and C4 on a real application. Books didn’t happen. I tried, got bored, lost.&lt;/p&gt;

&lt;p&gt;But the mindset stuck.&lt;/p&gt;

&lt;p&gt;Sometimes too much.&lt;/p&gt;

&lt;p&gt;The project doesn’t have an MVP yet, and I’m already thinking about exposing the API for a future mobile app, admin panel options, tenant isolation, roles, deployment, Kubernetes, events, module boundaries.&lt;/p&gt;

&lt;p&gt;It feels productive because technically you are thinking about real problems.&lt;/p&gt;

&lt;p&gt;Just not real yet.&lt;/p&gt;

&lt;p&gt;A friend told me once: don’t optimize what doesn’t exist.&lt;/p&gt;

&lt;p&gt;I nodded. Very smart. Very reasonable.&lt;/p&gt;

&lt;p&gt;Then I continued doing it anyway.&lt;/p&gt;

&lt;p&gt;And it wasn’t even premature optimization.&lt;/p&gt;

&lt;p&gt;It was premature architecture.&lt;/p&gt;

&lt;p&gt;A nice respectable way to avoid building the ugly first version.&lt;/p&gt;

&lt;p&gt;That’s probably the part I needed to admit.&lt;/p&gt;

&lt;p&gt;I wasn’t blocked because I didn’t know enough architecture.&lt;/p&gt;

&lt;p&gt;Sometimes I was blocked because I tried to apply architecture before there was anything worth architecting.&lt;/p&gt;

&lt;h2&gt;
  
  
  The AI panic was mixed with job panic
&lt;/h2&gt;

&lt;p&gt;Vibe coding annoyed me for a long time.&lt;/p&gt;

&lt;p&gt;Not the tools exactly. The culture around it.&lt;/p&gt;

&lt;p&gt;That whole internet vibe of:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I don’t know programming, but Claude Code shipped my fifth SaaS&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When you’re trying to enter the market as a junior, this doesn’t sound inspiring.&lt;/p&gt;

&lt;p&gt;It sounds like someone removed the door before you reached it.&lt;/p&gt;

&lt;p&gt;Add fewer junior vacancies, less remote work, endless posts about AI replacing entry-level developers, and suddenly the thought is not “the market is rough”.&lt;/p&gt;

&lt;p&gt;The thought becomes: maybe I’m useless.&lt;/p&gt;

&lt;p&gt;That is not a great mental place to evaluate tools from.&lt;/p&gt;

&lt;p&gt;I started hating AI partly because it was standing next to that fear.&lt;/p&gt;

&lt;p&gt;But using AI and becoming a person who understands nothing are not the same thing.&lt;/p&gt;

&lt;p&gt;I had already used Claude Code a lot. &lt;code&gt;gofro&lt;/code&gt; came from that period. Back then Claude in Zed’s Agent Panel felt close to pair programming: you could see what it was touching, what it was writing, where it was going. The limits were okay. Reviews didn’t destroy the whole window. Hallucinations felt less painful.&lt;/p&gt;

&lt;p&gt;Later it got worse for me. Limits started to hurt more. Large reviews became expensive. Hallucinations became more noticeable. In my bubble people started mentioning Kimi, Codex, other tools.&lt;/p&gt;

&lt;p&gt;I tried Kimi Code, hit a timeout, got annoyed, bought ChatGPT Plus, and tried Codex.&lt;/p&gt;

&lt;p&gt;Codex is also inside Zed for me, but the feeling is different.&lt;/p&gt;

&lt;p&gt;Claude felt like watching someone code next to me.&lt;/p&gt;

&lt;p&gt;Codex feels more like sending work to another room and waiting for a batch of changes.&lt;/p&gt;

&lt;p&gt;Less live feedback. Slower feeling.&lt;/p&gt;

&lt;p&gt;But the limits for $19 felt almost illegal after what I was used to.&lt;/p&gt;

&lt;p&gt;So now I’m less interested in “which agent is morally pure” or whatever.&lt;/p&gt;

&lt;p&gt;The real question is: does this tool help me reach a working state faster without making me lose ownership of the code?&lt;/p&gt;

&lt;p&gt;For this auth flow, yes.&lt;/p&gt;

&lt;h2&gt;
  
  
  “It works” is not enough
&lt;/h2&gt;

&lt;p&gt;The Codex commit made me calmer about AI coding, but not more trusting.&lt;/p&gt;

&lt;p&gt;Actually the opposite.&lt;/p&gt;

&lt;p&gt;If AI writes code, I need to review harder.&lt;/p&gt;

&lt;p&gt;Auth? Check password hashing, token expiration, middleware, errors.&lt;/p&gt;

&lt;p&gt;Invites? Check if an invite can be accepted twice. Check tenant boundaries. Check roles. Check institution links.&lt;/p&gt;

&lt;p&gt;Migrations? Check constraints, indexes, nullable fields.&lt;/p&gt;

&lt;p&gt;SQL in handlers? No.&lt;/p&gt;

&lt;p&gt;A &lt;code&gt;200 OK&lt;/code&gt; response is not proof that the code belongs in the project.&lt;/p&gt;

&lt;p&gt;It only proves that one path responded once.&lt;/p&gt;

&lt;p&gt;That’s not enough.&lt;/p&gt;

&lt;p&gt;My current rule is simple, I guess:&lt;/p&gt;

&lt;p&gt;I’m fine with AI writing the first version.&lt;/p&gt;

&lt;p&gt;I’m not fine with not understanding the final one.&lt;/p&gt;

&lt;p&gt;If code stays in the repository, I need to be able to explain it.&lt;/p&gt;

&lt;p&gt;Why this endpoint exists. Why this logic is not in a handler. Why this table is related that way. Why this error is returned. Why this can be deployed without embarrassing me.&lt;/p&gt;

&lt;p&gt;If I can’t explain it, it’s not really mine.&lt;/p&gt;

&lt;p&gt;Even if my name is on the commit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Not a manifesto
&lt;/h2&gt;

&lt;p&gt;I still want a job.&lt;/p&gt;

&lt;p&gt;Pet projects, startups, freelance — all useful, sure. But a real job gives you other people’s code, reviews, processes, responsibility, commercial experience. Hard to fully replace that alone.&lt;/p&gt;

&lt;p&gt;I also still don’t want to become a prompt operator.&lt;/p&gt;

&lt;p&gt;But I don’t want to keep proving that I’m a real programmer by manually suffering through every repetitive stub either.&lt;/p&gt;

&lt;p&gt;If AI gets me faster to the point where I can send a request and see a real response, fine.&lt;/p&gt;

&lt;p&gt;After that, the actual work starts.&lt;/p&gt;

&lt;p&gt;Review the diff.&lt;/p&gt;

&lt;p&gt;Fix the weird parts.&lt;/p&gt;

&lt;p&gt;Move SQL out of handlers.&lt;/p&gt;

&lt;p&gt;Write tests.&lt;/p&gt;

&lt;p&gt;Clean up.&lt;/p&gt;

&lt;p&gt;Refactor.&lt;/p&gt;

&lt;p&gt;Deploy.&lt;/p&gt;

&lt;p&gt;Own what remains.&lt;/p&gt;

&lt;p&gt;Maybe vibe coding is not the thing I hated.&lt;/p&gt;

&lt;p&gt;Maybe I hated the part before the project becomes alive.&lt;/p&gt;

&lt;p&gt;And maybe the real failure mode is not “AI wrote the first draft”.&lt;/p&gt;

&lt;p&gt;Maybe it’s keeping code you don’t understand just because it worked once.&lt;/p&gt;

&lt;p&gt;Anyway.&lt;/p&gt;

&lt;p&gt;That’s the current working theory.&lt;/p&gt;

&lt;p&gt;It took being sick of a file tree and reviewing 1200 Codex-generated lines to get there.&lt;/p&gt;

</description>
      <category>go</category>
      <category>ai</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>SSH died. Spent 3 hours fixing the wrong thing.</title>
      <dc:creator>Alexey</dc:creator>
      <pubDate>Wed, 20 May 2026 15:38:14 +0000</pubDate>
      <link>https://dev.to/anxi0uz/ssh-died-spent-3-hours-fixing-the-wrong-thing-4dlh</link>
      <guid>https://dev.to/anxi0uz/ssh-died-spent-3-hours-fixing-the-wrong-thing-4dlh</guid>
      <description>&lt;p&gt;Three or four days ago I deployed a Gitea runner, tested it, closed the terminal and moved on. Today, for some reason I don't even remember, I tried to SSH into the server. Nothing.&lt;/p&gt;

&lt;p&gt;Opened the browser to check if the server was alive — course project running, Gitea up, Nextcloud up, everything in the k3s cluster fine. Went into VMmanager, rebooted. Still couldn't get in. Closed The Boys and went to fix it through VNC.&lt;/p&gt;




&lt;h2&gt;
  
  
  nmap first
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nmap &lt;span class="nt"&gt;-p&lt;/span&gt; 22 2.27.42.100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;PORT     STATE    SERVICE
22/tcp   filtered ssh
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;filtered&lt;/code&gt; — not closed, not refused. Packets reaching the server and getting silently dropped. Firewall somewhere.&lt;/p&gt;

&lt;p&gt;Checked the INPUT chain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Chain INPUT (policy DROP)
1    KUBE-ROUTER-INPUT
2    ACCEPT     tcp dpt:22
3    KUBE-PROXY-FIREWALL
...
8    ufw-before-input
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;ACCEPT rule for port 22 at position 2. Looked fine.&lt;/p&gt;

&lt;p&gt;Wasn't fine.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where it actually breaks
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nft list ruleset | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-E&lt;/span&gt; &lt;span class="s2"&gt;"22|drop|DROP"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;type filter hook input priority filter; policy drop;
...
tcp dport 22 counter packets 0 bytes 0 accept
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Zero packets on the accept rule. Connections weren't reaching it at all.&lt;/p&gt;

&lt;p&gt;The server has both iptables-nft (kube-router, UFW) and native nftables running at the same time. They fight. kube-router constantly reconciles and overwrites stuff. The output was already warning about it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight conf"&gt;&lt;code&gt;&lt;span class="c"&gt;# Warning: table ip filter is managed by iptables-nft, do not touch!
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Gitea runner deploy from a few days ago triggered a reconciliation that messed up the rule ordering. I just hadn't tried SSH since then.&lt;/p&gt;




&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;Native nftables table at priority &lt;code&gt;-150&lt;/code&gt;. Runs before any filter chains (priority &lt;code&gt;0&lt;/code&gt;), before kube-router, before everything. kube-router only manages the iptables-nft layer — doesn't touch native nftables tables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nft add table inet ssh_rescue
nft &lt;span class="s1"&gt;'add chain inet ssh_rescue input { type filter hook input priority -150; }'&lt;/span&gt;
nft add rule inet ssh_rescue input tcp dport 22 accept
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;SSH came back. Wrote to my friend: "fixed". He said "eee". Made it a systemd service. Two minutes later wrote to him: "SSH died again".&lt;/p&gt;




&lt;h2&gt;
  
  
  Round two
&lt;/h2&gt;

&lt;p&gt;Back in VNC. Table still there, rules still there, zero packets on the accept rule again.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;systemctl start nftables&lt;/code&gt; had loaded the saved &lt;code&gt;/etc/nftables.conf&lt;/code&gt; which had kube-router's warning comments in it and corrupted the nftables state. Re-added the table manually. SSHed from the server to itself — worked. sshd on &lt;code&gt;0.0.0.0:22&lt;/code&gt; — fine. Still couldn't connect from outside.&lt;/p&gt;

&lt;p&gt;Then checked fail2ban, which had installed itself as a dependency somewhere during all this. It had banned two IPs — bots hammering port 22 the whole time. My repeated failed attempts got caught in the same drop. Ran &lt;code&gt;fail2ban-client unban --all&lt;/code&gt;, connected immediately.&lt;/p&gt;

&lt;p&gt;Then SSH died again. Disabled fail2ban completely — still nothing.&lt;/p&gt;




&lt;h2&gt;
  
  
  The actual reason
&lt;/h2&gt;

&lt;p&gt;I was in the middle of debugging nftables chains when I remembered — my VPN is self-hosted on a server in Finland. The day before I'd been complaining to my friend that the VPN was slow. The provider had sent an email:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Due to an increase in brute-force complaints via SSH (port 22), outgoing traffic on port 22 has been blocked for VPS servers located in Finland.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I had read it. I knew about it. And I spent three hours in VNC chasing nftables, fail2ban and kube-router while the answer was sitting in my inbox the whole time.&lt;/p&gt;

&lt;p&gt;Turned off the VPN. SSH connected immediately.&lt;/p&gt;




&lt;h2&gt;
  
  
  What to do from day one
&lt;/h2&gt;

&lt;p&gt;Add the ssh_rescue table before you need it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nft add table inet ssh_rescue
nft &lt;span class="s1"&gt;'add chain inet ssh_rescue input { type filter hook input priority -150; }'&lt;/span&gt;
nft add rule inet ssh_rescue input tcp dport 22 accept
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make it a service so it survives reboots and kube-router reconciliation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /usr/local/bin/ssh-rescue.sh &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="no"&gt;EOF2&lt;/span&gt;&lt;span class="sh"&gt;'
#!/bin/bash
nft list table inet ssh_rescue 2&amp;gt;/dev/null || {
    nft add table inet ssh_rescue
    nft add chain inet ssh_rescue input { type filter hook input priority -150; }
    nft add rule inet ssh_rescue input tcp dport 22 accept
}
&lt;/span&gt;&lt;span class="no"&gt;EOF2
&lt;/span&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x /usr/local/bin/ssh-rescue.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After any deploy that touches networking — run &lt;code&gt;nmap -p 22 &amp;lt;ip&amp;gt;&lt;/code&gt; immediately.&lt;/p&gt;

&lt;p&gt;And read your damn emails.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>selfhosted</category>
      <category>devops</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>I got tired of setting up Go projects from scratch, so I built a scaffolding CLI</title>
      <dc:creator>Alexey</dc:creator>
      <pubDate>Sun, 17 May 2026 13:37:39 +0000</pubDate>
      <link>https://dev.to/anxi0uz/i-got-tired-of-setting-up-go-projects-from-scratch-so-i-built-a-scaffolding-cli-33je</link>
      <guid>https://dev.to/anxi0uz/i-got-tired-of-setting-up-go-projects-from-scratch-so-i-built-a-scaffolding-cli-33je</guid>
      <description>&lt;p&gt;Before I wrote any actual business logic in my last project, I spent days just setting up the infrastructure around it. Parsing configs, writing Dockerfiles, wiring up Compose, connecting Postgres and Redis, getting the server to actually start. At some point I just gave up and went to play Dota instead.&lt;/p&gt;

&lt;p&gt;I'd done this before in .NET — &lt;code&gt;dotnet new&lt;/code&gt; generates a working project from a template in seconds. Go has nothing like that out of the box. So I built it.&lt;/p&gt;

&lt;p&gt;It's called &lt;a href="https://github.com/anxi0uz/gofro" rel="noopener noreferrer"&gt;gofro&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;One command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gofro new myapi &lt;span class="nt"&gt;--postgres&lt;/span&gt; &lt;span class="nt"&gt;--redis&lt;/span&gt; &lt;span class="nt"&gt;--grafana&lt;/span&gt; &lt;span class="nt"&gt;--github&lt;/span&gt; johndoe &lt;span class="nt"&gt;--git&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cmd/main.go&lt;/code&gt; with graceful shutdown wired up&lt;/li&gt;
&lt;li&gt;Config loading via koanf (TOML + env vars, env wins)&lt;/li&gt;
&lt;li&gt;Docker Compose with only the services you asked for&lt;/li&gt;
&lt;li&gt;Multi-stage Dockerfile&lt;/li&gt;
&lt;li&gt;pgxpool connection + goose migrations runner (if &lt;code&gt;--postgres&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;go-redis client (if &lt;code&gt;--redis&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Prometheus scrape config + Grafana in Compose (if &lt;code&gt;--grafana&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;OpenAPI spec + oapi-codegen setup so you can define your API and generate typed handlers&lt;/li&gt;
&lt;li&gt;Generic storage layer — &lt;code&gt;GetAll&lt;/code&gt;, &lt;code&gt;GetOne&lt;/code&gt;, &lt;code&gt;Create&lt;/code&gt;, &lt;code&gt;Update&lt;/code&gt;, &lt;code&gt;Delete&lt;/code&gt; over pgx&lt;/li&gt;
&lt;li&gt;Module path set to &lt;code&gt;github.com/johndoe/myapi&lt;/code&gt; automatically&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git init&lt;/code&gt; if you pass &lt;code&gt;--git&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then &lt;code&gt;go mod tidy&lt;/code&gt; and &lt;code&gt;docker compose up -d&lt;/code&gt; and you're writing actual code.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why I built this instead of using something existing
&lt;/h2&gt;

&lt;p&gt;Coming from .NET, &lt;code&gt;dotnet new&lt;/code&gt; was just there. Pick a template, get a project, start working. In Go I kept doing the same dance every time: copy the config parser from the last project, rewrite the Compose file, remember how pgxpool initialization works, set up graceful shutdown again.&lt;/p&gt;

&lt;p&gt;The last time I did it was for a college logistics platform. I had a tight deadline, hadn't touched Go in a while after a stressful hackathon, and spent way too long just building the scaffolding before writing a single handler. That's when I decided to just solve it once.&lt;/p&gt;

&lt;p&gt;gofro is opinionated. It picks the stack for you — chi for routing, koanf for config, pgx for Postgres, goose for migrations, oapi-codegen for API generation. If you want something different, it's probably not for you. But if you're fine with that stack, you skip a day of setup.&lt;/p&gt;




&lt;h2&gt;
  
  
  The flags
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;--postgres    pgxpool + goose migrations + generic storage layer
--redis       go-redis/v9 client
--prometheus  Prometheus scrape config
--grafana     Grafana in Compose (enables --prometheus automatically)
--github      sets module path to github.com/&amp;lt;nick&amp;gt;/&amp;lt;project&amp;gt;
--module      full custom module path
--git         runs git init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can mix and match. Minimal API with no databases:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gofro new myapi &lt;span class="nt"&gt;--github&lt;/span&gt; johndoe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Full stack with observability:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gofro new myapi &lt;span class="nt"&gt;--postgres&lt;/span&gt; &lt;span class="nt"&gt;--redis&lt;/span&gt; &lt;span class="nt"&gt;--prometheus&lt;/span&gt; &lt;span class="nt"&gt;--grafana&lt;/span&gt; &lt;span class="nt"&gt;--github&lt;/span&gt; johndoe &lt;span class="nt"&gt;--git&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  What the generated project looks like
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;myapi/
├── cmd/
│   └── main.go              # graceful shutdown, signal handling, dependency wiring
├── configs/
│   ├── config.toml          # base config
│   └── prometheus.yml       # only with --prometheus
├── internal/
│   ├── api/
│   │   ├── api.swagger.yaml # define your endpoints here
│   │   ├── gen.go           # go:generate directive for oapi-codegen
│   │   └── oapi-codegen.yaml
│   ├── config/
│   │   └── config.go        # struct + koanf loader + DSN helpers
│   ├── database/
│   │   ├── postgres.go      # only with --postgres
│   │   └── redis.go         # only with --redis
│   └── handler/
│       └── server_impl.go   # Server struct, JSON(), Run()
├── pkg/
│   └── storage/
│       └── storage.go       # only with --postgres
├── migrations/              # only with --postgres
├── docker-compose.yml
├── Dockerfile
├── .env
└── Makefile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The workflow after generation:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Define your API in &lt;code&gt;internal/api/api.swagger.yaml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;make generate&lt;/code&gt; — oapi-codegen produces typed models and the server interface&lt;/li&gt;
&lt;li&gt;Implement the interface methods on the &lt;code&gt;Server&lt;/code&gt; struct&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;docker compose up -d&lt;/code&gt; and &lt;code&gt;go run ./cmd/&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  The generic storage layer
&lt;/h2&gt;

&lt;p&gt;This is the part I use in every project. It's built on &lt;code&gt;go-sqlbuilder&lt;/code&gt; and pgx, works with any struct via generics:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="c"&gt;// SELECT with optional filter&lt;/span&gt;
&lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;storage&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;GetAll&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;User&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"users"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sb&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;sqlbuilder&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SelectBuilder&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;sb&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sb&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Equal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"active"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;true&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;// SELECT one&lt;/span&gt;
&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;storage&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;GetOne&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;User&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"users"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sb&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;sqlbuilder&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SelectBuilder&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;sb&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sb&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Equal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;errors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Is&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;storage&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ErrNotFound&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;// INSERT&lt;/span&gt;
&lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;storage&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"users"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;newUser&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;// UPDATE — skips fields tagged `immutable` (like created_at)&lt;/span&gt;
&lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;storage&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"users"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sb&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;sqlbuilder&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;UpdateBuilder&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;sb&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sb&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Equal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ID&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fields tagged &lt;code&gt;db:"-"&lt;/code&gt; are skipped on insert. Fields tagged &lt;code&gt;immutable&lt;/code&gt; are skipped on update. No magic, just generics and struct tags.&lt;/p&gt;




&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;install &lt;/span&gt;github.com/anxi0uz/gofro@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure &lt;code&gt;$(go env GOPATH)/bin&lt;/code&gt; is in your &lt;code&gt;$PATH&lt;/code&gt;. Then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gofro new myproject &lt;span class="nt"&gt;--postgres&lt;/span&gt; &lt;span class="nt"&gt;--redis&lt;/span&gt; &lt;span class="nt"&gt;--github&lt;/span&gt; yourname &lt;span class="nt"&gt;--git&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;myproject
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Source: &lt;a href="https://github.com/anxi0uz/gofro" rel="noopener noreferrer"&gt;github.com/anxi0uz/gofro&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>cli</category>
      <category>opensource</category>
      <category>webdev</category>
    </item>
    <item>
      <title>My friend wanted GitLab. He got Gitea and Nextcloud for Obsidian instead.</title>
      <dc:creator>Alexey</dc:creator>
      <pubDate>Thu, 14 May 2026 14:22:41 +0000</pubDate>
      <link>https://dev.to/anxi0uz/my-friend-wanted-gitlab-he-got-gitea-and-nextcloud-for-obsidian-instead-500i</link>
      <guid>https://dev.to/anxi0uz/my-friend-wanted-gitlab-he-got-gitea-and-nextcloud-for-obsidian-instead-500i</guid>
      <description>&lt;p&gt;A friend sent me an article about GitHub potentially getting blocked in Russia and asked me to spin up GitLab. I suggested Gitea — I'd used it at a college hackathon, knew it was lightweight and wouldn't eat half the server. He agreed.&lt;/p&gt;

&lt;p&gt;While the deploy was running, I asked him how he syncs Obsidian. He said — plain WebDAV, nothing fancy. Well, server's already open anyway, so I threw in Nextcloud too. Hour and a half later I had both a git host and a cloud storage.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why not GitLab
&lt;/h2&gt;

&lt;p&gt;My friend originally wanted GitLab. I opened the docs, looked at the requirements — 4 GB RAM just to start — and said no. We don't have a dedicated git server, there's already a project running on it. GitLab would've eaten everything.&lt;/p&gt;

&lt;p&gt;Gitea idles at ~150 MB. Actions are compatible with GitHub Actions syntax, so existing workflows move over without rewriting. I'd already used it at a hackathon, knew it worked fine. Suggested it, got the green light.&lt;/p&gt;




&lt;h2&gt;
  
  
  On Helm
&lt;/h2&gt;

&lt;p&gt;First time I touched Kubernetes was when I had to deploy a college project for a grade. Wrote manifests by hand — Deployment, Service, Ingress, PVC, repeat. I knew Helm existed but never had a reason to dig into it.&lt;/p&gt;

&lt;p&gt;Turns out it's like pacman, but for Kubernetes. One &lt;code&gt;values.yaml&lt;/code&gt; instead of five hundred lines of YAML, one command — everything's up. Would've lost my mind doing it the old way.&lt;/p&gt;

&lt;p&gt;First though, Helm couldn't see the cluster at all:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Kubernetes cluster unreachable: Get "http://localhost:8080/version"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;k3s puts the kubeconfig somewhere Helm doesn't look by default. Fix:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;KUBECONFIG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/etc/rancher/k3s/k3s.yaml
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'export KUBECONFIG=/etc/rancher/k3s/k3s.yaml'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Gitea
&lt;/h2&gt;

&lt;p&gt;The server already had ingress-nginx and cert-manager with a &lt;code&gt;letsencrypt-prod&lt;/code&gt; ClusterIssuer. Set the DNS beforehand — A record &lt;code&gt;git.logiflowadvanced.online → 2.27.42.100&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gitea-values.yaml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;ingress&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="na"&gt;ingressClassName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx&lt;/span&gt;
  &lt;span class="na"&gt;hosts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;host&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;git.logiflowadvanced.online&lt;/span&gt;
      &lt;span class="na"&gt;paths&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/&lt;/span&gt;
          &lt;span class="na"&gt;pathType&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Prefix&lt;/span&gt;
  &lt;span class="na"&gt;tls&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;secretName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gitea-tls&lt;/span&gt;
      &lt;span class="na"&gt;hosts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;git.logiflowadvanced.online&lt;/span&gt;
  &lt;span class="na"&gt;annotations&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;cert-manager.io/cluster-issuer&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;letsencrypt-prod&lt;/span&gt;

&lt;span class="na"&gt;gitea&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;admin&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;admin&lt;/span&gt;
    &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yourpassword&lt;/span&gt;
    &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;your@email.com&lt;/span&gt;

&lt;span class="na"&gt;persistence&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;size&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;10Gi&lt;/span&gt;

&lt;span class="na"&gt;postgresql-ha&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;

&lt;span class="na"&gt;postgresql&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;helm repo add gitea-charts https://dl.gitea.com/charts/
helm repo update
helm &lt;span class="nb"&gt;install &lt;/span&gt;gitea gitea-charts/gitea &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--namespace&lt;/span&gt; gitea &lt;span class="nt"&gt;--create-namespace&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-f&lt;/span&gt; gitea-values.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pods came up. Opened the browser — invalid certificate, browser complaining. Checked the Ingress:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;NAME    CLASS    HOSTS                          ADDRESS   PORTS
&lt;/span&gt;&lt;span class="gp"&gt;gitea   &amp;lt;none&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;git.logiflowadvanced.online              80, 443
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;CLASS: &amp;lt;none&amp;gt;&lt;/code&gt; — the nginx controller just ignored this Ingress entirely. cert-manager didn't issue anything either, so nginx was serving its default self-signed cert.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl patch ingress gitea &lt;span class="nt"&gt;-n&lt;/span&gt; gitea &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;json &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'[{"op":"add","path":"/spec/ingressClassName","value":"nginx"}]'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the patch, cert-manager issued the certificate and the site opened fine.&lt;/p&gt;

&lt;h3&gt;
  
  
  SSH
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;gitea-ssh&lt;/code&gt; is created as a headless ClusterIP by default — not reachable from outside. Port 22 is taken by the system SSH, so I needed a NodePort. You can't patch a headless service into NodePort — have to delete and recreate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl delete svc gitea-ssh &lt;span class="nt"&gt;-n&lt;/span&gt; gitea

kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; - &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
apiVersion: v1
kind: Service
metadata:
  name: gitea-ssh
  namespace: gitea
spec:
  type: NodePort
  selector:
    app.kubernetes.io/name: gitea
  ports:
    - port: 22
      targetPort: 2222
      nodePort: 30022
&lt;/span&gt;&lt;span class="no"&gt;EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remote looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote add gitea ssh://git@git.logiflowadvanced.online:30022/username/repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Nextcloud
&lt;/h2&gt;

&lt;p&gt;Set up the DNS for &lt;code&gt;cloud.logiflowadvanced.online&lt;/code&gt; while Gitea was still deploying.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;nextcloud-values.yaml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;ingress&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="na"&gt;ingressClassName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nginx&lt;/span&gt;
  &lt;span class="na"&gt;hosts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;host&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cloud.logiflowadvanced.online&lt;/span&gt;
      &lt;span class="na"&gt;paths&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/&lt;/span&gt;
          &lt;span class="na"&gt;pathType&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Prefix&lt;/span&gt;
  &lt;span class="na"&gt;tls&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;secretName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nextcloud-tls&lt;/span&gt;
      &lt;span class="na"&gt;hosts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;cloud.logiflowadvanced.online&lt;/span&gt;
  &lt;span class="na"&gt;annotations&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;cert-manager.io/cluster-issuer&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;letsencrypt-prod&lt;/span&gt;
    &lt;span class="na"&gt;nginx.ingress.kubernetes.io/proxy-body-size&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0"&lt;/span&gt;

&lt;span class="na"&gt;nextcloud&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;host&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cloud.logiflowadvanced.online&lt;/span&gt;
  &lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;admin&lt;/span&gt;
  &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yourpassword&lt;/span&gt;

&lt;span class="na"&gt;mariadb&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="na"&gt;auth&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yourdbpassword&lt;/span&gt;
    &lt;span class="na"&gt;database&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nextcloud&lt;/span&gt;
    &lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nextcloud&lt;/span&gt;

&lt;span class="na"&gt;postgresql&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;

&lt;span class="na"&gt;persistence&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="na"&gt;size&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;10Gi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;helm &lt;span class="nb"&gt;install &lt;/span&gt;nextcloud nextcloud/nextcloud &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--namespace&lt;/span&gt; nextcloud &lt;span class="nt"&gt;--create-namespace&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-f&lt;/span&gt; nextcloud-values.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same &lt;code&gt;ingressClassName&lt;/code&gt; issue — same patch, same result.&lt;/p&gt;

&lt;p&gt;After the first login it kept redirecting to &lt;code&gt;/login/cleary?=1&lt;/code&gt;. Nextcloud didn't know its own external address:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; nextcloud deploy/nextcloud &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  php occ config:system:set overwriteprotocol &lt;span class="nt"&gt;--value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https"&lt;/span&gt;
kubectl &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; nextcloud deploy/nextcloud &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  php occ config:system:set overwrite.cli.url &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://cloud.logiflowadvanced.online"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Obsidian
&lt;/h3&gt;

&lt;p&gt;Created separate users for me and my friend. WebDAV URL per user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://cloud.logiflowadvanced.online/remote.php/dav/files/username/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the RemotelySave plugin: type — WebDAV, URL, login, password. Works.&lt;/p&gt;




&lt;p&gt;The thing that ate most of my time wasn't Gitea or Nextcloud — it was &lt;code&gt;ingressClassName&lt;/code&gt;. Neither chart sets it automatically, and without it nginx just ignores the Ingress completely. cert-manager doesn't issue anything. Browser shows self-signed, you stare at the logs, pods are all Running, no errors anywhere.&lt;/p&gt;

&lt;p&gt;Run &lt;code&gt;kubectl get ingress -n &amp;lt;namespace&amp;gt;&lt;/code&gt; right after deploy. If CLASS says &lt;code&gt;&amp;lt;none&amp;gt;&lt;/code&gt; — that's your problem.&lt;/p&gt;

&lt;p&gt;The other non-obvious one: &lt;code&gt;gitea-ssh&lt;/code&gt; is headless and you can't patch it into a NodePort — you have to delete and recreate it. Spent a few minutes trying to patch it before actually reading the error.&lt;/p&gt;

&lt;p&gt;With Nextcloud and MariaDB — if MariaDB didn't come up on the first deploy or you uninstalled and reinstalled, helm will complain about credential mismatch on upgrade. Just &lt;code&gt;helm uninstall&lt;/code&gt; + &lt;code&gt;kubectl delete pvc --all -n nextcloud&lt;/code&gt; and start fresh, it's faster than untangling the creds.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>git</category>
      <category>selfhosted</category>
    </item>
  </channel>
</rss>
