Skip to content

Commit dac487c

Browse files
committed
feat(genapi): add tuto openwebui
1 parent a79154c commit dac487c

File tree

1 file changed

+137
-0
lines changed
  • tutorials/deploy-openwebui-with-generative-apis

1 file changed

+137
-0
lines changed
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
---
2+
meta:
3+
title: Deploying Open WebUI with Scaleway's Generative APIs
4+
description: This guide explains how to deploy Open WebUI with Scaleway's Generative APIs using Docker or Scaleway's Serverless Containers.
5+
content:
6+
h1: Deploying Open WebUI with Scaleway's Generative APIs
7+
paragraph: Learn how to integrate Scaleway's Generative APIs with Open WebUI for a seamless AI-powered experience using Docker or Scaleway's Serverless Containers.
8+
tags: open-webui docker scaleway generative-apis
9+
categories:
10+
- generative-apis
11+
dates:
12+
validation: 2025-02-17
13+
posted: 2025-02-17
14+
---
15+
16+
Integrating Scaleway's Generative APIs with Open WebUI allows you to leverage powerful AI models in a user-friendly, self-hosted interface.
17+
Open WebUI is an open-source frontend that simplifies interactions with AI models, providing an intuitive alternative to proprietary AI interfaces.
18+
19+
This tutorial will guide you through:
20+
21+
- Configuring Generative APIs on Scaleway
22+
- Installing Open WebUI Locally
23+
- Deploying Open WebUI Using Scaleway's Serverless Containers
24+
25+
26+
By the end, you'll have a fully functional AI-powered setup.
27+
28+
<Macro id="requirements" />
29+
30+
### Prerequisites
31+
32+
- A Scaleway account logged into the [console](https://console.scaleway.com)
33+
- [Owner](/iam/concepts/#owner) status or appropriate [IAM permissions](/iam/concepts/#permission)
34+
- [Docker](https://docs.docker.com/get-docker/) installed on your system
35+
36+
## Configuring Generative APIs on Scaleway
37+
38+
Scaleway's Generative APIs provide access to advanced AI models via simple API calls. To set up:
39+
40+
### Creating an API key
41+
42+
1. Log in to the [Scaleway Console](https://console.scaleway.com/).
43+
2. Click on your **Organization name** in the top right corner of the console to display the menu.
44+
3. Click **API keys** in the pop-up menu.
45+
4. Click **Generate a New API Key**, provide a name, and store the key securely.
46+
47+
<Message type="tip">
48+
For detailed information about creating API keys, refer to [How to create API keys](/iam/how-to/create-api-keys/).
49+
</Message>
50+
51+
### Identifying the API endpoint
52+
53+
Scaleway assigns a unique endpoint for your Generative API access. This can be found in the Generative APIs section of the console. The format typically follows:
54+
55+
```
56+
https://api.scaleway.ai/YOUR_PROJECT_ID/v1
57+
```
58+
59+
<Message type="note">
60+
For more information about your Project ID, refer to our [dedicated documentation](/organizations-and-projects/how-to/create-a-project/).
61+
</Message>
62+
63+
## Installing Open WebUI locally
64+
65+
Open WebUI provides an easy-to-use interface for interacting with AI models. The recommended installation method is via Docker.
66+
67+
### Running Open WebUI with Scaleway integration
68+
69+
1. Pull and Run the Docker container:
70+
71+
```bash
72+
docker run -d \
73+
-p 3000:8080 \
74+
-e OPENAI_API_BASE_URL=https://api.scaleway.ai/<YOUR_PROJECT_ID>/v1 \
75+
-e OPENAI_API_KEY=<YOUR_API_KEY> \
76+
-v open-webui:/app/backend/data \
77+
--name open-webui \
78+
--restart always \
79+
ghcr.io/open-webui/open-webui:main
80+
```
81+
82+
<Message type="note">
83+
Replace `<YOUR_PROJECT_ID>` and `<YOUR_API_KEY>` with your actual values.
84+
</Message>
85+
86+
2. Navigate to `http://localhost:3000` in your browser to access the Open WebUI interface.
87+
88+
3. Click **Sign Up** to create an administrator account.
89+
4. Select a Model from the available Scaleway AI models and start interacting.
90+
91+
For more details, refer to the [Open WebUI Quick Start Guide](https://docs.openwebui.com/getting-started/quick-start/).
92+
93+
## Deploying Open WebUI Using Scaleway's Serverless Containers (Optional)
94+
95+
For cloud-based deployment, Scaleway's Serverless Containers offer a scalable solution.
96+
97+
### Deploying on Scaleway via the console
98+
99+
1. In the Scaleway Console, navigate to **Serverless** > **Containers**.
100+
2. Click **Deploy Container** to display the container creation wizard.
101+
3. Select an external registry and use the image `ghcr.io/open-webui/open-webui:main`.
102+
4. Enter a name for your container and configure it's resources.
103+
5. Click **Advanced options** and configure Secrets:
104+
- Set `OPENAI_API_BASE_URL` and `OPENAI_API_KEY` with your specific values.
105+
106+
6. Click **Deploy container** to launch deployment. Once deployed, note the provided endpoint to access Open WebUI.
107+
108+
### Deploying on Scaleway using the ClI
109+
110+
#### Ensure your Scaleway namespace exists
111+
112+
Scaleway Serverless Containers are deployed inside a **namespace**. If you do not have one, create it first:
113+
114+
```bash
115+
scw container namespace create name=openwebui-ns region=fr-par
116+
```
117+
Find the namespace ID:
118+
```bash
119+
scw container namespace list
120+
```
121+
122+
### Create the Serverless Container
123+
Now, create the container with your **Docker image and secret injection**:
124+
125+
```bash
126+
127+
$ scw container container create name=open-webui \
128+
namespace-id=<YOUR_NAMESPACE_ID> \
129+
registry-image="ghcr.io/open-webui/open-webui:main" \
130+
environment-variables.OPENAI_API_BASE_URL="https://api.scaleway.ai/<YOUR_PROJECT_ID>/v1" \
131+
secret-environment-variables.0.key="OPENAI_API_KEY" \
132+
secret-environment-variables.0.value="<YOUR_SECRET_KEY>" \
133+
region=fr-par
134+
```
135+
136+
For more details, refer to Scaleway's [Serverless Containers documentation](/serverless-containers/).
137+

0 commit comments

Comments
 (0)