FoxxMD Posted June 1, 2020 Posted June 1, 2020 (edited) Application Name: pgadmin4 Application Site: https://www.pgadmin.org/ Github Repo: https://github.com/postgres/pgadmin4 Docker Hub: https://hub.docker.com/r/dpage/pgadmin4/ Template Repo: https://github.com/FoxxMD/unraid-docker-templates Overview pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world. Some features: Designed for PostgreSQL 9.5 and above Access and manage multiple databases CRUD for all the things and raw SQL execution Wizards and graphic tools for many administrative tasks (ACL, backup/restore, etc.) Monitoring dashboard How is this different than the existing CA template for pgAdmin4? The dockerhub repo (fenglc) used for that template has not been updated in 2 years and is now archived This dockerhub repo (dpage) is the official image for pgAdmin4 and is up to date fenglc only supports utilities (pg_restore, etc.) for postgres 9 while dpage contains utilities for postgres 9.5, 9.6, 10, 11, and 12 fenglc has hardcoded default credentials while dpage supports supplying your own default user/pass for new installations dpage supports many more environmental variables for configuration Initial Setup Regardless of existing or new installation you MUST configure ownership for the directory mapped to appdata under the Config setting in the template. This is due to pgadmin using a non-root user inside the container for operations. Either create the directory manually (defaults to /mnt/user/appdata/pgadmin4) or wait for the container to create it on initial start. Then run this command from the unraid cli (terminal window) to configure ownership: chown -R 5050:5050 /mnt/user/appdata/pgadmin4 Thanks @dreadu and @SOULV1CE for figuring this out Usage NOTE: On initial container build there may be a noticeable delay (10-20 seconds) between when the container starts and when the UI becomes available. === Migrating from fenglc or bringing your own data === Use the Config path (under "Show More Settings") in the template to map your working directory. If you are migrating from fenglc just use the same folder from appdata. If you use this approach you can safely ignore or remove the Email/Password variables from the template. === New Installations === You must provide values for Default Email and Default Password in the template or the container will not start. The email is not actually used, it's just a username. After the container has been started for the first time these variables can be removed from the template. Configuration All other configuration for the container can be found in the pgAdmin docs. Edited January 23, 2023 by FoxxMD added ownership setup Quote
R.NOVACHKOV Posted June 14, 2020 Posted June 14, 2020 Hello, I am trying to create a backup for database and there is one problem I can't set path out of the default backup (/usr/local/pgsql-12) folder or go in that folder after that. It is asking for password, but it is not working with the account password setted in the container. Quote
MattFaz Posted September 30, 2020 Posted September 30, 2020 Is there any current issue with this? A completely fresh install the Username and Password don't work, just always says they are invalid. Quote
FoxxMD Posted September 30, 2020 Author Posted September 30, 2020 (edited) 13 hours ago, Mattyfaz said: Is there any current issue with this? A completely fresh install the Username and Password don't work, just always says they are invalid. I just tried a fresh install and am seeing this issue now...it seems the login attempt is redirecting and then not passing the form data correctly. I'm looking to see if there is any troubleshooting info on this... EDIT: @Mattyfaz can you try setting the Config path to a new (non-existing) location? I was able to login after using a clean path. Edited September 30, 2020 by FoxxMD Quote
Zerreth Posted November 27, 2020 Posted November 27, 2020 So any attempt at login / password does not work anymore. Removing the config folder/files & setting the default login & password in the container variables had no effect. Seems very broken to me... Quote
bwarlick Posted November 21, 2021 Posted November 21, 2021 YOU MUST DO THE FOLLOWING IN ORDER TO RUN THIS DOCKER: After installing the docker container, there should be a folder in appdata on the unraid host named pgadmin4. You must change the permissions on this folder: Here's how: On the unraid host, click the terminal button at the top right: When you get a terminal window, set the permissions on the pgadmin4 folder as follows 3 2 Quote
dreadu Posted June 9, 2022 Posted June 9, 2022 On 11/21/2021 at 6:34 PM, bwarlick said: YOU MUST DO THE FOLLOWING IN ORDER TO RUN THIS DOCKER: [...] When you get a terminal window, set the permissions on the pgadmin4 folder as follows Thank you very much for that info! I just updated unraid from 6.9.2 to 6.10.2 and could not figure out why at least one CPU core was stuck at 100%! Did check terminal -> top and could only see COMMAND "gunicorn"- which I could not find anything related to unraid with google. And the user was 5050 (and the only process using it, which baffled me). Then I suspected docker (not runninv VMs currently). First test Plex was not successful, but luckily the second try with pgadmin4 did the trick. When stopping the docker the cpu dropped to ~2-7% instead of permanent 40-100% over all 4 cores. Then I checked the community application and found your post- which I find interesting- because I did not have this problem before the update. For anybody reading my post: here is the original pgadmin documentation https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html#mapped-files-and-directories After your suggestion with sudo chown -R 5050:5050 pgadmin and starting the docker again, the PID with COMMAND gunicorn and user 5050 did return, but dropped to 0% CPU after a couple of seconds. I assume it tried to access its appdata folder and gut stuck in a loop to try again. Why this did not happen before the unraid os update is beyond me, but not it's fixed. Thanks again 👍 1 Quote
profzelonka Posted August 3, 2022 Posted August 3, 2022 Any hope of this docker template being updated/fixed?? On a clean new Unraid 6.10.3 install, this docker's webUI doesn't even open. Or is there another way I can restore a backup I took in pdadmin before? File is without extension, not a mysql or dump, or maybe that is a dump, I have no idea what pgadmin saves in by default. Quote
SOULV1CE Posted January 15, 2023 Posted January 15, 2023 On 8/3/2022 at 2:24 AM, profzelonka said: Any hope of this docker template being updated/fixed?? On a clean new Unraid 6.10.3 install, this docker's webUI doesn't even open. Or is there another way I can restore a backup I took in pdadmin before? File is without extension, not a mysql or dump, or maybe that is a dump, I have no idea what pgadmin saves in by default. I just set this up right now and got the webUI to load. After initial pull I noticed the container stopped so I went into the logs and saw the following error: Quote ERROR : Failed to create the directory /var/lib/pgadmin/sessions: [Errno 13] Permission denied: '/var/lib/pgadmin/sessions' HINT : Create the directory /var/lib/pgadmin/sessions, ensure it is writeable by 'pgadmin', and try again, or, create a config_local.py file and override the SESSION_DB_PATH setting per https://www.pgadmin.org/docs/pgadmin4/6.18/config_py.html I then referenced this section of the pgAdmin docs and ran the following command in my Unraid terminal to set the needed permissions for the pgadmin user: sudo chown -R 5050:5050 /mnt/user/appdata/pgadmin4 Now when I went to start up the pgadmin4 container again all was successful and the webUI launched successfully. Hope this helps! Also I just noticed that after I typed all of this out @dreadu posted the same solution before me back in June 2022 that I completely missed because scatter brain🤦♂️ Leaving this comment up in case others are like me who miss it as well! Quote
FoxxMD Posted January 23, 2023 Author Posted January 23, 2023 Ive updated the OP and the unraid template with instructions for configuring ownership. Thanks @dreadu and @SOULV1CE for figure that out 2 Quote
mikmik Posted February 18, 2023 Posted February 18, 2023 I think it's worth to mention that emails on special domains, e.g. [email protected], [email protected], [email protected], etc. may not be used. What is more confusing is that the setup script will process them fine and create an appropriate user, but webUI won't let you in showing error that the email is not valid. In the container log the error will be more meaningful and say "The domain name ... is a special-use or reserved name that cannot be used with email." Another concern is that, if such email was set, and pgadmin4 was initialized, it will not be enough to simply change PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD variables and restart the container. Since setup process is executed only during the first container start, it will be necessary to remove the contents of the /mnt/user/appdata/pgadmin4 directory. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.