Docker Install Errors

I’m new to Docker and Vikunja. When starting the Docker containers, I receive an error.
Access denied for user 'vikunja'@'localhost' (using password: YES)

Installed following this guide.

Output

sudo docker compose up
WARN[0000] /home/jeff/vikunja/docker-compose.yml: `version` is obsolete
[+] Running 2/0
 ✔ Container vikunja-db-1       Created                                                                                                                                                                                                                                                  0.0s
 ✔ Container vikunja-vikunja-1  Created                                                                                                                                                                                                                                                  0.0s
Attaching to db-1, vikunja-1
db-1       | 2024-05-25 13:34:20+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.8+maria~ubu2204 started.
db-1       | 2024-05-25 13:34:20+00:00 [Warn] [Entrypoint]: /sys/fs/cgroup///memory.pressure not writable, functionality unavailable to MariaDB
db-1       | 2024-05-25 13:34:20+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db-1       | 2024-05-25 13:34:20+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.8+maria~ubu2204 started.
db-1       | 2024-05-25 13:34:21+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
db-1       | 2024-05-25 13:34:21 0 [Note] Starting MariaDB 10.11.8-MariaDB-ubu2204 source revision 3a069644682e336e445039e48baae9693f9a08ee as process 1
db-1       | 2024-05-25 13:34:21 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
db-1       | 2024-05-25 13:34:21 0 [Note] InnoDB: Number of transaction pools: 1
db-1       | 2024-05-25 13:34:21 0 [Note] InnoDB: Using SSE4.2 crc32 instructions
db-1       | 2024-05-25 13:34:21 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
db-1       | 2024-05-25 13:34:21 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
db-1       | 2024-05-25 13:34:21 0 [Note] InnoDB: Completed initialization of buffer pool
db-1       | 2024-05-25 13:34:21 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
db-1       | 2024-05-25 13:34:21 0 [Note] InnoDB: End of log at LSN=46980
db-1       | 2024-05-25 13:34:21 0 [Note] InnoDB: 128 rollback segments are active.
db-1       | 2024-05-25 13:34:21 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
db-1       | 2024-05-25 13:34:21 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
db-1       | 2024-05-25 13:34:21 0 [Note] InnoDB: log sequence number 46980; transaction id 14
db-1       | 2024-05-25 13:34:21 0 [Note] Plugin 'FEEDBACK' is disabled.
db-1       | 2024-05-25 13:34:21 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db-1       | 2024-05-25 13:34:21 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
db-1       | 2024-05-25 13:34:21 0 [Note] InnoDB: Buffer pool(s) load completed at 240525 13:34:21
db-1       | 2024-05-25 13:34:21 0 [Note] Server socket created on IP: '0.0.0.0'.
db-1       | 2024-05-25 13:34:21 0 [Note] Server socket created on IP: '::'.
db-1       | 2024-05-25 13:34:21 0 [Note] mariadbd: ready for connections.
db-1       | Version: '10.11.8-MariaDB-ubu2204'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
db-1       | 2024-05-25 13:34:22 3 [Warning] Access denied for user 'vikunja'@'localhost' (using password: YES)
vikunja-1  | info: creating the new user vikunja with 1000:1000
vikunja-1  | usermod: no changes
vikunja-1  | 2024-05-25T13:34:23.435316364Z: INFO       ▶ config/InitConfig 001 No config file found, using default or config from environment variables.
db-1       | 2024-05-25 13:34:23 4 [Warning] Access denied for user 'vikunja'@'172.21.0.3' (using password: YES)
vikunja-1  | 2024-05-25T13:34:23.436165659Z: CRITICAL   ▶ migration/Migrate 003 Migration failed: Error 1045 (28000): Access denied for user 'vikunja'@'172.21.0.3' (using password: YES)
vikunja-1 exited with code 0
vikunja-1  | usermod: no changes
vikunja-1  | 2024-05-25T13:34:23.870130332Z: INFO       ▶ config/InitConfig 001 No config file found, using default or config from environment variables.
db-1       | 2024-05-25 13:34:23 5 [Warning] Access denied for user 'vikunja'@'172.21.0.3' (using password: YES)
vikunja-1  | 2024-05-25T13:34:23.871061953Z: CRITICAL   ▶ migration/Migrate 003 Migration failed: Error 1045 (28000): Access denied for user 'vikunja'@'172.21.0.3' (using password: YES)
vikunja-1 exited with code 0
vikunja-1  | usermod: no changes
vikunja-1  | 2024-05-25T13:34:24.304541242Z: INFO       ▶ config/InitConfig 001 No config file found, using default or config from environment variables.
db-1       | 2024-05-25 13:34:24 6 [Warning] Access denied for user 'vikunja'@'172.21.0.3' (using password: YES)
vikunja-1  | 2024-05-25T13:34:24.305212882Z: CRITICAL   ▶ migration/Migrate 003 Migration failed: Error 1045 (28000): Access denied for user 'vikunja'@'172.21.0.3' (using password: YES)
vikunja-1 exited with code 1
db-1       | 2024-05-25 13:34:24 7 [Warning] Access denied for user 'vikunja'@'localhost' (using password: YES)
vikunja-1  | usermod: no changes
vikunja-1  | 2024-05-25T13:34:24.925286861Z: INFO       ▶ config/InitConfig 001 No config file found, using default or config from environment variables.
db-1       | 2024-05-25 13:34:24 8 [Warning] Access denied for user 'vikunja'@'172.21.0.3' (using password: YES)
vikunja-1  | 2024-05-25T13:34:24.926021584Z: CRITICAL   ▶ migration/Migrate 003 Migration failed: Error 1045 (28000): Access denied for user 'vikunja'@'172.21.0.3' (using password: YES)

