Installation
This installation was first done by diving into SSH from a terminal to my minipc and uploading a Docker Compose. This installation uses a database and in this case a postgresql database is used.
You may have to allow certain permissions for the joplin folder so the database will run. If so, you may refer to this link: permission commands for new folders
I could have used a healthcheck in the Docker Compose to make sure the database was up and running before the joplin server started, but apparently it wasn't needed. I may update this in the future.
First change directory to your Docker folder (I keep all containers in a Docker folder). Add a folder called joplin. Change directory to the joplin directory, add a folder called data.
cd /docker
sudo mkdir joplin
cd /docker/joplin
sudo mkdir data
Add a docker-compose file.
cd /docker/joplin
sudo nano docker-compose.yml
- Once the nano editor is open, add the docker compose lines below:
services:
db:
image: postgres:16
container_name: joplin-db
volumes:
- ./data:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=<your database password>
- POSTGRES_USER=joplin
- POSTGRES_DB=joplindb
app:
image: joplin/server:latest
container_name: joplin
depends_on:
- db
ports:
- "22300:22300"
restart: unless-stopped
environment:
- APP_PORT=22300
- APP_BASE_URL=<your localhost ipaddress:port number>
- DB_CLIENT=pg
- POSTGRES_PASSWORD=<your database password> #same as above
- POSTGRES_DATABASE=joplindb #same as above
- POSTGRES_USER=joplin #same as above
- POSTGRES_PORT=5432 #same port on left-hand side of colon as db service above
- POSTGRES_HOST=db #same as first service name above
- Press Ctrl-O and then enter to save the file. Ctrl-X to exit the Nano editor.
- Then start the container with the following command:
sudo docker compose up -d
- You can now enter the Joplin server in your internet browser with:
http://<local ip address>:22300
- The the default email is admin@localhost and the default password is admin.
- You will be prompted to add your full name and then a new email and password.
- A confirmation email will be sent which you will need to click 'Confirm email'.
- You should now be able to login to your new Joplin server with the new email and password from 7. above.
- Click on Admin to make any changes you deem necessary.
- Download the Joplin app on your devices, configure the settings, make notes and 'synchronise'.
No Comments