Files
chatgpt-ui/guide/quick-start.html
github-actions[bot] 3360252d06 Deploy to GitHub pages
2023-04-18 02:45:52 +00:00

93 lines
22 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="VuePress 2.0.0-beta.61">
<style>
:root {
--c-bg: #fff;
}
html.dark {
--c-bg: #22272e;
}
html, body {
background-color: var(--c-bg);
}
</style>
<script>
const userMode = localStorage.getItem('vuepress-color-scheme');
const systemDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
if (userMode === 'dark' || (userMode !== 'light' && systemDarkMode)) {
document.documentElement.classList.toggle('dark', true);
}
</script>
<title>Quick Start | ChatGPT UI</title><meta name="description" content="A ChatGPT web client">
<link rel="preload" href="/chatgpt-ui/assets/style-ad6949cb.css" as="style"><link rel="stylesheet" href="/chatgpt-ui/assets/style-ad6949cb.css">
<link rel="modulepreload" href="/chatgpt-ui/assets/app-525ee8ad.js"><link rel="modulepreload" href="/chatgpt-ui/assets/framework-5866ffd3.js"><link rel="modulepreload" href="/chatgpt-ui/assets/quick-start.html-5d24620c.js"><link rel="modulepreload" href="/chatgpt-ui/assets/quick-start.html-b336d0c1.js"><link rel="prefetch" href="/chatgpt-ui/assets/index.html-f32af385.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/buymeacoffee.html-f20ec2fb.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/configuration.html-ed512da6.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/development.html-117eb2b5.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/problems.html-3485ea96.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/index.html-a9203641.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/buymeacoffee.html-22a781eb.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/configuration.html-0ef661b4.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/development.html-b8d21bb5.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/problems.html-f1039fc4.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/quick-start.html-91a3ce5d.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/404.html-60b35caa.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/index.html-18d42ac0.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/buymeacoffee.html-138309cb.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/configuration.html-a7684ba6.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/development.html-df5e9336.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/problems.html-84e6145b.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/index.html-d042d854.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/buymeacoffee.html-5158290f.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/configuration.html-99825d43.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/development.html-989a2b06.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/problems.html-dabd58d0.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/quick-start.html-fc1bc91c.js" as="script"><link rel="prefetch" href="/chatgpt-ui/assets/404.html-87d54bd8.js" as="script">
</head>
<body>
<div id="app"><!--[--><div class="theme-container"><!--[--><header class="navbar"><div class="toggle-sidebar-button" title="toggle sidebar" aria-expanded="false" role="button" tabindex="0"><div class="icon" aria-hidden="true"><span></span><span></span><span></span></div></div><span><a href="/chatgpt-ui/" class=""><!----><span class="site-name">ChatGPT UI</span></a></span><div class="navbar-items-wrapper" style=""><!--[--><!--]--><nav class="navbar-items can-hide"><!--[--><div class="navbar-item"><a href="/chatgpt-ui/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/WongSaang/chatgpt-ui/releases" rel="noopener noreferrer" target="_blank" aria-label="Changelog"><!--[--><!--]--> Changelog <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="Select language"><span class="title">Languages</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="Select language"><span class="title">Languages</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><a aria-current="page" href="/chatgpt-ui/guide/quick-start.html" class="router-link-active router-link-exact-active router-link-active" aria-label="English"><!--[--><!--]--> English <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/chatgpt-ui/zh/guide/quick-start.html" class="" aria-label="简体中文"><!--[--><!--]--> 简体中文 <!--[--><!--]--></a></li><!--]--></ul></div></div><!--]--></nav><!--[--><!--]--><button class="toggle-color-mode-button" title="toggle color mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><!----></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-items"><!--[--><div class="navbar-item"><a href="/chatgpt-ui/" class="" aria-label="Guide"><!--[--><!--]--> Guide <!--[--><!--]--></a></div><div class="navbar-item"><a class="external-link" href="https://github.com/WongSaang/chatgpt-ui/releases" rel="noopener noreferrer" target="_blank" aria-label="Changelog"><!--[--><!--]--> Changelog <span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!--[--><!--]--></a></div><div class="navbar-item"><div class="navbar-dropdown-wrapper"><button class="navbar-dropdown-title" type="button" aria-label="Select language"><span class="title">Languages</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="Select language"><span class="title">Languages</span><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><a aria-current="page" href="/chatgpt-ui/guide/quick-start.html" class="router-link-active router-link-exact-active router-link-active" aria-label="English"><!--[--><!--]--> English <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a href="/chatgpt-ui/zh/guide/quick-start.html" class="" aria-label="简体中文"><!--[--><!--]--> 简体中文 <!--[--><!--]--></a></li><!--]--></ul></div></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading active">Guide <!----></p><ul style="" class="sidebar-item-children"><!--[--><li><a href="/chatgpt-ui/" class="sidebar-item" aria-label="Introduction"><!--[--><!--]--> Introduction <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/chatgpt-ui/guide/quick-start.html" class="router-link-active router-link-exact-active router-link-active sidebar-item active" aria-label="Quick Start"><!--[--><!--]--> Quick Start <!--[--><!--]--></a><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/chatgpt-ui/guide/quick-start.html#deploying" class="router-link-active router-link-exact-active sidebar-item" aria-label="Deploying"><!--[--><!--]--> Deploying <!--[--><!--]--></a><ul style="" class="sidebar-item-children"><!--[--><li><a aria-current="page" href="/chatgpt-ui/guide/quick-start.html#quickly-deploy-script" class="router-link-active router-link-exact-active sidebar-item" aria-label="Quickly deploy script"><!--[--><!--]--> Quickly deploy script <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/chatgpt-ui/guide/quick-start.html#docker-compose" class="router-link-active router-link-exact-active sidebar-item" aria-label="Docker Compose"><!--[--><!--]--> Docker Compose <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><a aria-current="page" href="/chatgpt-ui/guide/quick-start.html#after-deployment" class="router-link-active router-link-exact-active sidebar-item" aria-label="After Deployment"><!--[--><!--]--> After Deployment <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><a href="/chatgpt-ui/guide/configuration.html" class="sidebar-item" aria-label="Configuration Reference"><!--[--><!--]--> Configuration Reference <!--[--><!--]--></a><!----></li><li><a href="/chatgpt-ui/guide/problems.html" class="sidebar-item" aria-label="Encountering Issues"><!--[--><!--]--> Encountering Issues <!--[--><!--]--></a><!----></li><li><a href="/chatgpt-ui/guide/development.html" class="sidebar-item" aria-label="Development Guide"><!--[--><!--]--> Development Guide <!--[--><!--]--></a><!----></li><li><a href="/chatgpt-ui/guide/buymeacoffee.html" class="sidebar-item" aria-label="Donation"><!--[--><!--]--> Donation <!--[--><!--]--></a><!----></li><!--]--></ul></li><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page"><!--[--><!--]--><div class="theme-default-content"><!--[--><!--]--><div><h1 id="quick-start" tabindex="-1"><a class="header-anchor" href="#quick-start" aria-hidden="true">#</a> Quick Start</h1><p>This project provides related docker images for deployment on a VPS or your local computer. Please note that if your network is unable to request the OpenAI API address, you need to configure a proxy. If you want to make it available to other users, it&#39;s best to have a domain name and resolve it to the server.</p><p>You also need an OpenAI API Key, and there are multiple ways to obtain it online, please search for it yourself.</p><h2 id="deploying" tabindex="-1"><a class="header-anchor" href="#deploying" aria-hidden="true">#</a> Deploying</h2><h3 id="quickly-deploy-script" tabindex="-1"><a class="header-anchor" href="#quickly-deploy-script" aria-hidden="true">#</a> Quickly deploy script</h3><p><strong>Note: This script has only been verified on Ubuntu Server 22.04 LTS.</strong></p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>bash &lt;(curl -Ls https://raw.githubusercontent.com/WongSaang/chatgpt-ui/main/deployment.sh)
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="docker-compose" tabindex="-1"><a class="header-anchor" href="#docker-compose" aria-hidden="true">#</a> Docker Compose</h3><h4 id="prepare-docker-compose-yml" tabindex="-1"><a class="header-anchor" href="#prepare-docker-compose-yml" aria-hidden="true">#</a> Prepare docker-compose.yml</h4><p>The project provides a sample <code>docker-compose.yml</code>. If you want to customize the configuration, please refer to the <a href="/en/guide/configuration" target="_blank" rel="noopener noreferrer">configuration reference<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> section.</p><p>You can download the <code>docker-compose.yml</code> template to your local machine or server by clicking on the link below:</p><p><a href="https://raw.githubusercontent.com/WongSaang/chatgpt-ui/main/docker-compose.yml" target="_blank" rel="noopener noreferrer">https://raw.githubusercontent.com/WongSaang/chatgpt-ui/main/docker-compose.yml<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a></p><p>You can also manually create the <code>docker-compose.yml</code> file and copy the following content into the file:</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>version: &#39;3&#39;
services:
client:
platform: linux/x86_64
image: wongsaang/chatgpt-ui-client:latest
environment:
- SERVER_DOMAIN=http://backend-web-server
- DEFAULT_LOCALE=en
# - NUXT_PUBLIC_APP_NAME=&#39;ChatGPT UI&#39; # The name of the application
# - NUXT_PUBLIC_TYPEWRITER=true # Whether to enable the typewriter effect, default false
# - NUXT_PUBLIC_TYPEWRITER_DELAY=50 # The delay time of the typewriter effect, default 50ms
depends_on:
- backend-web-server
ports:
- &#39;${CLIENT_PORT:-80}:80&#39;
networks:
- chatgpt_ui_network
restart: always
backend-wsgi-server:
platform: linux/x86_64
image: wongsaang/chatgpt-ui-wsgi-server:latest
environment:
- APP_DOMAIN=${APP_DOMAIN:-localhost:9000}
- SERVER_WORKERS=3 # The number of worker processes for handling requests.
# - DB_URL=postgres://postgres:postgrespw@localhost:49153/chatgpt # If this parameter is not set, the built-in Sqlite will be used by default. It should be noted that if you do not connect to an external database, the data will be lost after the container is destroyed.
- DJANGO_SUPERUSER_USERNAME=admin # default superuser name
- DJANGO_SUPERUSER_PASSWORD=password # default superuser password
- DJANGO_SUPERUSER_EMAIL=admin@example.com # default superuser email
- ACCOUNT_EMAIL_VERIFICATION=${ACCOUNT_EMAIL_VERIFICATION:-none} # Determines the e-mail verification method during signup choose one of &quot;none&quot;, &quot;optional&quot;, or &quot;mandatory&quot;. Default is &quot;optional&quot;. If you don&#39;t need to verify the email, you can set it to &quot;none&quot;.
# If you want to use the email verification function, you need to configure the following parameters
# - EMAIL_HOST=SMTP server address
# - EMAIL_PORT=SMTP server port
# - EMAIL_HOST_USER=
# - EMAIL_HOST_PASSWORD=
# - EMAIL_USE_TLS=True
# - EMAIL_FROM=no-reply@example.com #Default sender email address
ports:
- &#39;${WSGI_PORT:-8000}:8000&#39;
networks:
- chatgpt_ui_network
restart: always
backend-web-server:
platform: linux/x86_64
image: wongsaang/chatgpt-ui-web-server:latest
environment:
- BACKEND_URL=http://backend-wsgi-server:8000
ports:
- &#39;${SERVER_PORT:-9000}:80&#39;
depends_on:
- backend-wsgi-server
networks:
- chatgpt_ui_network
restart: always
networks:
chatgpt_ui_network:
driver: bridge
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h4 id="starting-the-service" tabindex="-1"><a class="header-anchor" href="#starting-the-service" aria-hidden="true">#</a> Starting the Service</h4><p>After modifying the configuration as needed, you can start the service by running the following command:</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>docker-compose up --pull always -d
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>This command is used to start the services specified in the Docker Compose configuration. The specific meanings of the parameters are as follows:</p><ul><li><code>up</code>: start the services specified in the Docker Compose configuration.</li><li><code>--pull always</code>: before starting the service each time, the latest version of the image will be pulled from the Docker image repository. This ensures that the image used is always up to date.</li><li><code>-d</code>: run the service in the background. If this parameter is not added, the service will run in the current terminal window until the user manually stops it.</li></ul><h2 id="after-deployment" tabindex="-1"><a class="header-anchor" href="#after-deployment" aria-hidden="true">#</a> After Deployment</h2><p>Access the management panel at <code>http(s)://your.domain:9000/admin</code> or <code>http(s)://123.123.123.123:9000/admin</code> using the default superuser account:</p><ul><li>username: <strong>admin</strong></li><li>password: <strong>password</strong></li></ul><p><s>Before starting a chat, you need to add an OpenAI API key. In the management panel, in the &quot;Settings&quot; section, there is a record named <code>openai_api_key</code>. Set the value to your API key.</s></p><p>In the latest version, a separate API Key management has been added to the admin panel, located under &quot;Provider/Api keys&quot;. You can add multiple API Keys here, and the backend program will track the usage of each key&#39;s token and balance the usage based on token usage. <strong>To enable this feature, you need to delete the previous &quot;openai_api_key&quot; setting.</strong></p><p>Now you can access the client at <code>http(s)://your.domain</code> or <code>http://123.123.123.123</code> to start chatting.</p><p>🎉🎉🎉 Have fun!</p></div><!--[--><!--]--></div><footer class="page-meta"><!----><div class="meta-item last-updated"><span class="meta-item-label">Last Updated: </span><!----></div><div class="meta-item contributors"><span class="meta-item-label">Contributors: </span><span class="meta-item-info"><!--[--><!--[--><span class="contributor" title="email: rafiwx@gmail.com">Rafi</span><!--[-->, <!--]--><!--]--><!--[--><span class="contributor" title="email: iluozan@126.com">AI&amp;I</span><!----><!--]--><!--]--></span></div></footer><nav class="page-nav"><p class="inner"><span class="prev"><a href="/chatgpt-ui/" class="" aria-label="Introduction"><!--[--><!--]--> Introduction <!--[--><!--]--></a></span><span class="next"><a href="/chatgpt-ui/guide/configuration.html" class="" aria-label="Configuration Reference"><!--[--><!--]--> Configuration Reference <!--[--><!--]--></a></span></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
<script type="module" src="/chatgpt-ui/assets/app-525ee8ad.js" defer></script>
</body>
</html>