I am running docker desktop under windows 10 to host wikijs as a local service on my desktop computer.
All has been fine for a couple of years, but yesterday I upgraded to the latest versions of docker and wikijs and now my database connection seems to have been lost
In a windows 10 cmd line as administrator I ran the following commands:
docker stop wiki
docker rm wiki
docker run -d -p 8080:3000 --name wiki --restart unless-stopped -e “DB_TYPE=postgres” -e “DB_HOST=db” -e “DB_PORT=5432” -e “DB_USER=wikijs” -e “DB_PASS=wikijsrocks” -e “DB_NAME=wiki_db-data” Package wiki · GitHub
and it produces this output:
5cfc2cb10b2a1645a31d25c75273a0a149ee612b22964a6c41398a7cbc412e39
The wiki container starts when I’m using the docker desktop gui, but if I look at the wiki container log, I see this
03-08T14:46:33.894Z [MASTER] warn: Will retry in 3 seconds… [Attempt 10 of 10]
2025-03-08 14:46:38 Loading configuration from /wiki/config.yml… OK
2025-03-08 14:46:39 2025-03-08T14:46:39.066Z [MASTER] info: =======================================
2025-03-08 14:46:39 2025-03-08T14:46:39.068Z [MASTER] info: = Wiki.js 2.5.306 =====================
2025-03-08 14:46:39 2025-03-08T14:46:39.069Z [MASTER] info: =======================================
2025-03-08 14:46:39 2025-03-08T14:46:39.069Z [MASTER] info: Initializing…
2025-03-08 14:46:39 2025-03-08T14:46:39.523Z [MASTER] info: Using database driver pg for postgres [ OK ]
2025-03-08 14:46:39 2025-03-08T14:46:39.526Z [MASTER] info: Connecting to database…
2025-03-08 14:46:42 2025-03-08T14:46:42.849Z [MASTER] error: Database Connection Error: ENOTFOUND undefined:undefined
2025-03-08 14:46:42 2025-03-08T14:46:42.849Z [MASTER] warn: Will retry in 3 seconds… [Attempt 1 of 10]
2025-03-08 14:46:45 2025-03-08T14:46:45.854Z [MASTER] info: Connecting to database…
2025-03-08 14:46:49 2025-03-08T14:46:49.159Z [MASTER] error: Database Connection Error: ENOTFOUND undefined:undefined
2025-03-08 14:46:49 2025-03-08T14:46:49.159Z [MASTER] warn: Will retry in 3 seconds… [Attempt 2 of 10]
2025-03-08 14:46:52 2025-03-08T14:46:52.165Z [MASTER] info: Connecting to database…
2025-03-08 14:46:55 2025-03-08T14:46:55.477Z [MASTER] error: Databas
I am new to Docker desktop and have found it works really well for my wiki application, this is the first problem I’ve had, any help for things to try much appreciated.
Thanks very much for your help with this. I used the commands you suggested and a wiki container and db container were created in docker desktop. When I enter the localhost url into my browser I get to a brand new wikijs page which offers to install wikijs 2.5.306, which is useful, should I go ahead and install?
I now need to configure things so that the database used is the one for the wiki I have developed over the last year or so.
I think I can use the commands you have provided to set up my own database container, but how do I find my database?
te other persistent problem I have is that when I close docker desktop, I can’t tun it again - the GUI does not appear. I have to terminate tasks in windows task manager.
Since you’ve been using Wiki.js for a year, your old database might be: Stored in a Docker Volume
Run the following command to check existing volumes: docker volume ls
Look for a volume related to your old database, possibly named something like:
local_pgdata
wikijs_db_volume
postgres_data
If you find it, create a new database container using this volume:
docker run -d --name db --network=wikinet -v local_pgdata:/var/lib/postgresql/data
-e POSTGRES_USER=wikijs -e POSTGRES_PASSWORD=wikijsrocks -e POSTGRES_DB=wiki_db
-p 5432:5432 postgres:13
In windows file manager I manged to list all docker volumes. Some are named, the most likely named one was wiki_db-data, but I cannot get this to connect.
So i’m now thinking that somehow my database has been lost / deleted.
However, in the volume list, there are some volumes which are ids e.g.
02dea3ba9f6306826b3e6dca07b5d4384d53e8892f402a028d20ae5e7de7da90
Is there any way I can create a db from the volume id?
thanks for help, I used copilot extensively to check out database conatiners and wiki container, but all my data is gone.
My own fault for not creating a backup.
Happy days