Operating system
macOS
Joplin version
3.0.15
Desktop version info
Joplin 3.0.15 (prod, darwin)
Client ID: dffbc31ad7624ce3b47c7c02e96e8a50
Sync Version: 3
Profile Version: 47
Keychain Supported: Yes
Revision: 598677b
Backup: 1.4.1
Sync target
Joplin Server
Editor
Rich Text Editor
What issue do you have?
I am trying to setup Joplin server on synology was and it is giving me ECONNREFUSED error in Joplin app.
Below is my YML file which is the only file I have from a setup perspective. Please tell me what is missing.
Docker-Compose.yml (updated with few changes recommended by this forum)
version: '3'
services:
db:
image: postgres:latest
volumes:
- ./data/postgres:/var/lib/postgresql/data
ports:
- "5433:5432"
restart: unless-stopped
# network: bridge
# command: -p 5433
environment:
- POSTGRES_PASSWORD=Quadrant9CitableUnworthy
- POSTGRES_USER=joplin
- POSTGRES_DATABASE=joplindb
app:
image: joplin/server:latest
depends_on:
- db
ports:
- "8011:22300"
restart: unless-stopped
environment:
- APP_PORT=8011
- APP_BASE_URL=http://192.168.12.227:8011
- DB_CLIENT=pg
- POSTGRES_PASSWORD=Quadrant9CitableUnworthy
- POSTGRES_DATABASE=joplindb
- POSTGRES_USER=joplin
- POSTGRES_PORT=5433
- POSTGRES_HOST=db
Are you sure the enironment "App-Port" rule ist working?
You could try to use the Standart Port of the Container and map it to 8011.
That should work
- APP_PORT=22300
And
- "8011:22300"
That did not work. It still says connection to port 5433 refused. It is the DB connection which is failing. I guess. I am a newbie.
Try:
ports:
- "8011:22300"
and
environment:
- APP_PORT=8011
You might be right about the db though
Could it be, that the dash in the Database Password ist the Problem?
Try it with a Password only in lower-, uppercase and Numbers.
I mean, I had a Problem about those passwords in the past.
Or try to Set the Password in between " ".
Changed the password. All I can say DB port 5432 and App port 22300 is not available for me which is why I am mapping to 5433 and 8011 respectively.
But App is not able to talk to DB. Appreciate any help on this. Latest code is as follows after few changes.
version: '3'
services:
db:
image: postgres:latest
volumes:
- ./data/postgres:/var/lib/postgresql/data
ports:
- "5433:5432"
restart: unless-stopped
# network: bridge
# command: -p 5433
environment:
- POSTGRES_PASSWORD=Quadrant9CitableUnworthy
- POSTGRES_USER=joplin
- POSTGRES_DATABASE=joplindb
app:
image: joplin/server:latest
depends_on:
- db
ports:
- "8011:22300"
restart: unless-stopped
environment:
- APP_PORT=8011
- APP_BASE_URL=http://192.168.12.227:8011
- DB_CLIENT=pg
- POSTGRES_PASSWORD=Quadrant9CitableUnworthy
- POSTGRES_DATABASE=joplindb
- POSTGRES_USER=joplin
- POSTGRES_PORT=5433
- POSTGRES_HOST=db
Latest Docker-Compose file is as follows. I changed password to remove - and also my problem is unable to use the default port 5432 and 22300. Appreciate any help.
version: '3'
services:
db:
image: postgres:latest
volumes:
- ./data/postgres:/var/lib/postgresql/data
ports:
- "5433:5432"
restart: unless-stopped
# network: bridge
# command: -p 5433
environment:
- POSTGRES_PASSWORD=Quadrant9CitableUnworthy
- POSTGRES_USER=joplin
- POSTGRES_DATABASE=joplindb
app:
image: joplin/server:latest
depends_on:
- db
ports:
- "8011:22300"
restart: unless-stopped
environment:
- APP_PORT=8011
- APP_BASE_URL=http://192.168.12.227:8011
- DB_CLIENT=pg
- POSTGRES_PASSWORD=Quadrant9CitableUnworthy
- POSTGRES_DATABASE=joplindb
- POSTGRES_USER=joplin
- POSTGRES_PORT=5433
- POSTGRES_HOST=db
Still not working.
version: '3'
services:
db:
image: postgres:latest
volumes:
- ./data/postgres:/var/lib/postgresql/data
ports:
- "5433:5432"
restart: unless-stopped
# network: bridge
# command: -p 5433
environment:
- POSTGRES_PASSWORD=Quadrant9CitableUnworthy
- POSTGRES_USER=joplin
- POSTGRES_DATABASE=joplindb
app:
image: joplin/server:latest
depends_on:
- db
ports:
- "8011:22300"
restart: unless-stopped
environment:
- APP_PORT=8011
- APP_BASE_URL=http://192.168.12.227:8011
- DB_CLIENT=pg
- POSTGRES_PASSWORD=Quadrant9CitableUnworthy
- POSTGRES_DATABASE=joplindb
- POSTGRES_USER=joplin
- POSTGRES_PORT=5433
- POSTGRES_HOST=db
Hm, I'm sorry. I'm running out of Ideas, too.
Your docker-compose.yaml looks right. Can you force a recreation on that NAS at startup?
Like
docker-compose up -d --force-recreate
?
I run the joplin-server under a linux-server so I don't know how it works in Synology NAS.
I had problems in the past, where changes not been recognized until i restart the container with the --force-recreate
flag.
Ah, one Idea came up into my mind:
Are you sure, your db container is starting up?
You route your port from 5432 to 5433. So I think, you have more then one pg-database container running. And if the other container has also the name db, maybe it try to connect to the false container.
And I think I remember, that docker starts the second container and change the name.
Try this:
version: '3'
services:
joplin_db:
image: postgres:latest
volumes:
- ./data/postgres:/var/lib/postgresql/data
ports:
- "5433:5432"
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=Quadrant9CitableUnworthy
- POSTGRES_USER=joplin
- POSTGRES_DATABASE=joplindb
joplin_app:
image: joplin/server:latest
depends_on:
- joplin_db
ports:
- "8011:22300"
restart: unless-stopped
environment:
- APP_PORT=8011
- APP_BASE_URL=http://192.168.12.227:8011
- DB_CLIENT=pg
- POSTGRES_PASSWORD=Quadrant9CitableUnworthy
- POSTGRES_DATABASE=joplindb
- POSTGRES_USER=joplin
- POSTGRES_PORT=5433
- POSTGRES_HOST=joplin_db
A user on the forum did previously post a link to a guide they had used to set up Joplin Server on a Synology NAS.
Just wondering if there is any "Synology specific" information in this guide that may help you.