Hello i'm trying to install Joplin-server on my nas. I've pulled the docker image. But idk how to setup all the other things. I haven't exposed on net my nas. I'll use Joplin only on local (I'll access with vpn when i'm not at home)
I'm using WebDAV on a Synology NAS and it works very well. Since Joplin is used locally in your case, so that the sync efficiency and note sharing features are not essential.
Hi!
If you want to use Joplin-server locally you do not need to expose it to the internet. What did you do after pulling the Docker image? I use docker-compose
personally, I find it easier than docker run
or using Synology's Docker GUI. If you want I can give you an example but you have to be able to ssh into your NAS.
First of all, thanks for your reply. Honestly this is the first time I try to use docker, I know roughly how it works, but I think it was precisely the lack of knowledge of the difference between docker-compose, run or how to use the synology GUI that made me break down. I can easily access synology with SSH.
Excuse me but I think I have explained myself badly. With local I mean on my lan, syncing with the server it's essentials because I have several machine which I want to syncronize with my note. Most of these are out of my Lan, and the only way to make a secure connection to my nas is over vpn. That's why I told local
Hi again!
As you can read here joplin-server should have a speed advantage over WebDAV. I do not know how much it matters because I have not tested Joplin with WebDAV but I think it is a good opportunity to learn using Docker. I am running Bitwarden, Tandoor Recipes, Piwigo, mariaDB, joplin-server and Adminer as Docker containers on my Synology DS216+II.
Here is the content of of my docker-compose.yml
:
version: '3'
services:
db:
image: postgres:latest # Download latest postgres image
container_name: postgres # Here you can give the container a name of your liking
# ports:
# - 5433:5432 # Expose internal docker port 5432 to external port 5433. Not necessary if you do not want to use the database from outside docker.
restart: unless-stopped # Restart if not stopped manually
volumes:
- ./joplin-data:/var/lib/postgresql/data # Make database files persistent. Otherwise your data is lost when the container is destroyed.
environment:
- APP_PORT=22300 # Specify port joplin-server is reachable at
- POSTGRES_PASSWORD=joplin # Specify database password
- POSTGRES_USER=joplin # Specify database user
- POSTGRES_DB=joplin # Specify database name
app:
image: joplin/server:latest # Download latest joplin-server image
depends_on:
- db
ports:
- "22300:22300" # Expose internal port to LAN
restart: unless-stopped
environment:
- APP_BASE_URL=https://YOURDOMAIN.org # If you do not want to expose joplin-server to the internet use your LAN-IP and port
- DB_CLIENT=pg
- POSTGRES_PASSWORD=joplin # Must be the same as above
- POSTGRES_DATABASE=joplin # Must be the same as above
- POSTGRES_USER=joplin # Must be the same as above
- POSTGRES_PORT=5432 # Postgres internal port
- POSTGRES_HOST=db
After installing Docker you should find a folder named docker
. I recommend you create a folder structure named /joplin-server/joplin-data
in /volume1/docker
. In /volume1/docker/joplin-server
you create a file docker-compose.yml
and copy the content of the code section above into it. You can do this in your browser and by using the Synology app Text-Editor.
SSH into your NAS, then you run sudo docker-compose pull
and sudo docker-compose up -d
in /volume1/docker/joplin-data
. If everything is okay you should be able to log in to YOURNASLANIP:22300/login
. Then you only have to read this and change the syncronization method in your Joplin app. CAUTION! Read the FAQ before changing syncronisation target!!!
To update type sudo docker-compose stop
, then sudo docker-compose pull
and sudo docker-compose up -d
.
Hi again, thank for your reply.
I've done all. But i've just one issue, after starting the containers, i tried to login with the default credentials
admin @ localhost and admin, but the server redirects me to localhost which is incorrect since it has a different address from the machine I use.
EDIT:
I've just solved with appbaseurl var
APP_BASE_URL=http://NASLANIP:22300
Is it correct?
EDIT N.2:
Excuse me again for the numerous requests, I still have one last problem. I created an account with an email address and password. When I try to configure the joplin app with joplin server I enter email, password and server address. I leave the joplin server folder field blank. The joplin app gives me error:
Error: GET api/files/root:/root/info.json:/content: Unknown error (500): {"error":"Cannot read property 'id' of null"
Do you mean Joplin Server Directory? I left it empty and got the same error. It should contain Apps/Joplin
.
I have to change the post above to reflect your finding concerning APP_BASE_URL
.
Hi, I'm jumping in because I have an issue trying to use your docker-compose.
My structure is :
/volume1/docker/joplin/joplin-data
/volume1/docker/joplin/script
I adapted your docker-compose file in docker/joplin/script
:
version: '3'
services:
db:
image: postgres:latest # Download latest postgres image
container_name: postgres # Here you can give the container a name of your liking
ports:
- "5432:5432" # Expose internal docker port 5432 to external port 5433. Not necessary if you do not want to use the database from outside docker.
restart: unless-stopped # Restart if not stopped manually
volumes:
- /volume1/docker/joplin/joplin-data:/var/lib/postgresql/data # Make database files persistent. Otherwise your data is lost when the container is destroyed.
environment:
- APP_PORT=22300 # Specify port joplin-server is reachable at
- POSTGRES_PASSWORD=joplin # Specify database password
- POSTGRES_USER=joplin # Specify database user
- POSTGRES_DB=joplin # Specify database name
app:
image: joplin/server:latest # Download latest joplin-server image
depends_on:
- db
ports:
- "22300:22300" # Expose internal port to LAN
restart: unless-stopped
environment:
- APP_BASE_URL=https://joplin.########.fr # If you do not want to expose joplin-server to the internet use your LAN-IP and port
- DB_CLIENT=pg
- POSTGRES_PASSWORD=joplin # Must be the same as above
- POSTGRES_DATABASE=joplin # Must be the same as above
- POSTGRES_USER=joplin # Must be the same as above
- POSTGRES_PORT=5432 # Postgres internal port
- POSTGRES_HOST=db
I finally get in my script
folder where I ran docker-compose pull
then docker-compose up -d
But I got an error message :
Listing the different port in use with netstat-pat | grep LISTEN
doesn't show that 5432 is used by another app.
Any idea ?
Thx
Maybe not on your server. What about using nmap 192.168.1.0/24
for example? It scans your whole LAN for open ports. You have to change the IP to reflect your own IP range, of course.
I found my mistake : it came from the definitions of db ports. I wanted to try with the possibility to use the database outside docker so I took the example on docker hub site :
ports:
- "5432:5432"
I suppressed this line (as you did) and now it works.
But don't ask me why it doesn't work when written as it is written on docker hub site.
You only need this line if you want to access the database from outside Docker. But something is listening on port 5432 on your network.
Hello all,
I am really sorry all for having a beginner question (since I am new to Synology/Docker) and would have a question.
I successfully set-up running Joplin Server via Synology/Docker, but I want to re-do the volumes settings in Docker again, so that data is not only stored in Docker Container and can be backed up as "files within the NAS".
What do I need to set as mount path?
docker/joplin (<--- is the folder I created in the NAS but currently empty as mount path is not linked correctly)
Mount path: What is the equivalant I have to set here? Something like /data ?
Thank you so much.
In a second step I will then try to switch from SQLite to Postgres based on the great explanation above.
Cheers
Jursch
Mine is set up as thus:
volumes:
- /volume1/docker/joplin2/database:/var/lib/postgresql/data
The docker-compose file is in the joplin2 folder, and I created a 'database' folder inside that one. You'll have to correspond your mounting point (the part on the left) to where your Docker folders are.
Thank you so much for the input
I was able to map my "local" synology folder with /var/lib/postgresql/data and also managed to get postgresql running. But after Sync, my local folder is somehow still empty, whereas I was hoping to have some files which I can backup outside the Container.
Strange, but at least Postgresql it is running and I understood it should be faster than SQLite, right?
Thank you very much for your post. I used your "docker-compose.yml" to successfully install joplin server on qnap nas, but there are still some problems, such as how to create a joplin account. Can you open a new post? How to deploy joplin server on nas under detailed instructions such as graphics and text? thank you very much
Hiya. I had a similar problem - turned out that I had a different docker container using that port, but it didn't show up in netstat or other tools I tried to locate the issue (on Ubuntu Server).
But running docker ps
showed me there is a different container running that held that port; killing it solved the issue.
Hello, I installed this on my Synology NAS and was able to login to the admin account without any issue. However I am not understanding how to actually use Joplin from this install - apologies if I'm missing an important step somewhere here. How do I actually login and use Joplin to start making entries and notes and such?
You have to use a Joplin Client on Desktop or Mobile. The Joplin Server is only a Sync Target, no user GUI for not creating, editing, viewing (Expected for shared notes) or managment.
Hello,
I would like to use this thread to ask for assistance with my problem. Using my Synology NAS, I was trying to setup the Joplin App to synchronize my notes (MacBook and my Android Phone). The plan is to avoid port forwarding, but setup a VPN with my router to enable sync when not at home. The sync in my local LAN works for me at the moment. After some days of reading and try&error (I am completely new to the field of NAS/docker/Joplin) I was able to setup the sync with both devices.
- Install Docker & WebDAV on the NAS
- Created designated NAS user profile with permission to read/write
- Configure WebDAV (opening ports 5005 for http and 5006 for https)
- Register the package Joplin/server using the docker GUI
Odd observation:
When I stop the docker container, the Joplin App at my MacBook is still able to sync with the Joplin Server. Only if I stop the WebDAV application (by deactivation of the https and http ports) the sync fails.
The Joplin folder containing all sync files&folders is in the Home folder of the user, not as described under Volume1/docker/joplin-server ...
Two questions:
How can I access the login page to change the default admin@localhost password?
Why is the sync still working when the docker container is stopped?