[GH-ISSUE #615] OpenPanel Templete Error #703

Open
opened 2026-04-16 11:13:10 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @lijianqiang12 on GitHub (Dec 21, 2025).
Original GitHub issue: https://github.com/Dokploy/templates/issues/615

Template Name

OpenPanel

Relevant Logs of the Error

It‘s error when use OpenPanel 2.0.0

Steps to Reproduce the Error

Only Deploy by this templete

Environment Information

CentOS7

When does this error occur?

During template deployment

Additional Context

No response

Will you send a PR to fix it?

Maybe, need help

Originally created by @lijianqiang12 on GitHub (Dec 21, 2025). Original GitHub issue: https://github.com/Dokploy/templates/issues/615 ### Template Name OpenPanel ### Relevant Logs of the Error It‘s error when use OpenPanel 2.0.0 ### Steps to Reproduce the Error Only Deploy by this templete ### Environment Information ```bash CentOS7 ``` ### When does this error occur? During template deployment ### Additional Context _No response_ ### Will you send a PR to fix it? Maybe, need help
GiteaMirror added the bug label 2026-04-16 11:13:10 -05:00
Author
Owner

@digitaldrreamer commented on GitHub (Feb 14, 2026):

x-common: &x-common
  NODE_ENV: production
  SELF_HOSTED: "true"
  API_URL: ${API_URL}
  DASHBOARD_URL: ${DASHBOARD_URL}
  DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@op-db:5432/${POSTGRES_DB}?schema=public
  DATABASE_URL_DIRECT: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@op-db:5432/${POSTGRES_DB}?schema=public
  REDIS_URL: redis://default:${REDIS_PASSWORD}@op-kv:6379
  CLICKHOUSE_URL: http://op-ch:8123/openpanel

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

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

  op-ch:
    image: clickhouse/clickhouse-server:25.10.2.65
    restart: always
    volumes:
      - op-ch-data:/var/lib/clickhouse
      - op-ch-logs:/var/log/clickhouse-server
    networks:
      - openpanel-internal
    environment:
      - CLICKHOUSE_SKIP_USER_SETUP=1
    healthcheck:
      test: ['CMD-SHELL', 'clickhouse-client --query "SELECT 1" -d openpanel']
      interval: 10s
      timeout: 5s
      retries: 5

  op-api:
    image: lindesvard/openpanel-api:2
    restart: always
    networks:
      - openpanel-internal
      - dokploy-network
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=dokploy-network"
      
      # Router for API with /api path
      - "traefik.http.routers.openpanel-api.rule=Host(`analytics.yourdomain.com`) && PathPrefix(`/api`)"
      - "traefik.http.routers.openpanel-api.entrypoints=websecure"
      - "traefik.http.routers.openpanel-api.tls=true"
      - "traefik.http.routers.openpanel-api.tls.certresolver=letsencrypt"
      - "traefik.http.routers.openpanel-api.priority=100"
      
      # Strip /api prefix before forwarding to container
      - "traefik.http.middlewares.openpanel-api-stripprefix.stripprefix.prefixes=/api"
      - "traefik.http.routers.openpanel-api.middlewares=openpanel-api-stripprefix"
      
      # Service configuration
      - "traefik.http.services.openpanel-api.loadbalancer.server.port=3000"
    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...'
        CI=true pnpm -r run migrate:deploy
        pnpm start
      "
    environment:
      COOKIE_SECRET: ${COOKIE_SECRET}
      ALLOW_REGISTRATION: ${ALLOW_REGISTRATION}
      ALLOW_INVITATION: ${ALLOW_INVITATION}
      EMAIL_SENDER: ${EMAIL_SENDER}
      RESEND_API_KEY: ${RESEND_API_KEY}
      <<: *x-common
    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:2
    restart: always
    networks:
      - openpanel-internal
      - dokploy-network
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=dokploy-network"
      
      # Router for Dashboard at root path
      - "traefik.http.routers.openpanel-dashboard.rule=Host(`analytics.yourdomain.com`)"
      - "traefik.http.routers.openpanel-dashboard.entrypoints=websecure"
      - "traefik.http.routers.openpanel-dashboard.tls=true"
      - "traefik.http.routers.openpanel-dashboard.tls.certresolver=letsencrypt"
      - "traefik.http.routers.openpanel-dashboard.priority=10"
      
      # Service configuration
      - "traefik.http.services.openpanel-dashboard.loadbalancer.server.port=3000"
    depends_on:
      op-api:
        condition: service_healthy
    environment:
      <<: *x-common
    healthcheck:
      test: ['CMD-SHELL', 'curl -f http://localhost:3000/ || exit 1']
      interval: 10s
      timeout: 5s
      retries: 5

  op-worker:
    image: lindesvard/openpanel-worker:2
    restart: always
    networks:
      - openpanel-internal
    depends_on:
      op-api:
        condition: service_healthy
    environment:
      <<: *x-common
    healthcheck:
      test: ['CMD-SHELL', 'curl -f http://localhost:3000/healthcheck || exit 1']
      interval: 10s
      timeout: 5s
      retries: 5

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

networks:
  openpanel-internal:
    driver: bridge
  dokploy-network:
    external: true

After running and getting that 404, replace your compose file with the code above

Image

Replace analytics.yourdomain.com with your domain or subdomain that openpanel will run on.
Save it.

Next, remove all domains from the domain tab, since its handled in the compose file already when you replaced analytics.yourdomain.com.

Image

Deploy. You're live.

<!-- gh-comment-id:3901608799 --> @digitaldrreamer commented on GitHub (Feb 14, 2026): ``` x-common: &x-common NODE_ENV: production SELF_HOSTED: "true" API_URL: ${API_URL} DASHBOARD_URL: ${DASHBOARD_URL} DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@op-db:5432/${POSTGRES_DB}?schema=public DATABASE_URL_DIRECT: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@op-db:5432/${POSTGRES_DB}?schema=public REDIS_URL: redis://default:${REDIS_PASSWORD}@op-kv:6379 CLICKHOUSE_URL: http://op-ch:8123/openpanel services: op-db: image: postgres:14-alpine restart: always volumes: - op-db-data:/var/lib/postgresql/data networks: - openpanel-internal healthcheck: test: ['CMD-SHELL', 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'] interval: 10s timeout: 5s retries: 5 environment: - POSTGRES_DB=${POSTGRES_DB} - POSTGRES_USER=${POSTGRES_USER} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} op-kv: image: redis:7.2.5-alpine restart: always volumes: - op-kv-data:/data networks: - openpanel-internal command: redis-server --requirepass ${REDIS_PASSWORD} --maxmemory-policy noeviction healthcheck: test: ['CMD', 'redis-cli', '-a', '${REDIS_PASSWORD}', 'ping'] interval: 10s timeout: 5s retries: 5 op-ch: image: clickhouse/clickhouse-server:25.10.2.65 restart: always volumes: - op-ch-data:/var/lib/clickhouse - op-ch-logs:/var/log/clickhouse-server networks: - openpanel-internal environment: - CLICKHOUSE_SKIP_USER_SETUP=1 healthcheck: test: ['CMD-SHELL', 'clickhouse-client --query "SELECT 1" -d openpanel'] interval: 10s timeout: 5s retries: 5 op-api: image: lindesvard/openpanel-api:2 restart: always networks: - openpanel-internal - dokploy-network labels: - "traefik.enable=true" - "traefik.docker.network=dokploy-network" # Router for API with /api path - "traefik.http.routers.openpanel-api.rule=Host(`analytics.yourdomain.com`) && PathPrefix(`/api`)" - "traefik.http.routers.openpanel-api.entrypoints=websecure" - "traefik.http.routers.openpanel-api.tls=true" - "traefik.http.routers.openpanel-api.tls.certresolver=letsencrypt" - "traefik.http.routers.openpanel-api.priority=100" # Strip /api prefix before forwarding to container - "traefik.http.middlewares.openpanel-api-stripprefix.stripprefix.prefixes=/api" - "traefik.http.routers.openpanel-api.middlewares=openpanel-api-stripprefix" # Service configuration - "traefik.http.services.openpanel-api.loadbalancer.server.port=3000" 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...' CI=true pnpm -r run migrate:deploy pnpm start " environment: COOKIE_SECRET: ${COOKIE_SECRET} ALLOW_REGISTRATION: ${ALLOW_REGISTRATION} ALLOW_INVITATION: ${ALLOW_INVITATION} EMAIL_SENDER: ${EMAIL_SENDER} RESEND_API_KEY: ${RESEND_API_KEY} <<: *x-common 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:2 restart: always networks: - openpanel-internal - dokploy-network labels: - "traefik.enable=true" - "traefik.docker.network=dokploy-network" # Router for Dashboard at root path - "traefik.http.routers.openpanel-dashboard.rule=Host(`analytics.yourdomain.com`)" - "traefik.http.routers.openpanel-dashboard.entrypoints=websecure" - "traefik.http.routers.openpanel-dashboard.tls=true" - "traefik.http.routers.openpanel-dashboard.tls.certresolver=letsencrypt" - "traefik.http.routers.openpanel-dashboard.priority=10" # Service configuration - "traefik.http.services.openpanel-dashboard.loadbalancer.server.port=3000" depends_on: op-api: condition: service_healthy environment: <<: *x-common healthcheck: test: ['CMD-SHELL', 'curl -f http://localhost:3000/ || exit 1'] interval: 10s timeout: 5s retries: 5 op-worker: image: lindesvard/openpanel-worker:2 restart: always networks: - openpanel-internal depends_on: op-api: condition: service_healthy environment: <<: *x-common healthcheck: test: ['CMD-SHELL', 'curl -f http://localhost:3000/healthcheck || exit 1'] interval: 10s timeout: 5s retries: 5 volumes: op-db-data: op-kv-data: op-ch-data: op-ch-logs: networks: openpanel-internal: driver: bridge dokploy-network: external: true ``` After running and getting that 404, replace your compose file with the code above <img width="1291" height="567" alt="Image" src="https://github.com/user-attachments/assets/963d3e64-7ebf-410f-8fe6-72c1412a593a" /> Replace `analytics.yourdomain.com` with your domain or subdomain that openpanel will run on. Save it. Next, remove all domains from the domain tab, since its handled in the compose file already when you replaced `analytics.yourdomain.com`. <img width="1306" height="707" alt="Image" src="https://github.com/user-attachments/assets/4040b821-cfe0-4060-9067-5db4e36bc727" /> Deploy. You're live.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/templates#703