<?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.us-east-2.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>I Moved From Go to FastAPI. It Felt Suspiciously Easy.</title>
      <dc:creator>Alexey</dc:creator>
      <pubDate>Fri, 07 Aug 2026 19:46:03 +0000</pubDate>
      <link>https://dev.to/anxi0uz/i-moved-from-go-to-fastapi-it-felt-suspiciously-easy-3ck0</link>
      <guid>https://dev.to/anxi0uz/i-moved-from-go-to-fastapi-it-felt-suspiciously-easy-3ck0</guid>
      <description>&lt;p&gt;For quite a while, most of my backend code was written in Go.&lt;/p&gt;

&lt;p&gt;I built projects like Logiflow, a logistics backend with PostgreSQL, Redis, WebSockets, OSRM and monitoring, and Sentinel, an event-driven fraud detection project using Kafka and PostgreSQL.&lt;/p&gt;

&lt;p&gt;At some point I also got tired of setting up the same Go project structure over and over again, so I built &lt;code&gt;gofro&lt;/code&gt;, a small scaffolding CLI for generating the boring parts.&lt;/p&gt;

&lt;p&gt;I got used to the way Go backend projects feel.&lt;/p&gt;

&lt;p&gt;You create the server, configure the router, initialize the database, construct dependencies, pass them around, handle errors and gradually connect everything together.&lt;/p&gt;

&lt;p&gt;Then I started building LinkUp with Python and FastAPI.&lt;/p&gt;

&lt;p&gt;My first impression was simple:&lt;/p&gt;

&lt;p&gt;This felt suspiciously easy.&lt;/p&gt;

&lt;p&gt;Not because the project itself was easier, but because a surprising amount of code I was used to writing simply disappeared.&lt;/p&gt;

&lt;p&gt;After spending some time with FastAPI, I started to understand where that complexity actually went.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where did all the plumbing go?
&lt;/h2&gt;

&lt;p&gt;A typical Go project of mine has a fairly explicit structure.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cmd/
internal/
    api/
    config/
    database/
    handler/
pkg/
migrations/
Dockerfile
Makefile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I like this approach.&lt;/p&gt;

&lt;p&gt;If something exists in the application, I can usually find where it was created and where it was passed.&lt;/p&gt;

&lt;p&gt;Routes are registered somewhere. Dependencies are constructed somewhere. Database connections are opened somewhere.&lt;/p&gt;

&lt;p&gt;When I started using FastAPI, the same things looked very different.&lt;/p&gt;

&lt;p&gt;For example, you can define a Pydantic model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;RegisterRequest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BaseModel&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;EmailStr&lt;/span&gt;
    &lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Field&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;min_length&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then use it directly in a route:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nd"&gt;@router.post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/register&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;RegisterRequest&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="bp"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;FastAPI understands that &lt;code&gt;data&lt;/code&gt; comes from the request body. Pydantic validates it, FastAPI uses the same information for OpenAPI, and serialization is handled for you.&lt;/p&gt;

&lt;p&gt;When I first saw this, I had to stop for a moment and figure out how FastAPI knew what I wanted.&lt;/p&gt;

&lt;p&gt;In Go I was used to seeing more of this process explicitly.&lt;/p&gt;

&lt;p&gt;FastAPI did not remove request parsing or validation. It just moved them behind conventions built around Python type annotations.&lt;/p&gt;

&lt;p&gt;That became a recurring theme while learning it.&lt;/p&gt;

&lt;p&gt;Less visible code does not necessarily mean less happening.&lt;/p&gt;

&lt;h2&gt;
  
  
  Then I found &lt;code&gt;Depends&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Dependency injection felt even stranger at first.&lt;/p&gt;

&lt;p&gt;In LinkUp I have dependencies for things like the database session, Redis and the currently authenticated user.&lt;/p&gt;

&lt;p&gt;A database dependency can be represented roughly like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;SessionDep&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Annotated&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="n"&gt;AsyncSession&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nc"&gt;Depends&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;get_session&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;Then another route or dependency simply asks for &lt;code&gt;SessionDep&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;FastAPI resolves it.&lt;/p&gt;

