Joplin Server pre-release is now available

Yes, but from the next release.

1 Like

Sooo - after spending the day trying to make this work - there's a few dependencies that were proving tricky - I was able to build an image for the arm64 architecture.

As I don't have a Raspberry Pi, would love to have someone test it and confirm that it works. The image is under florider89/joplin-server:master with the documentation of the environment here for now.

Once the next release for the server is published, I'll make this architecture available under the latest tag as well as the master tag is really just for testing.

@florider, keep in mind that a few things are going to change in the next release, in particular with regard to env variable support. You can follow the latest changes in this branch: GitHub - laurent22/joplin at docker_server_update

1 Like

That's the one that the master docker image tag is based on at the moment :slight_smile:. Been testing it all day today, seems to work just fine.

1 Like

5 posts were split to a new topic: Error running Joplin Server on RPi

Joplin Server has been updated and is now available on DockerHub:

Docker Hub

The README has also been updated with info on how to set it up with Docker, how to set the env variables, etc:

joplin/README.md at dev · laurent22/joplin · GitHub

If you notice any issue, or anything that could be clarified or made easier, feel free to let me know!

5 Likes

Hello I tried to run it on a raspberry pi 4 and I got an error when trying to run it:

$ sudo docker run florider89/joplin-server:master
[sudo] password: 
Unable to find image 'florider89/joplin-server:master' locally
master: Pulling from florider89/joplin-server
docker: no matching manifest for linux/arm/v7 in the manifest list entries.

Sorry I have limited exposure to docker but happy to help you test on this architecture if you want.

I'm glad that I can finally download the official Joplin Server image from Docker Hub. I have a few more questions.

  1. Where are notebook resources (such as images and attachments) stored? Are those included in the Postgres DB as well?
  2. What folders/files do I need to mount to preserve the Joplin Server settings and data?

Thank you again, and have a good day!

Hello,

You could export your data from Postgres with that command:

docker exec -u postgres -t joplin-server_db_1 pg_dumpall -c -U joplin | gzip > dump_`date +%d-%m-%Y""%H%M_%S`.sql.gz

Greetings

1 Like
  1. Where are notebook resources (such as images and attachments) stored? Are those included in the Postgres DB as well?

It's all in the DB

  1. What folders/files do I need to mount to preserve the Joplin Server settings and data?

Personally I use the built-in Docker volume, which is Postgres default and in this case you have nothing special to setup. Obviously it means that if you delete the container, the data is gone too, which some people don't like. I don't mind because I don't delete the container. If you want a different setup, you can check the Postgres info on DockerHub.

1 Like

Although the readme has been updated to use the server with docker, the .env-sample file is no longer provided and is not available in the repository, is it possible to put it again in the repository to clarify?

After multiple trials and errors, my Joplin Server finally seems working! I'm using a Synology NAS, and I had difficulty to link the Joplin Server container to the Postgres container. The former couldn't detect the latter's hostname for an unknown reason, but it could be solved by entering the NAS internal IP address.

However, once changing the admin password, I can't log back into the Joplin Server Web UI. Instead, I get the following error:

Invalid username or password

Error: Invalid username or password
at SessionModel. (/home/joplin/packages/server/src/models/SessionModel.ts:28:20)
at Generator.next ()
at fulfilled (/home/joplin/packages/server/dist/models/SessionModel.js:5:58)

I re-installed both Docker images (JS and Postgres) several times, and it seems it happens every time after changing a user's password (creating a new user works fine though). Not sure whether it's specific to my settings.

1 Like

I think you can instead use -e when running the JS Docker image or include those environment variables when composing the container with Docker Compose (in a YAML file).

Hi, I have the exact same error here just after having change the admin default password. Note : I changed both email and password at the same time, maybe it's the source of the problem?

1 Like

I tried to change both email and password, email only, and password only. For me, the error occurs whenever a password is modified.

Had the same password issue as well. From what I can see is happening in the users table, the new password seems to be stored in plain text rather than encrypted. Weirdly this is a bit intermittent as it'll store the user's password encrypted.

I set this up on a local network machine and I had a problem where the port 5432 appeared occupied, and the app container wouldn't connect to the db. Changing the ports in the db container in docker-compose solved the issue as per this Github issue.

ports:
#    - "5432:5432"
    - 5432

Yes I assume that was the issue, it's not being hashed when saved in this context. I'll create another release soon with a fix.

Workaround in the meantime (don't do this if you're not sure what you're doing!:

  1. Enter the container: docker exec -it joplin_db_1 /bin/bash
  2. Spin up the database: psql -d [joplin_db] -U [joplin_user]
  3. Display the users table: SELECT * FROM users LIMIT 10; SELECT * FROM users LIMIT 10;
  4. Upgrade to an admin user:
UPDATE users
SET is_admin = 1
WHERE users.email = '[user_email]';

You can then use this admin user to create your non-admin sync user.

@laurent I assumed the admins might be able to create a new admin user but there's no check box on the new user page. Would be a useful feature, or is this designed in?