<?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>lhelge.se</title>
    <link>https://lhelge.se/</link>
    <description>lhelge.se</description>
    <atom:link href="https://lhelge.se/rss.xml" rel="self" type="application/rss+xml"/>
    <lastBuildDate>Sat, 4 Jul 2026 00:00:00 +0000</lastBuildDate>
    <item>
      <title>Run persistent Claude Code sessions on a headless server</title>
      <link>https://lhelge.se/blog/claude-code-tmux/</link>
      <guid isPermaLink="true">https://lhelge.se/blog/claude-code-tmux/</guid>
      <pubDate>Sat, 4 Jul 2026 00:00:00 +0000</pubDate>
      <dc:creator>LHelge</dc:creator>
      <description>&lt;p&gt;I’ve really enjoyed working with Anthropic’s models ever since Opus 4.5. They read
between the lines and get my intent, and Opus, now Fable too, is genuinely good at my
weapon of choice, &lt;em&gt;Rust&lt;/em&gt;. &lt;strong&gt;Fable 5&lt;/strong&gt; came and went fast in June: available for only a
few days before the US government applied export restrictions on it. Now it’s back for a
week as part of my Claude Max subscription, and I have a long list of things I’d like to
throw at it.&lt;/p&gt;
&lt;p&gt;The catch: it’s vacation season here in Sweden, I have a trip planned, and I don’t want
to bring the laptop. I’ve used Claude Code’s &lt;code&gt;/remote-control&lt;/code&gt; feature for a while. It’s
a great way to keep an eye on a session while you’re out and about, but you still need a
computer running somewhere to host it. We’ve all seen the 3D-printed brackets that keep
a MacBook lid from closing.&lt;/p&gt;
&lt;p&gt;I have a small HP server at home running some homelab stuff, and I’ll occasionally SSH
in to do development. The problem is that a plain SSH session dies the moment the
connection drops. For everyday work I reach for
&lt;a href=&quot;https://github.com/zellij-org/zellij&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;zellij&lt;/a&gt;. I find the UX nicer, the keybindings
more discoverable and the defaults friendlier. But I couldn’t get a zellij session to
stay alive across a disconnect (could be me, could be how its server attaches to the
session), so for this I switched to &lt;a href=&quot;https://github.com/tmux/tmux&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;tmux&lt;/a&gt;, which
daemonizes itself and just kept running. After some trial and error I landed on a setup
that works great for my use case, so here’s a writeup for the next time I need it.&lt;/p&gt;
&lt;h2 id=&quot;the-always-on-dev-machine&quot;&gt;The always-on dev machine&lt;/h2&gt;
&lt;p&gt;First you need a machine that’s always on. That could be a cloud-hosted VPS, an old box
in the basement, or in my case a &lt;a href=&quot;https://www.proxmox.com/en/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Proxmox&lt;/a&gt; VM on my home
server.&lt;/p&gt;
&lt;div class=&quot;markdown-alert markdown-alert-tip&quot;&gt;
&lt;p class=&quot;markdown-alert-title&quot;&gt;Tip&lt;/p&gt;
&lt;p&gt;Since I’ll be doing Rust development, which is notoriously slow to compile, I gave the
VM a decent number of CPU cores, plenty of memory, and a fast NVMe SSD for the system
disk. A Raspberry Pi 3 from the junk bin wouldn’t cut it. Giving the agent a fast loop
to recompile and run the full test suite makes for a much better experience, &lt;em&gt;even
remotely&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;I spun up the VM, installed a headless &lt;a href=&quot;https://archlinux.org/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Arch Linux&lt;/a&gt;, added my
SSH key, and set it up with a nice Zsh shell and a &lt;a href=&quot;https://starship.rs/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;starship&lt;/a&gt;
prompt. Then I installed the terminal tools I use day to day: Rust, Node, Python, git,
gh-cli, helix, ripgrep, zellij, Claude Code, and of course tmux.&lt;/p&gt;
&lt;h3 id=&quot;easy-things-to-forget&quot;&gt;Easy things to forget&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Generate a new SSH key and add it to GitHub, Codeberg, GitLab, or wherever you keep
your projects.&lt;/li&gt;
&lt;li&gt;Set the global git config for &lt;code&gt;user.name&lt;/code&gt; and &lt;code&gt;user.email&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Authenticate the gh-cli with &lt;code&gt;gh auth login&lt;/code&gt; if you want Claude to open PRs for you.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;long-live-the-session&quot;&gt;Long live the session&lt;/h2&gt;
&lt;p&gt;Because tmux daemonizes its own server, a detached session already survives logging out
of SSH, or even outright killing the connection from your client. That was the whole
reason I switched to it.&lt;/p&gt;
&lt;p&gt;There’s still one systemd wrinkle worth knowing about: some distros are configured to
reap a user’s leftover processes on logout (the &lt;code&gt;KillUserProcesses&lt;/code&gt; setting in
&lt;code&gt;logind.conf&lt;/code&gt;; Arch leaves it off by default). To keep the setup robust no matter how a
box is configured, I enable lingering for my user:&lt;/p&gt;
&lt;pre class=&quot;code-block&quot;&gt;&lt;code&gt;&lt;span class=&quot;hl-source hl-shell hl-bash&quot;&gt;&lt;span class=&quot;hl-meta hl-function-call hl-shell&quot;&gt;&lt;span class=&quot;hl-variable hl-function hl-shell&quot;&gt;sudo&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;hl-meta hl-function-call hl-arguments hl-shell&quot;&gt; loginctl enable-linger &lt;span class=&quot;hl-meta hl-group hl-expansion hl-parameter hl-shell&quot;&gt;&lt;span class=&quot;hl-punctuation hl-definition hl-variable hl-shell&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;hl-variable hl-other hl-readwrite hl-shell&quot;&gt;USER&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Lingering lets a user’s services and processes keep running without an active login
session, exactly the state I’m after here. On my Arch box tmux survives without it, but
it’s cheap insurance for a machine I want to leave running and rely on while I’m away.&lt;/p&gt;
&lt;h2 id=&quot;ssh-straight-into-tmux&quot;&gt;SSH straight into tmux&lt;/h2&gt;
&lt;p&gt;You could SSH into the machine and run &lt;code&gt;tmux attach&lt;/code&gt; every time, but wouldn’t it be
nicer to SSH straight into your tmux session? Here’s how I have my &lt;code&gt;~/.ssh/config&lt;/code&gt; set
up:&lt;/p&gt;
&lt;pre class=&quot;code-block&quot;&gt;&lt;code&gt;&lt;span class=&quot;hl-text hl-plain&quot;&gt;Host dev-claude
    RequestTTY yes
    RemoteCommand zsh -l -c &amp;quot;tmux new -A -s claude&amp;quot;

