Skip to content

๐Ÿ”„ Updating the agent

When a new version of the local agent comes out, BolloPrint tells you, but the update happens on your computer, not from BolloPrint: the agent runs on your network and only you can change it. It's changing one number in your file and deploying again. Your printers, their history and the agent's keys aren't touched.


How you know it's time

  • Above the tabs in Settings โ†’ Printers a notice appears: "Your agent is using version 0.4.7. Version 0.4.9 is now available", with a How to update button that brings you here.
  • In the Local agent tab, that agent's version number shows up in orange. If it shows up in red, that version is no longer supported and you should update as soon as possible.

You'll always find the new version in the agent's Deployment tab (โ‹ฎ โ†’ Edit menu): it's the number at the end of the image: line.


What changes

Only the image: line changes, and within it only the version number. Everything else stays exactly the same: the code, the identity, the volume and the rest of the configuration.

Here's how a docker-compose.yml would look going from 0.4.7 to 0.4.9 (the keys show up as dots, but in your file they're your own):

Before

services:
  bolloprint-agent:
    image: ghcr.io/bolloprint/bolloprint-agent:0.4.7
    container_name: bolloprint_agent
    restart: unless-stopped
    network_mode: host
    environment:
      BP_AGENT_CODE: โ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ข
      BP_AGENT_INSTANCE_ID: โ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ข
    volumes:
      - identity:/var/lib/bolloprint

volumes:
  identity:
    name: bolloprint_agent_identity

After

services:
  bolloprint-agent:
    image: ghcr.io/bolloprint/bolloprint-agent:0.4.9
    container_name: bolloprint_agent
    restart: unless-stopped
    network_mode: host
    environment:
      BP_AGENT_CODE: โ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ข
      BP_AGENT_INSTANCE_ID: โ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ข
    volumes:
      - identity:/var/lib/bolloprint

volumes:
  identity:
    name: bolloprint_agent_identity

(Your file has a few more lines, like memory limits and logging; those stay as they are. They've been removed here so the difference stands out.)

โš ๏ธ Don't copy the manifest from the Deployment tab over your file

On an agent that already exists, BolloPrint shows the keys masked with dots, because it doesn't store them. If you paste that whole manifest over yours, you erase your keys and the agent stops connecting. Change only the number in the image: line of the file you already have.


Step by step

Docker Compose

  1. Open the agent's docker-compose.yml and change the number in the image: line.
  2. From that file's folder, pull the new version and start it again:
docker compose pull
docker compose up -d

Docker replaces the container with a new one, with the same configuration and the same volume.

Portainer

  1. Go to Stacks and open the agent's stack.
  2. Click Editor, change the number in the image: line.
  3. Turn on Re-pull image and redeploy (or Pull latest image, depending on your Portainer version) and click Update the stack.

Kubernetes

Change the number in the image: line in your file and apply it again:

kubectl apply -f bolloprint-agent.yaml

Or, without touching the file, change the deployment's image directly:

kubectl set image deployment/bolloprint-agent agent=ghcr.io/bolloprint/bolloprint-agent:0.4.9

If you do it that way, change the file too, or the next time you apply it you'll go back to the old version.


Checking it went well

Within a minute the agent shows up again as Online in the Local agent tab, with the new version number and no warning colour. The notice above the tabs disappears on its own.

While the container restarts, the printers may show up disconnected for a few seconds. That's normal: they come back on their own, and any prints in progress carry on running on the machine.

If it doesn't come back, check its log:

docker logs bolloprint_agent --tail 50

What NOT to do

  • Don't regenerate the keys to update. Regenerating is for when someone has your keys or you've lost the manifest, and it cuts the agent off until you deploy it again.
  • Don't delete the volume (bolloprint_agent_identity). You don't need to for updating, and on agents deployed with an older manifest that's where it stores its identity: without it you'd have to authorise it again.
  • Don't create a new agent. Updating is the same agent on a different version; a new one would have a different code and its printers wouldn't carry over on their own.

Frequently asked questions

Do I lose printers or history when I update? No. The printers and everything they've printed live in BolloPrint, not in the agent.

Can I skip versions? Yes. Go straight to the latest one BolloPrint points you to.

What if the new version gives me trouble? Put the previous number back in the image: line and deploy the same way. Then message us on Discord so we can take a look.

Does it update itself? No, on purpose: the agent runs on your computer and you decide when it changes.