<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <link href="https://inhji.de"/>
  <link rel="self" href="https://inhji.de/blog.xml"/>
  <author>
    <name>JJ</name>
  </author>
  <id>https://inhji.de</id>
  <title>inhji.de</title>
  <updated>2026-07-21T14:30:00+02:00</updated>
  <entry>
    <content type="html">&lt;p&gt;&lt;strong&gt;Alternative Title: How to break up the responsibilities and power of your phone&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Phones are amazing tools. They are an extension of our brains (which basically makes us &lt;a href=&quot;https://ar.al/2019/05/02/slavery-2.0-and-how-to-avoid-it-a-practical-guide-for-cyborgs/&quot;&gt;cyborgs&lt;/a&gt;) and provide us with many tools all packed into a small formfactor.&lt;/p&gt;
&lt;p&gt;This is both their strenght and their weakness. What happens if you lose your phone? You lost access to those tools, your memories, means of authentication, means of communication, and more. You might have a backup of those things because you planned ahead. But there might be someone who also has access to these things. That means they have access to parts of your brain. Isn&apos;t that scary?&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;The problem lies in the fact that a phone has &lt;strong&gt;too many responsibilities&lt;/strong&gt;. It&apos;s responsible for getting your mail. For paying for your groceries. As a flashlight when you go into the cellar and the lights broke &lt;em&gt;again&lt;/em&gt;. For playing music on your way to work. For navigation on your way to a foreign place. For communicating with your family. For calling for help in the case of an emergency.&lt;/p&gt;
&lt;p&gt;In &apos;the olden days&apos;(tm) you would have used a different device for each of these things above:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Computer&lt;/li&gt;
&lt;li&gt;Physical credit card&lt;/li&gt;
&lt;li&gt;Flashlight&lt;/li&gt;
&lt;li&gt;MP3 player&lt;/li&gt;
&lt;li&gt;Navigation system&lt;/li&gt;
&lt;li&gt;(Dumb) Phone.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Phew, that&apos;s a lot of devices. Why would I go through so much of hassle when I can just use my phone?&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;The answer for me, again, comes down to responsibility. You know what they say:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;With great responsibility comes great.. power?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Exactly. I don&apos;t want one device to have so much power over my life.&lt;/p&gt;
&lt;p&gt;But to be honest: I&apos;ve not gotten very far.&lt;/p&gt;
&lt;h2&gt;Payments&lt;/h2&gt;
&lt;p&gt;I ventured into using my phone for payments but because of the hard dependency of a google-infested surveillance device for doing so, I quickly stopped that. These days I hate using cash and use a card whenever possible, but honestly, I don&apos;t see a reason to use my phone for payments, other than scratching my &apos;new tech, shiny tech&apos; itch.&lt;/p&gt;
&lt;h2&gt;Flashlight&lt;/h2&gt;
&lt;p&gt;I own a flashlight, which I can use instead of my phone. The biggest reason I do is: &lt;em&gt;I feel like a fucking spy from teh movies doing it&lt;/em&gt; 😆&lt;/p&gt;
&lt;h2&gt;Email&lt;/h2&gt;
&lt;p&gt;Yeah, I&apos;m checking email on my computer. But 95% of the time, I do it on my phone. It&apos;s muscle memory at this point. It&apos;s not the worst thing to do on your phone, rarely addicting.&lt;/p&gt;
&lt;h2&gt;Music&lt;/h2&gt;
&lt;p&gt;Ah, this one is a biggie. I listen to music almost 24/7. Even when I sleep. I have a deep urge to untangle my phone and listening to music and just buy an MP3 Player. But I&apos;ve also gotten very much used to my own streaming service based on navidrome and bandcampsync which updates my collection automatically everytime I buy and album on Bandcamp.&lt;/p&gt;
&lt;p&gt;And these two goals, &lt;em&gt;local music on a dedicated device&lt;/em&gt; and &lt;em&gt;using a niche, selfhosted music streaming service&lt;/em&gt; seem utterly incompatible at the present time.&lt;/p&gt;
&lt;h2&gt;Navigation&lt;/h2&gt;
&lt;p&gt;I use a cycle computer for doing longer bike trips. It saves me from draining my phones battery. Great. 10/10, no notes.&lt;/p&gt;
&lt;p&gt;For other use cases, I believe that a smartphone is perfect for displaying a map and directions. If you are using a privacy conscious one like OSMAnd, CoMaps, etc., even better.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Foto von &lt;a href=&quot;https://unsplash.com/de/@raimondklavins?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText&quot;&gt;Raimond Klavins&lt;/a&gt; auf &lt;a href=&quot;https://unsplash.com/de/fotos/blau-orange-und-weisses-blumentextil-Ql6JhGdbQg0?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText&quot;&gt;Unsplash&lt;/a&gt;&lt;/p&gt;</content>
    <author>
      <name>JJ</name>
      <uri>https://inhji.de</uri>
    </author>
    <link href="https://inhji.de/posts/hardware-decentralization"/>
    <id>https://inhji.de/posts/hardware-decentralization</id>
    <title>Hardware Decentralization</title>
    <updated>2026-07-21T12:30:00Z</updated>
  </entry>
  <entry>
    <content type="html">&lt;p&gt;I work as a software developer in a small team. We all know and like each other, even though we don&apos;t see each other very often. Most of us work from home, so we mostly meet on Teams.&lt;/p&gt;
&lt;p&gt;As a software developer, I mostly solve problems. That&apos;s the most honest and true description of my job. Wether it&apos;s fixing a bug, developing a new feature or just doing research on a new topic, my mind is in problem solving mode.&lt;/p&gt;
&lt;p&gt;When you solve problems, there &lt;em&gt;will&lt;/em&gt; be times when you don&apos;t have a clear direction. When you&apos;re unsure what to do next. Maybe you need to take a walk. Or talk to a colleague to get a fresh perspective. Maybe you draw out your problem on a sheet of paper to get a better view of the bits and pieces that make up the problem and its environment.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Nobody would see a person looking to get a different perspective or a bit of distance to something as somebody who failed at what they are doing. Asking for help is human. Sleeping over a problem and waking up with the solution is human.&lt;/p&gt;
&lt;p&gt;Yet, when I get to a certain point of frustration about a problem that &lt;em&gt;seems&lt;/em&gt; to hard to solve, my instincts tell me to turn inwards, instead of outwards. Internalize the frustration. Try harder. And most importantly: Don&apos;t admit your failure.&lt;/p&gt;
&lt;p&gt;What used to be a challenge in my professional environment, now spreads into my personal life, poisoning seemingly unrelated aspects of me, like my relationships, my perception of myself and of others, my selfesteem, even my sensitivity to sound.&lt;/p&gt;
&lt;p&gt;The best way for me to describe this process: I take this (percieved) failure personally.&lt;/p&gt;
&lt;p&gt;It&apos;s not a problem with npm dependencies or a new concept for a screen in the application I&apos;m working on, it&apos;s an attack on my self. The way I defend myself from these attacks is simple, effective and wrong to the core. I shut myself. I let nobody come close to me. I become distant, even to the people close to me. I start devaluing others and my self.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;What it takes to get back to myself, to stop this downward spiral of negativity, is a phase of &amp;quot;Release&amp;quot;. To let off steam, if you will. This can mean going on a bike ride, until my legs feel like jelly and my lungs are burning. Which is the more positive situation.&lt;/p&gt;
&lt;p&gt;The less positive situation is when I burst out at somebody because of something &lt;em&gt;COMPLETELY&lt;/em&gt; unrelated, which hurts them (and myself indirectly, because it&apos;s usually somebody close to me).&lt;/p&gt;
&lt;p&gt;The worst way this ends is what I experienced last year. After months and months of built up frustration, my psyche decided it needed a break and&lt;/p&gt;
&lt;div class=&quot;markdown-alert markdown-alert-caution&quot;&gt;
&lt;p class=&quot;markdown-alert-title&quot;&gt;Caution&lt;/p&gt;
&lt;p&gt;Brain.exe has stopped working.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;I spent 6 weeks in hospital and 4 weeks more to get back to my normal work load. Something changed in me after coming back to work. I was more open to my colleagues and felt a lot better about myself.&lt;/p&gt;
&lt;p&gt;Today is the first day since then, where I can feel a bit of that poison creeping back up to me.&lt;/p&gt;
&lt;p&gt;So this is a reminder to myself and to anybody who experienced this, to turn outwards.&lt;/p&gt;</content>
    <author>
      <name>JJ</name>
      <uri>https://inhji.de</uri>
    </author>
    <link href="https://inhji.de/posts/turning-outwards-3q354"/>
    <id>https://inhji.de/posts/turning-outwards-3q354</id>
    <title>Turning outwards</title>
    <updated>2026-06-16T12:11:00Z</updated>
  </entry>
  <entry>
    <content type="html">&lt;p&gt;I have just added a link to my blog on my navbar. It now leads to a few unfinished, unpolished posts with layout problems and questionable design choices, all made by me. I&apos;m tempted to see this as a problem, as a reason to start despising the site and project as a whole. I could start over. And this time I would make it better. I would fix all the issues &lt;strong&gt;I, myself&lt;/strong&gt; have with the site &lt;strong&gt;before&lt;/strong&gt; it goes online. Nobody would notice how much of a bad writer and developer I am. Right? Right???&lt;/p&gt;
&lt;p&gt;This time, I will not give in to the temptation. Just leave this site as it is. Imperfect, broken, human, I guess. This time, I continue to post whimsical ramblings that mostly are a reflection of my current mood.&lt;/p&gt;
&lt;p&gt;I&apos;ll not delete my old posts, just keep on piling up the new ones until, someday maybe, I can look back and see how far I&apos;ve come.&lt;/p&gt;</content>
    <author>
      <name>JJ</name>
      <uri>https://inhji.de</uri>
    </author>
    <link href="https://inhji.de/posts/my-site-is-a-mess-72fpv"/>
    <id>https://inhji.de/posts/my-site-is-a-mess-72fpv</id>
    <title>My site is a mess</title>
    <updated>2026-06-10T11:41:10Z</updated>
  </entry>
  <entry>
    <content type="html">&lt;script type=&quot;module&quot;&gt;
  import mermaid from &apos;https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs&apos;;
  const theme = window.matchMedia &amp;&amp; window.matchMedia(&apos;(prefers-color-scheme: dark)&apos;).matches ? &apos;dark&apos; : &apos;default&apos;;
  mermaid.initialize({securityLevel: &apos;loose&apos;, theme: theme});
&lt;/script&gt;
&lt;p&gt;Today I spent the whole day at work coding up a completely work-unrelated thing: A deploy pipeline for my website. For every push to the main branch, a webhook triggers a pull and a rebuild of the code. There is also a smol ci pipeline, which runs the tests and checks if they pass. If yes, the webhook is called.&lt;/p&gt;
&lt;p&gt;It replaced the bash script I had before which was ssh-ing into my server and manually building the code. It was working fine, but had some limitations. The biggest was that I could only deploy from my laptop. The code was copied using rsync which works fine if you configure it correctly (&lt;em&gt;Narrator: he did not&lt;/em&gt;). So I ended up wiping my uploads folder a few times when deploying. Not fun.&lt;/p&gt;
&lt;p&gt;The new workflow goes something like this:&lt;/p&gt;
&lt;pre id=&quot;mermaid-1&quot; class=&quot;mermaid&quot; phx-update=&quot;ignore&quot;&gt;flowchart TB
  A1[git push] --&amp;gt; A2[Forgejo Action]
  A2 --&amp;gt; A3[webhook]
  A3 --&amp;gt; A4[build.sh]
  A4 --&amp;gt; A5[git pull]
  A5 --&amp;gt; A6[mix build]
&lt;/pre&gt;
&lt;p&gt;This shit is very barebones and probably insecure:&lt;/p&gt;
&lt;pre class=&quot;lumis lumis-themes zenwritten_dark zenwritten_light&quot; style=&quot;color: light-dark(#353535, #bbbbbb); background-color: light-dark(#eeeeee, #191919);&quot;&gt;&lt;code class=&quot;language-yaml&quot; translate=&quot;no&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;l-line&quot; data-line=&quot;1&quot;&gt;on:&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;2&quot;&gt;  push:&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;3&quot;&gt;    branches:&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;4&quot;&gt;      - main&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;5&quot;&gt;jobs:&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;6&quot;&gt;  compile:&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;7&quot;&gt;    runs-on: elixir&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;8&quot;&gt;    steps:&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;9&quot;&gt;      - name: Update APT &lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;10&quot;&gt;        run: apt update&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;11&quot;&gt;      - name: Install Node.js&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;12&quot;&gt;        run: apt install nodejs -y&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;13&quot;&gt;      - name: Checkout repo &lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;14&quot;&gt;        uses: https://data.forgejo.org/actions/checkout@v6&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;15&quot;&gt;      - name: Install Mix Deps&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;16&quot;&gt;        run: mix deps.get&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;17&quot;&gt;      - name: Compile Mix Deps and Setup Database&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;18&quot;&gt;        run: MIX_ENV=test mix ecto.setup&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;19&quot;&gt;      - name: Run Tests&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;20&quot;&gt;        run: mix test&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I feel like there could be more done and I just hope there is a better way, but for now, this is crazy cool. I&apos;ve never used a pipeline like this, so this feels very rocket-science 😆&lt;/p&gt;</content>
    <author>
      <name>JJ</name>
      <uri>https://inhji.de</uri>
    </author>
    <link href="https://inhji.de/posts/a-poor-mans-deployment-pipeline"/>
    <id>https://inhji.de/posts/a-poor-mans-deployment-pipeline</id>
    <title>A poor man&apos;s deployment pipeline</title>
    <updated>2026-05-08T07:39:18Z</updated>
  </entry>
  <entry>
    <content type="html">&lt;p&gt;After &lt;a href=&quot;/posts/regoogling-my-phone&quot; data-wikilink=&quot;true&quot;&gt;ReGoogling my phone&lt;/a&gt; a few days back, I also needed to factory reset it. I&apos;m in the process of getting everything set up again, which gives me time to reconsider all the apps that I had installed before. So I will share a list of apps that I have installed right now, and probably will update this list when I finish my setup.&lt;/p&gt;
&lt;h2&gt;The essentials&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Firefox&lt;/strong&gt; The only option for me, as far as Base Browsers go. I might switch to Iron Fox later.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Whatsapp&lt;/strong&gt; A necessary evil because all my socializing happens here.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FairEmail&lt;/strong&gt; It&apos;s a rock-solid email client with tons of well thought options.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bitwarden&lt;/strong&gt; My password manager of choice. Probably the first app I install.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Davx5&lt;/strong&gt; Essential for syncing my contacts and calenders.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MVGO&lt;/strong&gt; My only transportation app besides the DB App. It covers everything I need to get around in Munich.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tailscale&lt;/strong&gt; Doubles as a tunnel to my homenet and a way to use Mullvad VPN&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Nextcloud Notes&lt;/strong&gt; Better than Carnet.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Immich&lt;/strong&gt; My photo storage &amp;amp; backup service of choice&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Paperless Mobile&lt;/strong&gt; Lets me access my documents on the go&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DigiCal&lt;/strong&gt; The only calendar app I know of which has a week view which doesn&apos;t suck.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linkwarden&lt;/strong&gt; The mobile app for Linkwarden, the bookmark manager.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Symphonium&lt;/strong&gt; The best music player app.&lt;/li&gt;
&lt;/ul&gt;</content>
    <author>
      <name>JJ</name>
      <uri>https://inhji.de</uri>
    </author>
    <link href="https://inhji.de/posts/whats-on-my-phone-in-2026"/>
    <id>https://inhji.de/posts/whats-on-my-phone-in-2026</id>
    <title>What&apos;s on my phone in 2026</title>
    <updated>2026-04-29T07:01:29Z</updated>
  </entry>
  <entry>
    <content type="html">&lt;p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/files/images/FE43AFE888763DA3BBEE49501BAA25B46E84CFFA-original.png?v=63944602830&quot; alt=&quot;&quot; title=&quot;/tmp/plug-1695-VbZP/live_view_upload-1777383628-267747297191-1&quot; /&gt;&lt;em&gt;/tmp/plug-1695-VbZP/live_view_upload-1777383628-267747297191-1&lt;/em&gt;&lt;/p&gt;
&lt;/p&gt;
&lt;p&gt;I caved. I finally caved. After almost 10 years of using a (mostly) google-free phone, I decided to go back to having a fully goggled phone. The catalyst was the app of my Krankenkasse suddenly refusing to work, after it checked my phone for &amp;quot;security&amp;quot;. Yesterday I wiped my phone at least 3 times and came the conclusion that the ONLY way to run this app is with the original ROM (Fairphone OS in my case) &lt;strong&gt;AND&lt;/strong&gt; the bootloaded locked.&lt;/p&gt;
&lt;p&gt;I was using iodeOS with an unlocked bootloader for a few years before and was enjoying most apps working perfectly, plus fast updates and the newest android version.&lt;/p&gt;
&lt;p&gt;While I applaud my Krankenkasse for enforcing high security standards, I still believe that using custom ROM will not decrease the security of your phone. The bootloader is a security risk, depending on your threat model. The iodeOS adblocker has been increasing the security on my phone, IMHO.&lt;/p&gt;
&lt;p&gt;But like I said, I caved. For now, I&apos;m &lt;em&gt;fucking&lt;/em&gt; done playing this DeGoogling game of cat and mouse. This case has once again demonstrated that while it&apos;s pretty easy to avoid the google &lt;em&gt;apps&lt;/em&gt;  and even the &lt;em&gt;services&lt;/em&gt; (Drive, Search, Maps, you name it) with a bit of determination, you &lt;em&gt;CANNOT&lt;/em&gt; escape the power of the &lt;strong&gt;PLATFORM&lt;/strong&gt; that is Android and Google Play Services. Android is &lt;strong&gt;NOT&lt;/strong&gt; an open platform. It is a tightly closed and guarded fortress and if you want to play in googles playgroud, you better play by the &lt;em&gt;fucking&lt;/em&gt; rules.&lt;/p&gt;
&lt;p&gt;And since tech literacy seems to be a luxury that not many people can afford, which I don&apos;t blame them for, google keeps its power and gets to decide what you can and cannot do on Android.&lt;/p&gt;
&lt;p&gt;I &lt;strong&gt;fucking&lt;/strong&gt; hate it. But right now, I need this Krankenkasse app to work. Right now, that&apos;s more important than my ideals.&lt;/p&gt;</content>
    <author>
      <name>JJ</name>
      <uri>https://inhji.de</uri>
    </author>
    <link href="https://inhji.de/posts/regoogling-my-phone"/>
    <id>https://inhji.de/posts/regoogling-my-phone</id>
    <title>ReGoogling my phone</title>
    <updated>2026-04-28T13:40:45Z</updated>
  </entry>
  <entry>
    <content type="html">&lt;p&gt;A short tutorial how to configure uploads with Phoenix Framework.&lt;/p&gt;
&lt;h2&gt;The problem&lt;/h2&gt;
&lt;p&gt;It&apos;s confusing because there are different system which work with different paths:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Browser&lt;/strong&gt;: &lt;a href=&quot;https://inhji.de/uploads/files/images/cat.jpg&quot;&gt;https://inhji.de/uploads/files/images/cat.jpg&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;This is the public path&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Caddy&lt;/strong&gt;: /var/www/hajur/uploads/files/images/cat.png
&lt;ul&gt;
&lt;li&gt;This is the physical path of the image on disk&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Waffle Config&lt;/strong&gt;: /var/www/hajur
&lt;ul&gt;
&lt;li&gt;This is the &lt;em&gt;base&lt;/em&gt; path that all image files should be placed in&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Image Uploader&lt;/strong&gt;: uploads/files/images
&lt;ul&gt;
&lt;li&gt;This is the specific path for this kind of image&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Configuration&lt;/h2&gt;
&lt;h3&gt;Waffle&lt;/h3&gt;
&lt;p&gt;In our &lt;code&gt;config.exs&lt;/code&gt;, we define the default path for uploads. This is only used for &lt;em&gt;dev&lt;/em&gt; and &lt;em&gt;test&lt;/em&gt; environments.&lt;/p&gt;
&lt;pre class=&quot;lumis lumis-themes zenwritten_dark zenwritten_light&quot; style=&quot;color: light-dark(#353535, #bbbbbb); background-color: light-dark(#eeeeee, #191919);&quot;&gt;&lt;code class=&quot;language-elixir&quot; translate=&quot;no&quot; tabindex=&quot;0&quot; style=&quot;display: block; width: fit-content; min-width: 100%; overflow-wrap: anywhere;&quot;&gt;&lt;span class=&quot;l-line&quot; data-line=&quot;1&quot;&gt;config :waffle,&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;2&quot;&gt;  storage: Waffle.Storage.Local,&lt;/span&gt;
&lt;span class=&quot;l-line&quot; style=&quot;display: inline-block; width: 100%; min-height: 1lh; vertical-align: top; background-color: #3b4252;&quot; data-line=&quot;3&quot;&gt;  storage_dir_prefix: &amp;quot;priv/waffle/public&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For production, we place a &lt;code&gt;UPLOAD_DIR&lt;/code&gt; variable in our &lt;code&gt;.env&lt;/code&gt; file which will then replace our &lt;code&gt;storage_dir_prefix&lt;/code&gt; option:&lt;/p&gt;
&lt;pre class=&quot;lumis lumis-themes zenwritten_dark zenwritten_light&quot; style=&quot;color: light-dark(#353535, #bbbbbb); background-color: light-dark(#eeeeee, #191919);&quot;&gt;&lt;code class=&quot;language-elixir&quot; translate=&quot;no&quot; tabindex=&quot;0&quot; style=&quot;display: block; width: fit-content; min-width: 100%; overflow-wrap: anywhere;&quot;&gt;&lt;span class=&quot;l-line&quot; data-line=&quot;1&quot;&gt;upload_dir =&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;2&quot;&gt;  System.get_env(&amp;quot;UPLOAD_DIR&amp;quot;) ||&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;3&quot;&gt;    raise &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;4&quot;&gt;    environment variable UPLOAD_DIR is missing.&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;5&quot;&gt;    It should look like: /var/www/hajur/files&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;6&quot;&gt;    &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;l-line&quot; style=&quot;display: inline-block; width: 100%; min-height: 1lh; vertical-align: top;&quot; data-line=&quot;7&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;8&quot;&gt;config :waffle,&lt;/span&gt;
&lt;span class=&quot;l-line&quot; style=&quot;display: inline-block; width: 100%; min-height: 1lh; vertical-align: top; background-color: #3b4252;&quot; data-line=&quot;9&quot;&gt;  storage_dir_prefix: upload_dir&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Image Uploader&lt;/h3&gt;
&lt;p&gt;I&apos;m dithering all images and also create a smaller version as well as a very small thumbnail. The final filename is created by hashing the filename of the uploaded file. The &lt;code&gt;storage_dir&lt;/code&gt; is the thing that needs to match the caddy configuration.&lt;/p&gt;
&lt;pre class=&quot;lumis lumis-themes zenwritten_dark zenwritten_light&quot; style=&quot;color: light-dark(#353535, #bbbbbb); background-color: light-dark(#eeeeee, #191919);&quot;&gt;&lt;code class=&quot;language-elixir&quot; translate=&quot;no&quot; tabindex=&quot;0&quot; style=&quot;display: block; width: fit-content; min-width: 100%; overflow-wrap: anywhere;&quot;&gt;&lt;span class=&quot;l-line&quot; data-line=&quot;1&quot;&gt;defmodule Hajur.Content.ImageUploader do&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;2&quot;&gt;  use Waffle.Definition&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;3&quot;&gt;  use Waffle.Ecto.Definition&lt;/span&gt;
&lt;span class=&quot;l-line&quot; style=&quot;display: inline-block; width: 100%; min-height: 1lh; vertical-align: top;&quot; data-line=&quot;4&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;5&quot;&gt;  @versions [:original, :full, :thumb]&lt;/span&gt;
&lt;span class=&quot;l-line&quot; style=&quot;display: inline-block; width: 100%; min-height: 1lh; vertical-align: top;&quot; data-line=&quot;6&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;7&quot;&gt;  # Whitelist file extensions:&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;8&quot;&gt;  def validate({_file, _post}) do&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;9&quot;&gt;    true&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;10&quot;&gt;  end&lt;/span&gt;
&lt;span class=&quot;l-line&quot; style=&quot;display: inline-block; width: 100%; min-height: 1lh; vertical-align: top;&quot; data-line=&quot;11&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;12&quot;&gt;  def transform(:original, _) do&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;13&quot;&gt;    {:magick, &amp;quot;-auto-orient -colors 24 -dither FloydSteinberg -format png&amp;quot;, :png}&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;14&quot;&gt;  end&lt;/span&gt;
&lt;span class=&quot;l-line&quot; style=&quot;display: inline-block; width: 100%; min-height: 1lh; vertical-align: top;&quot; data-line=&quot;15&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;16&quot;&gt;  def transform(:full, _) do&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;17&quot;&gt;    {:magick,&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;18&quot;&gt;     &amp;quot;-auto-orient -resize 1280x1024&amp;gt; -background #ffffff00 -gravity center -extent 1280x1024 -colors 24 -dither FloydSteinberg -format png&amp;quot;,&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;19&quot;&gt;     :png}&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;20&quot;&gt;  end&lt;/span&gt;
&lt;span class=&quot;l-line&quot; style=&quot;display: inline-block; width: 100%; min-height: 1lh; vertical-align: top;&quot; data-line=&quot;21&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;22&quot;&gt;  def transform(:thumb, _) do&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;23&quot;&gt;    {:magick,&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;24&quot;&gt;     &amp;quot;-auto-orient -resize 250x250&amp;gt; -background #ffffff00 -gravity center -extent 250x250 -colors 24 -dither FloydSteinberg -format png&amp;quot;,&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;25&quot;&gt;     :png}&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;26&quot;&gt;  end&lt;/span&gt;
&lt;span class=&quot;l-line&quot; style=&quot;display: inline-block; width: 100%; min-height: 1lh; vertical-align: top;&quot; data-line=&quot;27&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;28&quot;&gt;  # Override the persisted filenames:&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;29&quot;&gt;  def filename(version, {file, _post_image} = _scope) do&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;30&quot;&gt;    hash = :crypto.hash(:sha, file.file_name) |&amp;gt; Base.encode16()&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;31&quot;&gt;    &amp;quot;#{hash}-#{version}&amp;quot;&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;32&quot;&gt;  end&lt;/span&gt;
&lt;span class=&quot;l-line&quot; style=&quot;display: inline-block; width: 100%; min-height: 1lh; vertical-align: top;&quot; data-line=&quot;33&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;34&quot;&gt;  # Override the storage directory:&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;35&quot;&gt;  def storage_dir(_version, {_file, _post}) do&lt;/span&gt;
&lt;span class=&quot;l-line&quot; style=&quot;display: inline-block; width: 100%; min-height: 1lh; vertical-align: top; background-color: #3b4252;&quot; data-line=&quot;36&quot;&gt;    &amp;quot;uploads/files/images&amp;quot;&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;37&quot;&gt;  end&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;38&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Caddy&lt;/h3&gt;
&lt;p&gt;I tried using rewrite without the wrapping &lt;code&gt;handle&lt;/code&gt; block which did not work. In the end, I added the &lt;code&gt;file_server&lt;/code&gt; directive. I have a feeling that that might have been the problem all along.&lt;/p&gt;
&lt;p&gt;We are matching for requests which begin with &lt;code&gt;/uploads&lt;/code&gt; and rewrite them to the actual directory where uploads are placed by the server. This will rewrite a url like:&lt;/p&gt;
&lt;pre class=&quot;lumis lumis-themes zenwritten_dark zenwritten_light&quot; style=&quot;color: light-dark(#353535, #bbbbbb); background-color: light-dark(#eeeeee, #191919);&quot;&gt;&lt;code class=&quot;language-plaintext&quot; translate=&quot;no&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;l-line&quot; data-line=&quot;1&quot;&gt;https://inhji.de/uploads/files/images/somehash-full.png&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;pre class=&quot;lumis lumis-themes zenwritten_dark zenwritten_light&quot; style=&quot;color: light-dark(#353535, #bbbbbb); background-color: light-dark(#eeeeee, #191919);&quot;&gt;&lt;code class=&quot;language-plaintext&quot; translate=&quot;no&quot; tabindex=&quot;0&quot;&gt;&lt;span class=&quot;l-line&quot; data-line=&quot;1&quot;&gt;/var/www/hajur/uploads/files/images/somehash-full.png&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lumis lumis-themes zenwritten_dark zenwritten_light&quot; style=&quot;color: light-dark(#353535, #bbbbbb); background-color: light-dark(#eeeeee, #191919);&quot;&gt;&lt;code class=&quot;language-caddy&quot; translate=&quot;no&quot; tabindex=&quot;0&quot; style=&quot;display: block; width: fit-content; min-width: 100%; overflow-wrap: anywhere;&quot;&gt;&lt;span class=&quot;l-line&quot; data-line=&quot;1&quot;&gt;inhji.de {&lt;/span&gt;
&lt;span class=&quot;l-line&quot; style=&quot;display: inline-block; width: 100%; min-height: 1lh; vertical-align: top; background-color: #3b4252;&quot; data-line=&quot;2&quot;&gt;  @uploads path /uploads/*&lt;/span&gt;
&lt;span class=&quot;l-line&quot; style=&quot;display: inline-block; width: 100%; min-height: 1lh; vertical-align: top; background-color: #3b4252;&quot; data-line=&quot;3&quot;&gt;  handle @uploads {&lt;/span&gt;
&lt;span class=&quot;l-line&quot; style=&quot;display: inline-block; width: 100%; min-height: 1lh; vertical-align: top; background-color: #3b4252;&quot; data-line=&quot;4&quot;&gt;    file_server&lt;/span&gt;
&lt;span class=&quot;l-line&quot; style=&quot;display: inline-block; width: 100%; min-height: 1lh; vertical-align: top; background-color: #3b4252;&quot; data-line=&quot;5&quot;&gt;    rewrite * /var/www/hajur/{path}&lt;/span&gt;
&lt;span class=&quot;l-line&quot; style=&quot;display: inline-block; width: 100%; min-height: 1lh; vertical-align: top; background-color: #3b4252;&quot; data-line=&quot;6&quot;&gt;  }&lt;/span&gt;
&lt;span class=&quot;l-line&quot; style=&quot;display: inline-block; width: 100%; min-height: 1lh; vertical-align: top;&quot; data-line=&quot;7&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;8&quot;&gt;  reverse_proxy * localhost:9000&lt;/span&gt;
&lt;span class=&quot;l-line&quot; data-line=&quot;9&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
    <author>
      <name>JJ</name>
      <uri>https://inhji.de</uri>
    </author>
    <link href="https://inhji.de/posts/file-uploads-with-phoenix-live-view-waffle-and-caddy"/>
    <id>https://inhji.de/posts/file-uploads-with-phoenix-live-view-waffle-and-caddy</id>
    <title>File Uploads with Phoenix Live View, Waffle and Caddy</title>
    <updated>2026-04-26T21:14:12Z</updated>
  </entry>
  <entry>
    <content type="html">&lt;p&gt;We recently got a &lt;a href=&quot;/posts/new-internet&quot; data-wikilink=&quot;true&quot;&gt;new-internet&lt;/a&gt;, and with it a strange error returned I thought I fixed long ago.&lt;/p&gt;
&lt;p&gt;I have a subdomain of inhji.de which resolves to a address in my local network. This way I can have an domain like &lt;code&gt;jellyfin.nas.inhji.de&lt;/code&gt; with a valid certificate and have it resolve to a local address.&lt;/p&gt;
&lt;p&gt;When I set up the new modem, I realized that the default address space is &lt;code&gt;192.168.2.0/24&lt;/code&gt;, whereas before it was &lt;code&gt;192.168.1.0/24&lt;/code&gt;. This meant I needed to setup all devices again with new ip addresses.&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/files/images/22957D5B43230E0C199B462CD9790CA7C90D9C7A-original.png?v=63944456119&quot; alt=&quot;&quot; title=&quot;Nginx Hosts&quot; /&gt;&lt;em&gt;Nginx Hosts&lt;/em&gt;&lt;/p&gt;

&lt;em&gt;Nginx Proxy Manager Hosts&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So I updated the Hosts on my Nginx, and thought everything would just work. And it did. But only sometimes. Sometimes the names would just not resolve.&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/files/images/A925581F3993411D8326C3702B6C8366EBA7B2E5-original.png?v=63944455747&quot; alt=&quot;&quot; title=&quot;DNS Rewrites&quot; /&gt;&lt;em&gt;DNS Rewrites&lt;/em&gt;&lt;/p&gt;

&lt;em&gt;AdGuard DNS Rewrites&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So I started looking for solutions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I added a DNS Rewrite in my AdGuardHome, which serves as my DNS and DHCP Server&lt;/li&gt;
&lt;li&gt;I double-checked if my modem was not still running a DHCP server&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After a few days, I suddenly remembered that it could have something to do with my tailscale network. I quickly checked the settings and found the problem.&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;&lt;img src=&quot;/uploads/files/images/F1FDA50F0B30A2EC12667A124DDC4CFD6695D1C6-original.png?v=63945459687&quot; alt=&quot;&quot; title=&quot;Tailscale Nameservers&quot; /&gt;&lt;em&gt;Tailscale Nameservers&lt;/em&gt;&lt;/p&gt;
&lt;/p&gt;
&lt;p&gt;In tailscale I had added a custom nameserver to resolve my &apos;local domain&apos; with my local DNS server. That entry still had an address in my old ip range. Which made all lookups fail. No idea why it worked sometimes, but after I added the correct address of my DNS server here, the problem was solved!&lt;/p&gt;</content>
    <author>
      <name>JJ</name>
      <uri>https://inhji.de</uri>
    </author>
    <link href="https://inhji.de/posts/this-one-weird-trick-fixed-my-dns-clickbait"/>
    <id>https://inhji.de/posts/this-one-weird-trick-fixed-my-dns-clickbait</id>
    <title>This one weird trick fixed my DNS (clickbait)</title>
    <updated>2026-04-26T21:04:18Z</updated>
  </entry>
</feed>