# Open WebUI (Remote AI Interface)

Deploys Open WebUI on a Instance. The UI runs locally on your cloud instance and connects to external AI APIs (OpenAI, Ollama, etc). No GPU needed on this Instance since inference happens externally.

#### Architecture:

* 1 Instance (Nano — 2 vCPU, 2 GB RAM)
* 1 private network (10.200.0.0/24)
* 1 floating IP (public access)
* 30 GB boot volume
* Security group allows SSH, port 3000

#### What is automated:

* Instance creation with selected flavor and image
* Private network, subnet, and router
* Floating IP assigned to VM
* Security group with ports 22, 3000
* Docker installed from official repository
* Open WebUI container started in remote API mode (no local model)
* Persistent volume for data
* Auto-restart enabled

#### Before you launch:

Update these parameters in the template or at launch time:

| Parameter        | Default                | What to change                                                                 |
| ---------------- | ---------------------- | ------------------------------------------------------------------------------ |
| `key_name`       | `stack-test`           | **Required.** Replace with your SSH keypair name from **Compute - Key Pairs**. |
| `image`          | `Ubuntu 22.04 Updated` | Change only if you need a different OS image.                                  |
| `flavor`         | `Nano`                 | Change only if you want a different VM size.                                   |
| `volume_size`    | `30`                   | Increase if needed (in GB).                                                    |
| `public_network` | `Public`               | Do not change unless your cloud has a different external network name.         |

{% hint style="info" %}
**key\_name is the only parameter you must change before launching.** Everything else works with defaults.
{% endhint %}

#### Open WebUI Template

Save as `open-webui.yaml` and upload via Orchestration or Past Direct.

```
heat_template_version: 2021-04-16
description: >
  NeevCloud: Open WebUI (Remote AI Interface). ChatGPT-style UI that connects
  to external LLM APIs (OpenAI, Azure, Anthropic, etc). No local model required.
  Accessible on port 3000.

parameters:
  image:
    type: string
    default: Ubuntu 22.04 Updated
  flavor:
    type: string
    default: Nano
  volume_size:
    type: number
    description: Boot volume size in GB
    default: 30
  public_network:
    type: string
    default: Public
  key_name:
    type: string
    default: stack-test

resources:
  net:
    type: OS::Neutron::Net
    properties:
      name: openwebui-net

  subnet:
    type: OS::Neutron::Subnet
    properties:
      network: { get_resource: net }
      cidr: 10.200.0.0/24
      dns_nameservers: [8.8.8.8, 8.8.4.4]

  router:
    type: OS::Neutron::Router
    properties:
      external_gateway_info:
        network: { get_param: public_network }

  router_interface:
    type: OS::Neutron::RouterInterface
    properties:
      router: { get_resource: router }
      subnet: { get_resource: subnet }

  sg:
    type: OS::Neutron::SecurityGroup
    properties:
      name: openwebui-sg
      rules:
        - { direction: ingress, protocol: tcp, port_range_min: 22, port_range_max: 22, remote_ip_prefix: 0.0.0.0/0 }
        - { direction: ingress, protocol: tcp, port_range_min: 3000, port_range_max: 3000, remote_ip_prefix: 0.0.0.0/0 }
        - { direction: ingress, protocol: icmp, remote_ip_prefix: 0.0.0.0/0 }

  server:
    type: OS::Nova::Server
    properties:
      name: openwebui-server
      flavor: { get_param: flavor }
      key_name: { get_param: key_name }
      networks:
        - network: { get_resource: net }
      security_groups:
        - { get_resource: sg }
      block_device_mapping_v2:
        - boot_index: 0
          delete_on_termination: true
          image: { get_param: image }
          volume_size: { get_param: volume_size }
      user_data_format: RAW
      user_data: |
        #!/bin/bash
        set -e
        export DEBIAN_FRONTEND=noninteractive

        # Install Docker
        apt-get update -y
        apt-get install -y ca-certificates curl gnupg
        install -m 0755 -d /etc/apt/keyrings
        curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
        chmod a+r /etc/apt/keyrings/docker.gpg
        echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo $VERSION_CODENAME) stable" > /etc/apt/sources.list.d/docker.list
        apt-get update -y
        apt-get install -y docker-ce docker-ce-cli containerd.io

        # Run Open WebUI (no Ollama, remote API mode)
        docker run -d \
          --name open-webui \
          --restart=always \
          -p 3000:8080 \
          -e OLLAMA_BASE_URL="" \
          -v open-webui-data:/app/backend/data \
          ghcr.io/open-webui/open-webui:main

  fip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network: { get_param: public_network }

  fip_assoc:
    type: OS::Neutron::FloatingIPAssociation
    properties:
      floatingip_id: { get_resource: fip }
      port_id: { get_attr: [server, addresses, { get_resource: net }, 0, port] }

outputs:
  openwebui_url:
    description: Open WebUI URL (create admin account on first login, then configure API keys in Settings)
    value:
      str_replace:
        template: http://HOST:3000
        params:
          HOST: { get_attr: [fip, floating_ip_address] }
  floating_ip:
    description: Public IP
    value: { get_attr: [fip, floating_ip_address] }
```

#### Access:

* Web UI: <http://floating-ip:3000>
* SSH: ssh ubuntu\@floating-ip

#### Deploy:

1. Go to [Orchestration](/neevcloud-products/orchestration-infrastructure-as-code/web-server-stack-template.md)
2. Upload open-webui.yaml
3. Select keypair, flavor, image
4. Launch stack
5. Open `http://floating-ip:3000` and create your admin account
6. Go to **Settings → Connections** and add your API key (OpenAI, Anthropic, etc.)

{% hint style="info" %}
**Note:** This template does not run any local model. It provides a web UI that calls external LLM APIs. You need a valid API key to use it.
{% endhint %}


---

# 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.neevcloud.com/neevcloud-guide/stack-automation-library/ai-and-applications/open-webui-remote-ai-interface.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.
