<a id="lxc-publish-md"></a>

# `lxc publish`

Publish instances as images

## Synopsis

Description:
Publish instances as images

```default
lxc publish [<remote>:]<instance>[/<snapshot>] [<remote>:] [flags] [key=value...]
```

## Options

```default
      --alias              New alias to define at target
      --compression none   Compression algorithm to use (none for uncompressed)
      --expire             Image expiration date (format: rfc3339)
  -f, --force              Stop the instance if currently running
      --public             Make the image public (accessible to unauthenticated clients as well)
      --reuse              If the image alias already exists, delete and create a new one
```

## Options inherited from parent commands

```default
      --debug          Show all debug messages
      --force-local    Force using the local unix socket
  -h, --help           Print help
      --project        Override the source project
  -q, --quiet          Don't show progress information
      --sub-commands   Use with help or --help to view sub-commands
  -v, --verbose        Show all information messages
      --version        Print version number
```

## SEE ALSO

* [lxc](https://canonical.com/lxd/docs/default/reference/manpages/lxc/index.html.md#lxc-md)	 - Command line client for LXD
