September 4, 20241 yr Author 1 hour ago, Braulio Dias Ribeiro said: How can I connect postgres to another docker? What do I need to type in the PATH? If both containers (the application and postgresql) are in the same custom network, you can connect using postgresql container's (host)name. If you are using host networking, you will need to use the host IP.
September 5, 20241 yr 14 hours ago, jj9987 said: If both containers (the application and postgresql) are in the same custom network, you can connect using postgresql container's (host)name. If you are using host networking, you will need to use the host IP. They are on the same network. But I don't know how to set username and password. Is that it? postgresql://USER:PASSWORD@Postgres:5432/langflow
September 6, 20241 yr Author On 9/5/2024 at 9:59 AM, Braulio Dias Ribeiro said: They are on the same network. But I don't know how to set username and password. Is that it? postgresql://USER:PASSWORD@Postgres:5432/langflow If you are using the official PostgreSQL image, then you can configure the initial superuser using POSTGRES_USER and POSTGRES_PASSWORD environment variables for username/password and POSTGRES_DB for database name. For simplicity purposes, you can use these. But it is recommended to connect with the superuser to the database and create a custom user and database for the application. You can follow PostgreSQL documentation for that, but the basics should be: CREATE USER 'user' WITH ENCRYPTED PASSWORD 'password'; CREATE DATABASE 'database' WITH OWNER 'user'; Edited September 6, 20241 yr by jj9987
September 6, 20241 yr 38 minutes ago, jj9987 said: If you are using the official PostgreSQL image, then you can configure the initial superuser using POSTGRES_USER and POSTGRES_PASSWORD environment variables for username/password and POSTGRES_DB for database name. For simplicity purposes, you can use these. But it is recommended to connect with the superuser to the database and create a custom user and database for the application. You can follow PostgreSQL documentation for that, but the basics should be: CREATE USER 'user' WITH ENCRYPTED PASSWORD 'password'; CREATE DATABASE 'database' WITH OWNER 'user'; I wanted to know how to fill in this path, if this was right. I found the answer, here's the solution. LANGFLOW_DATABASE_URL = postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME} In my case postgresql://langflow:PASSWORD@Postgres:5432/langflow
September 15, 2025Sep 15 Hi. May i ask the maintainer to remove Port Mapping as the mandatory field of the template for all Postgres templates. I want to keep the databased on the seperate custom network as the backend but by forcing Port Mapping, it is published on the host, defeating the purpose. Many thanks in advance.
September 16, 2025Sep 16 17 hours ago, nhatlinh said:Hi. May i ask the maintainer to remove Port Mapping as the mandatory field of the template for all Postgres templates. I want to keep the databased on the seperate custom network as the backend but by forcing Port Mapping, it is published on the host, defeating the purpose. Many thanks in advance.Just delete the port entries when you don't want them. Standard for all containers to have a default port mapping entry.
December 15, 2025Dec 15 On 9/16/2025 at 3:40 PM, Kilrah said:Just delete the port entries when you don't want them. Standard for all containers to have a default port mapping entry.You can't do that to the mandatory field. I had to replicate the template and modify it, removing it manually from the template. I agree that it is standard for all containers to have default but just don't make mandatory thus it can be remove with that button that you screenshot Edited December 15, 2025Dec 15 by nhatlinh
January 5Jan 5 Author On 12/15/2025 at 9:50 AM, nhatlinh said:You can't do that to the mandatory field. I had to replicate the template and modify it, removing it manually from the template. I agree that it is standard for all containers to have default but just don't make mandatory thus it can be remove with that button that you screenshotTook me awhile, but I've updated the templates to make the port not mandatory. Been awhile since I've actively worked with those, never spotted it. Thanks for reporting!I've also added newer PostgreSQL versions' templates.
March 22Mar 22 I'm not super tech savvy and it's possible I'm mistaken, but I believe that the fact that I'm running Unraid without a cache drive has caused this container to lose all data upon rebooting my server. I got it working as desired until I restarted to update Unraid. I had not noticed that, unlike every other Docker template I've found, it defaults to /mnt/cache/appdata rather than /mnt/user/appdata. And all data under /mnt/cache was lost on restart. I assume it was running on memory? My databases are gone without a trace.Don't let this happen to you!
March 22Mar 22 2 minutes ago, Embler said:running on memory?Any path that isn't mounted storage is in RAM
March 22Mar 22 13 minutes ago, trurl said:Any path that isn't mounted storage is in RAMSorry, you're not speaking plainly enough for me. Are you agreeing and saying that /mnt/cache is not mounted storage and is in RAM? Or are you saying that I'm wrong and /mnt/cache is mounted storage and not in ram, because I assume /mnt/ stands for mount(ed)? I don't know how Unraid handles these top level folders.Sorry if I'm wrong to post this here, I should have noticed the problem myself, I just thought it might help someone else avoid doing it themselves. Edited March 22Mar 22 by Embler grammar
March 22Mar 22 9 minutes ago, Embler said:Are you agreeing and saying that /mnt/cache is not mounted storage and is in RAM?If there isn't a pool named "cache" that would be mounted as /mnt/cache then that path doesn't have anything mounted to it and will be in RAM.10 minutes ago, Embler said:Sorry if I'm wrong to post this hereIt's fine, it's bad template publising practice to use default mounts that may not exist, publisher should fix. Edited March 22Mar 22 by Kilrah
May 13May 13 hi i installing postgresql for the first time i did version 18 as its the newest version but it wont run the log keeps talking about upgradin or so but i just installed it so i not sure what to do i looked at the links but that didnt help meError: in 18+, these Docker images are configured to store database data in a format which is compatible with "pg_ctlcluster" (specifically, using major-version-specific directory names). This better reflects how PostgreSQL itself works, and how upgrades are to be performed. See also https://github.com/docker-library/postgres/pull/1259 Counter to that, there appears to be PostgreSQL data in: /var/lib/postgresql/data (unused mount/volume) This is usually the result of upgrading the Docker image without upgrading the underlying database using "pg_upgrade" (which requires both versions). The suggested container configuration for 18+ is to place a single mount at /var/lib/postgresql which will then place PostgreSQL data in a subdirectory, allowing usage of "pg_upgrade --link" without mount point boundary issues. See https://github.com/docker-library/postgres/issues/37 for a (long) discussion around this process, and suggestions for how to do so. ** Press ANY KEY to close this window ** how do you install this the first time?
May 14May 14 9 hours ago, comet424 said:i did version 18 as its the newest versionWhat app did you install it for?You need to use the version the app wants instead of "the newest", PG versions are often not intercompatible so e.g. if an app is written for 16 it usually won't run with 18.
May 14May 14 i installed cuz it was the latest. i installed adminier. and Linkwarden.. the video was a year old or so so it was 17 and i figured you need 18 nowbut all i did was install 18 after install it wouldnt run in the first place.. so do i need to install 17?i installed the 18 version first after it installed it should be running.. but as soon as i click start all i get is that error log.. so then in the mean time i downloaded adminier and linkwarden figured maybe they gotta run before postgresl will run... but i figured postgresql has to be up and running before the other 2 can run Edited May 14May 14 by comet424
May 14May 14 i installed the 18 version first after it installed it should be running.. but as soon as i click start all i get is that error log.. so then in the mean time i downloaed adminier and linkwarden figured maybe they gotta run before postgresl will run... but i figured postgresql has to be up and running before the other 2 can run
May 14May 14 i watched this videoPostgreSQL on Unraid? Yes, and It’s Easier Than You Think!it shows you install it. and boom its running but that doesnt work for 18 i guess ill try 17this is the video for linkwarden...(22) Your Bookmark Chaos Ends NOW! Linkwarden + Unraid Setup - YouTubenow he doesnt say that postgres version o only saw the post gres version in a previous video.. doesnt the postgres server need to be running before you can use the other 2 services? if so cant do that yet till postgres runs currently installing 17update: so installing 17 installed.. and started up the 18 would never start right after installingwhat is 18 for? Edited May 14May 14 by comet424
May 27May 27 Author The error message says quite clearly, that Counter to that, there appears to be PostgreSQL data in: /var/lib/postgresql/data (unused mount/volume) This is usually the result of upgrading the Docker image without upgrading the underlying database using "pg_upgrade" (which requires both versions).PostgreSQL updates can not be done in-place. If you had existing PostgreSQL database in the directory, then you can't simply use a newer image, you need to actually upgrade the database with pg_upgrade.EDIT: Apparently there is a breaking change with official PostgreSQL 18 Docker image as well.Important Change: the PGDATA environment variable of the image was changed to be version specific in PostgreSQL 18 and above. For 18 it is /var/lib/postgresql/18/docker. Later versions will replace 18 with their respective major version (e.g., /var/lib/postgresql/19/docker for PostgreSQL 19.x). The defined VOLUME was changed in 18 and above to /var/lib/postgresql. Mounts and volumes should be targeted at the updated location. This will allow users upgrading between PostgreSQL major releases to use the faster --link when running pg_upgrade and mounting /var/lib/postgresql.Important Note: (for PostgreSQL 17 and below) Mount the data volume at /var/lib/postgresql/data and not at /var/lib/postgresql because mounts at the latter path WILL NOT PERSIST database data when the container is re-created. The Dockerfile that builds the image declares a volume at /var/lib/postgresql/data and if no data volume is mounted at that path then the container runtime will automatically create an anonymous volume that is not reused across container re-creations. Data will be written to the anonymous volume rather than your intended data volume and won't persist when the container is deleted and re-created.I've updated the PostgreSQL 18 template to use the correct volume. Edited May 27May 27 by jj9987
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.