Host dev dev-claude
    HostName 10.10.1.123
    User lhelge
    IdentityFile ~/.ssh/id_ed25519
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now &lt;code&gt;ssh dev-claude&lt;/code&gt; drops me directly into the &lt;code&gt;claude&lt;/code&gt; session, creating it if it
doesn’t exist yet (&lt;code&gt;tmux new -A&lt;/code&gt;), while plain &lt;code&gt;ssh dev&lt;/code&gt; still gives me a normal shell.&lt;/p&gt;
&lt;div class=&quot;markdown-alert markdown-alert-note&quot;&gt;
&lt;p class=&quot;markdown-alert-title&quot;&gt;Note&lt;/p&gt;
&lt;p&gt;I generally just &lt;a href=&quot;https://www.wireguard.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;WireGuard&lt;/a&gt; into my home network and
connect straight to SSH. If you don’t have that, you could put an externally reachable
jump host in front and add a &lt;code&gt;ProxyJump&lt;/code&gt; to the config, or use something like
&lt;a href=&quot;https://tailscale.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Tailscale&lt;/a&gt;, though I haven’t tested that setup myself.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;That’s it. Laptop stays home, the session stays alive, and Fable keeps chewing through
my backlog while I’m away.&lt;/p&gt;
</description>
      <category>Claude</category>
      <category>Development</category>
      <category>Homelab</category>
    </item>
    <item>
      <title>Hello world — new site, new engine</title>
      <link>https://lhelge.se/blog/hello-world/</link>
      <guid isPermaLink="true">https://lhelge.se/blog/hello-world/</guid>
      <pubDate>Sat, 2 May 2026 00:00:00 +0000</pubDate>
      <dc:creator>LHelge</dc:creator>
      <description>&lt;p&gt;After years of meaning to do it, I finally rewrote the site. The old Jekyll setup worked fine since I haven’t updated it after the first post. However, I also used a similar setup for the &lt;a href=&quot;https://lhelge.se/wiki/aphid-ev/&quot;&quot; class=&quot;wikilink&quot;&gt;Aphid EV&lt;/a&gt; project log where I found it lacking, which is why I developed &lt;a href=&quot;https://lhelge.se/wiki/aphid/&quot;&quot; class=&quot;wikilink&quot;&gt;Aphid&lt;/a&gt;. Since I have my own static site generator I might as well migrate this site to it as a form of dogfooding — especially since it is much smaller and easier to migrate than my project log.&lt;/p&gt;