&lt;p&gt;Coming from Go, I was much more used to something like this:&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="n"&gt;server&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;NewServer&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="n"&gt;redis&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;logger&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything is visible right there.&lt;/p&gt;

&lt;p&gt;With FastAPI, you look at a function parameter and the framework basically says:&lt;/p&gt;

&lt;p&gt;"Yeah, I know a guy."&lt;/p&gt;

&lt;p&gt;At first this felt like magic.&lt;/p&gt;

&lt;p&gt;After using it for a while, it started making more sense. The dependency graph still exists. FastAPI just lets me describe part of it declaratively instead of wiring every dependency manually.&lt;/p&gt;

&lt;p&gt;I still prefer understanding where those dependencies come from, but I no longer find the approach strange.&lt;/p&gt;

&lt;p&gt;Most of the time.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;async def&lt;/code&gt; does not make everything asynchronous
&lt;/h2&gt;

&lt;p&gt;This was probably the most important adjustment.&lt;/p&gt;

&lt;p&gt;Go gave me a fairly straightforward application-level model of concurrency.&lt;/p&gt;

&lt;p&gt;If I want to start another concurrent task, I can write:&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="k"&gt;go&lt;/span&gt; &lt;span class="n"&gt;doSomething&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The runtime obviously does a lot behind that simple line, but goroutines are a normal part of how Go programs are written.&lt;/p&gt;

&lt;p&gt;Python async works differently.&lt;/p&gt;

&lt;p&gt;In FastAPI, it is very easy to look at this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;login&lt;/span&gt;&lt;span class="p"&gt;(...):&lt;/span&gt;
    &lt;span class="bp"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and mentally classify everything inside it as asynchronous.&lt;/p&gt;

&lt;p&gt;That is not how it works.&lt;/p&gt;

&lt;p&gt;I ran into a good example while implementing authentication in LinkUp.&lt;/p&gt;

&lt;p&gt;Passwords are hashed with Argon2. Argon2 is intentionally expensive. Making password hashing computationally expensive is part of its job.&lt;/p&gt;

&lt;p&gt;But Argon2 is still synchronous CPU work.&lt;/p&gt;

&lt;p&gt;Putting that call inside an &lt;code&gt;async def&lt;/code&gt; does not suddenly make it cooperate with the event loop.&lt;/p&gt;

&lt;p&gt;If the hashing operation runs directly on the event loop thread, the loop has to wait for it to finish.&lt;/p&gt;

&lt;p&gt;So in LinkUp, password hashing and verification are moved into a thread pool:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;hash_password&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;run_in_threadpool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;password_hash&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;password&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;This was a useful reminder that &lt;code&gt;async&lt;/code&gt; is not a property that spreads through the entire function.&lt;/p&gt;

&lt;p&gt;An async PostgreSQL driver can yield while waiting for network I/O.&lt;/p&gt;

&lt;p&gt;Redis can yield.&lt;/p&gt;

&lt;p&gt;An HTTP client can yield.&lt;/p&gt;

&lt;p&gt;CPU-bound synchronous work cannot do that automatically.&lt;/p&gt;

&lt;p&gt;It sounds obvious once you understand the model, but an endpoint full of &lt;code&gt;async&lt;/code&gt; keywords can make it easy to forget what is actually happening underneath.&lt;/p&gt;

&lt;h2&gt;
  
  
  SQLAlchemy was familiar and unfamiliar at the same time
&lt;/h2&gt;

&lt;p&gt;The database side was another interesting part of the transition.&lt;/p&gt;

&lt;p&gt;The concepts were already familiar.&lt;/p&gt;

&lt;p&gt;A request needs a database session.&lt;/p&gt;

&lt;p&gt;Something fails, so the transaction should be rolled back.&lt;/p&gt;

&lt;p&gt;The session needs to be closed afterwards.&lt;/p&gt;

&lt;p&gt;None of that was new.&lt;/p&gt;

&lt;p&gt;The Python way of expressing it was.&lt;/p&gt;

