DEV Community

Elie
Elie

Posted on Edited on

How I Keep Coding Agents Running When My Laptop Closes

One of the major annoyances when you're traveling is losing your internet connection when you put your laptop in your backpack or get onto a plane.

You can run an app like Amphetamine or Caffeine to keep your laptop going. But this doesn't solve all your problems. You still need a hotspot on your phone, and then you go into a car park or an elevator and the connection stops. That can be super annoying.

There are better solutions. One is to use cloud servers.

With the remote servers I use, I can type a prompt, get the AI working, close my laptop, and it keeps working remotely. The experience still feels native on my desktop.

This is part of the setup I use to build Inbox Zero, the open source AI email assistant I founded.

You can see the complete setup in the 21-minute YouTube video. This article focuses on the developer workflow.

1. Run the agents on a cloud server

Hetzner and Netcup are two options I show in the video. You can get useful servers from them for much less than something like AWS.

A server with 4 GB of RAM can be fine when you're starting out. For me, it wasn't enough very quickly, so my recommendation is 8 or 16 GB. Twenty GB of storage wasn't enough for me either, and I had to add another volume. I would look at something closer to 80 or 160 GB.

For a coding server, you don't need to go all out. Most of the work is the AI doing what it needs to do, so you don't need a huge amount of CPU or RAM.

Hetzner server options showing available cloud server configurations

You also don't have to set up your own server. Cursor Agents and Claude's cloud agents are viable options if you don't want the extra setup.

2. Connect everything with Tailscale

My remote servers are on the same Tailscale network as my other devices. Tailscale is a way to put your laptop, phone, remote coding server, and other machines on the same private network.

You can lock the devices off from the public internet so only devices on the same network can connect over SSH.

The remote server still feels like working on my regular computer. I can start the AI, close my laptop, and continue later without stopping the remote process.

3. Keep sessions running with Herdr

Herdr works a bit like tmux, but it also gives you split screens, a file viewer, review tools, and plugins. You can connect it to a remote device and continue coding as usual.

Herdr interface running a persistent coding agent session on the remote server

In the video, I show Inbox Zero Mobile running on my Hetzner server while it appears in the side panel of my regular Herdr session. It is built into the terminal and works on any device.

If you disconnect from the server, or exit Herdr and start it again, it continues where it left off.

4. Continue from your phone

There are a few ways to code from your phone. The native Cursor, Claude, and ChatGPT apps can connect to their cloud agents, and ChatGPT can also connect to your remote server.

I have been using Moshi more and more. It gives you a terminal and works nicely with tools like tmux and Herdr. Termius is another option. I used it a little at the beginning and wasn't super in love with it, but a lot of people use it.

The useful part is that the work continues on the remote machine. The phone gives you another way to see what is happening and continue working.

5. Connect to a Mac for iOS work

If you're doing iOS development from a Linux server, you can connect it to a rented Mac in the cloud or a Mac Mini at home.

I will often have my AI connect to the Mac and test the app in an actual simulator.

Remote Mac workflow for running and inspecting an iOS application

If you want a machine at home that is always on, a Mac Mini or Mac Studio is ideal. An old laptop can work too. If you want to avoid owning another machine, a cloud Mac is another option.

Where Inbox Zero fits

Inbox Zero is an AI email assistant, and I'm the founder of the project. It is used by small teams and large enterprises, and it is free to self-host.

It helps organize your inbox, tells you which messages are important to respond to, drafts replies, and moves newsletters and marketing emails out of the way. It can also connect to your calendar and schedule appointments.

My complete software and physical travel setup is in the full YouTube video. It also covers the connected luggage, laptop power bank, chargers, and camera glasses I use with my family.

Top comments (0)