[GH-ISSUE #1020] Unraid Docker Compose access denied for user 'cypht'@'172.17.0.1' #546

Open
opened 2026-02-25 21:35:19 +03:00 by kerem · 11 comments
Owner

Originally created by @ansonryan on GitHub (May 14, 2024).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1020

Originally assigned to: @IrAlfred on GitHub.

💬 Question

During the installation through Unraid compose, the log reported the following warnings:

Warning: Use of undefined constant DB - assumed 'DB' (this will throw an Error in a future version of PHP) in /tmp/cypht_setup_database.php on line 3

Warning: Use of undefined constant DB - assumed 'DB' (this will throw an Error in a future version of PHP) in /tmp/cypht_setup_database.php on line 4

Warning: Use of undefined constant file - assumed 'file' (this will throw an Error in a future version of PHP) in /tmp/cypht_setup_database.php on line 5

Warning: Use of undefined constant mysql - assumed 'mysql' (this will throw an Error in a future version of PHP) in /tmp/cypht_setup_database.php on line 6
Waiting for database connection ... (SQLSTATE[HY000] [1045] Access denied for user 'cypht'@'172.17.0.1' (using password: YES))

My configuration on Unraid compose is as follows:

version: '3'
services:
  cypht:
    image: sailfrog/cypht-docker:latest
    container_name: cypht
    network_mode: bridge
    restart: always
    #privileged: true
    volumes:
      - /mnt/user/Personal/cypht:/var/lib/hm3/users
    ports:
      - "8280:80"
    environment:
      - CYPHT_AUTH_USERNAME=admin
      - CYPHT_AUTH_PASSWORD=admin_password
      - CYPHT_DB_CONNECTION_TYPE=host
      - CYPHT_DB_HOST=192.168.3.10
      - CYPHT_DB_DRIVER=mysql
      - CYPHT_DB_NAME=cypht
      - CYPHT_DB_USER=cypht
      - CYPHT_DB_PASS=Z
      - CYPHT_SESSION_TYPE=DB
      - CYPHT_DEFAULT_SETTING_TIMEZONE=Asia/Shanghai
      - CYPHT_MODULE_POP3=disable
      - CYPHT_MODULE_IMAP=enable
    labels:
      net.unraid.docker.webui: https://mail.domain.com/
      net.unraid.docker.icon: https://raw.githubusercontent.com/cypht-org/cypht/6d0e50a1778cd63a77130e44f4b46bb9c2a1cb82/modules/core/assets/images/logo.svg
      traefik.enable: true
      traefik.http.routers.cypht.rule: Host(`mail.domain.com`)
      traefik.http.services.cypht.loadbalancer.server.port: 80

networks:
  default:
    name: bridge
    external: true
Originally created by @ansonryan on GitHub (May 14, 2024). Original GitHub issue: https://github.com/cypht-org/cypht/issues/1020 Originally assigned to: @IrAlfred on GitHub. ## 💬 Question During the installation through Unraid compose, the log reported the following warnings: > Warning: Use of undefined constant DB - assumed 'DB' (this will throw an Error in a future version of PHP) in /tmp/cypht_setup_database.php on line 3 > > Warning: Use of undefined constant DB - assumed 'DB' (this will throw an Error in a future version of PHP) in /tmp/cypht_setup_database.php on line 4 > > Warning: Use of undefined constant file - assumed 'file' (this will throw an Error in a future version of PHP) in /tmp/cypht_setup_database.php on line 5 > > Warning: Use of undefined constant mysql - assumed 'mysql' (this will throw an Error in a future version of PHP) in /tmp/cypht_setup_database.php on line 6 > Waiting for database connection ... (SQLSTATE[HY000] [1045] Access denied for user 'cypht'@'172.17.0.1' (using password: YES)) > My configuration on Unraid compose is as follows: ``` version: '3' services: cypht: image: sailfrog/cypht-docker:latest container_name: cypht network_mode: bridge restart: always #privileged: true volumes: - /mnt/user/Personal/cypht:/var/lib/hm3/users ports: - "8280:80" environment: - CYPHT_AUTH_USERNAME=admin - CYPHT_AUTH_PASSWORD=admin_password - CYPHT_DB_CONNECTION_TYPE=host - CYPHT_DB_HOST=192.168.3.10 - CYPHT_DB_DRIVER=mysql - CYPHT_DB_NAME=cypht - CYPHT_DB_USER=cypht - CYPHT_DB_PASS=Z - CYPHT_SESSION_TYPE=DB - CYPHT_DEFAULT_SETTING_TIMEZONE=Asia/Shanghai - CYPHT_MODULE_POP3=disable - CYPHT_MODULE_IMAP=enable labels: net.unraid.docker.webui: https://mail.domain.com/ net.unraid.docker.icon: https://raw.githubusercontent.com/cypht-org/cypht/6d0e50a1778cd63a77130e44f4b46bb9c2a1cb82/modules/core/assets/images/logo.svg traefik.enable: true traefik.http.routers.cypht.rule: Host(`mail.domain.com`) traefik.http.services.cypht.loadbalancer.server.port: 80 networks: default: name: bridge external: true ```
Author
Owner

@marclaporte commented on GitHub (May 14, 2024):

FYI, we are working to revamp our Docker support

WIP: https://github.com/cypht-org/cypht/pull/1001

Context: https://github.com/cypht-org/cypht-docker/issues/31

<!-- gh-comment-id:2110332619 --> @marclaporte commented on GitHub (May 14, 2024): FYI, we are working to revamp our Docker support WIP: https://github.com/cypht-org/cypht/pull/1001 Context: https://github.com/cypht-org/cypht-docker/issues/31
Author
Owner

@marclaporte commented on GitHub (Sep 28, 2024):

@ansonryan Please retest with latest release: https://hub.docker.com/r/cypht/cypht

<!-- gh-comment-id:2380384315 --> @marclaporte commented on GitHub (Sep 28, 2024): @ansonryan Please retest with latest release: https://hub.docker.com/r/cypht/cypht
Author
Owner

@IrAlfred commented on GitHub (Aug 23, 2025):

Hello @ansonryan,

The latest release, Cypht 2.4.2, is now available on Docker Hub. Could you please retest when you have a moment?

You can pull it from: https://hub.docker.com/r/cypht/cypht

We're waiting for your feedback to confirm everything is working so we can close this issue. Thank you!

<!-- gh-comment-id:3216549803 --> @IrAlfred commented on GitHub (Aug 23, 2025): Hello @ansonryan, The latest release, Cypht 2.4.2, is now available on Docker Hub. Could you please retest when you have a moment? You can pull it from: [https://hub.docker.com/r/cypht/cypht](https://hub.docker.com/r/cypht/cypht) We're waiting for your feedback to confirm everything is working so we can close this issue. Thank you!
Author
Owner

@IrAlfred commented on GitHub (Sep 24, 2025):

Hello @ansonryan

I'm closing the issue, but please reopen it if you experience the problem again on the latest version.

<!-- gh-comment-id:3330673408 --> @IrAlfred commented on GitHub (Sep 24, 2025): Hello @ansonryan I'm closing the issue, but please reopen it if you experience the problem again on the latest version.
Author
Owner

@Neon-44 commented on GitHub (Nov 13, 2025):

not the original author, but I still get the Error.

I get a 502 on the website, the logs show failed login to the database. I assume that's the Cause for the 502. Can you reopen this @IrAlfred ?

<!-- gh-comment-id:3526380605 --> @Neon-44 commented on GitHub (Nov 13, 2025): not the original author, but I still get the Error. I get a 502 on the website, the logs show failed login to the database. I assume that's the Cause for the 502. Can you reopen this @IrAlfred ?
Author
Owner

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

not the original author, but I still get the Error.

I get a 502 on the website, the logs show failed login to the database. I assume that's the Cause for the 502. Can you reopen this @IrAlfred ?

Which version are you currently using ?

We need more details about your issue so we can try to reproduce and fix

<!-- gh-comment-id:3526429287 --> @IrAlfred commented on GitHub (Nov 13, 2025): > not the original author, but I still get the Error. > > I get a 502 on the website, the logs show failed login to the database. I assume that's the Cause for the 502. Can you reopen this [@IrAlfred](https://github.com/IrAlfred) ? Which version are you currently using ? We need more details about your issue so we can try to reproduce and fix
Author
Owner

@Neon-44 commented on GitHub (Nov 13, 2025):

502 was me reverse proxying to a nonexistent container, i am sorry, please ignore that.

I am on tag latest. I pruned all volumes and deleted the data dir in hopes of re-creating a fresh envronment. I have also tried to select the most important stuff from the logs:

at first it all seems to work

db-1  | 2025-11-13 09:19:09+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.15+maria~ubu2204 started.

db-1     | 2025-11-13 09:19:10+00:00 [Warn] [Entrypoint]: /sys/fs/cgroup///memory.pressure not writable, functionality unavailable to MariaDB

db-1     | 2025-11-13 09:19:10+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'

db-1     | 2025-11-13 09:19:10+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.15+maria~ubu2204 started.

db-1     | 2025-11-13 09:19:10+00:00 [Note] [Entrypoint]: Initializing database files

db-1     | 2025-11-13  9:19:10 0 [Warning] mariadbd: io_uring_queue_init() failed with EPERM: sysctl kernel.io_uring_disabled has the value 2, or 1 and the user of the process is not a member of sysctl kernel.io_uring_group. (see man 2 io_uring_setup).

db-1     | create_uring failed: falling back to libaio

db-1     | 2025-11-13 09:19:29+00:00 [Note] [Entrypoint]: Database files initialized

db-1     | 2025-11-13 09:19:29+00:00 [Note] [Entrypoint]: Starting temporary server

db-1     | 2025-11-13 09:19:29+00:00 [Note] [Entrypoint]: Waiting for server startup

db-1     | 2025-11-13  9:19:29 0 [Note] Starting MariaDB 10.11.15-MariaDB-ubu2204 source revision cb0d6dd835023a7162ace471cd047161f205dd58 server_uid srNITo6SywYCSr44ahCc2/H2wtw= as process 101

cypht-1  | Cannot load Xdebug - it was already loaded

cypht-1  |

cypht-1  | Attempting to connect to database ... (1/10)

cypht-1  | Attempting to connect to database ... (2/10)

cypht-1  | Attempting to connect to database ... (3/10)

cypht-1  | Attempting to connect to database ... (4/10)

cypht-1  | Database connection successful ...

cypht-1  | Database is empty. Initializing...

cypht-1  | Database schema initialized.

cypht-1  | Migrations table not found. Creating it...

cypht-1  | Migrations table created.

cypht-1  | Migrations table populated for new installation.

cypht-1  |

But then I get the first error. Funnily enough it seems that the Database only now starts, even though cypht before already logged that it successfully connected.

db-1     | Version: '10.11.15-MariaDB-ubu2204'  socket: '/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution

db-1     | 2025-11-13  9:19:30 3 [Warning] Access denied for user 'cypht'@'localhost' (using password: YES)

db-1     | 2025-11-13 09:19:30+00:00 [Note] [Entrypoint]: Temporary server started.

db-1     | 2025-11-13 09:19:33+00:00 [Note] [Entrypoint]: Creating database cypht

db-1     | 2025-11-13 09:19:33+00:00 [Note] [Entrypoint]: Creating user cypht

db-1     | 2025-11-13 09:19:33+00:00 [Note] [Entrypoint]: Giving user cypht access to schema cypht

db-1     | 2025-11-13 09:19:33+00:00 [Note] [Entrypoint]: Securing system users (equivalent to running mysql_secure_installation)

db-1     |

db-1     | 2025-11-13 09:19:33+00:00 [Note] [Entrypoint]: Stopping temporary server

db-1     | 2025-11-13  9:19:33 0 [Note] mariadbd (initiated by: unknown): Normal shutdown

db-1     | 2025-11-13  9:19:33 0 [Note] InnoDB: FTS optimize thread exiting.

db-1     | 2025-11-13  9:19:34 0 [Note] InnoDB: Starting shutdown...

db-1     | 2025-11-13  9:19:34 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool

db-1     | 2025-11-13  9:19:34 0 [Note] InnoDB: Buffer pool(s) dump completed at 251113  9:19:34

db-1     | 2025-11-13  9:19:35 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"

db-1     | 2025-11-13  9:19:35 0 [Note] InnoDB: Shutdown completed; log sequence number 45426; transaction id 15

cypht-1  | Db setup finished`

[a few cypht module logs]
`
db-1     | 2025-11-13  9:19:35 0 [Note] mariadbd: Shutdown complete

db-1     | 2025-11-13 09:19:35+00:00 [Note] [Entrypoint]: Temporary server stopped

db-1     |

db-1     | 2025-11-13 09:19:35+00:00 [Note] [Entrypoint]: MariaDB init process done. Ready for start up.

and then at the end of the log I have a

db-1     | 2025-11-13  9:19:35 0 [Note] InnoDB: Buffer pool(s) load completed at 251113  9:19:35

db-1     | 2025-11-13  9:19:35 0 [Note] Server socket created on IP: '0.0.0.0', port: '3306'.

db-1     | 2025-11-13  9:19:35 0 [Note] Server socket created on IP: '::', port: '3306'.

db-1     | 2025-11-13  9:19:35 0 [Note] mariadbd: ready for connections.

db-1     | Version: '10.11.15-MariaDB-ubu2204'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution

db-1     | 2025-11-13  9:19:40 5 [Warning] Access denied for user 'cypht'@'localhost' (using password: YES)
<!-- gh-comment-id:3526724769 --> @Neon-44 commented on GitHub (Nov 13, 2025): 502 was me reverse proxying to a nonexistent container, i am sorry, please ignore that. I am on tag latest. I pruned all volumes and deleted the data dir in hopes of re-creating a fresh envronment. I have also tried to select the most important stuff from the logs: at first it all seems to work ``` db-1 | 2025-11-13 09:19:09+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.15+maria~ubu2204 started. db-1 | 2025-11-13 09:19:10+00:00 [Warn] [Entrypoint]: /sys/fs/cgroup///memory.pressure not writable, functionality unavailable to MariaDB db-1 | 2025-11-13 09:19:10+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' db-1 | 2025-11-13 09:19:10+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.15+maria~ubu2204 started. db-1 | 2025-11-13 09:19:10+00:00 [Note] [Entrypoint]: Initializing database files db-1 | 2025-11-13 9:19:10 0 [Warning] mariadbd: io_uring_queue_init() failed with EPERM: sysctl kernel.io_uring_disabled has the value 2, or 1 and the user of the process is not a member of sysctl kernel.io_uring_group. (see man 2 io_uring_setup). db-1 | create_uring failed: falling back to libaio db-1 | 2025-11-13 09:19:29+00:00 [Note] [Entrypoint]: Database files initialized db-1 | 2025-11-13 09:19:29+00:00 [Note] [Entrypoint]: Starting temporary server db-1 | 2025-11-13 09:19:29+00:00 [Note] [Entrypoint]: Waiting for server startup db-1 | 2025-11-13 9:19:29 0 [Note] Starting MariaDB 10.11.15-MariaDB-ubu2204 source revision cb0d6dd835023a7162ace471cd047161f205dd58 server_uid srNITo6SywYCSr44ahCc2/H2wtw= as process 101 cypht-1 | Cannot load Xdebug - it was already loaded cypht-1 | cypht-1 | Attempting to connect to database ... (1/10) cypht-1 | Attempting to connect to database ... (2/10) cypht-1 | Attempting to connect to database ... (3/10) cypht-1 | Attempting to connect to database ... (4/10) cypht-1 | Database connection successful ... cypht-1 | Database is empty. Initializing... cypht-1 | Database schema initialized. cypht-1 | Migrations table not found. Creating it... cypht-1 | Migrations table created. cypht-1 | Migrations table populated for new installation. cypht-1 | ``` But then I get the first error. Funnily enough it seems that the Database only now starts, even though cypht before already logged that it successfully connected. ``` db-1 | Version: '10.11.15-MariaDB-ubu2204' socket: '/run/mysqld/mysqld.sock' port: 0 mariadb.org binary distribution db-1 | 2025-11-13 9:19:30 3 [Warning] Access denied for user 'cypht'@'localhost' (using password: YES) db-1 | 2025-11-13 09:19:30+00:00 [Note] [Entrypoint]: Temporary server started. db-1 | 2025-11-13 09:19:33+00:00 [Note] [Entrypoint]: Creating database cypht db-1 | 2025-11-13 09:19:33+00:00 [Note] [Entrypoint]: Creating user cypht db-1 | 2025-11-13 09:19:33+00:00 [Note] [Entrypoint]: Giving user cypht access to schema cypht db-1 | 2025-11-13 09:19:33+00:00 [Note] [Entrypoint]: Securing system users (equivalent to running mysql_secure_installation) db-1 | db-1 | 2025-11-13 09:19:33+00:00 [Note] [Entrypoint]: Stopping temporary server db-1 | 2025-11-13 9:19:33 0 [Note] mariadbd (initiated by: unknown): Normal shutdown db-1 | 2025-11-13 9:19:33 0 [Note] InnoDB: FTS optimize thread exiting. db-1 | 2025-11-13 9:19:34 0 [Note] InnoDB: Starting shutdown... db-1 | 2025-11-13 9:19:34 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool db-1 | 2025-11-13 9:19:34 0 [Note] InnoDB: Buffer pool(s) dump completed at 251113 9:19:34 db-1 | 2025-11-13 9:19:35 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1" db-1 | 2025-11-13 9:19:35 0 [Note] InnoDB: Shutdown completed; log sequence number 45426; transaction id 15 cypht-1 | Db setup finished` [a few cypht module logs] ` db-1 | 2025-11-13 9:19:35 0 [Note] mariadbd: Shutdown complete db-1 | 2025-11-13 09:19:35+00:00 [Note] [Entrypoint]: Temporary server stopped db-1 | db-1 | 2025-11-13 09:19:35+00:00 [Note] [Entrypoint]: MariaDB init process done. Ready for start up. ``` and then at the end of the log I have a ``` db-1 | 2025-11-13 9:19:35 0 [Note] InnoDB: Buffer pool(s) load completed at 251113 9:19:35 db-1 | 2025-11-13 9:19:35 0 [Note] Server socket created on IP: '0.0.0.0', port: '3306'. db-1 | 2025-11-13 9:19:35 0 [Note] Server socket created on IP: '::', port: '3306'. db-1 | 2025-11-13 9:19:35 0 [Note] mariadbd: ready for connections. db-1 | Version: '10.11.15-MariaDB-ubu2204' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution db-1 | 2025-11-13 9:19:40 5 [Warning] Access denied for user 'cypht'@'localhost' (using password: YES) ```
Author
Owner

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

@Neon-44

To help us investigate this issue efficiently, can you please share the content of your docker-compose.yml file?

For your security, please remember to:

Redact any sensitive information like passwords, or secrets before sharing.

You can replace them with placeholders like [REDACTED] or [SECRET].

This will allow us to replicate your environment and identify the root cause. Thank you!

<!-- gh-comment-id:3526803241 --> @IrAlfred commented on GitHub (Nov 13, 2025): @Neon-44 To help us investigate this issue efficiently, can you please share the content of your docker-compose.yml file? **For your security, please remember to:** Redact any sensitive information like passwords, or secrets before sharing. You can replace them with placeholders like [REDACTED] or [SECRET]. This will allow us to replicate your environment and identify the root cause. Thank you!
Author
Owner

@Neon-44 commented on GitHub (Nov 13, 2025):

Galdly. It is mainly just your example with

  • the Network cypht-webmail is for access from the reverse proxy
  • Port 81 is for testing purposes
  • I started with tag 2.5.1 but replaced it in hope latest would work. I don't see it making a difference.
services:
  db:
    image: mariadb:10
#    ports:
#      - "3306:3306"
    volumes:
      - ./data/mysql:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=[redacted]
      - MYSQL_DATABASE=cypht
      - MYSQL_USER=cypht
      - MYSQL_PASSWORD="[redacted]"
    healthcheck:
      test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-ucypht", "-pcypht_password"]
      interval: 10s
      timeout: 5s
      retries: 5
    networks:
     - cypht-internal

  cypht:
    image: cypht/cypht:latest
    depends_on:
      db:
        condition: service_healthy
    ports:
      - "81:80"
    environment:
      - AUTH_USERNAME=admin
      - AUTH_PASSWORD=[redacted]
      - DB_CONNECTION_TYPE=host
      - DB_DRIVER=mysql
      - DB_HOST=db
      - DB_NAME=cypht
      - DB_USER=cypht
      - DB_PASS="[redacted]"
      - SESSION_TYPE=DB
      - USER_CONFIG_TYPE=DB
    volumes:
      - ./data/log/nginx:/var/log/nginx
      - ./data/log/php:/var/log/php
      - ./data/log/supervisord:/var/log/supervisord
      - ./data/fonts:/usr/local/share/cypht/site/fonts
    networks:
     - cypht-webmail
     - cypht-internal

networks:
 cypht-webmail:
  external: true
 cypht-internal:
  external: false
<!-- gh-comment-id:3527023855 --> @Neon-44 commented on GitHub (Nov 13, 2025): Galdly. It is mainly just your example with - the Network cypht-webmail is for access from the reverse proxy - Port 81 is for testing purposes - I started with tag 2.5.1 but replaced it in hope latest would work. I don't see it making a difference. ``` services: db: image: mariadb:10 # ports: # - "3306:3306" volumes: - ./data/mysql:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=[redacted] - MYSQL_DATABASE=cypht - MYSQL_USER=cypht - MYSQL_PASSWORD="[redacted]" healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-ucypht", "-pcypht_password"] interval: 10s timeout: 5s retries: 5 networks: - cypht-internal cypht: image: cypht/cypht:latest depends_on: db: condition: service_healthy ports: - "81:80" environment: - AUTH_USERNAME=admin - AUTH_PASSWORD=[redacted] - DB_CONNECTION_TYPE=host - DB_DRIVER=mysql - DB_HOST=db - DB_NAME=cypht - DB_USER=cypht - DB_PASS="[redacted]" - SESSION_TYPE=DB - USER_CONFIG_TYPE=DB volumes: - ./data/log/nginx:/var/log/nginx - ./data/log/php:/var/log/php - ./data/log/supervisord:/var/log/supervisord - ./data/fonts:/usr/local/share/cypht/site/fonts networks: - cypht-webmail - cypht-internal networks: cypht-webmail: external: true cypht-internal: external: false ```
Author
Owner

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

Thank you @Neon-44

I've been able to reproduce the issue. The error indicates the user was configured for localhost access only. I'm investigating the root cause and will provide an update once I have more information.

<!-- gh-comment-id:3527250925 --> @IrAlfred commented on GitHub (Nov 13, 2025): Thank you @Neon-44 I've been able to reproduce the issue. The error indicates the user was configured for localhost access only. I'm investigating the root cause and will provide an update once I have more information.
Author
Owner

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

@Neon-44

You can use this workaround meanwhile

services:
  db:
    image: mariadb:10
#    ports:
#      - "3306:3306"
    volumes:
      - ./data/mysql:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=ROOT_PASS
      - MYSQL_DATABASE=cypht
    command: >
      bash -c '
      mkdir -p /docker-entrypoint-initdb.d &&
      echo "CREATE USER IF NOT EXISTS \"cypht\"@\"%\" IDENTIFIED BY \"cypht_password\"; GRANT ALL PRIVILEGES ON cypht.* TO \"cypht\"@\"%\"; FLUSH PRIVILEGES;" > /docker-entrypoint-initdb.d/init.sql &&
      exec docker-entrypoint.sh mariadbd
      '
    healthcheck:
      test: ["CMD", "mysqladmin", "ping", "-h", "db", "-ucypht", "-pcypht_password"]
      interval: 10s
      timeout: 5s
      retries: 5
    networks:
     - cypht-internal

  cypht:
    image: cypht/cypht:2.5.1
    depends_on:
      db:
        condition: service_healthy
    ports:
      - "81:80"
    environment:
      - AUTH_USERNAME=admin
      - AUTH_PASSWORD=admin
      - DB_CONNECTION_TYPE=host
      - DB_DRIVER=mysql
      - DB_HOST=db
      - DB_NAME=cypht
      - DB_USER=cypht
      - DB_PASS=cypht_password
      - SESSION_TYPE=DB
      - USER_CONFIG_TYPE=DB
    volumes:
      - ./data/log/nginx:/var/log/nginx
      - ./data/log/php:/var/log/php
      - ./data/log/supervisord:/var/log/supervisord
      - ./data/fonts:/usr/local/share/cypht/site/fonts
    networks:
     - cypht-webmail
     - cypht-internal

networks:
  cypht-webmail:
    external: true
  cypht-internal:
    external: false
<!-- gh-comment-id:3527748895 --> @IrAlfred commented on GitHub (Nov 13, 2025): @Neon-44 You can use this workaround meanwhile ``` services: db: image: mariadb:10 # ports: # - "3306:3306" volumes: - ./data/mysql:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=ROOT_PASS - MYSQL_DATABASE=cypht command: > bash -c ' mkdir -p /docker-entrypoint-initdb.d && echo "CREATE USER IF NOT EXISTS \"cypht\"@\"%\" IDENTIFIED BY \"cypht_password\"; GRANT ALL PRIVILEGES ON cypht.* TO \"cypht\"@\"%\"; FLUSH PRIVILEGES;" > /docker-entrypoint-initdb.d/init.sql && exec docker-entrypoint.sh mariadbd ' healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "db", "-ucypht", "-pcypht_password"] interval: 10s timeout: 5s retries: 5 networks: - cypht-internal cypht: image: cypht/cypht:2.5.1 depends_on: db: condition: service_healthy ports: - "81:80" environment: - AUTH_USERNAME=admin - AUTH_PASSWORD=admin - DB_CONNECTION_TYPE=host - DB_DRIVER=mysql - DB_HOST=db - DB_NAME=cypht - DB_USER=cypht - DB_PASS=cypht_password - SESSION_TYPE=DB - USER_CONFIG_TYPE=DB volumes: - ./data/log/nginx:/var/log/nginx - ./data/log/php:/var/log/php - ./data/log/supervisord:/var/log/supervisord - ./data/fonts:/usr/local/share/cypht/site/fonts networks: - cypht-webmail - cypht-internal networks: cypht-webmail: external: true cypht-internal: external: false ```
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#546
No description provided.