Compose File

version: '3'

services:
    vikunja:
        image: vikunja/vikunja
        environment:
            VIKUNJA_SERVICE_PUBLICURL: https://todo.smithbury.com
            VIKUNJA_DATABASE_HOST: db
            VIKUNJA_DATABASE_PASSWORD: [password1]
            VIKUNJA_DATABASE_TYPE: mysql
            VIKUNJA_DATABASE_USER: vikunja
            VIKUNJA_DATABASE_DATABASE: vikunja
            VIKUNJA_SERVICE_JWTSECRET: [password2]
        ports:
            - 3456:3456
        volumes:
            - ./files:/app/vikunja/files
        depends_on:
            db:
                condition: service_healthy
        restart: unless-stopped
    db:
        image: mariadb:10
        command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
        environment:
            MYSQL_ROOT_PASSWORD: [password3]
            MYSQL_USER: vikunja
            MYSQL_PASSWORD: [password1]
            MYSQL_DATABASE: vikunja
        volumes:
            - ./db:/var/lib/mysql
        restart: unless-stopped
        healthcheck:
            test: ["CMD-SHELL", "mysqladmin ping -h localhost -u $$MYSQL_USER --password=$$MYSQL_PASSWORD"]
            interval: 2s
            start_period: 30s

Docker Log

