---
title: "Configure public connection to an inference service via Open WebUI Virtual Machine"
sidebar_label: "Configure public connection via Open WebUI"
sidebar_position: 11
description: "How to configure a public connection to an inference service and interact with a model in the Open WebUI web interface"
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import {TabItemLabel} from '@selectel/docux/components';
import OpenWebUiDescription from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/ai-marketplace/open-webui.mdx';
import PlusIcon from '@selectel/docux/icons/plus';
import MoreVerticalIcon from '@selectel/docux/icons/more-vertical';
import CopyIcon from '@selectel/docux/icons/copy';
import EyeIcon from '@selectel/docux/icons/eye';
import ArrowTopIcon from '@selectel/docux/icons/arrow-top';
import Formbricks from '@theme/MDXComponents/Formbricks';

# Configure public connection to an inference service via Open WebUI Virtual Machine

You can configure a public connection to the inference service via [Open WebUI Virtual Machine](/ai-marketplace/open-webui.mdx). This will allow you to interact with the model in the Open WebUI web interface using a public endpoint via the internet.

For configuration, an inference service in [public access](/foundation-models-catalog/create/connection-types.mdx#public-connection) is used. Open WebUI Virtual Machine must be created with access from the internet:

* in a public subnetwork;
* or in a private subnetwork with a single public IP address.

1. [Create a cloud server with Open WebUI](#create-cloud-server-with-open-webui).
2. [Create an administrator account](#create-administrator-account) in Open WebUI.
3. [Run Open WebUI](#run-open-webui).
4. [Connect an endpoint in Open WebUI](#connect-endpoint).
5. [Send a test request to the model](#send-test-request).

### 1. Create a cloud server with Open WebUI \{#create-cloud-server-with-open-webui}

1. In the [control panel](https://my.selectel.ru/), on the top menu, click **Products** and select **AI Marketplace**.

2. Click **Create server**.

3. Fill in the blocks:

   * [Name and placement](#name-and-placement);
   * [Source](#source);
   * optional: [GPU](#gpu);
   * [Configuration](#configuration);
   * [Disks](#disks);
   * [Network](#network);
   * optional: [Access](#access);
   * optional: [Additional settings](#additional-settings);
   * optional: [Automation](#automation).

4. Check the server price.

5. Click **Create server**.

#### Name and placement \{#name-and-placement}

1. Enter a server name.

2. Select a [location](/infrastructure/locations.mdx) where the server will be created. The list of available GPUs depends on the location. You cannot change the location after the server is created.

#### Source \{#source}

Select the **Open WebUI VM (Ubuntu 24.04 LTS 64-bit)** image.

#### Optional: GPU \{#gpu}

1. Click **Add GPU**.

2. Select the GPU type. When choosing a GPU, consider the [minimum resource requirements](/ai-marketplace/open-webui.mdx#minimum-requirements) for the image to work. GPU specifications and descriptions can be found in the [Graphics Processing Units (GPU](/cloud-servers/create/gpus.mdx)).

3. Specify the number of GPUs.

After the server is created, you will be able to change the GPU type and quantity or delete the GPU. For details, see the [Changing Cloud Server Configuration](/cloud-servers/manage/change-server-configuration.mdx).

#### Configuration \{#configuration}

1. Specify the number of vCPUs.

2. Specify the RAM size.

After the server is created, you will be able to [change the configuration](/cloud-servers/manage/change-server-configuration.mdx).

#### Disks \{#disks}

1. Select the boot disk type. GPUs are not available when using a local disk as a boot disk.

2. Specify the disk size in GB or TB. The maximum size for all network volumes is 10 240 GB (10 TB), for a local disk — 1 256 GB (1 TB).

3. If you selected SSD Universal v2 or SSD Fast v2 disk type, specify the total read and write operations in IOPS. After the disk is created, you can [change the number of IOPS](/cloud-servers/volumes/edit-volume.mdx#update-iops) — decrease or increase it. The number of IOPS changes is unlimited.

4. Optional: to add additional disks:

   4.1. Click **Add disk**.

   4.2. Select the disk type.

   4.3. Specify the disk size in GB or TB. The maximum size for all network volumes is 10 240 GB (10 TB), for a local disk — 1 256 GB (1 TB).

   4.4. If you selected the SSD Universal v2 or SSD Fast v2 disk type, specify the total read and write operations in IOPS. After the disk is created, you can [change the number of IOPS](/cloud-servers/volumes/edit-volume.mdx#update-iops) — decrease or increase it. The number of IOPS changes is unlimited.

   After the server is created, you will be able to [detach additional disks or attach new ones](/cloud-servers/volumes/attach-detach-volume.mdx).

#### Network \{#network}

To set up public connectivity for the inference service, the server must be added to a subnet with internet access:

* a private subnet with a public IP address. A [public floating IP address](/cloud-servers/cloud-networks/public-floating-ip-addresses.mdx) will be connected to the server's private IP address, and internet traffic will be routed via NAT 1:1 through a [cloud router](/cloud-servers/cloud-networks/cloud-routers.mdx);

* or a public subnet where all addresses are accessible from the internet.

You can select an existing subnet or create a new one.

<Tabs queryString="add-network">
  <TabItem value="private-subnet-with-public-ip" default>
    <TabItemLabel>
      Private subnet with a public IP address
    </TabItemLabel>

    1. If you already have a private subnet and a cloud router with internet access:

       1.1. In the **Subnet** field, select the subnet type **Private + 1 public IP**.

       1.2. In the **Private** field, select an existing subnet.

       1.3. Optional: change the server's default private IP address.

    2. If you want to create a new subnet and a cloud router with internet access, in the **Subnet** field, select the subnet type **Private + 1 public IP**.

       A private network **nat**, a router **router-nat**, and one public address will be created automatically. The server will be added to the subnet in the **nat**.
  </TabItem>

  <TabItem value="public-subnet">
    <TabItemLabel>
      Public subnet
    </TabItemLabel>

    1. To add a server to an existing public subnet:

       1.1. In the **Subnet** field, select an existing subnet.

       1.2. Optional: change the server's default public IP address.

    2. To create a new public subnet:

       2.1. In the **Subnet** field, select the subnet type **Public**.

       2.2. In the **Subnet size** field, select the subnet size.
  </TabItem>
</Tabs>

#### Optional: Access \{#access}

1. In the **Password for root** field:

   1.1. Copy the `root` user password — the user with unrestricted privileges for all system actions.

   1.2. Save the password in a secure place and do not share it in plain text.

2. Place an [SSH key for the project](/cloud-servers/manage/create-and-place-ssh-key.mdx#place-public-ssh-key) on the server for secure connection:

   2.1. If the SSH key is not added to the cloud platform, click <PlusIcon />, enter the key name, paste the public key in OpenSSH format, and click **Add**.

   2.2. If the SSH key is added to the cloud platform, in the **SSH-key** field, select an existing key.

#### Optional: Additional settings \{#additional-settings}

1. To create a [preemptible server](/cloud-servers/about/preemptible-servers/), check the **Preemptible server**.

2. If you plan to create several servers and want to increase infrastructure fault tolerance, add the server to a [placement group](/cloud-servers/placement-groups/about-placement-groups/):

   2.1. To create a new group, click <PlusIcon />, enter the group name, and select a placement policy on different hosts:

   * preferred — the system will try to place servers on different hosts. If no suitable host is available when creating a server, it will be created on the same host;

   * required — servers in the group must be located on different hosts. If no suitable host is available when creating a server, the server will not be created.

   2.2. If the group is already created, in the **Placement group** field, select a placement group.

3. To add additional information or filter servers in the list, add server [tags](/cloud-servers/manage/tags.mdx). A tag with the image name is added automatically. To add a new tag, enter it in the **Tags** field.

#### Optional: Automation \{#automation}

1. To add a script that will be executed by the [cloud-init](https://cloud-init.io/) agent during the first operating system boot, in the **User data**:

   * open the **Text** tab and paste the script as text;
   * or open the **File** tab and upload the file containing the script.

   Examples of scripts and supported formats can be found in the [User data](/cloud-servers/manage/user-data.mdx).

### 2. Create an administrator account \{#create-administrator-account}

To work in the Open WebUI web interface, first create an administrator account.

1. In the [control panel](https://my.selectel.ru/ml/default/ai-marketplace), on the top menu, click **Products** and select **AI Marketplace**.

2. In the Open WebUI Virtual Machine card, click **Go to GUI**.

3. In the Open WebUI web interface, click **Let's start**.

4. Enter a username.

5. Enter an email address.

6. Enter a password.

7. Click **Create Administrator account**.

### 3. Launch Open WebUI \{#run-open-webui}

1. In the [control panel](https://my.selectel.ru/ml/default/ai-marketplace), on the top menu, click **Products** and select **AI Marketplace**.

2. In the Open WebUI Virtual Machine card, click **Go to GUI**.

3. Enter the administrator email address.

4. Enter the administrator password.

5. Click **Sign in**.

### 4. Connect an endpoint in Open WebUI \{#connect-endpoint}

1. In the Open WebUI web interface, click the profile icon and select **Admin Panel**.

2. Open the **Settings**.

3. Go to the **Connections**.

4. Turn on the **Direct connections**.

5. Click **Save**.

6. On the Open WebUI web interface home page, click the profile icon and select **Settings**.

7. Go to the **Connections**.

8. In the **Manage direct connections** row, click <PlusIcon />.

9. In the **URL** field, enter the endpoint:

   ```bash
   <endpoint>/v1
   ```

   Specify `<endpoint>` — the inference service endpoint; you can copy it in the [control panel](https://my.selectel.ru/ml/default/inference-services/): on the top menu, click **Products** → **Inference Services** → in the inference service card, in the **Inference service endpoint** row, click <CopyIcon />.

10. In the **Bearer** field, enter the API key. You can copy the API key in the [control panel](https://my.selectel.ru/ml/default/inference-services/): on the top menu, click **Products** → **Inference Services** → inference service page → **API Keys** tab → in the API key row, click <EyeIcon />, and then <CopyIcon />.

11. In the **Model IDs** field, enter the model name and click <PlusIcon />. The model name can be viewed in the [control panel](https://my.selectel.ru/ml/default/inference-services/): in the top menu, click **Products** → **Inference Services** → inference service page → tab **Service** → line **Model**.

12. Click **Save**.

### 5. Send a test request to the model \{#send-test-request}

1. In the Open WebUI web interface, click **Select a model**.

2. Select the model you added in step 8 when [connecting the endpoint in Open WebUI](#connect-endpoint).

3. On the Open WebUI web interface home page, click the profile icon and select **Settings**.

4. Go to the **General**.

5. In the **Advanced parameters** block, set the `max_tokens` parameter value to `5 000`.

6. Click **Save**.

7. Enter a test request, for example:

   ```
   Hello!
   ```

8. Click <ArrowTopIcon />.

9. Wait for the model response.

<Formbricks />
