# Render

[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/OpenKedai/openkedai)

The button creates a web service from `render.yaml`: it builds the image from
`deploy/Dockerfile` and attaches a 1 GB disk for the hub's data.

**A disk needs a paid instance** (the Starter plan). On Render's free plan every restart or
deploy would erase the hub's shops, so the blueprint doesn't use it.

1. Click the button, sign in, and confirm the service.
2. When it's live, open **Logs** and find the line ending `Setup code: …`.
3. Open the service's `onrender.com` address and choose **Set up a new shop**.

The hub knows its Render address on its own, so pairing codes use it.

## Settings

In the service's **Environment** tab; see [Configuration](https://docs.openkedai.com/self-hosting/configuration/). For backups to
S3-compatible storage, add the `OPENKEDAI_BACKUP_S3_…` variables ([Backups](https://docs.openkedai.com/self-hosting/backups/)).

## Updating

Render deploys the newest commit of the branch it follows. To update on your own schedule, turn
off **Auto-Deploy** and use **Manual Deploy** when you want a new version.

## Good to know

- One instance only: the data is on its disk.
- A disk-backed service restarts with a short pause on each deploy; devices keep selling and catch
  up afterwards.