&lt;h2 id=&quot;why-aphid&quot;&gt;Why aphid&lt;/h2&gt;
&lt;p&gt;There’s a longer post on why I developed &lt;a href=&quot;https://lhelge.se/wiki/aphid/&quot;&quot; class=&quot;wikilink&quot;&gt;Aphid&lt;/a&gt; on the project site, but in short I wanted a simple, opinionated static site generator with support for both a blog and a wiki. Modern agentic coding tools make it so easy to create exactly the software you need.&lt;/p&gt;
&lt;h2 id=&quot;what-changed&quot;&gt;What changed&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Engine: Jekyll → aphid&lt;/li&gt;
&lt;li&gt;Hosting: still GitHub Pages&lt;/li&gt;
&lt;li&gt;URL: unchanged&lt;/li&gt;
&lt;li&gt;Theme: completely new&lt;/li&gt;
&lt;li&gt;Wiki section: new &lt;em&gt;(not sure what to use it for on this site yet)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;what-s-next&quot;&gt;What’s next&lt;/h2&gt;
&lt;p&gt;Not sure to be honest. I haven’t written anything here for years, and I don’t think that will change.&lt;/p&gt;
</description>
      <category>lhelge.se</category>
      <category>GitHub</category>
      <category>Aphid</category>
    </item>
    <item>
      <title>Moving to new hosting platform</title>
      <link>https://lhelge.se/blog/new-hosting/</link>
      <guid isPermaLink="true">https://lhelge.se/blog/new-hosting/</guid>
      <pubDate>Thu, 29 Jun 2023 00:00:00 +0000</pubDate>
      <dc:creator>LHelge</dc:creator>
      <description>&lt;p&gt;This domain have housed different types of sites over the years. It started out with a &lt;a href=&quot;https://wordpress.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;WordPress&lt;/a&gt; blog, but lately it has been just an empty placeholder.&lt;/p&gt;
&lt;h2 id=&quot;hosting&quot;&gt;Hosting&lt;/h2&gt;
&lt;p&gt;I have been using a Swedish company for both web and e-mail hosting for over a decade. Their e-mail service has started to fall behind on several areas, and also in security, not supporting MFA. I decided to move my mail to &lt;a href=&quot;https://proton.me/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Proton&lt;/a&gt; and their Family account with support for custom domains. I have also moved my DNS-services to &lt;a href=&quot;https://cloudflare.com&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Cloudflare&lt;/a&gt;, and only had my web hosting left at my old provider.&lt;/p&gt;
&lt;p&gt;This lead to the decision to move web hosting to &lt;a href=&quot;https://pages.github.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;GitHub Pages&lt;/a&gt; instead which would allow me to cancel the current hosting service.&lt;/p&gt;
&lt;h2 id=&quot;platform&quot;&gt;Platform&lt;/h2&gt;
&lt;p&gt;When moving to &lt;a href=&quot;https://pages.github.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;GitHub Pages&lt;/a&gt; the static site generator &lt;a href=&quot;https://jekyllrb.com/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Jekyll&lt;/a&gt; is usually the first choice due to the seamless integration. I decided to try that together with the theme &lt;a href=&quot;https://chirpy.cotes.page/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Chirpy&lt;/a&gt; (you may recognize that page) 😜.&lt;/p&gt;
&lt;p&gt;Let’s see how that works out, but so far, Jekyll seems to be a really nice way to host a blog-like site.&lt;/p&gt;
</description>
      <category>lhelge.se</category>
      <category>GitHub</category>
      <category>Cloudflare</category>
      <category>Proton</category>
    </item>
  </channel>
</rss>