sudo docker compose logs
WARN[0000] /home/jeff/vikunja/docker-compose.yml: `version` is obsolete
db-1       | 2024-05-25 13:42:09+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.8+maria~ubu2204 started.
db-1       | 2024-05-25 13:42:09+00:00 [Warn] [Entrypoint]: /sys/fs/cgroup///memory.pressure not writable, functionality unavailable to MariaDB
db-1       | 2024-05-25 13:42:09+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db-1       | 2024-05-25 13:42:09+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.8+maria~ubu2204 started.
db-1       | 2024-05-25 13:42:09+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
vikunja-1  | info: creating the new user vikunja with 1000:1000
vikunja-1  | usermod: no changes
db-1       | 2024-05-25 13:42:09 0 [Note] Starting MariaDB 10.11.8-MariaDB-ubu2204 source revision 3a069644682e336e445039e48baae9693f9a08ee as process 1
vikunja-1  | 2024-05-25T13:42:12.105281371Z: INFO       ▶ config/InitConfig 001 No config file found, using default or config from environment variables.
vikunja-1  | 2024-05-25T13:42:12.106380596Z: CRITICAL   ▶ migration/Migrate 003 Migration failed: Error 1045 (28000): Access denied for user 'vikunja'@'172.22.0.3' (using password: YES)
vikunja-1  | info: creating the new user vikunja with 1000:1000
vikunja-1  | usermod: no changes
vikunja-1  | 2024-05-25T13:42:12.563366306Z: INFO       ▶ config/InitConfig 001 No config file found, using default or config from environment variables.
vikunja-1  | 2024-05-25T13:42:12.56443537Z: CRITICAL    ▶ migration/Migrate 003 Migration failed: Error 1045 (28000): Access denied for user 'vikunja'@'172.22.0.3' (using password: YES)
vikunja-1  | info: creating the new user vikunja with 1000:1000
vikunja-1  | usermod: no changes
vikunja-1  | 2024-05-25T13:42:13.005674201Z: INFO       ▶ config/InitConfig 001 No config file found, using default or config from environment variables.
vikunja-1  | 2024-05-25T13:42:13.006353756Z: CRITICAL   ▶ migration/Migrate 003 Migration failed: Error 1045 (28000): Access denied for user 'vikunja'@'172.22.0.3' (using password: YES)
db-1       | 2024-05-25 13:42:09 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
db-1       | 2024-05-25 13:42:09 0 [Note] InnoDB: Number of transaction pools: 1
db-1       | 2024-05-25 13:42:09 0 [Note] InnoDB: Using SSE4.2 crc32 instructions
db-1       | 2024-05-25 13:42:09 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
db-1       | 2024-05-25 13:42:09 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
db-1       | 2024-05-25 13:42:09 0 [Note] InnoDB: Completed initialization of buffer pool
db-1       | 2024-05-25 13:42:09 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
db-1       | 2024-05-25 13:42:09 0 [Note] InnoDB: End of log at LSN=46980
db-1       | 2024-05-25 13:42:09 0 [Note] InnoDB: 128 rollback segments are active.
db-1       | 2024-05-25 13:42:09 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
db-1       | 2024-05-25 13:42:09 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
db-1       | 2024-05-25 13:42:09 0 [Note] InnoDB: log sequence number 46980; transaction id 14
vikunja-1  | info: creating the new user vikunja with 1000:1000
vikunja-1  | usermod: no changes
db-1       | 2024-05-25 13:42:09 0 [Note] Plugin 'FEEDBACK' is disabled.
db-1       | 2024-05-25 13:42:09 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db-1       | 2024-05-25 13:42:09 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
db-1       | 2024-05-25 13:42:09 0 [Note] InnoDB: Buffer pool(s) load completed at 240525 13:42:09
db-1       | 2024-05-25 13:42:09 0 [Note] Server socket created on IP: '0.0.0.0'.
db-1       | 2024-05-25 13:42:09 0 [Note] Server socket created on IP: '::'.
db-1       | 2024-05-25 13:42:09 0 [Note] mariadbd: ready for connections.
db-1       | Version: '10.11.8-MariaDB-ubu2204'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
db-1       | 2024-05-25 13:42:11 3 [Warning] Access denied for user 'vikunja'@'localhost' (using password: YES)
db-1       | 2024-05-25 13:42:12 4 [Warning] Access denied for user 'vikunja'@'172.22.0.3' (using password: YES)
db-1       | 2024-05-25 13:42:12 5 [Warning] Access denied for user 'vikunja'@'172.22.0.3' (using password: YES)
db-1       | 2024-05-25 13:42:13 6 [Warning] Access denied for user 'vikunja'@'172.22.0.3' (using password: YES)
db-1       | 2024-05-25 13:42:13 7 [Warning] Access denied for user 'vikunja'@'localhost' (using password: YES)
db-1       | 2024-05-25 13:42:13 8 [Warning] Access denied for user 'vikunja'@'172.22.0.3' (using password: YES)
db-1       | 2024-05-25 13:42:14 9 [Warning] Access denied for user 'vikunja'@'172.22.0.3' (using password: YES)
db-1       | 2024-05-25 13:42:15 10 [Warning] Access denied for user 'vikunja'@'localhost' (using password: YES)
db-1       | 2024-05-25 13:42:15 0 [Note] mariadbd (initiated by: unknown): Normal shutdown
db-1       | 2024-05-25 13:42:15 0 [Note] InnoDB: FTS optimize thread exiting.
db-1       | 2024-05-25 13:42:15 0 [Note] InnoDB: Starting shutdown...
db-1       | 2024-05-25 13:42:15 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
db-1       | 2024-05-25 13:42:15 0 [Note] InnoDB: Buffer pool(s) dump completed at 240525 13:42:15
db-1       | 2024-05-25 13:42:16 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"
db-1       | 2024-05-25 13:42:16 0 [Note] InnoDB: Shutdown completed; log sequence number 46980; transaction id 15
db-1       | 2024-05-25 13:42:16 0 [Note] mariadbd: Shutdown complete
db-1       |
vikunja-1  | 2024-05-25T13:42:13.636445024Z: INFO       ▶ config/InitConfig 001 No config file found, using default or config from environment variables.
vikunja-1  | 2024-05-25T13:42:13.637215978Z: CRITICAL   ▶ migration/Migrate 003 Migration failed: Error 1045 (28000): Access denied for user 'vikunja'@'172.22.0.3' (using password: YES)
vikunja-1  | info: creating the new user vikunja with 1000:1000
vikunja-1  | usermod: no changes
vikunja-1  | 2024-05-25T13:42:14.668232191Z: INFO       ▶ config/InitConfig 001 No config file found, using default or config from environment variables.
vikunja-1  | 2024-05-25T13:42:14.669094775Z: CRITICAL   ▶ migration/Migrate 003 Migration failed: Error 1045 (28000): Access denied for user 'vikunja'@'172.22.0.3' (using password: YES)

