<?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: OmkarBhede</title>
    <description>The latest articles on DEV Community by OmkarBhede (@omkarbhede).</description>
    <link>https://dev.to/omkarbhede</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F974192%2F7b4093cb-b1ef-48e7-8791-d1ba70a62a40.jpeg</url>
      <title>DEV Community: OmkarBhede</title>
      <link>https://dev.to/omkarbhede</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/omkarbhede"/>
    <language>en</language>
    <item>
      <title>Keep Your Immich Server Up-to-Date 🚀</title>
      <dc:creator>OmkarBhede</dc:creator>
      <pubDate>Fri, 26 Sep 2025 07:51:38 +0000</pubDate>
      <link>https://dev.to/omkarbhede/keep-your-immich-server-up-to-date-hpc</link>
      <guid>https://dev.to/omkarbhede/keep-your-immich-server-up-to-date-hpc</guid>
      <description>&lt;p&gt;Running your own Immich server is awesome, but keeping it updated can be a tiny hassle. Here’s a simple Bash script that checks your current version, compares it with the latest GitHub release, and even helps you update safely.&lt;/p&gt;

&lt;p&gt;How it Works:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Check Current Version – Pulls your running Immich version via API.&lt;/li&gt;
&lt;li&gt;Check Latest Release – Fetches the latest release from GitHub.&lt;/li&gt;
&lt;li&gt;Compare Versions – Detects major, minor, or patch updates.&lt;/li&gt;
&lt;li&gt;Update Easily – Prompts you to update, then pulls the new Docker image and restarts the server.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;How to find api token?&lt;br&gt;
go to settings &amp;gt; API keys &amp;gt; New API key [only server permission is required]&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8g4lltzrp7mmunjohfad.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8g4lltzrp7mmunjohfad.png" alt="immich api token step" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡 Community tip: You can even run this on a cron job to get regular reminders about updates.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash
set -e

# -------------------------------
# Configuration
# -------------------------------
IMMICH_PORT=xxxxx
IMMICH_API_KEY="xxxxx"

# -------------------------------
# Function to get current Immich version
# -------------------------------
get_current_version() {
  RESPONSE=$(curl -s -H "x-immich-api-key: $IMMICH_API_KEY" \
      http://localhost:$IMMICH_PORT/api/server/version)

  # Extract version from major.minor.patch
  VERSION=$(echo "$RESPONSE" | sed -n 's/.*"major":\([0-9]*\).*"minor":\([0-9]*\).*"patch":\([0-9]*\).*/\1.\2.\3/p')

  if [[ -z "$VERSION" ]]; then
    VERSION="unknown"
  fi
  echo "$VERSION"   # NO 'v' prefix here
}

# -------------------------------
# Function to get latest release from GitHub
# -------------------------------
get_latest_version() {
  TAG=$(curl -s https://api.github.com/repos/immich-app/immich/releases/latest \
    | sed -n 's/.*"tag_name": *"\([^"]*\)".*/\1/p')

  # Strip leading 'v' if present
  echo "${TAG#v}"
}

# -------------------------------
# Compare versions
# -------------------------------
compare_versions() {
  IFS='.' read -r c_major c_minor c_patch &amp;lt;&amp;lt;&amp;lt; "$1"
  IFS='.' read -r l_major l_minor l_patch &amp;lt;&amp;lt;&amp;lt; "$2"

  if [[ "$c_major" -lt "$l_major" ]]; then
    echo "major"
  elif [[ "$c_minor" -lt "$l_minor" ]]; then
    echo "minor"
  elif [[ "$c_patch" -lt "$l_patch" ]]; then
    echo "patch"
  else
    echo "none"
  fi
}

# -------------------------------
# Main script
# -------------------------------
echo "🔍 Checking Immich versions..."

CURRENT_VERSION=$(get_current_version)
LATEST_VERSION=$(get_latest_version)

if [[ -z "$LATEST_VERSION" ]]; then
  LATEST_VERSION="unknown"
fi

echo "➡️  Current running version: v$CURRENT_VERSION"
echo "➡️  Latest available version: v$LATEST_VERSION"

if [[ "$CURRENT_VERSION" == "$LATEST_VERSION" ]] || [[ "$LATEST_VERSION" == "unknown" ]]; then
  echo "✅ No update required. You are running the latest version."
  exit 0
fi

UPDATE_TYPE=$(compare_versions "$CURRENT_VERSION" "$LATEST_VERSION")

case $UPDATE_TYPE in
  major)
    echo "⚠️  Major update available!"
    ;;
  minor)
    echo "ℹ️  Minor update available."
    ;;
  patch)
    echo "🔧 Patch update available."
    ;;
esac

read -p "Do you want to update Immich to v$LATEST_VERSION? (y/n): " confirm

if [[ "$confirm" =~ ^[Yy]$ ]]; then
  echo "🚀 Updating Immich..."
  docker compose down
  docker compose pull
  docker compose up -d
  echo "✅ Immich update complete."
else
  echo "❌ Update cancelled."
