<!-- Generated from the canonical OpenPost public page. Do not edit this build artifact. -->

Title: Maintenance
Description: Back up, upgrade, monitor, and recover a self-hosted instance.
Canonical: https://docs.openpo.st/self-hosting/maintenance
Source: [https://docs.openpo.st/self-hosting/maintenance](https://docs.openpo.st/self-hosting/maintenance)

# Maintenance

Back up `data/db`, `data/media`, and the JWT and encryption secrets as one restore set. Test a restore before relying on it. A database backup without media cannot restore complete publications.

## Upgrade

Pull the selected image, restart the service, and inspect the logs:

```sh
docker compose pull
docker compose up -d
docker compose logs --tail=100 -f openpost
```

The container applies database migrations on startup. Back up before upgrading; restoring an older image may also require restoring its database backup.

## Back up and restore

From the directory containing `docker-compose.yml`, stop the service while copying SQLite and media:

```sh
docker compose stop
tar -czf "openpost-backup-$(date +%Y%m%d-%H%M%S).tar.gz" data .env docker-compose.yml
docker compose start
```

Store the archive somewhere private and off the server. It contains credentials and your content. To restore on another server, extract it into an empty directory and run `docker compose up -d` there with the same image version used for the backup.

## Check health

```sh
curl https://your-openpost-host.example/api/v1/health
curl https://your-openpost-host.example/api/v1/ready
```

For a failed post, inspect the affected rendition, fix its provider or media issue, and retry it. For a failed startup, check logs, database connectivity, writable media storage, free disk space, and secret values.