Do you have the passwords wrapped in square brackets as in the files you show, or are they just placeholders? If they are there, recommend trying without, or wrapping everything in “quotes”. Yaml have weird rules regarding what is parsed as what, I think [foo] world be parsed as a list with the string “foo”.

Placeholders only. Actual are randomly generated upper, lower alpha with numbers. If it looks like the Vikunja and MySQL passwords not matching is the cause, I can post the actuals and change once verified.

Have you tried with a simple password, only letters? Or wrapping the complex ones in quotes?

I haven’t tried the Vikunja docker setup myself, so other than that I’m not sure what to try.

No luck :frowning:

I tried the tear down operation
``
then setting up with a close to default setup

version: '3'

services:
    vikunja:
        image: vikunja/vikunja
        environment:
            VIKUNJA_SERVICE_PUBLICURL: http://todo.smithbury.com
            VIKUNJA_DATABASE_HOST: db
            VIKUNJA_DATABASE_PASSWORD: testpass
            VIKUNJA_DATABASE_TYPE: mysql
            VIKUNJA_DATABASE_USER: vikunja
            VIKUNJA_DATABASE_DATABASE: vikunja
            VIKUNJA_SERVICE_JWTSECRET: JWTSECRET
        ports:
            - 3456:3456
        volumes:
            - ./files:/app/vikunja/files
        depends_on:
            db:
                condition: service_healthy
        restart: unless-stopped
    db:
        image: mariadb:10
        command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
        environment:
            MYSQL_ROOT_PASSWORD: supersecret
            MYSQL_USER: vikunja
            MYSQL_PASSWORD: testpass
            MYSQL_DATABASE: vikunja
        volumes:
            - ./db:/var/lib/mysql
        restart: unless-stopped
        healthcheck:
            test: ["CMD-SHELL", "mysqladmin ping -h localhost -u $$MYSQL_USER --password=$$MYSQL_PASSWORD"]
            interval: 2s
            start_period: 30s

Still gets the same error output.

sudo docker compose up
WARN[0000] /home/jeff/vikunja/docker-compose.yml: `version` is obsolete
[+] Running 2/2
 ✔ Container vikunja-db-1       Recreated                                                                                                                                                                                                                                                0.1s
 ✔ Container vikunja-vikunja-1  Recreated                                                                                                                                                                                                                                                0.1s