&lt;p&gt;A simplified version of the LinkUp session dependency looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_session&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;session_factory&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;
        &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;rollback&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="k"&gt;raise&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;FastAPI uses the code before &lt;code&gt;yield&lt;/code&gt; as setup and the remaining part as teardown.&lt;/p&gt;

&lt;p&gt;I understood why the lifecycle worked this way before the syntax itself started feeling natural.&lt;/p&gt;

&lt;p&gt;That happened quite a lot while moving to Python.&lt;/p&gt;

&lt;p&gt;I was not relearning what a database transaction was. I was learning how the Python ecosystem usually expresses the same idea.&lt;/p&gt;

&lt;p&gt;That is a very different experience from learning backend development for the first time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The actual backend problems did not change much
&lt;/h2&gt;

&lt;p&gt;After the first few days, something else became obvious.&lt;/p&gt;

&lt;p&gt;Once I got past the syntax and framework conventions, most of the important questions were the same ones I already knew.&lt;/p&gt;

&lt;p&gt;LinkUp uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Argon2 password hashing&lt;/li&gt;
&lt;li&gt;short-lived JWT access tokens&lt;/li&gt;
&lt;li&gt;opaque refresh tokens stored in Redis&lt;/li&gt;
&lt;li&gt;refresh token rotation&lt;/li&gt;
&lt;li&gt;revocation on logout&lt;/li&gt;
&lt;li&gt;HttpOnly cookies&lt;/li&gt;
&lt;li&gt;PostgreSQL persistence&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The implementation is Python, but the questions are not Python-specific.&lt;/p&gt;

&lt;p&gt;When should a transaction commit?&lt;/p&gt;

&lt;p&gt;What happens if two registration requests try to create the same email?&lt;/p&gt;

&lt;p&gt;Where should refresh sessions live?&lt;/p&gt;

&lt;p&gt;Can a refresh token be reused?&lt;/p&gt;

&lt;p&gt;How should logout invalidate a session?&lt;/p&gt;

&lt;p&gt;What happens if a valid access token references a user that no longer exists?&lt;/p&gt;

&lt;p&gt;Python did not remove those problems.&lt;/p&gt;

&lt;p&gt;FastAPI just removed a lot of the repetitive framework code around them.&lt;/p&gt;

&lt;p&gt;That was probably the biggest change in how I looked at the framework.&lt;/p&gt;

&lt;p&gt;At first, fewer lines of code made the whole thing look simpler.&lt;/p&gt;

&lt;p&gt;Later I realized that the engineering was still there. The ratio between framework code and application code had changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Go made me notice hidden complexity
&lt;/h2&gt;

&lt;p&gt;I think starting with Go affected the way I reacted to FastAPI.&lt;/p&gt;

&lt;p&gt;Go made me used to seeing plumbing.&lt;/p&gt;

&lt;p&gt;My Go projects tend to be fairly explicit about HTTP handlers, database access, context propagation, errors and infrastructure.&lt;/p&gt;

&lt;p&gt;Sentinel goes even further with Kafka consumers, explicit delivery semantics, worker pools and transactional persistence.&lt;/p&gt;

&lt;p&gt;I eventually wrote &lt;code&gt;gofro&lt;/code&gt; because I had repeated enough of the usual setup that generating part of it became convenient.&lt;/p&gt;

&lt;p&gt;Then I moved to FastAPI and suddenly request validation, dependency injection, OpenAPI generation and quite a lot of HTTP plumbing required very little code.&lt;/p&gt;

&lt;p&gt;My first instinct was to look for what I was missing.&lt;/p&gt;

&lt;p&gt;In practice, the abstraction is usually fine. I just need to know what it is doing.&lt;/p&gt;

&lt;p&gt;An &lt;code&gt;async def&lt;/code&gt; endpoint can still contain blocking code.&lt;/p&gt;

&lt;p&gt;An ORM can still produce an inefficient query.&lt;/p&gt;

&lt;p&gt;A dependency can have the wrong lifecycle.&lt;/p&gt;

&lt;p&gt;A Pydantic schema can model the wrong contract.&lt;/p&gt;

&lt;p&gt;A transaction can still be committed at the wrong time.&lt;/p&gt;

