mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-07-21 08:15:23 -04:00
[GH-ISSUE #91] Unable to access externally #50
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @adriaanvermaak on GitHub (Dec 9, 2025).
Original GitHub issue: https://github.com/vxcontrol/pentagi/issues/91
Hi Team,
Hope you are well.
Please could you assist, brining the environment up locally works perfectly, and is accessible locally via the browser.
I want to access the GUI from another external browser on the same network as the host hosting Pentagi.
which env or compose configs are required for this ?
I keep getting timout when attempting to access via browser - hostip:8443.
ENV
HTTP proxy to use it in isolation environment
PROXY_URL=
PentAGI server settings (docker-compose.yml)
PENTAGI_LISTEN_IP=0.0.0.0
PENTAGI_LISTEN_PORT=8443
PENTAGI_DATA_DIR=
PENTAGI_SSL_DIR=
PENTAGI_DOCKER_SOCKET=
PentAGI security settings
PUBLIC_URL=https://0.0.0.0:8443
CORS_ORIGINS=https://0.0.0.0:8443
COOKIE_SIGNING_SALT=salt # change this to improve security
Docker client settings to run primary terminal container
DOCKER_HOST=
DOCKER_TLS_VERIFY=
DOCKER_CERT_PATH=
Docker settings inside primary terminal container
DOCKER_INSIDE=true # enable to use docker socket
DOCKER_NET_ADMIN=true # enable to use net_admin capability
DOCKER_SOCKET=/var/run/docker.sock # path on host machine
DOCKER_NETWORK=
DOCKER_WORK_DIR=
DOCKER_PUBLIC_IP=0.0.0.0 # public ip of host machine
DOCKER_DEFAULT_IMAGE=
DOCKER_DEFAULT_IMAGE_FOR_PENTEST=
compose file
pentagi:
image: vxcontrol/pentagi:latest
restart: unless-stopped
container_name: pentagi
hostname: pentagi
expose:
- 8443/tcp
ports:
- ${PENTAGI_LISTEN_IP:-127.0.0.1}:${PENTAGI_LISTEN_PORT:-8443}:8443
depends_on:
- pgvector
environment:
- DOCKER_GID=998
- CORS_ORIGINS=${CORS_ORIGINS:-}
- COOKIE_SIGNING_SALT=${COOKIE_SIGNING_SALT:-}
- INSTALLATION_ID=${INSTALLATION_ID:-}
- LICENSE_KEY=${LICENSE_KEY:-}
- ASK_USER=${ASK_USER:-false}
- OPEN_AI_KEY=${OPEN_AI_KEY:-}
- OPEN_AI_SERVER_URL=${OPEN_AI_SERVER_URL:-}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
- ANTHROPIC_SERVER_URL=${ANTHROPIC_SERVER_URL:-}
- GEMINI_API_KEY=${GEMINI_API_KEY:-}
- GEMINI_SERVER_URL=${GEMINI_SERVER_URL:-}
- BEDROCK_REGION=${BEDROCK_REGION:-}
- BEDROCK_ACCESS_KEY_ID=${BEDROCK_ACCESS_KEY_ID:-}
- BEDROCK_SECRET_ACCESS_KEY=${BEDROCK_SECRET_ACCESS_KEY:-}
- BEDROCK_SERVER_URL=${BEDROCK_SERVER_URL:-}
- LLM_SERVER_URL=${LLM_SERVER_URL:-}
- LLM_SERVER_KEY=${LLM_SERVER_KEY:-}
- LLM_SERVER_MODEL=${LLM_SERVER_MODEL:-}
- LLM_SERVER_CONFIG_PATH=${LLM_SERVER_CONFIG_PATH:-}
- LLM_SERVER_LEGACY_REASONING=${LLM_SERVER_LEGACY_REASONING:-}
- OLLAMA_SERVER_URL=${OLLAMA_SERVER_URL:-}
- OLLAMA_SERVER_CONFIG_PATH=${OLLAMA_SERVER_CONFIG_PATH:-}
- EMBEDDING_URL=${EMBEDDING_URL:-}
- EMBEDDING_KEY=${EMBEDDING_KEY:-}
- EMBEDDING_MODEL=${EMBEDDING_MODEL:-}
- EMBEDDING_PROVIDER=${EMBEDDING_PROVIDER:-}
- EMBEDDING_BATCH_SIZE=${EMBEDDING_BATCH_SIZE:-}
- EMBEDDING_STRIP_NEW_LINES=${EMBEDDING_STRIP_NEW_LINES:-}
- SUMMARIZER_PRESERVE_LAST=${SUMMARIZER_PRESERVE_LAST:-}
- SUMMARIZER_USE_QA=${SUMMARIZER_USE_QA:-}
- SUMMARIZER_SUM_MSG_HUMAN_IN_QA=${SUMMARIZER_SUM_MSG_HUMAN_IN_QA:-}
- SUMMARIZER_LAST_SEC_BYTES=${SUMMARIZER_LAST_SEC_BYTES:-}
- SUMMARIZER_MAX_BP_BYTES=${SUMMARIZER_MAX_BP_BYTES:-}
- SUMMARIZER_MAX_QA_SECTIONS=${SUMMARIZER_MAX_QA_SECTIONS:-}
- SUMMARIZER_MAX_QA_BYTES=${SUMMARIZER_MAX_QA_BYTES:-}
- SUMMARIZER_KEEP_QA_SECTIONS=${SUMMARIZER_KEEP_QA_SECTIONS:-}
- ASSISTANT_USE_AGENTS=${ASSISTANT_USE_AGENTS:-}
- ASSISTANT_SUMMARIZER_PRESERVE_LAST=${ASSISTANT_SUMMARIZER_PRESERVE_LAST:-}
- ASSISTANT_SUMMARIZER_LAST_SEC_BYTES=${ASSISTANT_SUMMARIZER_LAST_SEC_BYTES:-}
- ASSISTANT_SUMMARIZER_MAX_BP_BYTES=${ASSISTANT_SUMMARIZER_MAX_BP_BYTES:-}
- ASSISTANT_SUMMARIZER_MAX_QA_SECTIONS=${ASSISTANT_SUMMARIZER_MAX_QA_SECTIONS:-}
- ASSISTANT_SUMMARIZER_MAX_QA_BYTES=${ASSISTANT_SUMMARIZER_MAX_QA_BYTES:-}
- ASSISTANT_SUMMARIZER_KEEP_QA_SECTIONS=${ASSISTANT_SUMMARIZER_KEEP_QA_SECTIONS:-}
- PROXY_URL=${PROXY_URL:-}
- EXTERNAL_SSL_CA_PATH=${EXTERNAL_SSL_CA_PATH:-}
- EXTERNAL_SSL_INSECURE=${EXTERNAL_SSL_INSECURE:-}
- SCRAPER_PUBLIC_URL=${SCRAPER_PUBLIC_URL:-}
- SCRAPER_PRIVATE_URL=${SCRAPER_PRIVATE_URL:-}
- PUBLIC_URL=${PUBLIC_URL:-}
- STATIC_DIR=${STATIC_DIR:-}
- STATIC_URL=${STATIC_URL:-}
- SERVER_PORT=${SERVER_PORT:-8443}
- SERVER_HOST=${SERVER_HOST:-0.0.0.0}
- SERVER_SSL_CRT=${SERVER_SSL_CRT:-}
- SERVER_SSL_KEY=${SERVER_SSL_KEY:-}
- SERVER_USE_SSL=${SERVER_USE_SSL:-true}
- OAUTH_GOOGLE_CLIENT_ID=${OAUTH_GOOGLE_CLIENT_ID:-}
- OAUTH_GOOGLE_CLIENT_SECRET=${OAUTH_GOOGLE_CLIENT_SECRET:-}
- OAUTH_GITHUB_CLIENT_ID=${OAUTH_GITHUB_CLIENT_ID:-}
- OAUTH_GITHUB_CLIENT_SECRET=${OAUTH_GITHUB_CLIENT_SECRET:-}
- DATABASE_URL=postgres://${PENTAGI_POSTGRES_USER:-postgres}:${PENTAGI_POSTGRES_PASSWORD:-postgres}@pgvector:5432/${PENTAGI_POSTGRES_DB:-pentagidb}?sslmode=disable
- DUCKDUCKGO_ENABLED=${DUCKDUCKGO_ENABLED:-}
- SEARXNG_URL=${SEARXNG_URL:-}
- SEARXNG_CATEGORIES=${SEARXNG_CATEGORIES:-}
- SEARXNG_LANGUAGE=${SEARXNG_LANGUAGE:-}
- SEARXNG_SAFESEARCH=${SEARXNG_SAFESEARCH:-}
- SEARXNG_TIME_RANGE=${SEARXNG_TIME_RANGE:-}
- GOOGLE_API_KEY=${GOOGLE_API_KEY:-}
- GOOGLE_CX_KEY=${GOOGLE_CX_KEY:-}
- GOOGLE_LR_KEY=${GOOGLE_LR_KEY:-}
- TRAVERSAAL_API_KEY=${TRAVERSAAL_API_KEY:-}
- TAVILY_API_KEY=${TAVILY_API_KEY:-}
- PERPLEXITY_API_KEY=${PERPLEXITY_API_KEY:-}
- PERPLEXITY_MODEL=${PERPLEXITY_MODEL:-sonar}
- PERPLEXITY_CONTEXT_SIZE=${PERPLEXITY_CONTEXT_SIZE:-low}
- LANGFUSE_BASE_URL=${LANGFUSE_BASE_URL:-}
- LANGFUSE_PROJECT_ID=${LANGFUSE_PROJECT_ID:-}
- LANGFUSE_PUBLIC_KEY=${LANGFUSE_PUBLIC_KEY:-}
- LANGFUSE_SECRET_KEY=${LANGFUSE_SECRET_KEY:-}
- OTEL_HOST=${OTEL_HOST:-}
- DOCKER_HOST=${DOCKER_HOST:-unix:///var/run/docker.sock}
- DOCKER_TLS_VERIFY=${DOCKER_TLS_VERIFY:-}
- DOCKER_CERT_PATH=${DOCKER_CERT_PATH:-}
- DOCKER_INSIDE=${DOCKER_INSIDE:-false}
- DOCKER_NET_ADMIN=${DOCKER_NET_ADMIN:-false}
- DOCKER_SOCKET=${DOCKER_SOCKET:-}
- DOCKER_NETWORK=${DOCKER_NETWORK:-}
- DOCKER_PUBLIC_IP=${DOCKER_PUBLIC_IP:-}
- DOCKER_WORK_DIR=${DOCKER_WORK_DIR:-}
- DOCKER_DEFAULT_IMAGE=${DOCKER_DEFAULT_IMAGE:-}
- DOCKER_DEFAULT_IMAGE_FOR_PENTEST=${DOCKER_DEFAULT_IMAGE_FOR_PENTEST:-}
logging:
options:
max-size: 50m
max-file: '7'
@adriaanvermaak commented on GitHub (Dec 9, 2025):
So internally, PentAGI is fine.
The issue is still:
curl https://127.0.0.1:8443 from the host → works ✅
curl https://serverip:8443 from the host → times out ❌
External server to serverip:8443 → timeout ❌
@asdek commented on GitHub (Dec 11, 2025):
Hello @adriaanvermaak
maybe you faced the issue due to these env values:
PUBLIC_URL is used for redirect and can be valid URL to root page of PentAGI like an IP address or FQDN in your network for this host.
CORS_ORIGINS should use as list of valid URLs to access UI like PUBLIC_URL but all of these options:
CORS_ORIGINS=https://localhost:8443,https://{SERVER_IP}:8443,https://{SERVER_FQDN}:8443maybe in your browser console is text of error except timed out
also, please, check your firewall settings on the host and in the network, maybe there is communication via tcp/8443 is denied
@adriaanvermaak commented on GitHub (Dec 11, 2025):
hi @asdek
thanks for the response.
i have set it back to the default settings but still face the same issue.
curl -vk -H 'Content-Type: application/json' -d '{"mail":"admin@pentagi.com","password":"P3"}' https://127.0.0.1:8443/api/v1/auth/login
{"data":{},"status":"success"}
server is listening on port 8443 locally and accessible, but from any external browser all timeout.
I have another application running on 8080, working externally, no firewall exceptions preventing it as other port applications are accessible.
i have allow added a reverse proxy on 8444 to route to 8443 and that is accessible external but all login attempts fail....
@Muitamax commented on GitHub (Feb 23, 2026):
Verify What Docker Is Actually Binding
Run:
docker ps
Look at PORTS column.
If you see:
127.0.0.1:8443->8443/tcp
That is your issue.
You need:
0.0.0.0:8443->8443/tcp
Or:
:::8443->8443/tcp
@Muitamax commented on GitHub (Feb 23, 2026):
Hardcode It (Eliminate Env Ambiguity)
Modify compose file directly:
ports:
Then:
docker compose down
docker compose up -d --force-recreate
Test again:
curl https://serverip:8443 -k
If that works → issue solved.
@Vaibhavee89 commented on GitHub (Feb 23, 2026):
🔧 Complete Solution for External Access Issue
I've analyzed this issue and identified three root causes. Here's the complete solution:
Root Causes
127.0.0.1(localhost only)0.0.0.0as a URL is invalid✅ Complete Fix
Step 1: Update Your
.envFileReplace
192.168.1.100with your actual server IP:⚠️ Important:
0.0.0.0is a bind address, not a valid URL. Use your actual IP address in PUBLIC_URL and CORS_ORIGINS.Step 2: Recreate Containers
This is critical - environment changes won't take effect without recreation:
Step 3: Verify Port Binding
✅ Expected output:
❌ If you see:
Then the environment variable wasn't picked up. Use the alternative fix below.
🔄 Alternative: Hardcode Port Binding (Guaranteed to Work)
If environment variables don't work, edit
docker-compose.ymlline 31:Change from:
To:
Then recreate:
🧱 Firewall Check
Ensure port 8443 is open:
🧪 Testing
From server:
From another machine:
Browser:
Accept the SSL certificate warning (self-signed cert).
🔁 Reverse Proxy Fix (Port 8444)
If you're using a reverse proxy and login fails, the issue is cookie/header forwarding.
Nginx configuration:
Update
.env:📋 Quick Checklist
PENTAGI_LISTEN_IP=0.0.0.0in.envPUBLIC_URLto your actual server IP (not 0.0.0.0)CORS_ORIGINSto include your server IPdocker compose down && docker compose up -d --force-recreatedocker psshows0.0.0.0:8443binding🐛 Still Not Working?
Check container logs:
Share the output and the result of:
This should resolve the external access issue. The key is proper environment configuration + container recreation + correct PUBLIC_URL/CORS settings.
@Muitamax commented on GitHub (Feb 23, 2026):
Bind to 0.0.0.0 for external access.
Use actual IP in PUBLIC_URL and CORS_ORIGINS.
Recreate containers for env changes to take effect.
Open the firewall port.