Attaching to db-1, vikunja-1
db-1       | 2024-05-26 11:25:20+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.8+maria~ubu2204 started.
db-1       | 2024-05-26 11:25:20+00:00 [Warn] [Entrypoint]: /sys/fs/cgroup///memory.pressure not writable, functionality unavailable to MariaDB
db-1       | 2024-05-26 11:25:20+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db-1       | 2024-05-26 11:25:20+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.8+maria~ubu2204 started.
db-1       | 2024-05-26 11:25:21+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
db-1       | 2024-05-26 11:25:21 0 [Note] Starting MariaDB 10.11.8-MariaDB-ubu2204 source revision 3a069644682e336e445039e48baae9693f9a08ee as process 1
db-1       | 2024-05-26 11:25:21 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
db-1       | 2024-05-26 11:25:21 0 [Note] InnoDB: Number of transaction pools: 1
db-1       | 2024-05-26 11:25:21 0 [Note] InnoDB: Using SSE4.2 crc32 instructions
db-1       | 2024-05-26 11:25:21 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
db-1       | 2024-05-26 11:25:21 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
db-1       | 2024-05-26 11:25:21 0 [Note] InnoDB: Completed initialization of buffer pool
db-1       | 2024-05-26 11:25:21 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
db-1       | 2024-05-26 11:25:21 0 [Note] InnoDB: End of log at LSN=46980
db-1       | 2024-05-26 11:25:21 0 [Note] InnoDB: 128 rollback segments are active.
db-1       | 2024-05-26 11:25:21 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
db-1       | 2024-05-26 11:25:21 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
db-1       | 2024-05-26 11:25:21 0 [Note] InnoDB: log sequence number 46980; transaction id 14
db-1       | 2024-05-26 11:25:21 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db-1       | 2024-05-26 11:25:21 0 [Note] Plugin 'FEEDBACK' is disabled.
db-1       | 2024-05-26 11:25:21 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
db-1       | 2024-05-26 11:25:21 0 [Note] InnoDB: Buffer pool(s) load completed at 240526 11:25:21
db-1       | 2024-05-26 11:25:21 0 [Note] Server socket created on IP: '0.0.0.0'.
db-1       | 2024-05-26 11:25:21 0 [Note] Server socket created on IP: '::'.
db-1       | 2024-05-26 11:25:21 0 [Note] mariadbd: ready for connections.
db-1       | Version: '10.11.8-MariaDB-ubu2204'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
db-1       | 2024-05-26 11:25:22 3 [Warning] Access denied for user 'vikunja'@'localhost' (using password: YES)
vikunja-1  | info: creating the new user vikunja with 1000:1000
vikunja-1  | usermod: no changes
vikunja-1  | 2024-05-26T11:25:23.526627614Z: INFO       ▶ config/InitConfig 001 No config file found, using default or config from environment variables.
db-1       | 2024-05-26 11:25:23 4 [Warning] Access denied for user 'vikunja'@'172.24.0.3' (using password: YES)
vikunja-1  | 2024-05-26T11:25:23.527361758Z: CRITICAL   ▶ migration/Migrate 003 Migration failed: Error 1045 (28000): Access denied for user 'vikunja'@'172.24.0.3' (using password: YES)
vikunja-1 exited with code 0
vikunja-1  | usermod: no changes
vikunja-1  | 2024-05-26T11:25:23.944771006Z: INFO       ▶ config/InitConfig 001 No config file found, using default or config from environment variables.
db-1       | 2024-05-26 11:25:23 5 [Warning] Access denied for user 'vikunja'@'172.24.0.3' (using password: YES)
vikunja-1  | 2024-05-26T11:25:23.945886128Z: CRITICAL   ▶ migration/Migrate 003 Migration failed: Error 1045 (28000): Access denied for user 'vikunja'@'172.24.0.3' (using password: YES)
vikunja-1 exited with code 1
vikunja-1  | usermod: no changes
vikunja-1  | 2024-05-26T11:25:24.404900948Z: INFO       ▶ config/InitConfig 001 No config file found, using default or config from environment variables.
db-1       | 2024-05-26 11:25:24 6 [Warning] Access denied for user 'vikunja'@'172.24.0.3' (using password: YES)
vikunja-1  | 2024-05-26T11:25:24.405897725Z: CRITICAL   ▶ migration/Migrate 003 Migration failed: Error 1045 (28000): Access denied for user 'vikunja'@'172.24.0.3' (using password: YES)

I’m not sure what’s happened but after repeated tear downs and re-stands, I eventually got it working. Now just working my way through the error below.

And fixed :slight_smile: Just had to correct my API URL.