infisical icon indicating copy to clipboard operation
infisical copied to clipboard

Site_URL is not used

Open Haru768 opened this issue 9 months ago • 6 comments

Hello, i try to use the self hosted version of infisical. I used the docker compose docs and set the Site-Url in environments like that

environment:

  • SITE_URL=https://testSite.de

But if i start the Container the logs say

Create your infisical Administrator Account at: http://localhost:8080/admin/signup

I wan't the url to be https://testsite.de/admin/signup

But i can't get it working

Haru768 avatar Apr 16 '25 11:04 Haru768

The SITE_URL was not designed to be used this way. If you are using docker on your own device, localhost is your domain. You would need to serve the Infisical app behind a reverse-proxy, which then you would use a local DNS server to point your domain testsite.de to the ip address of the reverse-proxy. Then the reverse-proxy can direct this url to the appropriate service.

chakraborty29 avatar Apr 17 '25 02:04 chakraborty29

I use a reverse proxy. Sorry i should have mentiond it. But do i understand it right that the Site_url is nit designed to really change the url from localhost to a other url? For changing that i must use the reverse proxy?

Haru768 avatar Apr 17 '25 05:04 Haru768

Can you provide more details, like your docker compose, and the output messages you are getting from the terminal and your env variables where you set the SITE_URL. I don't want to assume how SITE_URL is used since I am also new to this project. Could be a simple misconfiguration.

chakraborty29 avatar Apr 17 '25 05:04 chakraborty29

Overall i use Portainer and traefik reverse proxy

` portainer:

container_name: infisical-backend
restart: unless-stopped
depends_on:
  db:
    condition: service_healthy
  redis:
    condition: service_started
image: infisical/infisical:latest-postgres
pull_policy: always
environment:
  - SITE_URL=https://testSite.de
  - ENCRYPTION_KEY=key
  - AUTH_SECRET=secret
  - REDIS_URL=redis://redis:6379
  - DB_CONNECTION_URI=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
  - NODE_ENV=production
labels:
  - traefik.enable=true
  - traefik.http.services.${NAME}.loadbalancer.server.port=8080
  - traefik.http.routers.${NAME}_web.rule=Host(`${URL}`)
  - traefik.http.routers.${NAME}_web.entrypoints=web
  - traefik.http.routers.${NAME}_web-secured.rule=Host(`${URL}`)
  - traefik.http.routers.${NAME}_web-secured.entrypoints=web-secure
  - traefik.http.routers.${NAME}_web-secured.tls=true
networks:
  - infisical-network

`

that would be my docker compose. The labels are copied from other projects where it works completly fine.

` Please migrate your code to use AWS SDK for JavaScript (v3).

For more information, check the migration guide at https://a.co/7PzMCcy (Use node --trace-warnings ... to show where the warning was created) 2025/04/16 03:00PM 30 | pid=1 hostname=73e4638a2cf8 reqId=UNKNOWN_REQUEST_ID severity=INFO msg=No migrations pending: Skipping migration process. 2025/04/16 03:00PM 30 | pid=1 hostname=73e4638a2cf8 reqId=UNKNOWN_REQUEST_ID severity=INFO msg=Initializing pg-queue... 2025/04/16 03:00PM 30 | pid=1 hostname=73e4638a2cf8 reqId=UNKNOWN_REQUEST_ID severity=INFO msg=KMS: Loading ROOT Key into Memory. 2025/04/16 03:00PM 30 | pid=1 hostname=73e4638a2cf8 reqId=UNKNOWN_REQUEST_ID severity=INFO msg=Current license does not support custom rate limit configuration Recursive reference detected at #/properties/tree/properties/children/items! Defaulting to any Checking configurations... Testing smtp connection SMTP - Failed to connect to undefined:587 - connect ECONNREFUSED ...::587 Testing Postgres connection PostgreSQL - Connected successfully Testing redis connection Redis successfully connected Welcome to Infisical Create your Infisical administrator account at: http://localhost:8080/admin/signup 2025/04/16 03:00PM 50 | pid=1 hostname=73e4638a2cf8 reqId=UNKNOWN_REQUEST_ID severity=ERROR err={"type":"Error","message":"connect ECONNREFUSED ...:587","stack":"Error: connect ECONNREFUSED ...::587\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16)","errno":-111,"code":"ESOCKET","syscall":"connect","address":"...:","port":587,"command":"CONN"} msg=connect ECONNREFUSED ...::587 `

SMTP is not set up so it is no problem that it is not working

Haru768 avatar Apr 17 '25 06:04 Haru768

But do i understand it right that the Site_url is nit designed to really change the url from localhost to a other url? For changing that i must use the reverse proxy?

Correct, SITE_URL will simply change a few redirects and UI links, meaning that you should set it to testSite.de. No matter what SITE_URL is set to, the deployment will still be at localhost 8080.

If going to testSite.de/admin/signup does not work, it's likely an issue with your reverse proxy.

x032205 avatar May 07 '25 06:05 x032205

Same issue here, and its blocking me from being able to use infisical in my project because its incompatible with our production environment.

murray484 avatar Oct 28 '25 21:10 murray484