Issues with OpenPanel #102

Open
opened 2025-11-22 20:30:31 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @lindesvard on GitHub (Aug 19, 2025).

Template Name

OpenPanel

Relevant Logs of the Error

No relevant logs for this

Steps to Reproduce the Error

  1. Deploy the OpenPanel Self Host Template from DOKPLOY templates.
  2. Configure the domain names.
  3. Edit the .env to add the API path to domain name (https://mydomain.com/api)
  4. Deploy the application on DOKPLOY via Docker Compose
  5. Access the Onboarding page.

Expected Behavior: Users can sign up without any problem.
Actual behavior: On sign up page after filling out the details create account button doesn't actually works.

I'm not the one with this issue. I'm the creator of OpenPanel and helped him out to get everything working.

Environment Information

Dokploy version: v0.24.11
Template: latest
Don't think anything here is relevant tbh

When does this error occur?

After successful deployment

Additional Context

I think the current template is broken. Everything spins up and working but when you actually do any requests (eg creating an account) the API_URL is not set and points to the wrong service.

It looks like it's copied from the coolify templated and missing some vital things to work on dokploy.

I think everything is working except envs for NEXT_PUBLIC_API_URL and NEXT_PUBLIC_DASHBOARD_URL. The SERVICE_FQDN_* part is related to coolify and I don't think dokploy supports this since it seems like I needed to replace them with the actual domain.

Also I think the checkbox for the strip external path should be checked on this one:

[[config.domains]]
serviceName = "op-api"
port = 3_000
host = "${api_domain}"

I gladly assist any future development with this but I have never used dokploy so lacking a bit knowledge here.


What I actually did to make this work for the users which had this problem:

  • Ensure all NEXT_PUBLIC_API_URL and NEXT_PUBLIC_DASHBOARD_URL were matching the expected value (so I just hardcoded them in the docker compose).
  • Since the api and dashboard was using the same domain and the api had a forward path to /api I checked the Strip external path options. Otherwise the api would get the wrong path
  • The user in question had cloudflare infront and it cached all resources so we purge cloudflare after all changes (not related to dokploy but just want to point that out)

Below is the docker compose

x-database: &x-database
  DATABASE_URL: postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@op-db:5432/${OPENPANEL_POSTGRES_DB}?schema=public
  DATABASE_URL_DIRECT: postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@op-db:5432/${OPENPANEL_POSTGRES_DB}?schema=public
  REDIS_URL: redis://default:${SERVICE_PASSWORD_REDIS}@op-kv:6379
  CLICKHOUSE_URL: ${OPENPANEL_CLICKHOUSE_URL:-http://op-ch:8123/openpanel}

services:
  op-db:
    image: postgres:14-alpine
    restart: always
    volumes:
      - op-db-data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
      interval: 10s
      timeout: 5s
      retries: 5
    environment:
      - POSTGRES_DB=${OPENPANEL_POSTGRES_DB}
      - POSTGRES_USER=${SERVICE_USER_POSTGRES}
      - POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}

  op-kv:
    image: redis:7.2.5-alpine
    restart: always
    volumes:
      - op-kv-data:/data
    command: redis-server --requirepass ${SERVICE_PASSWORD_REDIS} --maxmemory-policy noeviction
    healthcheck:
      test: [CMD, redis-cli, -a, "${SERVICE_PASSWORD_REDIS}", ping]
      interval: 10s
      timeout: 5s
      retries: 5

  op-ch:
    image: clickhouse/clickhouse-server:24.3.2-alpine
    restart: always
    volumes:
      - op-ch-data:/var/lib/clickhouse
      - op-ch-logs:/var/log/clickhouse-server
      - ../files/clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/op-config.xml:ro
      - ../files/clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/op-user-config.xml:ro
      - ../files/clickhouse/init-db.sql:/docker-entrypoint-initdb.d/1_init-db.sql:ro
    healthcheck:
      test: [CMD-SHELL, 'clickhouse-client --query "SELECT 1" -d openpanel']
      interval: 10s
      timeout: 5s
      retries: 5

  op-api:
    image: lindesvard/openpanel-api:${OP_API_VERSION:-latest}
    restart: always
    command: >
      sh -c "
        echo 'Waiting for PostgreSQL to be ready...'
        while ! nc -z op-db 5432; do
          sleep 1
        done
        echo 'PostgreSQL is ready'

        echo 'Waiting for ClickHouse to be ready...'
        while ! nc -z op-ch 8123; do
          sleep 1
        done
        echo 'ClickHouse is ready'

        echo 'Running migrations...'
        
        echo '$DATABASE_URL'

        CI=true pnpm -r run migrate:deploy

        pnpm start
      "
    environment:
      # Common
      NODE_ENV: production
      NEXT_PUBLIC_SELF_HOSTED: true
      NEXT_PUBLIC_API_URL: https://thedomain.com/api
      NEXT_PUBLIC_DASHBOARD_URL: https://thedomain.com
      # Others
      COOKIE_SECRET: ${SERVICE_BASE64_COOKIESECRET}
      ALLOW_REGISTRATION: ${OPENPANEL_ALLOW_REGISTRATION:-false}
      ALLOW_INVITATION: ${OPENPANEL_ALLOW_INVITATION:-true}
      EMAIL_SENDER: ${OPENPANEL_EMAIL_SENDER}
      RESEND_API_KEY: ${RESEND_API_KEY}
      <<: *x-database
    healthcheck:
      test: ["CMD-SHELL", "curl -f http://localhost:3000/healthcheck || exit 1"]
      interval: 10s
      timeout: 5s
      retries: 5
    depends_on:
      op-db:
        condition: service_healthy
      op-ch:
        condition: service_healthy
      op-kv:
        condition: service_healthy

  op-dashboard:
    image: lindesvard/openpanel-dashboard:${OP_DASHBOARD_VERSION:-latest}
    restart: always
    depends_on:
      op-api:
        condition: service_healthy
    environment:
      # Common
      NODE_ENV: production
      NEXT_PUBLIC_SELF_HOSTED: true
      NEXT_PUBLIC_API_URL: https://thedomain.com/api
      NEXT_PUBLIC_DASHBOARD_URL: https://thedomain.com
      <<: *x-database
    healthcheck:
      test:
        ["CMD-SHELL", "curl -f http://localhost:3000/api/healthcheck || exit 1"]
      interval: 10s
      timeout: 5s
      retries: 5

  op-worker:
    image: lindesvard/openpanel-worker:${OP_WORKER_VERSION:-latest}
    restart: always
    depends_on:
      op-api:
        condition: service_healthy
    environment:
      # Common
      NODE_ENV=production:
      NEXT_PUBLIC_SELF_HOSTED: true
      NEXT_PUBLIC_API_URL: https://thedomain.com/api
      <<: *x-database
    healthcheck:
      test: ["CMD-SHELL", "curl -f http://localhost:3000/healthcheck || exit 1"]
      interval: 10s
      timeout: 5s
      retries: 5
    deploy:
      mode: replicated
      replicas: 1

volumes:
  op-db-data:
  op-kv-data:
  op-ch-data:
  op-ch-logs:
  op-proxy-data:
  op-proxy-config:

Will you send a PR to fix it?

Maybe, need help

Originally created by @lindesvard on GitHub (Aug 19, 2025). ### Template Name OpenPanel ### Relevant Logs of the Error No relevant logs for this ### Steps to Reproduce the Error 1. Deploy the OpenPanel Self Host Template from DOKPLOY templates. 2. Configure the domain names. 3. Edit the .env to add the API path to domain name (https://mydomain.com/api) 4. Deploy the application on DOKPLOY via Docker Compose 5. Access the Onboarding page. Expected Behavior: Users can sign up without any problem. Actual behavior: On sign up page after filling out the details create account button doesn't actually works. I'm not the one with this issue. I'm the creator of OpenPanel and helped him out to get everything working. ### Environment Information ```bash Dokploy version: v0.24.11 Template: latest Don't think anything here is relevant tbh ``` ### When does this error occur? After successful deployment ### Additional Context I think the current template is broken. Everything spins up and working but when you actually do any requests (eg creating an account) the API_URL is not set and points to the wrong service. It looks like it's copied from the coolify templated and missing some vital things to work on dokploy. I think everything is working except envs for `NEXT_PUBLIC_API_URL` and `NEXT_PUBLIC_DASHBOARD_URL`. The `SERVICE_FQDN_*` part is related to coolify and I don't think dokploy supports this since it seems like I needed to replace them with the actual domain. Also I think the checkbox for the strip external path should be checked on this one: ``` [[config.domains]] serviceName = "op-api" port = 3_000 host = "${api_domain}" ``` I gladly assist any future development with this but I have never used dokploy so lacking a bit knowledge here. --- What I actually did to make this work for the users which had this problem: - Ensure all `NEXT_PUBLIC_API_URL` and `NEXT_PUBLIC_DASHBOARD_URL` were matching the expected value (so I just hardcoded them in the docker compose). - Since the api and dashboard was using the same domain and the api had a forward path to `/api` I checked the Strip external path options. Otherwise the api would get the wrong path - The user in question had cloudflare infront and it cached all resources so we purge cloudflare after all changes (not related to dokploy but just want to point that out) Below is the docker compose ``` x-database: &x-database DATABASE_URL: postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@op-db:5432/${OPENPANEL_POSTGRES_DB}?schema=public DATABASE_URL_DIRECT: postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@op-db:5432/${OPENPANEL_POSTGRES_DB}?schema=public REDIS_URL: redis://default:${SERVICE_PASSWORD_REDIS}@op-kv:6379 CLICKHOUSE_URL: ${OPENPANEL_CLICKHOUSE_URL:-http://op-ch:8123/openpanel} services: op-db: image: postgres:14-alpine restart: always volumes: - op-db-data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] interval: 10s timeout: 5s retries: 5 environment: - POSTGRES_DB=${OPENPANEL_POSTGRES_DB} - POSTGRES_USER=${SERVICE_USER_POSTGRES} - POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES} op-kv: image: redis:7.2.5-alpine restart: always volumes: - op-kv-data:/data command: redis-server --requirepass ${SERVICE_PASSWORD_REDIS} --maxmemory-policy noeviction healthcheck: test: [CMD, redis-cli, -a, "${SERVICE_PASSWORD_REDIS}", ping] interval: 10s timeout: 5s retries: 5 op-ch: image: clickhouse/clickhouse-server:24.3.2-alpine restart: always volumes: - op-ch-data:/var/lib/clickhouse - op-ch-logs:/var/log/clickhouse-server - ../files/clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/op-config.xml:ro - ../files/clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/op-user-config.xml:ro - ../files/clickhouse/init-db.sql:/docker-entrypoint-initdb.d/1_init-db.sql:ro healthcheck: test: [CMD-SHELL, 'clickhouse-client --query "SELECT 1" -d openpanel'] interval: 10s timeout: 5s retries: 5 op-api: image: lindesvard/openpanel-api:${OP_API_VERSION:-latest} restart: always command: > sh -c " echo 'Waiting for PostgreSQL to be ready...' while ! nc -z op-db 5432; do sleep 1 done echo 'PostgreSQL is ready' echo 'Waiting for ClickHouse to be ready...' while ! nc -z op-ch 8123; do sleep 1 done echo 'ClickHouse is ready' echo 'Running migrations...' echo '$DATABASE_URL' CI=true pnpm -r run migrate:deploy pnpm start " environment: # Common NODE_ENV: production NEXT_PUBLIC_SELF_HOSTED: true NEXT_PUBLIC_API_URL: https://thedomain.com/api NEXT_PUBLIC_DASHBOARD_URL: https://thedomain.com # Others COOKIE_SECRET: ${SERVICE_BASE64_COOKIESECRET} ALLOW_REGISTRATION: ${OPENPANEL_ALLOW_REGISTRATION:-false} ALLOW_INVITATION: ${OPENPANEL_ALLOW_INVITATION:-true} EMAIL_SENDER: ${OPENPANEL_EMAIL_SENDER} RESEND_API_KEY: ${RESEND_API_KEY} <<: *x-database healthcheck: test: ["CMD-SHELL", "curl -f http://localhost:3000/healthcheck || exit 1"] interval: 10s timeout: 5s retries: 5 depends_on: op-db: condition: service_healthy op-ch: condition: service_healthy op-kv: condition: service_healthy op-dashboard: image: lindesvard/openpanel-dashboard:${OP_DASHBOARD_VERSION:-latest} restart: always depends_on: op-api: condition: service_healthy environment: # Common NODE_ENV: production NEXT_PUBLIC_SELF_HOSTED: true NEXT_PUBLIC_API_URL: https://thedomain.com/api NEXT_PUBLIC_DASHBOARD_URL: https://thedomain.com <<: *x-database healthcheck: test: ["CMD-SHELL", "curl -f http://localhost:3000/api/healthcheck || exit 1"] interval: 10s timeout: 5s retries: 5 op-worker: image: lindesvard/openpanel-worker:${OP_WORKER_VERSION:-latest} restart: always depends_on: op-api: condition: service_healthy environment: # Common NODE_ENV=production: NEXT_PUBLIC_SELF_HOSTED: true NEXT_PUBLIC_API_URL: https://thedomain.com/api <<: *x-database healthcheck: test: ["CMD-SHELL", "curl -f http://localhost:3000/healthcheck || exit 1"] interval: 10s timeout: 5s retries: 5 deploy: mode: replicated replicas: 1 volumes: op-db-data: op-kv-data: op-ch-data: op-ch-logs: op-proxy-data: op-proxy-config: ``` ### Will you send a PR to fix it? Maybe, need help
GiteaMirror added the bug label 2025-11-22 20:30:31 -06:00
Author
Owner

@thaarrtt commented on GitHub (Aug 24, 2025):

another one to add that user need to manually edit the config, but even then I cant even sent a request to open panel instance

@thaarrtt commented on GitHub (Aug 24, 2025): another one to add that user need to manually edit the config, but even then I cant even sent a request to open panel instance
Author
Owner

@moinulmoin commented on GitHub (Oct 18, 2025):

@Siumauricio hey mate, please look into this.

@moinulmoin commented on GitHub (Oct 18, 2025): @Siumauricio hey mate, please look into this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/templates#102