[GH-ISSUE #8358] [Bug] Admin Console error "Unable to connect to server" when using FQDN=localhost in Docker Compose #3760

Open
opened 2026-03-23 21:32:58 +00:00 by mirror · 11 comments
Owner

Originally created by @vagetablechicken on GitHub (Nov 26, 2025).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/8358

Bug Description

Ref tutorial, I cp deploy.env .env, so it'll use FQDN=localhost, the admin frontend might fail to connect to GoTrue or other services, got error Unable to connect to server. Please check your connection and try again. on admin console web.

I had to switch localhost to my local LAN IP to get everything working properly. FQDN=<my ip>

Is this issue specific to macOS or OrbStack? If so, maybe we should add more comment about it, e.g. 'careful about FQDN', 'if localhost can't work, use lan ip'.

How to Reproduce

I deployed AppFlowy on macOS (OrbStack) following the official docs https://appflowy.com/docs/Local-Host-Deployment. I used the default configuration by copying deploy.env directly to .env.

Upon accessing the console at localhost:80/console, the frontend fails to connect to the backend with the error: 'Unable to connect to server.' It seems the default configuration might have issues communicating within the container environment.

Expected Behavior

Should login successfully.

Operating System

macos 15.5

AppFlowy Version(s)

latest

Screenshots

Image

Additional Context

No response

Originally created by @vagetablechicken on GitHub (Nov 26, 2025). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/8358 ### Bug Description Ref tutorial, I `cp deploy.env .env`, so it'll use `FQDN=localhost`, the admin frontend might fail to connect to GoTrue or other services, got error `Unable to connect to server. Please check your connection and try again.` on admin console web. I had to switch localhost to my local LAN IP to get everything working properly. `FQDN=<my ip>` Is this issue specific to macOS or OrbStack? If so, maybe we should add more comment about it, e.g. 'careful about FQDN', 'if localhost can't work, use lan ip'. ### How to Reproduce I deployed AppFlowy on macOS (OrbStack) following the official docs https://appflowy.com/docs/Local-Host-Deployment. I used the default configuration by copying deploy.env directly to .env. Upon accessing the console at localhost:80/console, the frontend fails to connect to the backend with the error: 'Unable to connect to server.' It seems the default configuration might have issues communicating within the container environment. ### Expected Behavior Should login successfully. ### Operating System macos 15.5 ### AppFlowy Version(s) latest ### Screenshots <img width="433" height="546" alt="Image" src="https://github.com/user-attachments/assets/ff1952e6-2b6b-4dec-82a4-9601fcfc7514" /> ### Additional Context _No response_
Author
Owner

@Zack-labs commented on GitHub (Dec 1, 2025):

same

<!-- gh-comment-id:3598451862 --> @Zack-labs commented on GitHub (Dec 1, 2025): same
Author
Owner

@Zack-labs commented on GitHub (Dec 1, 2025):

I added this to .env; but still same error:

GOTRUE_VERSION=0.9.165
APPFLOWY_CLOUD_VERSION=0.9.165
ADMIN_FRONTEND_VERSION=0.9.165
APPFLOWY_WORKER_VERSION=0.9.165
APPFLOWY_WEB_VERSION=0.9.131

<!-- gh-comment-id:3598538832 --> @Zack-labs commented on GitHub (Dec 1, 2025): I added this to .env; but still same error: GOTRUE_VERSION=0.9.165 APPFLOWY_CLOUD_VERSION=0.9.165 ADMIN_FRONTEND_VERSION=0.9.165 APPFLOWY_WORKER_VERSION=0.9.165 APPFLOWY_WEB_VERSION=0.9.131
Author
Owner

@james-agbonz commented on GitHub (Dec 2, 2025):

I am currently experiencing the same issue and sometimes a successful login is cached , but when i logout i have the same recurring error again

Image
<!-- gh-comment-id:3603195970 --> @james-agbonz commented on GitHub (Dec 2, 2025): I am currently experiencing the same issue and sometimes a successful login is cached , but when i logout i have the same recurring error again <img width="554" height="305" alt="Image" src="https://github.com/user-attachments/assets/97ed1f6a-0239-4856-b223-3628baf67f67" />
Author
Owner

@Zack-labs commented on GitHub (Dec 2, 2025):

@vagetablechicken @james-agbonz
It worked yaaaaay

  1. In the .env file, replace localhost with your machine’s IP address:
    FQDN=<your_machine_ip>
    
  2. When accessing the admin platform, use:
    http://<your_machine_ip>/console/login
    
    Make sure to use http instead of https to avoid CORS/network issues.
<!-- gh-comment-id:3603846997 --> @Zack-labs commented on GitHub (Dec 2, 2025): @vagetablechicken @james-agbonz It worked yaaaaay 1. In the `.env` file, replace `localhost` with your machine’s IP address: ``` FQDN=<your_machine_ip> ``` 2. When accessing the admin platform, use: ``` http://<your_machine_ip>/console/login ``` **Make sure to use `http` instead of `https` to avoid CORS/network issues.**
Author
Owner

@JasZhe commented on GitHub (Dec 15, 2025):

For some reason I get a 200 response but with this, seems like there's supposed to be some sort of redirect maybe?

0:{"a":"$@1","f":"","b":"Aa32vRWD7VkR9tTXDb9eT"}
1:{"success":false,"error":{"message":"Unexpected token '<', \"\n<!DOCTYPE \"... is not valid JSON","type":"NETWORK"}}

I changed the FQDN to point to the internal IP of my host machine (i.e. 192.168.x.x) and the custom nginx ports NGINX_PORT=4444 and NGINX_TLS_PORT=4445 as well as changing the docker compose mounts to be bind mounts. And port mappings for redis:
ports:

  • 6479:6379

and for the gotrue:
ports:

  • 9999:9999

all i see is an nginx log:

nginx-1            | 10.8.0.10 - - [15/Dec/2025:06:39:26 +0000] "POST /console/login HTTP/1.1" 200 188 "http://192.168.0.110:4444/console/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/146.0"

edit: resetting the nginx port to 80 and 443 seems to fix it..

edit2: 🤦 I had to add the custom nginx port to the FQDN i.e. 192.168.x.x:4444 and then I also had to allow the docker network through my firewall i.e. docker network inspect appflowy-cloud_default -> <subnet i.e. 172.16.16.0/24> -> sudo ufw allow from <subnet i.e. 172.16.16.0/24> to any port 4444 proto tcp

<!-- gh-comment-id:3653734453 --> @JasZhe commented on GitHub (Dec 15, 2025): For some reason I get a 200 response but with this, seems like there's supposed to be some sort of redirect maybe? ``` 0:{"a":"$@1","f":"","b":"Aa32vRWD7VkR9tTXDb9eT"} 1:{"success":false,"error":{"message":"Unexpected token '<', \"\n<!DOCTYPE \"... is not valid JSON","type":"NETWORK"}} ``` I changed the FQDN to point to the internal IP of my host machine (i.e. 192.168.x.x) and the custom nginx ports NGINX_PORT=4444 and NGINX_TLS_PORT=4445 as well as changing the docker compose mounts to be bind mounts. And port mappings for redis: ports: - 6479:6379 and for the gotrue: ports: - 9999:9999 all i see is an nginx log: ``` nginx-1 | 10.8.0.10 - - [15/Dec/2025:06:39:26 +0000] "POST /console/login HTTP/1.1" 200 188 "http://192.168.0.110:4444/console/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/146.0" ``` edit: resetting the nginx port to 80 and 443 seems to fix it.. edit2: 🤦 I had to add the custom nginx port to the FQDN i.e. 192.168.x.x:4444 and then I also had to allow the docker network through my firewall i.e. `docker network inspect appflowy-cloud_default` -> `<subnet i.e. 172.16.16.0/24>` -> `sudo ufw allow from `<subnet i.e. 172.16.16.0/24>` to any port 4444 proto tcp`
Author
Owner

@tylerjwoodfin commented on GitHub (Dec 20, 2025):

@JasZhe 's solution worked perfectly for me, as well, after about 2 hours of troubleshooting this.

  • Change FQDN to your host, including the port
  • I didn't have to change Gotrue or nginx at all from what the default .env has.
  • docker network inspect appflowy-cloud_default -> <subnet i.e. 172.16.16.0/24> -> sudo ufw allow from <subnet i.e. 172.16.16.0/24> to any port 4444 proto tcp
<!-- gh-comment-id:3677426515 --> @tylerjwoodfin commented on GitHub (Dec 20, 2025): @JasZhe 's solution worked perfectly for me, as well, after about 2 hours of troubleshooting this. - Change FQDN to your host, including the port - I didn't have to change Gotrue or nginx at all from what the default .env has. - docker network inspect appflowy-cloud_default -> <subnet i.e. 172.16.16.0/24> -> sudo ufw allow from <subnet i.e. 172.16.16.0/24> to any port 4444 proto tcp
Author
Owner

@Varssos commented on GitHub (Jan 14, 2026):

Issue is still visible.
@Zack-labs , @JasZhe , @tylerjwoodfin thank you guys.
In my case in docker logs appflowy-cloud-admin_frontend-1 I had:

[18:33:28] 🚨 [ServerFetch] [CRITICAL] Server fetch failed: {
  name: 'GoTrue login',
  url: 'http://localhost/gotrue/token?grant_type=password',
  method: 'POST',
  error: {
    name: 'TypeError',
    message: 'fetch failed',
...

I only had to change in .env:
FQDN=<your_machine_ip>:<port>
In my case it was(because I changed NGINX_PORT=4080):
FQDN=192.168.0.64:4080

After that docker logs appflowy-cloud-admin_frontend-1:

...
 ✓ Starting...
 ✓ Ready in 280ms

<!-- gh-comment-id:3751221480 --> @Varssos commented on GitHub (Jan 14, 2026): Issue is still visible. @Zack-labs , @JasZhe , @tylerjwoodfin thank you guys. In my case in `docker logs appflowy-cloud-admin_frontend-1` I had: ``` [18:33:28] 🚨 [ServerFetch] [CRITICAL] Server fetch failed: { name: 'GoTrue login', url: 'http://localhost/gotrue/token?grant_type=password', method: 'POST', error: { name: 'TypeError', message: 'fetch failed', ... ``` I only had to change in `.env`: `FQDN=<your_machine_ip>:<port>` In my case it was(because I changed NGINX_PORT=4080): `FQDN=192.168.0.64:4080` After that `docker logs appflowy-cloud-admin_frontend-1`: ``` ... ✓ Starting... ✓ Ready in 280ms ```
Author
Owner

@ediwon23 commented on GitHub (Jan 30, 2026):

I found a trick to fix this,
When I traced the error from admin_frontend container, which is "error. getaddrinfo ENOTFOUND domain.com"
So I assume it is a DNS error, then add extra_hosts to admin_frontend service in docker-compose.yml

admin_frontend:
    restart: on-failure
    image: appflowyinc/admin_frontend:${APPFLOWY_ADMIN_FRONTEND_VERSION:-latest}
    environment:
      - APPFLOWY_GOTRUE_BASE_URL=${APPFLOWY_BASE_URL}/gotrue
      - APPFLOWY_BASE_URL=${APPFLOWY_BASE_URL}
    extra_hosts:
      - "yourdomain.com:172.20.0.5"

You can find this ip from docker inspect appflowy-cloud-nginx-1, then don't forget to apply the change by docker compose up -d. After that, you could log in "http://youdomain.com/console" and create a user and password.

As a result, I think the problem is that admin_frontend need to access nginx. But it can't if you didn't expose to public without DNS record.

<!-- gh-comment-id:3821512940 --> @ediwon23 commented on GitHub (Jan 30, 2026): I found a trick to fix this, When I traced the error from `admin_frontend` container, which is "error. getaddrinfo ENOTFOUND domain.com" So I assume it is a DNS error, then add extra_hosts to `admin_frontend` service in `docker-compose.yml` ``` admin_frontend: restart: on-failure image: appflowyinc/admin_frontend:${APPFLOWY_ADMIN_FRONTEND_VERSION:-latest} environment: - APPFLOWY_GOTRUE_BASE_URL=${APPFLOWY_BASE_URL}/gotrue - APPFLOWY_BASE_URL=${APPFLOWY_BASE_URL} extra_hosts: - "yourdomain.com:172.20.0.5" ``` You can find this ip from `docker inspect appflowy-cloud-nginx-1`, then don't forget to apply the change by `docker compose up -d`. After that, you could log in "http://youdomain.com/console" and create a user and password. As a result, I think the problem is that admin_frontend need to access nginx. But it can't if you didn't expose to public without DNS record.
Author
Owner

@khanetor commented on GitHub (Feb 25, 2026):

I think I am seeing the regression of this issue, since I am using the latest admin frontend docker image.

I am using a domain name "appflowy.example.com", so I set the env var FQDN as such, instead of ip:port as mentioned above.

Then, when logging in the admin console, I can only see this

Image

Checking the logs in different containers (10 containers in total), I can only see an error in the admin frontend container.

[19:19:23] 🚨 [ServerFetch] [CRITICAL] Server fetch failed: {
name: 'GoTrue health check',
url: 'http://localhost:9999/health',
method: 'GET',
error: {
name: 'TypeError',
message: 'fetch failed',
stack: 'TypeError: fetch failed\n' +
'    at node:internal/deps/undici/undici:14902:13\n' +
'    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
'    at async n (/app/apps/super/.next/server/chunks/484.js:1:1278)\n' +
'    at async Promise.allSettled (index 0)\n' +
'    at async s (/app/apps/super/.next/server/chunks/484.js:1:2320)\n' +
'    at async t4 (/app/node_modules/.pnpm/next@15.5.7_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:2454)\n' +
'    at async /app/node_modules/.pnpm/next@15.5.7_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:1271\n' +
'    at async t2 (/app/node_modules/.pnpm/next@15.5.7_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:14:14859)\n' +
'    at async nQ (/app/node_modules/.pnpm/next@15.5.7_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:23704)\n' +
'    at async m (/app/apps/super/.next/server/app/login/page.js:1:8029)',
cause: {
name: 'AggregateError',
message: '',
stack: 'AggregateError: \n' +
'    at internalConnectMultiple (node:net:1122:18)\n' +
'    at afterConnectMultiple (node:net:1689:7)\n' +
'    at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17)'
}
}
}

What I find interesting is the use of localhost. I think it is hard-coded somewhere, because I don't specify any env vars to localhost. When I sh into the admin frontend container, I can ping gotrue:9999 without problems, and the ping was not successful with localhost:9999.

In other instances, I also saw this error message randomly.

[19:19:23] 🚨 [ServerFetch] [CRITICAL] Server fetch failed: {
name: 'AppFlowy Cloud health check',
url: 'http://localhost:8000/api/health',
method: 'GET',
error: {
name: 'TypeError',
message: 'fetch failed',
stack: 'TypeError: fetch failed\n' +
'    at node:internal/deps/undici/undici:14902:13\n' +
'    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
'    at async n (/app/apps/super/.next/server/chunks/484.js:1:1278)\n' +
'    at async Promise.allSettled (index 1)\n' +
'    at async s (/app/apps/super/.next/server/chunks/484.js:1:2320)\n' +
'    at async t4 (/app/node_modules/.pnpm/next@15.5.7_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:2454)\n' +
'    at async /app/node_modules/.pnpm/next@15.5.7_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:1271\n' +
'    at async t2 (/app/node_modules/.pnpm/next@15.5.7_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:14:14859)\n' +
'    at async nQ (/app/node_modules/.pnpm/next@15.5.7_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:23704)\n' +
'    at async m (/app/apps/super/.next/server/app/login/page.js:1:8029)',
cause: {
name: 'AggregateError',
message: '',
stack: 'AggregateError: \n' +
'    at internalConnectMultiple (node:net:1122:18)\n' +
'    at afterConnectMultiple (node:net:1689:7)\n' +
'    at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17)'
}
}
}

For completeness, here is the complete set of env var in my Dokploy deployment.

FQDN=appflowy.example.com
SCHEME=https
WS_SCHEME=wss
APPFLOWY_BASE_URL=https://appflowy.example.com
APPFLOWY_WEBSOCKET_BASE_URL=wss://appflowy.example.com/ws/v2
APPFLOWY_WEB_URL=https://appflowy.example.com
API_EXTERNAL_URL=https://appflowy.example.com/gotrue
TZ=Europe/Helsinki
GOTRUE_ADMIN_EMAIL=myname@emailcom
GOTRUE_ADMIN_PASSWORD=&dWT2o69FItyA%WJj0^W
GOTRUE_DISABLE_SIGNUP=false
POSTGRES_HOST=postgres
POSTGRES_USER=appflowy
POSTGRES_PASSWORD=nyom5yttfguerblmzzvmlxd3pojkqvku3iwsvrvreggzflty09sempojep7arnhb
POSTGRES_PORT=5432
POSTGRES_DB=appflowy
REDIS_HOST=redis
REDIS_PORT=6379
GOTRUE_JWT_SECRET=6uktzy9yw47ruvfjvikgdpqdt2fqwdfswd1yb8t1209ajusdnogm2fmf0xkvrfgi
GOTRUE_JWT_EXP=7200
GOTRUE_JWT_ADMIN_GROUP_NAME=supabase_admin
GOTRUE_DB_DRIVER=postgres
GOTRUE_DATABASE_URL=postgres://appflowy:${POSTGRES_PASSWORD}@postgres:5432/appflowy?search_path=auth
PORT=9999
GOTRUE_SITE_URL=appflowy-flutter://
GOTRUE_URI_ALLOW_LIST=**
GOTRUE_SMTP_HOST=
GOTRUE_SMTP_PORT=465
GOTRUE_SMTP_USER=
GOTRUE_SMTP_PASS=
GOTRUE_SMTP_ADMIN_EMAIL=${GOTRUE_ADMIN_EMAIL}
GOTRUE_SMTP_MAX_FREQUENCY=1ns
GOTRUE_RATE_LIMIT_EMAIL_SENT=100
GOTRUE_MAILER_AUTOCONFIRM=true
GOTRUE_MAILER_URLPATHS_CONFIRMATION=/gotrue/verify
GOTRUE_MAILER_URLPATHS_INVITE=/gotrue/verify
GOTRUE_MAILER_URLPATHS_RECOVERY=/gotrue/verify
GOTRUE_MAILER_URLPATHS_EMAIL_CHANGE=/gotrue/verify
GOTRUE_MAILER_TEMPLATES_MAGIC_LINK=
GOTRUE_EXTERNAL_GOOGLE_ENABLED=false
GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID=
GOTRUE_EXTERNAL_GOOGLE_SECRET=
GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI=https://appflowy.example.com/gotrue/callback
GOTRUE_EXTERNAL_GITHUB_ENABLED=false
GOTRUE_EXTERNAL_GITHUB_CLIENT_ID=
GOTRUE_EXTERNAL_GITHUB_SECRET=
GOTRUE_EXTERNAL_GITHUB_REDIRECT_URI=https://appflowy.example.com/gotrue/callback
GOTRUE_EXTERNAL_DISCORD_ENABLED=false
GOTRUE_EXTERNAL_DISCORD_CLIENT_ID=
GOTRUE_EXTERNAL_DISCORD_SECRET=
GOTRUE_EXTERNAL_DISCORD_REDIRECT_URI=https://appflowy.example.com/gotrue/callback
GOTRUE_SAML_ENABLED=false
GOTRUE_SAML_PRIVATE_KEY=
RUST_LOG=info
APPFLOWY_ENVIRONMENT=production
APPFLOWY_DATABASE_URL=postgres://appflowy:${POSTGRES_PASSWORD}@postgres:5432/appflowy
APPFLOWY_REDIS_URI=redis://redis:6379
APPFLOWY_GOTRUE_JWT_SECRET=${GOTRUE_JWT_SECRET}
APPFLOWY_GOTRUE_JWT_EXP=7200
APPFLOWY_GOTRUE_BASE_URL=http://gotrue:9999
APPFLOWY_ACCESS_CONTROL=true
APPFLOWY_DATABASE_MAX_CONNECTIONS=40
APPFLOWY_WEBSOCKET_MAILBOX_SIZE=6000
APPFLOWY_MAILER_SMTP_HOST=
APPFLOWY_MAILER_SMTP_PORT=465
APPFLOWY_MAILER_SMTP_USERNAME=
APPFLOWY_MAILER_SMTP_EMAIL=
APPFLOWY_MAILER_SMTP_PASSWORD=
APPFLOWY_MAILER_SMTP_TLS_KIND=wrapper
MINIO_HOST=minio
MINIO_PORT=9000
APPFLOWY_S3_USE_MINIO=true
APPFLOWY_S3_CREATE_BUCKET=true
APPFLOWY_S3_MINIO_URL=http://minio:9000
APPFLOWY_S3_ACCESS_KEY=psoqe9ebjrhmfzpp
APPFLOWY_S3_SECRET_KEY=lp2yq1uinvcx85rcmlnyjnvrmezev1a8
APPFLOWY_S3_BUCKET=appflowy
APPFLOWY_S3_REGION=us-east-1
APPFLOWY_S3_PRESIGNED_URL_ENDPOINT=https://appflowy.example.com/minio-api
ADMIN_FRONTEND_REDIS_URL=redis://redis:6379
ADMIN_FRONTEND_GOTRUE_URL=http://gotrue:9999
ADMIN_FRONTEND_APPFLOWY_CLOUD_URL=http://appflowy_cloud:8000
ADMIN_FRONTEND_PATH_PREFIX=/console
AI_OPENAI_API_KEY=
DEFAULT_AI_MODEL=gpt-4o-mini
DEFAULT_AI_COMPLETION_MODEL=gpt-4o-mini
AZURE_OPENAI_API_KEY=
AZURE_OPENAI_ENDPOINT=
AZURE_OPENAI_API_VERSION=
AI_SERVER_HOST=ai
AI_SERVER_PORT=5001
AI_DATABASE_URL=postgresql+psycopg://appflowy:${POSTGRES_PASSWORD}@postgres:5432/appflowy
AI_REDIS_URL=redis://redis:6379
AI_USE_MINIO=true
AI_MINIO_URL=http://minio:9000
AI_APPFLOWY_HOST=https://appflowy.example.com
APPFLOWY_EMBEDDING_CHUNK_SIZE=2000
APPFLOWY_EMBEDDING_CHUNK_OVERLAP=200
APPFLOWY_WORKER_REDIS_URL=redis://redis:6379
APPFLOWY_WORKER_ENVIRONMENT=production
APPFLOWY_WORKER_DATABASE_URL=postgres://appflowy:${POSTGRES_PASSWORD}@postgres:5432/appflowy
APPFLOWY_WORKER_DATABASE_NAME=appflowy
APPFLOWY_WORKER_IMPORT_TICK_INTERVAL=30
APPFLOWY_INDEXER_ENABLED=true
APPFLOWY_INDEXER_DATABASE_URL=postgres://appflowy:${POSTGRES_PASSWORD}@postgres:5432/appflowy
APPFLOWY_INDEXER_REDIS_URL=redis://redis:6379
APPFLOWY_INDEXER_EMBEDDING_BUFFER_SIZE=5000
APPFLOWY_COLLABORATE_MULTI_THREAD=false
APPFLOWY_COLLABORATE_REMOVE_BATCH_SIZE=100
NGINX_PORT=80
NGINX_TLS_PORT=443
GOTRUE_VERSION=latest
APPFLOWY_CLOUD_VERSION=latest
APPFLOWY_ADMIN_FRONTEND_VERSION=0.12.6
APPFLOWY_AI_VERSION=latest
APPFLOWY_WORKER_VERSION=latest
APPFLOWY_WEB_VERSION=latest

I have played around with APPFLOWY_ADMIN_FRONTEND_VERSION from 0.12.2 to 0.12.6, and they all behave the same way.

<!-- gh-comment-id:3961490148 --> @khanetor commented on GitHub (Feb 25, 2026): I think I am seeing the regression of this issue, since I am using the latest admin frontend docker image. I am using a domain name "appflowy.example.com", so I set the env var FQDN as such, instead of ip:port as mentioned above. Then, when logging in the admin console, I can only see this <img width="409" height="541" alt="Image" src="https://github.com/user-attachments/assets/b80f03c5-ac21-4033-b757-0d22545a0d4d" /> Checking the logs in different containers (10 containers in total), I can only see an error in the admin frontend container. ``` [19:19:23] 🚨 [ServerFetch] [CRITICAL] Server fetch failed: { name: 'GoTrue health check', url: 'http://localhost:9999/health', method: 'GET', error: { name: 'TypeError', message: 'fetch failed', stack: 'TypeError: fetch failed\n' + ' at node:internal/deps/undici/undici:14902:13\n' + ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' + ' at async n (/app/apps/super/.next/server/chunks/484.js:1:1278)\n' + ' at async Promise.allSettled (index 0)\n' + ' at async s (/app/apps/super/.next/server/chunks/484.js:1:2320)\n' + ' at async t4 (/app/node_modules/.pnpm/next@15.5.7_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:2454)\n' + ' at async /app/node_modules/.pnpm/next@15.5.7_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:1271\n' + ' at async t2 (/app/node_modules/.pnpm/next@15.5.7_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:14:14859)\n' + ' at async nQ (/app/node_modules/.pnpm/next@15.5.7_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:23704)\n' + ' at async m (/app/apps/super/.next/server/app/login/page.js:1:8029)', cause: { name: 'AggregateError', message: '', stack: 'AggregateError: \n' + ' at internalConnectMultiple (node:net:1122:18)\n' + ' at afterConnectMultiple (node:net:1689:7)\n' + ' at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17)' } } } ``` What I find interesting is the use of localhost. I think it is hard-coded somewhere, because I don't specify any env vars to localhost. When I sh into the admin frontend container, I can ping gotrue:9999 without problems, and the ping was not successful with localhost:9999. In other instances, I also saw this error message randomly. ``` [19:19:23] 🚨 [ServerFetch] [CRITICAL] Server fetch failed: { name: 'AppFlowy Cloud health check', url: 'http://localhost:8000/api/health', method: 'GET', error: { name: 'TypeError', message: 'fetch failed', stack: 'TypeError: fetch failed\n' + ' at node:internal/deps/undici/undici:14902:13\n' + ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' + ' at async n (/app/apps/super/.next/server/chunks/484.js:1:1278)\n' + ' at async Promise.allSettled (index 1)\n' + ' at async s (/app/apps/super/.next/server/chunks/484.js:1:2320)\n' + ' at async t4 (/app/node_modules/.pnpm/next@15.5.7_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:2454)\n' + ' at async /app/node_modules/.pnpm/next@15.5.7_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:1271\n' + ' at async t2 (/app/node_modules/.pnpm/next@15.5.7_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:14:14859)\n' + ' at async nQ (/app/node_modules/.pnpm/next@15.5.7_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:23704)\n' + ' at async m (/app/apps/super/.next/server/app/login/page.js:1:8029)', cause: { name: 'AggregateError', message: '', stack: 'AggregateError: \n' + ' at internalConnectMultiple (node:net:1122:18)\n' + ' at afterConnectMultiple (node:net:1689:7)\n' + ' at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17)' } } } ``` For completeness, here is the complete set of env var in my Dokploy deployment. ``` FQDN=appflowy.example.com SCHEME=https WS_SCHEME=wss APPFLOWY_BASE_URL=https://appflowy.example.com APPFLOWY_WEBSOCKET_BASE_URL=wss://appflowy.example.com/ws/v2 APPFLOWY_WEB_URL=https://appflowy.example.com API_EXTERNAL_URL=https://appflowy.example.com/gotrue TZ=Europe/Helsinki GOTRUE_ADMIN_EMAIL=myname@emailcom GOTRUE_ADMIN_PASSWORD=&dWT2o69FItyA%WJj0^W GOTRUE_DISABLE_SIGNUP=false POSTGRES_HOST=postgres POSTGRES_USER=appflowy POSTGRES_PASSWORD=nyom5yttfguerblmzzvmlxd3pojkqvku3iwsvrvreggzflty09sempojep7arnhb POSTGRES_PORT=5432 POSTGRES_DB=appflowy REDIS_HOST=redis REDIS_PORT=6379 GOTRUE_JWT_SECRET=6uktzy9yw47ruvfjvikgdpqdt2fqwdfswd1yb8t1209ajusdnogm2fmf0xkvrfgi GOTRUE_JWT_EXP=7200 GOTRUE_JWT_ADMIN_GROUP_NAME=supabase_admin GOTRUE_DB_DRIVER=postgres GOTRUE_DATABASE_URL=postgres://appflowy:${POSTGRES_PASSWORD}@postgres:5432/appflowy?search_path=auth PORT=9999 GOTRUE_SITE_URL=appflowy-flutter:// GOTRUE_URI_ALLOW_LIST=** GOTRUE_SMTP_HOST= GOTRUE_SMTP_PORT=465 GOTRUE_SMTP_USER= GOTRUE_SMTP_PASS= GOTRUE_SMTP_ADMIN_EMAIL=${GOTRUE_ADMIN_EMAIL} GOTRUE_SMTP_MAX_FREQUENCY=1ns GOTRUE_RATE_LIMIT_EMAIL_SENT=100 GOTRUE_MAILER_AUTOCONFIRM=true GOTRUE_MAILER_URLPATHS_CONFIRMATION=/gotrue/verify GOTRUE_MAILER_URLPATHS_INVITE=/gotrue/verify GOTRUE_MAILER_URLPATHS_RECOVERY=/gotrue/verify GOTRUE_MAILER_URLPATHS_EMAIL_CHANGE=/gotrue/verify GOTRUE_MAILER_TEMPLATES_MAGIC_LINK= GOTRUE_EXTERNAL_GOOGLE_ENABLED=false GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID= GOTRUE_EXTERNAL_GOOGLE_SECRET= GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI=https://appflowy.example.com/gotrue/callback GOTRUE_EXTERNAL_GITHUB_ENABLED=false GOTRUE_EXTERNAL_GITHUB_CLIENT_ID= GOTRUE_EXTERNAL_GITHUB_SECRET= GOTRUE_EXTERNAL_GITHUB_REDIRECT_URI=https://appflowy.example.com/gotrue/callback GOTRUE_EXTERNAL_DISCORD_ENABLED=false GOTRUE_EXTERNAL_DISCORD_CLIENT_ID= GOTRUE_EXTERNAL_DISCORD_SECRET= GOTRUE_EXTERNAL_DISCORD_REDIRECT_URI=https://appflowy.example.com/gotrue/callback GOTRUE_SAML_ENABLED=false GOTRUE_SAML_PRIVATE_KEY= RUST_LOG=info APPFLOWY_ENVIRONMENT=production APPFLOWY_DATABASE_URL=postgres://appflowy:${POSTGRES_PASSWORD}@postgres:5432/appflowy APPFLOWY_REDIS_URI=redis://redis:6379 APPFLOWY_GOTRUE_JWT_SECRET=${GOTRUE_JWT_SECRET} APPFLOWY_GOTRUE_JWT_EXP=7200 APPFLOWY_GOTRUE_BASE_URL=http://gotrue:9999 APPFLOWY_ACCESS_CONTROL=true APPFLOWY_DATABASE_MAX_CONNECTIONS=40 APPFLOWY_WEBSOCKET_MAILBOX_SIZE=6000 APPFLOWY_MAILER_SMTP_HOST= APPFLOWY_MAILER_SMTP_PORT=465 APPFLOWY_MAILER_SMTP_USERNAME= APPFLOWY_MAILER_SMTP_EMAIL= APPFLOWY_MAILER_SMTP_PASSWORD= APPFLOWY_MAILER_SMTP_TLS_KIND=wrapper MINIO_HOST=minio MINIO_PORT=9000 APPFLOWY_S3_USE_MINIO=true APPFLOWY_S3_CREATE_BUCKET=true APPFLOWY_S3_MINIO_URL=http://minio:9000 APPFLOWY_S3_ACCESS_KEY=psoqe9ebjrhmfzpp APPFLOWY_S3_SECRET_KEY=lp2yq1uinvcx85rcmlnyjnvrmezev1a8 APPFLOWY_S3_BUCKET=appflowy APPFLOWY_S3_REGION=us-east-1 APPFLOWY_S3_PRESIGNED_URL_ENDPOINT=https://appflowy.example.com/minio-api ADMIN_FRONTEND_REDIS_URL=redis://redis:6379 ADMIN_FRONTEND_GOTRUE_URL=http://gotrue:9999 ADMIN_FRONTEND_APPFLOWY_CLOUD_URL=http://appflowy_cloud:8000 ADMIN_FRONTEND_PATH_PREFIX=/console AI_OPENAI_API_KEY= DEFAULT_AI_MODEL=gpt-4o-mini DEFAULT_AI_COMPLETION_MODEL=gpt-4o-mini AZURE_OPENAI_API_KEY= AZURE_OPENAI_ENDPOINT= AZURE_OPENAI_API_VERSION= AI_SERVER_HOST=ai AI_SERVER_PORT=5001 AI_DATABASE_URL=postgresql+psycopg://appflowy:${POSTGRES_PASSWORD}@postgres:5432/appflowy AI_REDIS_URL=redis://redis:6379 AI_USE_MINIO=true AI_MINIO_URL=http://minio:9000 AI_APPFLOWY_HOST=https://appflowy.example.com APPFLOWY_EMBEDDING_CHUNK_SIZE=2000 APPFLOWY_EMBEDDING_CHUNK_OVERLAP=200 APPFLOWY_WORKER_REDIS_URL=redis://redis:6379 APPFLOWY_WORKER_ENVIRONMENT=production APPFLOWY_WORKER_DATABASE_URL=postgres://appflowy:${POSTGRES_PASSWORD}@postgres:5432/appflowy APPFLOWY_WORKER_DATABASE_NAME=appflowy APPFLOWY_WORKER_IMPORT_TICK_INTERVAL=30 APPFLOWY_INDEXER_ENABLED=true APPFLOWY_INDEXER_DATABASE_URL=postgres://appflowy:${POSTGRES_PASSWORD}@postgres:5432/appflowy APPFLOWY_INDEXER_REDIS_URL=redis://redis:6379 APPFLOWY_INDEXER_EMBEDDING_BUFFER_SIZE=5000 APPFLOWY_COLLABORATE_MULTI_THREAD=false APPFLOWY_COLLABORATE_REMOVE_BATCH_SIZE=100 NGINX_PORT=80 NGINX_TLS_PORT=443 GOTRUE_VERSION=latest APPFLOWY_CLOUD_VERSION=latest APPFLOWY_ADMIN_FRONTEND_VERSION=0.12.6 APPFLOWY_AI_VERSION=latest APPFLOWY_WORKER_VERSION=latest APPFLOWY_WEB_VERSION=latest ``` I have played around with APPFLOWY_ADMIN_FRONTEND_VERSION from 0.12.2 to 0.12.6, and they all behave the same way.
Author
Owner

@x9t9 commented on GitHub (Mar 12, 2026):

Having the same issue ( deploying on Dokploy )
It seems to be an issue with http:// Vs. https:// config on the URL / Domains and DNS / FQDN for some redirects.
But honestly not sure yet

<!-- gh-comment-id:4043784555 --> @x9t9 commented on GitHub (Mar 12, 2026): Having the same issue ( deploying on Dokploy ) It seems to be an issue with http:// Vs. https:// config on the URL / Domains and DNS / FQDN for some redirects. But honestly not sure yet
Author
Owner

@erayerdin commented on GitHub (Mar 16, 2026):

I have reached to a new set of errors:

Cookie “appflowy_admin_token” has been rejected because a non-HTTPS cookie can’t be set as “secure”. [login](http://192.168.1.67:1909/console/login?returnUrl=%2Fusers-management)
Cookie “sb-access-token” has been rejected because a non-HTTPS cookie can’t be set as “secure”. [token](http://192.168.1.67:1909/gotrue/token?grant_type=password)
Cookie “sb-refresh-token” has been rejected because a non-HTTPS cookie can’t be set as “secure”. [token](http://192.168.1.67:1909/gotrue/token?grant_type=password)
Cookie “appflowy_admin_token” has been rejected because a non-HTTPS cookie can’t be set as “secure”.

Basically, even if it is HTTP, it cannot set some cookies as secure as it is not HTTPS.

<!-- gh-comment-id:4069762414 --> @erayerdin commented on GitHub (Mar 16, 2026): I have reached to a new set of errors: ``` Cookie “appflowy_admin_token” has been rejected because a non-HTTPS cookie can’t be set as “secure”. [login](http://192.168.1.67:1909/console/login?returnUrl=%2Fusers-management) Cookie “sb-access-token” has been rejected because a non-HTTPS cookie can’t be set as “secure”. [token](http://192.168.1.67:1909/gotrue/token?grant_type=password) Cookie “sb-refresh-token” has been rejected because a non-HTTPS cookie can’t be set as “secure”. [token](http://192.168.1.67:1909/gotrue/token?grant_type=password) Cookie “appflowy_admin_token” has been rejected because a non-HTTPS cookie can’t be set as “secure”. ``` Basically, even if it is HTTP, it cannot set some cookies as secure as it is not HTTPS.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#3760
No description provided.