Guide

How to run AI agents 24/7

Your agents stop when your laptop sleeps. Here are the honest ways to keep them working day and night, and how your phone reaches them wherever they run.

Updated 6 November 2026

You set up a routine for six in the morning, closed your laptop, and woke up to find it never ran. Or you asked an agent to watch a page for a price drop, and it went quiet the moment you left the house. That is not a bug. Bloks runs on your own computer, so when that computer sleeps, your agents stop.

This guide walks through the real options for keeping agents working around the clock, from staying on the laptop to a server of your own, and how your phone reaches them in each case.

Why agents stop when your laptop sleeps

Every agent in Bloks is a real engine session running on the machine that holds the workspace. There is no server of ours doing the work in the background. That is the point: your agents, your keys and your data stay with you. The cost is that the machine has to be awake.

Bloks softens this on a laptop:

  • While an agent is working, Bloks keeps the laptop from dozing off.
  • If it does sleep in the middle of a task, the agent picks up where it left off when you are back.
  • A routine that was missed fires once when the Mac wakes, or is skipped if it is too stale. Missed runs never pile up.
  • The morning brief, due at 08:00, is made when the Mac wakes if it was asleep at that time.

On Windows, the desktop app can keep running in the system tray when you close its window: Settings, General, Window. On a Mac, one stray ⌘Q no longer stops your agents; you hold it for a moment or press it twice.

For many people that is enough. If you want routines at three in the morning, watchers that never miss a change, or a Telegram bot that always answers, you need a machine that stays on.

Option 1: a home computer that stays on

The simplest always-on setup is a computer at home that never sleeps: a Mac mini in a cupboard, a mini PC, or a Linux box. You have two ways to use it.

Run the desktop app on it. Install Bloks as usual and leave it running. Your agents live there, and your laptop and phone reach them.

Run bloks-server on it. This is the same workspace the desktop app runs, without the desktop. It suits a machine with no screen. Install the Bloks server on a VPS with Docker covers the Docker route, and the same steps work on a box at home.

Either way, your laptop becomes a window onto that machine. In the desktop app on your laptop:

  1. Open Settings, Phone and devices, Your servers (or Add a server in the workspace switcher).
  2. Paste the pairing link the server printed, then Add server.
  3. The server appears as a workspace in the switcher, beside any others.
  4. If you want the laptop to run no agents of its own, turn off Run workspaces on this computer. The workspaces on the laptop wait, untouched, until you turn it back on.

One thing to know: two Bloks servers sharing one computer’s data would overwrite each other’s work, so only one may use it at a time. If bloks-server is already running on a Mac and you open the Bloks app on that same Mac, the app says so and shows the server’s address instead of starting a second one.

Option 2: bloks-server on a VPS

A small rented Linux server works the same way as a box at home, without the noise or the power bill. The fastest route is Docker Compose:

mkdir bloks && cd bloks
curl -fsSLO https://raw.githubusercontent.com/hamedgitty/bloks/main/compose.yml
curl -fsSL -o .env https://raw.githubusercontent.com/hamedgitty/bloks/main/.env.example
docker compose up -d
docker compose exec bloks bloks-server pair

You will also set BLOKS_PUBLIC_URL in .env and put a reverse proxy, tunnel or VPN in front. The full Docker guide goes step by step. If you would rather not use Docker, the docs and the self-hosting notes describe a systemd service that starts at boot and again after a crash.

A few things to plan for:

  • Engines run on the server. Agents use the engines installed there, so install and sign in to Claude Code or Codex on the server, or give your agents API keys from the app.
  • The browser runs there too. With Chrome or Chromium installed on the server, the Bloks browser beside the chat runs on the server and shows live in every device’s panel, so agents keep browsing when your Mac is closed.
  • Updates. A server set up with systemd updates from Settings, About on any of your own devices, or with bloks-server update. With Docker, an update is a newer image: docker compose pull, then docker compose up -d.

Option 3: managed hosting

If you would rather not look after a machine at all, Bloks can run one for you. Managed hosting is a private machine of your own that stays on, and Bloks moves your agents over when you sign up. Your Mac becomes one more window onto them, beside your phone and a browser.

Moving in brings your agents, memory, rooms, routines, watchers, workflows and conversations. Keys and secrets never travel, so Bloks lists the ones to enter again. The copy on your Mac stays, marked as moved, and its routines and bots stop there so nothing runs twice. You can move a hosted workspace back to your Mac at any time.

Be clear about one limit: a hosted machine is not your Mac. It cannot reach the files, apps or screen on your own computer, or a local model running there. Plans and what each includes are on the pricing page.

How your phone reaches agents that run elsewhere

Nothing runs on the phone. It is a window onto wherever your agents live, and there are two roads to it.

Through Bloks Cloud. The server listens on loopback only and connects out to Bloks Cloud, which carries the iPhone app, the desktop app on your laptop and a browser at bloks.dev/web. No port is opened, and pairing works from anywhere. This is also what makes notifications and Live Activities reach a locked phone. Traffic is sealed end to end, so the relay in the middle cannot read it.

Your own way. On your home network or VPN, the iPhone app pairs at an http:// address on that network, or at your computer’s Tailscale IPv6 address. It does not pair at an https:// address of your own yet. Without Bloks Cloud, the phone works while the app is open, and notifications do not reach a locked phone.

You can use both. With Bloks Cloud turned on for a server, bloks-server pair prints your own addresses first and a Bloks Cloud link after, for a device somewhere your address does not reach.

If Bloks Cloud ever cannot be reached, nothing stops. The line keeps trying in the background, bloks-server status says it is not connected, and agents, routines and watchers carry on.

Control your AI agents from your iPhone covers pairing and notifications in detail.

Which option fits

  • You use Bloks while you work and mostly want it to finish what it started: stay on the laptop. Bloks keeps it awake mid-task and catches up on wake.
  • You have a spare Mac or mini PC: run the desktop app or bloks-server on it, and pair your laptop and phone.
  • You are comfortable with a Linux server: bloks-server on a VPS with Docker, reached through Bloks Cloud or your own proxy.
  • You want it always on with nothing to maintain: managed hosting, on the pricing page.

Whichever you choose, the agents, their memory and the way you talk to them stay the same. Only the machine underneath changes.

Questions

Do my agents keep working when my laptop is closed?

Not on the laptop itself. Bloks runs on your computer, so when it sleeps your agents stop, and a task that was cut off picks up where it left off when you are back.

Do I need Bloks Cloud to run bloks-server?

No. You can reach a server your own way, through your reverse proxy, tunnel or VPN, with BLOKS_CLOUD=off. Bloks Cloud adds reach from anywhere and notifications on a locked phone.

What happens to my agents if Bloks Cloud cannot be reached?

They carry on. Bloks Cloud is only a road between your devices and the server, so agents, routines and watchers keep running while it tries to reconnect in the background.

Can I run more than one workspace on one server?

One server is one workspace. For a second, run a second server with its own data folder and port, and pair both to the desktop app, where they sit side by side in the workspace switcher.

Meet your team.

Free for Mac, Windows and Linux. Bring the AI you already have.

View on GitHub