&lt;p&gt;FastAPI does not solve backend engineering.&lt;/p&gt;

&lt;p&gt;It mostly saves me from writing some of the repetitive parts of it.&lt;/p&gt;

&lt;p&gt;I like that distinction much more than simply saying FastAPI is "easier."&lt;/p&gt;

&lt;h2&gt;
  
  
  There are still things I miss about Go
&lt;/h2&gt;

&lt;p&gt;Python is much more concise for a lot of application code.&lt;/p&gt;

&lt;p&gt;There are places in my Go projects where the equivalent Python implementation would probably be much smaller.&lt;/p&gt;

&lt;p&gt;There is less repetitive error handling, less manual DTO plumbing and generally less code needed to express common web application behavior.&lt;/p&gt;

&lt;p&gt;But explicitness has advantages too.&lt;/p&gt;

&lt;p&gt;In Go, this is boring:&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="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;especially after seeing it for the thousandth time.&lt;/p&gt;

&lt;p&gt;But I always know where the failure is being handled.&lt;/p&gt;

&lt;p&gt;In FastAPI, a small route can depend on several other functions, and part of its behavior may live somewhere deeper in that dependency graph.&lt;/p&gt;

&lt;p&gt;SQLAlchemy can express a query very compactly, but I still need to care about the SQL it eventually generates.&lt;/p&gt;

&lt;p&gt;Neither approach feels universally better to me.&lt;/p&gt;

&lt;p&gt;They just put complexity in different places.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part I liked most was realizing I did not start from zero
&lt;/h2&gt;

&lt;p&gt;This was probably the nicest part of switching stacks.&lt;/p&gt;

&lt;p&gt;My Python fluency was much lower than my familiarity with the backend problems I was trying to solve.&lt;/p&gt;

&lt;p&gt;Sometimes I had to look up a Python construction while already knowing exactly what I wanted the application to do.&lt;/p&gt;

&lt;p&gt;I could forget the syntax for an async generator dependency while still understanding why the database session needed cleanup.&lt;/p&gt;

&lt;p&gt;I could be unfamiliar with a particular SQLAlchemy API while already understanding the transaction boundary I wanted.&lt;/p&gt;

&lt;p&gt;I could still be getting used to &lt;code&gt;asyncio&lt;/code&gt; while knowing that running Argon2 directly on an event loop was a bad idea once I understood how the loop worked.&lt;/p&gt;

&lt;p&gt;The language changed.&lt;/p&gt;

&lt;p&gt;The framework changed.&lt;/p&gt;

&lt;p&gt;The libraries changed.&lt;/p&gt;

&lt;p&gt;PostgreSQL did not.&lt;/p&gt;

&lt;p&gt;Redis did not.&lt;/p&gt;

&lt;p&gt;HTTP did not.&lt;/p&gt;

&lt;p&gt;Transactions did not.&lt;/p&gt;

&lt;p&gt;Most of the problems simply appeared in a different form.&lt;/p&gt;

&lt;p&gt;I was not learning backend development again.&lt;/p&gt;

&lt;p&gt;I was translating what I already knew into another ecosystem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do I prefer FastAPI now?
&lt;/h2&gt;

&lt;p&gt;I still do not know.&lt;/p&gt;

&lt;p&gt;I am not sure I need to choose either.&lt;/p&gt;

&lt;p&gt;I like Go because the system often feels very visible. There is relatively little framework machinery between me and the application.&lt;/p&gt;

&lt;p&gt;I like FastAPI because I can describe a lot of application behavior with surprisingly little code.&lt;/p&gt;

&lt;p&gt;What changed after moving from one to the other is that I now look at convenient abstractions a little differently.&lt;/p&gt;

&lt;p&gt;Instead of assuming the complexity disappeared, I try to understand where it moved.&lt;/p&gt;

&lt;p&gt;FastAPI can make backend code feel very simple.&lt;/p&gt;

&lt;p&gt;Backend development itself is still the same problem.&lt;/p&gt;

</description>
      <category>python</category>
      <category>fastapi</category>
      <category>go</category>
      <category>backend</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>
