---
title: blossom service:update
url: /docs/reference/cli/service/update/
canonical_url: https://blossom88.com/docs/reference/cli/service/update/
markdown_url: https://blossom88.com/docs/reference/cli/service/update.md
summary: Update a service
categories:
  - cli
  - reference
---

# blossom service:update

Update a service

## Usage

    blossom service:update --id ID [--data DATA]

## Flags

| Flag | Description |
| --- | --- |
| `--id (required)` | Service id |
| `--data, -d` | YAML or JSON data, a path to a data file, or an HTTP(S) URL |

Guide: [Update a Service](https://blossom88.com/docs/reference/cli/service/update/)

Examples:

    blossom service:update --id service-100 --data service.yml

service.yml:

```yaml
service:
  health_check:
    enabled: true
    kind: http
    path: /ready
    traffic: true
```

Changes to a Service health check wait for the next Environment deployment.

## Change a Service Image

Set `image` to override the Environment image for this Service. Clear
`command` and `entrypoint` to use the selected image's startup defaults:

```yaml
service:
  image: docker.io/library/nginx:stable
  command: null
  entrypoint: null
  port: 80
```

Save service.yml, then update the Service and deploy its Environment:

    blossom service:update --id service-100 --data service.yml
    blossom environment:deploy --id environment-100 --follow

To inherit the Environment image again, clear `image` and set the command and
port for your application:

```yaml
service:
  image: null
  command: bundle exec puma
  entrypoint: null
  port: 3000
```

Restart and scale keep using the deployed image until the next deployment.
See [Choose a Service Image](/docs/reference/cli/service/create/#choose-a-service-image)
for image references, private registries, and rollback behavior.

## Health and Resources

Update `health_check` and `resources` through the same service.yml fields used
at creation. See [Health and Resources](/docs/reference/cli/service/create/#health-and-resources)
for health check behavior, the preset table, and a custom allocation example.

## Persistent Services

Persistent storage grows through the same `storage` object as creation. Include
its existing mount path and availability; neither can change. Storage cannot
shrink. Growth starts on save and is reported by its Activity. Stop existing
Containers before adding storage to a stateless Service.

See [Persistent Services](/docs/reference/cli/service/create/#persistent-services)
for the storage fields and creation example.

### Change Container Size

A resources-only update coordinates the stop, compute change and resume on the
same Volume. Shared neighbors keep running. Change images, commands and other
settings separately:

    blossom service:update --id service-100 --data '{service: {resources: {preset: medium}}}'
    blossom activity:wait --id activity-100

Use the Activity returned by the update. **Change size** in Service settings
shows the Capacity effect and interruption before confirmation. A failed change
can **Resume** when its Volume and Service settings are unchanged.

## Routes

To send a path such as `/cable` to this Service instead of `web`, add a route
with [blossom route:create](/docs/reference/cli/route/create/);
routes belong to the Environment.
