# DigitalOcean

Use a **Droplet** (a small virtual server). DigitalOcean's App Platform doesn't keep files
between deploys, so it can't hold the hub's data.

1. **Create → Droplets**. Choose:
   - region: **Singapore** (or the one nearest the shop);
   - image: **Ubuntu 24.04**;
   - size: the smallest Basic plan is plenty (512 MB or 1 GB of memory);
   - authentication: an SSH key.
2. Under **Advanced options → Add initialization scripts (user data)**, paste the contents of
   [`deploy/digitalocean/cloud-init.yaml`](https://github.com/OpenKedai/openkedai/blob/main/deploy/digitalocean/cloud-init.yaml). It runs
   the [Linux installer](https://docs.openkedai.com/self-hosting/linux/) on first boot.
3. Create the Droplet. After two or three minutes, open `http://<droplet IP>:8080` and choose
   **Set up a new shop**. The setup code:

   ```sh
   ssh root@<droplet IP> 'journalctl -u openkedai | grep "Setup code"'
   ```

Without the user data step, you can SSH in and run the installer yourself:
`curl -fsSL https://raw.githubusercontent.com/OpenKedai/openkedai/main/deploy/install.sh | sh`.

## Next steps

- Put the hub behind HTTPS with a domain name: [HTTPS and remote access](https://docs.openkedai.com/self-hosting/https/). Then set
  `OPENKEDAI_PUBLIC_URL` so pairing codes use it.
- Turn on DigitalOcean's weekly backups for the Droplet, or the hub's own
  [copies to S3-compatible storage](https://docs.openkedai.com/self-hosting/backups/) (DigitalOcean Spaces works).
- Updating, settings and logs: see [Linux installer](https://docs.openkedai.com/self-hosting/linux/).
