[GH-ISSUE #1786] 🐛 [Bug] cypht migration issue from 2.4.2 to 2.5.1 #706

Closed
opened 2026-02-25 21:35:43 +03:00 by kerem · 1 comment
Owner

Originally created by @kevinend51 on GitHub (Nov 11, 2025).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1786

Originally assigned to: @IrAlfred on GitHub.

🐛 Bug

Here is my original docker compose:

services:
  db:
    image: mariadb:10.11.15
    restart: unless-stopped
    volumes:
      - ./mysql:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: *****
      MYSQL_DATABASE: cypht
      MYSQL_USER: cypht
      MYSQL_PASSWORD: *****
  cypht:
    image: cypht/cypht:2.4.2
    restart: unless-stopped
    ports:
      - "50210:80"
    environment:
      AUTH_USERNAME: admin
      AUTH_PASSWORD: *****
      DB_CONNECTION_TYPE: host
      DB_DRIVER: mysql
      DB_HOST: db
      DB_NAME: cypht
      DB_USER: cypht
      DB_PASS: *****
      SESSION_TYPE: DB
      USER_CONFIG_TYPE: DB
      ADMIN_USERS: admin

I execute docker compose down, change the cypht image from 2.4.2 to 2.5.1, and execute docker compose up -d. However, the error occurs:

Database connection successful ...
Database detected. Running migrations...
Running migrations...
Migrations completed.

Db setup finished
Creating directory for attachments /var/lib/hm3/attachments
Cannot load Xdebug - it was already loaded
Error: Unable to create user account.
user admin already exists
Cannot load Xdebug - it was already loaded

Seems like cypht fails to start due to trying recreate admin account?

Version & Environment

Rev: cypht/cypht:2.5.1

OS: docker

Originally created by @kevinend51 on GitHub (Nov 11, 2025). Original GitHub issue: https://github.com/cypht-org/cypht/issues/1786 Originally assigned to: @IrAlfred on GitHub. <!-- You can find the latest issue templates here https://github.com/ulfgebhardt/issue-templates --> ## 🐛 Bug <!-- Describe your issue in detail. Include screenshots if needed. Give us as much information as possible. Use a clear and concise description of what the bug is.--> Here is my original docker compose: ``` services: db: image: mariadb:10.11.15 restart: unless-stopped volumes: - ./mysql:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: ***** MYSQL_DATABASE: cypht MYSQL_USER: cypht MYSQL_PASSWORD: ***** cypht: image: cypht/cypht:2.4.2 restart: unless-stopped ports: - "50210:80" environment: AUTH_USERNAME: admin AUTH_PASSWORD: ***** DB_CONNECTION_TYPE: host DB_DRIVER: mysql DB_HOST: db DB_NAME: cypht DB_USER: cypht DB_PASS: ***** SESSION_TYPE: DB USER_CONFIG_TYPE: DB ADMIN_USERS: admin ``` I execute `docker compose down`, change the cypht image from 2.4.2 to 2.5.1, and execute `docker compose up -d`. However, the error occurs: ``` Database connection successful ... Database detected. Running migrations... Running migrations... Migrations completed. Db setup finished Creating directory for attachments /var/lib/hm3/attachments Cannot load Xdebug - it was already loaded Error: Unable to create user account. user admin already exists Cannot load Xdebug - it was already loaded ``` Seems like cypht fails to start due to trying recreate admin account? ### Version & Environment <!-- Paste Git-Commit ID or Tag-Name here --> Rev: cypht/cypht:2.5.1 <!-- Specify your OS and OS Version here if the issue is (most likely) platform dependent. --> OS: docker
kerem 2026-02-25 21:35:43 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@IrAlfred commented on GitHub (Nov 11, 2025):

Hello @kevinend51,

Thank you for reporting this issue. The fix has been implemented in pull request #1782 and will be included in the next release.

In the meantime, here's a workaround: please delete the existing user before starting the container. This should resolve the container failure you're experiencing.

<!-- gh-comment-id:3517319051 --> @IrAlfred commented on GitHub (Nov 11, 2025): Hello @kevinend51, Thank you for reporting this issue. The fix has been implemented in pull request #1782 and will be included in the next release. In the meantime, here's a workaround: please delete the existing user before starting the container. This should resolve the container failure you're experiencing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#706
No description provided.