WongSaang / chatgpt-ui

A ChatGPT web client that supports multiple users, multiple languages, and multiple database connections for persistent data storage. Provides Docker images and quick deployment scripts.
https://wongsaang.github.io/chatgpt-ui/
MIT License
1.51k stars 333 forks source link

一键安装的问题 #130

Closed KevinJonesChs closed 1 year ago

KevinJonesChs commented 1 year ago

我使用的是一键安装的命令,bash <(curl -Ls https://raw.githubusercontent.com/WongSaang/chatgpt-ui/main/deployment.sh)

安装完成以后在进入服务器的admin端的时候出现错误: Forbidden (403) CSRF verification failed. Request aborted.

More information is available with DEBUG=True.

下面是安装的 全过程:

root@C20230406122366:~# bash <(curl -Ls https://raw.githubusercontent.com/WongSaang/chatgpt-ui/main/deployment.sh) Please enter a domain name or external IP address [default: localhost]: localhost Please set a port for the frontend server [default: 80]: 80 Please set a port for the backend server [default: 9000]: 9000 Please set a port for the backend WSGI server [default: 8000]: 8000 Docker is not installed, installing now... Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB] Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB] Get:4 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [728 kB] Get:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [108 kB] Get:6 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [14.1 MB] Get:7 http://security.ubuntu.com/ubuntu jammy-security/main Translation-en [147 kB] Get:8 http://security.ubuntu.com/ubuntu jammy-security/main amd64 c-n-f Metadata [9020 B] Get:9 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [701 kB]
Get:10 http://security.ubuntu.com/ubuntu jammy-security/restricted Translation-en [109 kB]
Get:11 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 c-n-f Metadata [576 B] Get:12 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [716 kB]
Get:13 http://security.ubuntu.com/ubuntu jammy-security/universe Translation-en [118 kB]
Get:14 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 c-n-f Metadata [14.2 kB]
Get:15 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [19.4 kB]
Get:16 http://security.ubuntu.com/ubuntu jammy-security/multiverse Translation-en [4068 B]
Get:17 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 c-n-f Metadata [228 B]
Get:18 http://archive.ubuntu.com/ubuntu jammy/universe Translation-en [5652 kB]
Get:19 http://archive.ubuntu.com/ubuntu jammy/universe amd64 c-n-f Metadata [286 kB]
Get:20 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [217 kB]
Get:21 http://archive.ubuntu.com/ubuntu jammy/multiverse Translation-en [112 kB]
Get:22 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 c-n-f Metadata [8372 B]
Get:23 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [990 kB]
Get:24 http://archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [210 kB]
Get:25 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 c-n-f Metadata [13.9 kB]
Get:26 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [744 kB]
Get:27 http://archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en [115 kB]
Get:28 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 c-n-f Metadata [576 B]
Get:29 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [899 kB]
Get:30 http://archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [180 kB]
Get:31 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 c-n-f Metadata [18.6 kB]
Get:32 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [24.1 kB]
Get:33 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse Translation-en [6312 B]
Get:34 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 c-n-f Metadata [444 B]
Get:35 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [40.6 kB]
Get:36 http://archive.ubuntu.com/ubuntu jammy-backports/main Translation-en [9800 B]
Get:37 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 c-n-f Metadata [388 B]
Get:38 http://archive.ubuntu.com/ubuntu jammy-backports/restricted amd64 c-n-f Metadata [116 B]
Get:39 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [20.3 kB]
Get:40 http://archive.ubuntu.com/ubuntu jammy-backports/universe Translation-en [14.4 kB]
Get:41 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 c-n-f Metadata [480 B]
Get:42 http://archive.ubuntu.com/ubuntu jammy-backports/multiverse amd64 c-n-f Metadata [116 B]
Fetched 26.6 MB in 31s (854 kB/s)
Reading package lists... Done Reading package lists... Done Building dependency tree... Done Reading state information... Done lsb-release is already the newest version (11.1.0ubuntu4). lsb-release set to manually installed. The following additional packages will be installed: dirmngr gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv libcurl4 Suggested packages: pinentry-gnome3 tor parcimonie xloadimage scdaemon The following packages will be upgraded: ca-certificates curl dirmngr gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv libcurl4 14 upgraded, 0 newly installed, 0 to remove and 179 not upgraded. Need to get 2875 kB of archives. After this operation, 2048 B of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gpg-wks-client amd64 2.2.27-3ubuntu2.1 [62.7 kB] Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 dirmngr amd64 2.2.27-3ubuntu2.1 [293 kB] Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gnupg-utils amd64 2.2.27-3ubuntu2.1 [308 kB] Get:4 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gpg-wks-server amd64 2.2.27-3ubuntu2.1 [57.5 kB] Get:5 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gpg-agent amd64 2.2.27-3ubuntu2.1 [209 kB] Get:6 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gpg amd64 2.2.27-3ubuntu2.1 [519 kB] Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gpgconf amd64 2.2.27-3ubuntu2.1 [94.2 kB] Get:8 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gnupg-l10n all 2.2.27-3ubuntu2.1 [54.4 kB] Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gnupg all 2.2.27-3ubuntu2.1 [315 kB] Get:10 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gpgsm amd64 2.2.27-3ubuntu2.1 [197 kB] Get:11 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 gpgv amd64 2.2.27-3ubuntu2.1 [137 kB] Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 ca-certificates all 20211016ubuntu0.22.04.1 [144 kB] Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 curl amd64 7.81.0-1ubuntu1.10 [194 kB] Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libcurl4 amd64 7.81.0-1ubuntu1.10 [290 kB] Fetched 2875 kB in 5s (580 kB/s) Preconfiguring packages ... (Reading database ... 64175 files and directories currently installed.) Preparing to unpack .../00-gpg-wks-client_2.2.27-3ubuntu2.1_amd64.deb ... Unpacking gpg-wks-client (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ... Preparing to unpack .../01-dirmngr_2.2.27-3ubuntu2.1_amd64.deb ... Unpacking dirmngr (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ... Preparing to unpack .../02-gnupg-utils_2.2.27-3ubuntu2.1_amd64.deb ... Unpacking gnupg-utils (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ... Preparing to unpack .../03-gpg-wks-server_2.2.27-3ubuntu2.1_amd64.deb ... Unpacking gpg-wks-server (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ... Preparing to unpack .../04-gpg-agent_2.2.27-3ubuntu2.1_amd64.deb ... Unpacking gpg-agent (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ... Preparing to unpack .../05-gpg_2.2.27-3ubuntu2.1_amd64.deb ... Unpacking gpg (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ... Preparing to unpack .../06-gpgconf_2.2.27-3ubuntu2.1_amd64.deb ... Unpacking gpgconf (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ... Preparing to unpack .../07-gnupg-l10n_2.2.27-3ubuntu2.1_all.deb ... Unpacking gnupg-l10n (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ... Preparing to unpack .../08-gnupg_2.2.27-3ubuntu2.1_all.deb ... Unpacking gnupg (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ... Preparing to unpack .../09-gpgsm_2.2.27-3ubuntu2.1_amd64.deb ... Unpacking gpgsm (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ... Preparing to unpack .../10-gpgv_2.2.27-3ubuntu2.1_amd64.deb ... Unpacking gpgv (2.2.27-3ubuntu2.1) over (2.2.27-3ubuntu2) ... Setting up gpgv (2.2.27-3ubuntu2.1) ... (Reading database ... 64175 files and directories currently installed.) Preparing to unpack .../ca-certificates_20211016ubuntu0.22.04.1_all.deb ... Unpacking ca-certificates (20211016ubuntu0.22.04.1) over (20211016) ... Preparing to unpack .../curl_7.81.0-1ubuntu1.10_amd64.deb ... Unpacking curl (7.81.0-1ubuntu1.10) over (7.81.0-1ubuntu1.2) ... Preparing to unpack .../libcurl4_7.81.0-1ubuntu1.10_amd64.deb ... Unpacking libcurl4:amd64 (7.81.0-1ubuntu1.10) over (7.81.0-1ubuntu1.2) ... Setting up ca-certificates (20211016ubuntu0.22.04.1) ... Updating certificates in /etc/ssl/certs... rehash: warning: skipping ca-certificates.crt,it does not contain exactly one certificate or CRL 0 added, 3 removed; done. Setting up gnupg-l10n (2.2.27-3ubuntu2.1) ... Setting up gpgconf (2.2.27-3ubuntu2.1) ... Setting up libcurl4:amd64 (7.81.0-1ubuntu1.10) ... Setting up curl (7.81.0-1ubuntu1.10) ... Setting up gpg (2.2.27-3ubuntu2.1) ... Setting up gnupg-utils (2.2.27-3ubuntu2.1) ... Setting up gpg-agent (2.2.27-3ubuntu2.1) ... Setting up gpgsm (2.2.27-3ubuntu2.1) ... Setting up dirmngr (2.2.27-3ubuntu2.1) ... Setting up gpg-wks-server (2.2.27-3ubuntu2.1) ... Setting up gpg-wks-client (2.2.27-3ubuntu2.1) ... Setting up gnupg (2.2.27-3ubuntu2.1) ... Processing triggers for libc-bin (2.35-0ubuntu3) ... Processing triggers for man-db (2.10.2-1) ... Processing triggers for install-info (6.8-4build1) ... Processing triggers for ca-certificates (20211016ubuntu0.22.04.1) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. Scanning processes...
Scanning linux images...

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host. Get:1 https://download.docker.com/linux/ubuntu jammy InRelease [48.9 kB] Get:2 https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages [15.5 kB]
Hit:3 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:4 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:5 http://archive.ubuntu.com/ubuntu jammy-updates InRelease Hit:6 http://archive.ubuntu.com/ubuntu jammy-backports InRelease Fetched 64.4 kB in 1s (71.9 kB/s) Reading package lists... Done Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: docker-ce-rootless-extras libltdl7 libslirp0 pigz slirp4netns Suggested packages: aufs-tools cgroupfs-mount | cgroup-lite The following NEW packages will be installed: containerd.io docker-buildx-plugin docker-ce docker-ce-cli docker-ce-rootless-extras docker-compose-plugin libltdl7 libslirp0 pigz slirp4netns 0 upgraded, 10 newly installed, 0 to remove and 179 not upgraded. Need to get 109 MB of archives. After this operation, 396 MB of additional disk space will be used. Get:1 https://download.docker.com/linux/ubuntu jammy/stable amd64 containerd.io amd64 1.6.20-1 [28.3 MB] Get:2 http://archive.ubuntu.com/ubuntu jammy/universe amd64 pigz amd64 2.6-1 [63.6 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy/main amd64 libltdl7 amd64 2.4.6-15build2 [39.6 kB] Get:4 http://archive.ubuntu.com/ubuntu jammy/main amd64 libslirp0 amd64 4.6.1-1build1 [61.5 kB] Get:5 http://archive.ubuntu.com/ubuntu jammy/universe amd64 slirp4netns amd64 1.0.1-2 [28.2 kB] Get:6 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-buildx-plugin amd64 0.10.4-1~ubuntu.22.04~jammy [25.9 MB] Get:7 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-ce-cli amd64 5:23.0.3-1~ubuntu.22.04~jammy [13.2 MB]
Get:8 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-ce amd64 5:23.0.3-1~ubuntu.22.04~jammy [22.0 MB]
Get:9 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-ce-rootless-extras amd64 5:23.0.3-1~ubuntu.22.04~jammy [8772 kB] Get:10 https://download.docker.com/linux/ubuntu jammy/stable amd64 docker-compose-plugin amd64 2.17.2-1~ubuntu.22.04~jammy [10.9 MB] Fetched 109 MB in 1min 32s (1191 kB/s)
Selecting previously unselected package pigz. (Reading database ... 64172 files and directories currently installed.) Preparing to unpack .../0-pigz_2.6-1_amd64.deb ... Unpacking pigz (2.6-1) ... Selecting previously unselected package containerd.io. Preparing to unpack .../1-containerd.io_1.6.20-1_amd64.deb ... Unpacking containerd.io (1.6.20-1) ... Selecting previously unselected package docker-buildx-plugin. Preparing to unpack .../2-docker-buildx-plugin_0.10.4-1~ubuntu.22.04~jammy_amd64.deb ... Unpacking docker-buildx-plugin (0.10.4-1~ubuntu.22.04~jammy) ... Selecting previously unselected package docker-ce-cli. Preparing to unpack .../3-docker-ce-cli_5%3a23.0.3-1~ubuntu.22.04~jammy_amd64.deb ... Unpacking docker-ce-cli (5:23.0.3-1~ubuntu.22.04~jammy) ... Selecting previously unselected package docker-ce. Preparing to unpack .../4-docker-ce_5%3a23.0.3-1~ubuntu.22.04~jammy_amd64.deb ... Unpacking docker-ce (5:23.0.3-1~ubuntu.22.04~jammy) ... Selecting previously unselected package docker-ce-rootless-extras. Preparing to unpack .../5-docker-ce-rootless-extras_5%3a23.0.3-1~ubuntu.22.04~jammy_amd64.deb ... Unpacking docker-ce-rootless-extras (5:23.0.3-1~ubuntu.22.04~jammy) ... Selecting previously unselected package docker-compose-plugin. Preparing to unpack .../6-docker-compose-plugin_2.17.2-1~ubuntu.22.04~jammy_amd64.deb ... Unpacking docker-compose-plugin (2.17.2-1~ubuntu.22.04~jammy) ... Selecting previously unselected package libltdl7:amd64. Preparing to unpack .../7-libltdl7_2.4.6-15build2_amd64.deb ... Unpacking libltdl7:amd64 (2.4.6-15build2) ... Selecting previously unselected package libslirp0:amd64. Preparing to unpack .../8-libslirp0_4.6.1-1build1_amd64.deb ... Unpacking libslirp0:amd64 (4.6.1-1build1) ... Selecting previously unselected package slirp4netns. Preparing to unpack .../9-slirp4netns_1.0.1-2_amd64.deb ... Unpacking slirp4netns (1.0.1-2) ... Setting up docker-buildx-plugin (0.10.4-1~ubuntu.22.04~jammy) ... Setting up containerd.io (1.6.20-1) ... Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service. Setting up docker-compose-plugin (2.17.2-1~ubuntu.22.04~jammy) ... Setting up libltdl7:amd64 (2.4.6-15build2) ... Setting up docker-ce-cli (5:23.0.3-1~ubuntu.22.04~jammy) ... Setting up libslirp0:amd64 (4.6.1-1build1) ... Setting up pigz (2.6-1) ... Setting up docker-ce-rootless-extras (5:23.0.3-1~ubuntu.22.04~jammy) ... Setting up slirp4netns (1.0.1-2) ... Setting up docker-ce (5:23.0.3-1~ubuntu.22.04~jammy) ... Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service. Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket. Processing triggers for man-db (2.10.2-1) ... Processing triggers for libc-bin (2.35-0ubuntu3) ... Scanning processes...
Scanning linux images...

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host. Docker Compose is not installed, installing now... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 45.4M 100 45.4M 0 0 1134k 0 0:00:41 0:00:41 --:--:-- 1167k Downloading configuration files... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2410 100 2410 0 0 5694 0 --:--:-- --:--:-- --:--:-- 5683 Starting services... [+] Running 30/30 ⠿ client Pulled 193.3s ⠿ 91d30c5bc195 Pull complete 99.0s ⠿ 364c153f6a00 Pull complete 188.7s ⠿ 1f67b6d8c10d Pull complete 188.9s ⠿ 206a12661583 Pull complete 189.0s ⠿ dc87c07d161f Pull complete 189.1s ⠿ 5141691bd59a Pull complete 189.5s ⠿ backend-wsgi-server Pulled 229.9s ⠿ f1f26f570256 Pull complete 86.3s ⠿ 2d2b01660885 Pull complete 86.5s ⠿ 26d67cf2888e Pull complete 87.2s ⠿ 3580911408ce Pull complete 87.3s ⠿ 281eb31ad614 Pull complete 87.7s ⠿ 2d7ad282d7f0 Pull complete 221.9s ⠿ c61bbc9e9f5b Pull complete 222.0s ⠿ 3c209f31f2a7 Pull complete 225.6s ⠿ fe95a4fb6379 Pull complete 225.7s ⠿ 8db04f481b99 Pull complete 225.8s ⠿ 6b79b97a74e4 Pull complete 226.1s ⠿ backend-web-server Pulled 35.3s ⠿ f56be85fc22e Pull complete 7.1s ⠿ 902afa68ca51 Pull complete 7.4s ⠿ b0a3a88d1edf Pull complete 7.5s ⠿ 51509a9feac5 Pull complete 7.6s ⠿ 2dcba36d07e0 Pull complete 7.7s ⠿ 0665eda1eb4f Pull complete 7.8s ⠿ 034c69766aa3 Pull complete 31.2s ⠿ e2ecc6a10df9 Pull complete 31.3s ⠿ a40868713b35 Pull complete 31.5s ⠿ 7a361e28c048 Pull complete 31.6s [+] Running 4/4 ⠿ Network root_chatgpt_ui_network Created 0.1s ⠿ Container root-backend-wsgi-server-1 Started 0.9s ⠿ Container root-backend-web-server-1 Started 1.3s ⠿ Container root-client-1 Started 1.9s Done

luowei729 commented 1 year ago

要在安装配置的时候把默认的localhost改成自己的域名,不然登录不了后台

KevinJonesChs commented 1 year ago

好的 谢谢