Skip to content

Site_URL is not used #3435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Haru768 opened this issue Apr 16, 2025 · 5 comments
Open

Site_URL is not used #3435

Haru768 opened this issue Apr 16, 2025 · 5 comments

Comments

@Haru768
Copy link

Haru768 commented Apr 16, 2025

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:

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

@chakraborty29
Copy link

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.

@Haru768
Copy link
Author

Haru768 commented Apr 17, 2025

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?

@chakraborty29
Copy link

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.

@Haru768
Copy link
Author

Haru768 commented Apr 17, 2025

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

@x032205
Copy link
Contributor

x032205 commented May 7, 2025

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.

You may also need to add testSite.de to allowedHosts in the frontend vite config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants