> ## Documentation Index
> Fetch the complete documentation index at: https://docs.edbb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Provision EDBB VPS with Cloud-Init

> Upload a qcow2 image with Cloud-Init support, supply your user-data, and boot it via the EDBB Installation → Custom Image workflow.

## Bring Your Own Cloud-Init Image

<Info>
  Cloud-Init lets you boot a custom qcow2 image and execute first-boot automation (user creation, key injection, package installs) without touching the console. Make sure you keep independent backups—the upload process wipes the VPS disk.
</Info>

Cloud-Init is a lightweight framework baked into many Linux templates. On first boot it reads your <code>#cloud-config</code> instructions, creates users, injects SSH keys, installs packages, and runs commands so the server is ready without manual steps.

***

## Why Use Cloud-Init

* **Automated onboarding** – preconfigure users, passwords, SSH keys, and services.
* **Repeatable builds** – the same image and user-data produce identical environments across regions.
* **Custom stacks** – ship bespoke templates or vendor images instead of the standard automated installers.

***

## Prepare Your Image

<CardGroup cols={3}>
  <Card title="🧰 Build & Clean">
    Export a <strong>qcow2</strong> disk that already includes Cloud-Init. Remove SSH host keys and temporary data so the instance generates fresh credentials on first boot.
  </Card>

  <Card title="📝 Bring user-data">
    Keep your <code>#cloud-config</code> YAML handy. You’ll paste it in <strong>Expert mode</strong> if you want to run custom tasks on first boot.
  </Card>

  <Card title="🔒 Verify & checksum">
    Confirm the image boots locally and note its checksum. This helps you detect corruption before uploading and keeps reinstalls predictable.
  </Card>
</CardGroup>

***

## Upload - Provision (Existing VPS)

<Steps>
  <Step title="Open the Installation tab">
    Sign in to the <a href="https://my.edbb.com/clientarea.php" target="_blank">EDBB Control Panel</a>, choose your VPS, and switch to the <strong>Installation</strong> tab.
  </Step>

  <Step title="Select Custom Image">
    Choose the <strong>Custom Image</strong> sub-tab to reveal the Cloud-Init upload interface.
  </Step>

  <Step title="Upload the qcow2 file">
    Drag & drop your qcow2 (or click <em>browse</em>). The Control Panel stores the image temporarily for this reinstall.

    <div style={{marginTop: "16px"}}>
      <img src="https://mintcdn.com/edbackboneco/6MSQb3s7ohtG7kzq/assets/vps-upload-iso.png?fit=max&auto=format&n=6MSQb3s7ohtG7kzq&q=85&s=622a1401eed20200dbfd95765881cd50" alt="Upload custom Cloud-Init image" style={{width: "100%", maxWidth: "820px", borderRadius: "16px", border: "1px solid rgba(0,0,0,0.08)"}} width="1444" height="1616" data-path="assets/vps-upload-iso.png" />
    </div>
  </Step>

  <Step title="Configure Expert mode (optional)">
    Toggle <strong>Expert mode</strong> if you want to paste Cloud-Init user-data or SSH keys. Supply a strong password—or rely on keys only—and tick the confirmation acknowledging that the disk will be erased.
  </Step>

  <Step title="Start the installation">
    Click <strong>Proceed</strong>. The VPS is rebuilt from your qcow2 image and executes the supplied Cloud-Init directives on first boot.
  </Step>
</Steps>

<Note>
  Uploading a qcow2 image removes the existing disk content permanently. Keep an external backup and verify the checksum of your image before you begin.
</Note>

***

## Sample `cloud-config`

```yaml theme={"system"}
#cloud-config
users:
  - default
  - name: deploy
    groups: sudo
    shell: /bin/bash
    ssh_authorized_keys:
      - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKeyHere
package_update: true
package_upgrade: true
packages:
  - nginx
  - fail2ban
write_files:
  - path: /etc/motd
    permissions: "0644"
    owner: root:root
    content: |
      Welcome to your automated VPS!
runcmd:
  - [systemctl, enable, --now, nginx]
  - [ufw, allow, "OpenSSH"]
power_state:
  mode: reboot
```

***

## Validate - Troubleshoot

* Run `sudo cloud-init status --wait` after first boot to confirm success.
* Check `/var/log/cloud-init.log` for detailed logs if tasks fail.
* Re-upload a revised image or update the YAML and rerun the installation if you need adjustments.

***
