Opengram

Upgrading

How to upgrade Opengram to a new version.

Opengram applies database migrations automatically on startup, so upgrading is straightforward regardless of your deployment method.

Before upgrading

Back up your data before upgrading. The critical files are:

  • opengram.db and opengram.db-wal (the SQLite database and write-ahead log)
  • uploads/ directory (uploaded files and media)
  • opengram.config.json (your configuration)

See Backup & Restore for detailed instructions.

CLI

If you installed Opengram via npm or the install script, run:

opengram upgrade

This installs the latest version via npm and restarts the service if it is running.

If the OpenClaw plugin is installed, it is upgraded automatically as well and you will be prompted to restart the OpenClaw gateway.

Docker

With Docker Compose (recommended):

docker compose pull
docker compose up -d

Without Compose, pull the new image and recreate the container:

docker pull opengram/web:latest
docker stop opengram
docker rm opengram

# Re-run with the same flags you used originally
docker run -d \
  --name opengram \
  -p 3000:3000 \
  -v opengram_data:/opt/opengram/data \
  -v "$(pwd)/config:/opt/opengram/config" \
  opengram/web:latest

Migrations run automatically when the container starts.

Manual (from source)

cd /path/to/opengram
git pull
npm install
npm run build

Then restart the server:

opengram restart

Migrations apply automatically on startup.

Verify the upgrade

After upgrading, check that the server is healthy:

curl -fsS http://localhost:3000/api/v1/health

Check the version:

opengram version

On this page