# Updating (/docs/self-hosting/updating)

Your Vercel project deploys every push to your fork's main branch. To update, pull the
new version, migrate your database, then push.

New versions are listed on [GitHub Releases](https://github.com/joshxfi/goatside/releases)
and in `CHANGELOG.md`, with what changed since the last one. To hear about them, choose
**Watch → Custom → Releases** on the repo.

<Steps>
<Step>

### Pull the update [#pull-the-update]

From your clone:

```sh
git remote add upstream https://github.com/joshxfi/goatside   # once
git pull upstream main
pnpm install
```

</Step>
<Step>

### Migrate the database [#migrate-the-database]

If GitHub Actions runs your migrations (see
[Database](/docs/self-hosting/database#with-github-actions)), it applies new ones after
you push, and you can skip this step.

Otherwise, the new version may expect new tables or columns, so apply any new
migrations before it deploys. [Database](/docs/self-hosting/database#your-url-and-token)
shows where to find the URL and token.

```sh
TURSO_DATABASE_URL=libsql://goatside-<you>.turso.io \
TURSO_AUTH_TOKEN=<token> \
pnpm db:migrate
```

With nothing new to apply, it does nothing, so it's safe to run every time.

</Step>
<Step>

### Push to deploy [#push-to-deploy]

```sh
git push
```

Vercel builds and deploys it. Check that it finished under your project's
**Deployments**.

</Step>
</Steps>

GitHub's **Sync fork** button works too, but it deploys straight away. If GitHub Actions
doesn't run your migrations, run any new migration first.

If a deploy misbehaves, **Instant Rollback** in Vercel puts the previous version back.
