# Vultr

OPS works perfectly fine with Vultr.

For most operations you'll want to use the following config and you'll need access to your API key and the access key and secret access key found in your portal:

```json
{
  "CloudConfig": {
    "Zone": "ewr1",
    "BucketName": "nanos-test"
  }
}
```

```sh
package main

import (
  "fmt"
  "net/http"
)

func main() {
  fmt.Println("hello world!")

  http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
    fmt.Fprintf(w, "Welcome to my website!")
  })

  fs := http.FileServer(http.Dir("static/"))
  http.Handle("/static/", http.StripPrefix("/static/", fs))

  http.ListenAndServe("0.0.0.0:8080", nil)
}
```

## Image Operations

### Create Image

```sh
VULTR_TOKEN=my_api_token \
VULTR_ACCESS=my_access_token \
VULTR_SECRET=my_vultr_secret \
ops image create <elf_file|program> -i <image_name> -c config.json -z ewr1 -t vultr
```

### List Images

```sh
VULTR_TOKEN=my_api_token \
VULTR_ACCESS=my_access_token \
VULTR_SECRET=my_vultr_secret \
ops image list -z ewr1 -t vultr
```

### Delete Image

## Instance Operations

### Create Instance

```sh
VULTR_TOKEN=my_api_token \
VULTR_ACCESS=my_access_token \
VULTR_SECRET=my_vultr_secret \
ops instance create 6f5e4eebdf761 -z ewr1 -t vultr
```

You may assign a static ("reserved ip") using the following config:

```sh
"CloudConfig": {
    "StaticIP": "1.2.3.4"
}
```

### List Instances

```sh
VULTR_TOKEN=my_api_token \
VULTR_ACCESS=my_access_token \
VULTR_SECRET=my_vultr_secret \
ops instance list -z ewr1 -t vultr
```

### Get Logs for Instance

### Delete Instance


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ops.city/ops/clouds/vultr.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