fi

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>bash</category>
      <category>docker</category>
      <category>opensource</category>
      <category>automation</category>
    </item>
    <item>
      <title>Why I hate Dotenv ?</title>
      <dc:creator>OmkarBhede</dc:creator>
      <pubDate>Sat, 23 Sep 2023 23:04:21 +0000</pubDate>
      <link>https://dev.to/omkarbhede/why-i-hate-dotenv--2fbd</link>
      <guid>https://dev.to/omkarbhede/why-i-hate-dotenv--2fbd</guid>
      <description>&lt;p&gt;I have built FREE tool to deal with this problem. &lt;a href="https://www.envvaults.com/"&gt;link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jzb5c0Fw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2kxmfjxoy7pa5l4oix8q.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jzb5c0Fw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2kxmfjxoy7pa5l4oix8q.jpg" alt="Image description" width="498" height="322"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hi developers 👋🏼 I have been using NodeJS for couple of years but still I feel managing environment variables, especially in production, is a daunting task.&lt;/p&gt;

&lt;p&gt;What should I do ? Should I add env variables to docker build command ? Should I add env variables in GitHub Secrets ? OR Should I ssh into ec2 and create &lt;code&gt;.env&lt;/code&gt; file 😓&lt;/p&gt;

&lt;p&gt;So lets address this problem…&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The Problem with Dotenv&lt;/strong&gt;&lt;br&gt;
Dotenv is a moat popular package used by 30M+ developers to load environment variables from a &lt;code&gt;.env&lt;/code&gt; file into the process environment. While it simplifies the process, it has its limitations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Lack of Security&lt;/em&gt;: Dotenv relies on plaintext .env files, which can expose sensitive information if not handled carefully. (like committing it to GitHub 🤯)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Limited Functionality&lt;/em&gt;: It doesn’t provide an solution for production environment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Inflexible Configuration&lt;/em&gt;: Dotenv lacks flexibility when it comes to managing different configurations for different environments (development, staging, production).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What I dont want ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cqm-HlFT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ivv77ja56aay51mmlfxk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cqm-HlFT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ivv77ja56aay51mmlfxk.jpg" alt="Image description" width="700" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But there will be some solution created by Big Cloud Giants ? Right ?&lt;/strong&gt; &lt;br&gt;
Yes. but…&lt;/p&gt;

&lt;p&gt;Azure — costs &lt;code&gt;1$ per key per month&lt;/code&gt; with additional per api call charges&lt;/p&gt;

&lt;p&gt;GCP — almost &lt;code&gt;0.5$ per key per month&lt;/code&gt; (gcp has most complicated pricing tier I have ever seen)&lt;/p&gt;

&lt;p&gt;AWS — costs &lt;code&gt;0.8$ per key per month&lt;/code&gt; with additional api call charges&lt;/p&gt;

&lt;p&gt;i.e. I need to pay at least a &lt;strong&gt;dollar/month to just store NODE_ENV=production 🤔&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;then why cant I use GitHub Secrets ? Its FREE.. is it ?&lt;/strong&gt;&lt;br&gt;
This is the best solution for managing env variables is out there. but still its free tier lacks environment specific secrets manager. (Yeah Im indie hacker and cant afford to buy $20/month Plan)&lt;/p&gt;

&lt;p&gt;&amp;amp; I dont want to manage this sh*t..&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MGf90jwQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oebdhzugbs3yf34vpobs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MGf90jwQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oebdhzugbs3yf34vpobs.png" alt="Image description" width="800" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Then What To Do ?&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If there is no solution, then best solution is to build the solution.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What if there is npm package which —&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;does everything dotenv does &amp;amp;&lt;/li&gt;
&lt;li&gt;in development loads from .env file&lt;/li&gt;
&lt;li&gt;in production checks for .env files or else loads it from cloud without any major configuration&lt;/li&gt;
&lt;li&gt;there is easy and secure way to access, modify, delete environments.&lt;/li&gt;
&lt;li&gt;&amp;amp; is cheap.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;So Finally what I built ?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;simple nodeJS implementation. (&lt;em&gt;envvaults npm package — wrapper around dotenv&lt;/em&gt;)&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ElA17gyX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m01kuvo7mz38q6v36nls.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ElA17gyX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m01kuvo7mz38q6v36nls.png" alt="Image description" width="781" height="620"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Web Dashboard to manage .envs&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7t1cgi6d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6o8fd62nvv7kph182nuk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7t1cgi6d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6o8fd62nvv7kph182nuk.png" alt="Image description" width="800" height="746"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;VS Code extension to manage .envs from VS Code (WHY NOT?)&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Yt411Ylb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uerqoxwv6etv0g65blvv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Yt411Ylb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uerqoxwv6etv0g65blvv.png" alt="Image description" width="800" height="485"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What about security ? Okay.. Lets implement what Github Secrets is using 😘. &lt;a href="https://libsodium.gitbook.io/doc/bindings_for_other_languages"&gt;Libsodium sealed boxes&lt;/a&gt; added&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;But how will it load .env in production ?&lt;/strong&gt;&lt;br&gt;
envvaults npm package requires 2 predefined env variables- &lt;strong&gt;EV_AID&lt;/strong&gt; &amp;amp; &lt;strong&gt;EV_KEY&lt;/strong&gt;. with these 2 env variables &lt;em&gt;it will fetch all remaing variables defined inside “VAULT”&lt;/em&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;EV_AID is account ID and EV_KEY is secret key for specific vault.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;How can you use this ?&lt;/strong&gt;&lt;br&gt;
step 1. install npm package =&amp;gt; &lt;strong&gt;npm i envvaults&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;step 2. create account on &lt;a href="https://app.envvaults.com/"&gt;this link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;step 3. access inside VS Code using &lt;a href="https://marketplace.visualstudio.com/items?itemName=omkarbhede.envvaults"&gt;this link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Done!! Now lets get back to writing code 😤&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
