You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
password authentication failed, brand new installation #816
db-1 | 2025-03-01 21:04:54.911 UTC [548] FATAL: password authentication failed for user "docmost"
db-1 | 2025-03-01 21:04:54.911 UTC [548] DETAIL: Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"
Here's the out put from a docker-compose up > log.log after removing volumes:
Attaching to db-1, docmost-1, redis-1
redis-1 | 1:C 03 Mar 2025 12:54:15.364 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see jemalloc/jemalloc#1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis-1 | 1:C 03 Mar 2025 12:54:15.367 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis-1 | 1:C 03 Mar 2025 12:54:15.367 * Redis version=7.2.7, bits=64, commit=00000000, modified=0, pid=1, just started
redis-1 | 1:C 03 Mar 2025 12:54:15.367 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis-1 | 1:M 03 Mar 2025 12:54:15.368 * monotonic clock: POSIX clock_gettime
redis-1 | 1:M 03 Mar 2025 12:54:15.369 * Running mode=standalone, port=6379.
redis-1 | 1:M 03 Mar 2025 12:54:15.370 * Server initialized
redis-1 | 1:M 03 Mar 2025 12:54:15.370 * Ready to accept connections tcp
db-1 | The files belonging to this database system will be owned by user "postgres".
db-1 | This user must also own the server process.
db-1 |
db-1 | The database cluster will be initialized with locale "en_US.utf8".
db-1 | The default database encoding has accordingly been set to "UTF8".
db-1 | The default text search configuration will be set to "english".
db-1 |
db-1 | Data page checksums are disabled.
db-1 |
db-1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok
db-1 | creating subdirectories ... ok
db-1 | selecting dynamic shared memory implementation ... posix
db-1 | selecting default max_connections ... 100
db-1 | selecting default shared_buffers ... 128MB
db-1 | selecting default time zone ... UTC
db-1 | creating configuration files ... ok
db-1 | running bootstrap script ... ok
docmost-1 |
docmost-1 | > [email protected] start /app
docmost-1 | > pnpm --filter ./apps/server run start:prod
docmost-1 |
db-1 | performing post-bootstrap initialization ... ok
docmost-1 |
docmost-1 | > [email protected] start:prod /app/apps/server
docmost-1 | > cross-env NODE_ENV=production node dist/main
docmost-1 |
db-1 | syncing data to disk ... ok
db-1 |
db-1 |
db-1 | Success. You can now start the database server using:
db-1 |
db-1 | pg_ctl -D /var/lib/postgresql/data -l logfile start
db-1 |
db-1 | waiting for server to start....2025-03-03 12:54:18.456 UTC [40] LOG: starting PostgreSQL 16.8 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 14.2.0) 14.2.0, 64-bit
db-1 | 2025-03-03 12:54:18.460 UTC [40] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db-1 | 2025-03-03 12:54:18.472 UTC [43] LOG: database system was shut down at 2025-03-03 12:54:17 UTC
db-1 | 2025-03-03 12:54:18.483 UTC [40] LOG: database system is ready to accept connections
db-1 | done
db-1 | server started
db-1 | CREATE DATABASE
db-1 |
db-1 |
db-1 | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
db-1 |
db-1 | waiting for server to shut down....2025-03-03 12:54:18.747 UTC [40] LOG: received fast shutdown request
db-1 | 2025-03-03 12:54:18.753 UTC [40] LOG: aborting any active transactions
db-1 | 2025-03-03 12:54:18.759 UTC [40] LOG: background worker "logical replication launcher" (PID 46) exited with exit code 1
db-1 | 2025-03-03 12:54:18.761 UTC [41] LOG: shutting down
db-1 | 2025-03-03 12:54:18.764 UTC [41] LOG: checkpoint starting: shutdown immediate
db-1 | 2025-03-03 12:54:19.071 UTC [41] LOG: checkpoint complete: wrote 924 buffers (5.6%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.233 s, sync=0.064 s, total=0.311 s; sync files=301, longest=0.009 s, average=0.001 s; distance=4267 kB, estimate=4267 kB; lsn=0/191AB10, redo lsn=0/191AB10
db-1 | 2025-03-03 12:54:19.081 UTC [40] LOG: database system is shut down
db-1 | done
db-1 | server stopped
db-1 |
db-1 | PostgreSQL init process complete; ready for start up.
db-1 |
docmost-1 | [Nest] 42 - 03/03/2025, 12:54:22 PM LOG [NestFactory] Starting Nest application...
docmost-1 | [Nest] 42 - 03/03/2025, 12:54:23 PM LOG [DatabaseModule] Establishing database connection
docmost-1 | [Nest] 42 - 03/03/2025, 12:54:23 PM LOG [DatabaseModule] Retrying [1/15] in 3 seconds
docmost-1 | [Nest] 42 - 03/03/2025, 12:54:26 PM LOG [DatabaseModule] Retrying [2/15] in 3 seconds
docmost-1 | [Nest] 42 - 03/03/2025, 12:54:29 PM LOG [DatabaseModule] Retrying [3/15] in 3 seconds
ubuntu@raspberrypi5:~/docmost$ sudo docker volume ls
[sudo] password for ubuntu:
DRIVER VOLUME NAME
local 24c9e32a33a319160f656203fca3c08bccda9d4308f6505d8c38842836db07ed
local 155de12ab4d8180bce3f9b192861be9d4bd66dca5dd49afe4ec4b74790f67490
local 47911f291cbb4c6fbfeea80469ff33526932288b6de684b4a2aaa6e8fbe29522
local 94637e06c0e99301a0b475d6caaf7cf9d347c61b0a154d93176bbc0eb9251502
local 99610bc4fc14c7e457227ebfb00475967cfc8278dac7503e1fb56b9e0cbb47a5
local docmost_db_data
local docmost_docmost
local docmost_redis_data
local e8154634af3e36bf4254a8faebc8e70a867be355f29ca5323c16e9e0da64f063
local edc2273b4c73afbd9f366a531f74645e44e03188e63c1cebbe23fa9fb88eb57e
local fcab120b68c94c7c0311b06300679d8939948fcae377757069b4069217e4e5b0
local immich_model-cache
local portainer_data
@Philipinho I'm genuinely not sure, that this is true. Is the postgres database setup handled by some initial setup script in the docker container?
I'm asking because according to the Installation Docs, all I have to do for inital setup is to fill the variables in the docker-compose.yml and I've tried it on two systems now, with exactly the same password in DATABASE_URL and POSTGRES_PASSWORD and I'm getting the same error.
Not that I have any deeper knowledge of this software, but since I didn't configure the database directly, I can only assume some script must be taking the information in the docker compose file to set everything up. If there is a connection error then, this setup script would be the first place I'd look for a cause.
hello, from my side I was working for a migration from a postgres_data volume to other. I was testing the data integrity into my localhost (by using podman). I got this error message any time I tried login into DB, error:
2026-01-05 15:57:33.472 UTC [32] FATAL: password authentication failed for user "postgres"
�2026-01-05 15:57:33.472 UTC [32] DETAIL: Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"
As I meanly use mariadb/mysql rather postgres I forgot about this file setup: pg_hba.conf
I checked the postgres docu and by AI, and I could fix my issue.
podman exec postgres sed -i '$c\host all all all trust' /var/lib/postgresql/data/pg_hba.conf
podman exec -u postgres postgres psql -c "SELECT pg_reload_conf();"
For sure the above workaround is not a solution, it's just for testing in dev/localhost env.
Activity
simowilso commentedon Mar 3, 2025
Tried this, same result. I'm stuck: docker compose down --volumes and then docker compose up -d
Philipinho commentedon Mar 3, 2025
Trying to convert into a discussion but Github issue -> discussion conversion seems to be failing.
Philipinho commentedon Mar 3, 2025
i. Do you have any data in your postgres database?
ii. Do you have any special characters in your chosen password?
simowilso commentedon Mar 3, 2025
Hi - I think docker-compose down --volumes removes the database? If so then no there is no data in it.
No special characters, simple 20 letter string
simowilso commentedon Mar 3, 2025
Here's the out put from a docker-compose up > log.log after removing volumes:
Attaching to db-1, docmost-1, redis-1
redis-1 | 1:C 03 Mar 2025 12:54:15.364 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see jemalloc/jemalloc#1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis-1 | 1:C 03 Mar 2025 12:54:15.367 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis-1 | 1:C 03 Mar 2025 12:54:15.367 * Redis version=7.2.7, bits=64, commit=00000000, modified=0, pid=1, just started
redis-1 | 1:C 03 Mar 2025 12:54:15.367 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis-1 | 1:M 03 Mar 2025 12:54:15.368 * monotonic clock: POSIX clock_gettime
redis-1 | 1:M 03 Mar 2025 12:54:15.369 * Running mode=standalone, port=6379.
redis-1 | 1:M 03 Mar 2025 12:54:15.370 * Server initialized
redis-1 | 1:M 03 Mar 2025 12:54:15.370 * Ready to accept connections tcp
db-1 | The files belonging to this database system will be owned by user "postgres".
db-1 | This user must also own the server process.
db-1 |
db-1 | The database cluster will be initialized with locale "en_US.utf8".
db-1 | The default database encoding has accordingly been set to "UTF8".
db-1 | The default text search configuration will be set to "english".
db-1 |
db-1 | Data page checksums are disabled.
db-1 |
db-1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok
db-1 | creating subdirectories ... ok
db-1 | selecting dynamic shared memory implementation ... posix
db-1 | selecting default max_connections ... 100
db-1 | selecting default shared_buffers ... 128MB
db-1 | selecting default time zone ... UTC
db-1 | creating configuration files ... ok
db-1 | running bootstrap script ... ok
docmost-1 |
docmost-1 | > [email protected] start /app
docmost-1 | > pnpm --filter ./apps/server run start:prod
docmost-1 |
db-1 | performing post-bootstrap initialization ... ok
docmost-1 |
docmost-1 | > [email protected] start:prod /app/apps/server
docmost-1 | > cross-env NODE_ENV=production node dist/main
docmost-1 |
db-1 | syncing data to disk ... ok
db-1 |
db-1 |
db-1 | Success. You can now start the database server using:
db-1 |
db-1 | pg_ctl -D /var/lib/postgresql/data -l logfile start
db-1 |
db-1 | waiting for server to start....2025-03-03 12:54:18.456 UTC [40] LOG: starting PostgreSQL 16.8 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 14.2.0) 14.2.0, 64-bit
db-1 | 2025-03-03 12:54:18.460 UTC [40] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db-1 | 2025-03-03 12:54:18.472 UTC [43] LOG: database system was shut down at 2025-03-03 12:54:17 UTC
db-1 | 2025-03-03 12:54:18.483 UTC [40] LOG: database system is ready to accept connections
db-1 | done
db-1 | server started
db-1 | CREATE DATABASE
db-1 |
db-1 |
db-1 | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
db-1 |
db-1 | waiting for server to shut down....2025-03-03 12:54:18.747 UTC [40] LOG: received fast shutdown request
db-1 | 2025-03-03 12:54:18.753 UTC [40] LOG: aborting any active transactions
db-1 | 2025-03-03 12:54:18.759 UTC [40] LOG: background worker "logical replication launcher" (PID 46) exited with exit code 1
db-1 | 2025-03-03 12:54:18.761 UTC [41] LOG: shutting down
db-1 | 2025-03-03 12:54:18.764 UTC [41] LOG: checkpoint starting: shutdown immediate
db-1 | 2025-03-03 12:54:19.071 UTC [41] LOG: checkpoint complete: wrote 924 buffers (5.6%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.233 s, sync=0.064 s, total=0.311 s; sync files=301, longest=0.009 s, average=0.001 s; distance=4267 kB, estimate=4267 kB; lsn=0/191AB10, redo lsn=0/191AB10
db-1 | 2025-03-03 12:54:19.081 UTC [40] LOG: database system is shut down
db-1 | done
db-1 | server stopped
db-1 |
db-1 | PostgreSQL init process complete; ready for start up.
db-1 |
docmost-1 | [Nest] 42 - 03/03/2025, 12:54:22 PM LOG [NestFactory] Starting Nest application...
docmost-1 | [Nest] 42 - 03/03/2025, 12:54:23 PM LOG [DatabaseModule] Establishing database connection
docmost-1 | [Nest] 42 - 03/03/2025, 12:54:23 PM LOG [DatabaseModule] Retrying [1/15] in 3 seconds
docmost-1 | [Nest] 42 - 03/03/2025, 12:54:26 PM LOG [DatabaseModule] Retrying [2/15] in 3 seconds
docmost-1 | [Nest] 42 - 03/03/2025, 12:54:29 PM LOG [DatabaseModule] Retrying [3/15] in 3 seconds
Philipinho commentedon Mar 3, 2025
Please provide the output of
docker volume ls.simowilso commentedon Mar 3, 2025
ubuntu@raspberrypi5:~/docmost$ sudo docker volume ls
[sudo] password for ubuntu:
DRIVER VOLUME NAME
local 24c9e32a33a319160f656203fca3c08bccda9d4308f6505d8c38842836db07ed
local 155de12ab4d8180bce3f9b192861be9d4bd66dca5dd49afe4ec4b74790f67490
local 47911f291cbb4c6fbfeea80469ff33526932288b6de684b4a2aaa6e8fbe29522
local 94637e06c0e99301a0b475d6caaf7cf9d347c61b0a154d93176bbc0eb9251502
local 99610bc4fc14c7e457227ebfb00475967cfc8278dac7503e1fb56b9e0cbb47a5
local docmost_db_data
local docmost_docmost
local docmost_redis_data
local e8154634af3e36bf4254a8faebc8e70a867be355f29ca5323c16e9e0da64f063
local edc2273b4c73afbd9f366a531f74645e44e03188e63c1cebbe23fa9fb88eb57e
local fcab120b68c94c7c0311b06300679d8939948fcae377757069b4069217e4e5b0
local immich_model-cache
local portainer_data
Philipinho commentedon Mar 3, 2025
In your compose file, is this exactly how it is? do you have the
DATABASE_URLpassword set?simowilso commentedon Mar 3, 2025
It turns out there's some password length limit. I don't know what it is, my original password was around 20 chars, a shorter one is working.
tmoehle commentedon Mar 3, 2025
I'm having the same issue with a 10 character password. Not sure this is solved.
Philipinho commentedon Mar 3, 2025
@tmoehle please kindly create a new discussion.
It’s more of a misconfiguration kind of problem.
tmoehle commentedon Mar 3, 2025
@Philipinho I'm genuinely not sure, that this is true. Is the postgres database setup handled by some initial setup script in the docker container?
I'm asking because according to the Installation Docs, all I have to do for inital setup is to fill the variables in the docker-compose.yml and I've tried it on two systems now, with exactly the same password in DATABASE_URL and POSTGRES_PASSWORD and I'm getting the same error.
Not that I have any deeper knowledge of this software, but since I didn't configure the database directly, I can only assume some script must be taking the information in the docker compose file to set everything up. If there is a connection error then, this setup script would be the first place I'd look for a cause.
Philipinho commentedon Mar 3, 2025
The Postgres image auto-creates the user and database on setup.
Do you have special characters in your password?
You should create a new discussion.
arsaboo commentedon Mar 25, 2025
Avoid using special characters in the password field, and remove the files generated during your initial setup from the Docker volumes.
MaRinobale commentedon Nov 11, 2025
First,docker rm volume,then docker-compose up -d
castrilllo commentedon Jan 5, 2026
hello, from my side I was working for a migration from a postgres_data volume to other. I was testing the data integrity into my localhost (by using podman). I got this error message any time I tried login into DB, error:
As I meanly use mariadb/mysql rather postgres I forgot about this file setup: pg_hba.conf
I checked the postgres docu and by AI, and I could fix my issue.
For sure the above workaround is not a solution, it's just for testing in dev/localhost env.
hope it can be useful.
fix(collab): charge every collab frame's work in full, and drop the p…
test(collab): pin that a blamed rebuild is never charged to the co-ed…
Merge wiki-v2 (PR 90, docmost#810) into fix/816-conflict-scan
Merge pull request #89 from cccvu/fix/816-conflict-scan
fix(collab): size the docmost#827 deadlines for a slower core (SLOW_H…
fix(collab): docmost#827 bounds sized on Graviton2, the production cl…