# Deploy this project to Vibe Hosting

You are a coding agent. The person you are working for asked you to put this project online with Vibe Hosting (https://vibecodedhost.com). No account, sign-up or payment is needed to do it. Follow the steps in order.

## What the person is getting

- The project runs as Docker containers with persistent storage and a public HTTPS address like `their-app.vibecodedhost.app`.
- It is free, with no time limit at the moment. A free app sleeps after 30 minutes without requests and wakes on the next one, in a few seconds; background jobs pause while it sleeps. Paid plans ($10 CAD/month per app, with more CPU, storage and deployments) are not open yet.
- Deploying means the person accepts the terms of service at https://vibecodedhost.com/terms. In short: work-in-progress apps with no uptime guarantee; no adult content, profanity, malware, miners or attack tools.

## Step 1: get this project's hosting key

If the project root already has a file named `.env.vibe-hosting`, this project has a hosting already. Read `VIBE_HOSTING_API_KEY` from it and go to step 2: pushing again updates the same app at the same address.

Otherwise create a hosting:

```sh
curl -sS -X POST https://vibecodedhost.com/api/commands/create-hosting
```

The answer is JSON; you need `appId` and `apiKey` from it. The key is shown this once and cannot be recovered. Save it straight away in `.env.vibe-hosting` at the project root:

```
VIBE_HOSTING_APP_ID=<appId>
VIBE_HOSTING_API_KEY=<apiKey>
```

Then make sure `.env.vibe-hosting` is ignored by git (add it to `.gitignore` if no existing rule covers it). Never commit the key, and never include it in what you upload: the packaging command in the next step's instructions already leaves `.env.*` files out.

If the answer is `429`, this network has made as many new apps as it may today. Tell the person, and suggest they log in on https://vibecodedhost.com and click "New hosting" there, which gives them a key to hand you.

## Step 2: fetch the deployment instructions and follow them to the end

```sh
curl -s -H "Authorization: Bearer <apiKey>" https://vibecodedhost.com/api/v1/instructions
```

They explain the `vibe.json` manifest, the Dockerfile, how to package and push the project, how to wait until it is live, and what to tell the person when it is, including their private link to the app's page.

If a deployment fails, the status check gives you the error, a hint and the build log. Fixing it and pushing again is part of this job: carry on until the app is live, without going back to the person for each failure.

If you cannot get it working, or something here does not behave as described, tell the person they can write to https://vibecodedhost.com/contact: a person reads every message and replies as soon as possible.
