# Build Install Command

## Install Command

Parameters:\
`setup_url`: Setup URL obtained from the [Access Info Api](/api/api-requests.md#get-access-info)\
`key`: Setup key obtained from the [Access Info Api](/api/api-requests.md#get-access-info)

### Base Command

```
({setup_url} -4O setup.sh || curl {setup_url} -Lo setup.sh) && bash setup.sh {key}
```

When you run this command, you will be prompted to select an image. To use a pre-selected image, refer to the section below.

### Pre-selected Image Command

Append -i={image\_id} to the base command.\
`image_id` can be found in [Images Api](/api/api-requests.md#get-images)

### Choose port, username and password

-port={portnumber}\
-username={username} \
-password={password}

### Pre-Confirmed Command

Append `-y` to the command to skip confirmation prompts.

### Force Install (skip port check)

To skip port check, append `-f`  to the command

## Init Script

```
#!/bin/bash
tries=10
while [ $tries -gt 0 ] && ! { (wget {setup_url} -4O install.sh || curl {setup_url} -Lo install.sh); } ; do
    echo "Download failed, retrying $tries more times"
    tries=$((tries-1))
    sleep 10
    echo -e "nameserver 8.8.8.8\nnameserver 1.1.1.1" > /etc/resolv.conf
done
bash install.sh {key} -i={image_id} -y

```


---

# 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.tinyinstaller.top/api/build-install-command.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.
