Joplin Server Edition

It uses posgresql and we already have a module for the same. So it can be reused

Instructions above are now tested, at least through the point of being able to log in and add a user. More to come, perhaps, later.

Right now, these instructions seem to work on a system that doesn’t already have another PostgreSQL container running. I’m sure there’s a way to connect it to an existing container, but I’m not sure right now what that would be.

1 Like

Are there conflicts presented if the server already has posgresql installed and running, especially the module available for Nethserver?

No idea, but when the application publishes a Docker environment, I’m inclined to use that. That way, version conflicts become a non-issue. But if you can figure out how to get joplin-server (in Docker) to talk to an existing PostgreSQL server, no doubt that would be helpful to discuss here.

Edit: FWIW, the nethserver-postgresql module seems to install pg 9.2, while the docker-compose file is going to be using pg 13.1.

Edit 2:

Turns out there are, just as there are if another Docker app/container has its own PostgreSQL installation–that’s going to want to listen on port 5432, which the default for this will as well. The obvious (to me) solution is to set the port to, say, 5433 in .env, and set ports of "5433:5432" in the docker-compose.yml file, and that lets the containers start, but I’m getting database connection errors:

app_1  | 2021-07-20 17:47:53: App: Trying to connect to database...
app_1  | 2021-07-20 17:47:53: db: Could not connect. Will try again. connect ECONNREFUSED 172.18.0.2:5433
app_1  | 2021-07-20 17:47:54: db: Could not connect. Will try again. connect ECONNREFUSED 172.18.0.2:5433
app_1  | 2021-07-20 17:47:55: db: Could not connect. Will try again. connect ECONNREFUSED 172.18.0.2:5433
app_1  | 2021-07-20 17:47:56: db: Could not connect. Will try again. connect ECONNREFUSED 172.18.0.2:5433
app_1  | 2021-07-20 17:47:57: db: Could not connect. Will try again. connect ECONNREFUSED 172.18.0.2:5433
app_1  | 2021-07-20 17:47:58: db: Could not connect. Will try again. connect ECONNREFUSED 172.18.0.2:5433
app_1  | 2021-07-20 17:47:59: db: Could not connect. Will try again. connect ECONNREFUSED 172.18.0.2:5433

Edit 3:
I’ve made updates to the instructions above, which will tell Postgres to listen on port 5433 in order to avoid conflicts with other Postgres installations. With those updates, it’s working just fine on my production server.

2 Likes

Any chances to make it aware of accountprovider users? Samba4 or LDAP…

AFAIK, it doesn’t support any sort of external users.

@danb35, @robb

Hi

Even for “simple” Apps which only allow local, database users, there are solutions enabling SSO - available on the market for 20 years…

One of the earliest such solutions came from Novell. Their Storage was NDS, later eDirectory (eDir) - basically a more LDAP compatible LDAP than MS AD.
AD was one of the first candidates, Database stuff (Think SAP) came at about the same time.

The basic App was a sort of sorting house in App form. Modules for AD contained the appropriate field mapping from Novells eDir LDAP to Microsoft’s AD LDAP. The Module for Database (Think PHP Module for each Database, it’s not all only MariaDB out there…) came for Oracle, DB2, PGSQL, MySQL (At the time no MariaDB yet!) and others.

So if a user was created in Novells eDir, and appropriate Groups mandated a User in the SAP Database and AD, they were created according to the rules.

Same went if a user was modified anywhere, the information was synched back. The Sync direction could be fine tuned…

The same is available nowadays from several vendors. Microfocus, who took what was left over of Novell, still has that in their Portfolio, and it’s still used by big players on the market.

Sometimes a historical review helps, or a “step back” view for the bigger picture…

I think at one time it was even called Account Manager, now the product is called NetIQ Access Manager…

My 2 cents
Andy

i am looking at the install instructions for this, as well as this folder joplin/packages/server at dev · laurent22/joplin (github.com)

and there seems to be multiple changes and updates that have been made to the software since the initial release.

Is this install isntruction still valid, or needs to be updated with the current releases of the same software

Releases · laurent22/joplin (github.com)

At the time, I’d read on the Joplin forum not to use the latest tag, but rather to require a specific version. I don’t know if that advice still holds. I can’t see that the README or the docker-compose.yml have been updated since I wrote the instructions above. Let’s see what they say over there:

1 Like

seems its working
image

OK, I’m now seeing the same. I’ve edited the docker-compose.yml above to reflect this.

1 Like

i seem to be getting a certificate error when trying to conenct to the installed instance of joplin server

Error. Please check that URL, username, password, etc. are correct and that the sync target is accessible. The reported error was:

request to https://notes.domain.tld/api/sessions failed, reason: certificate has expired (Code CERT_HAS_EXPIRED)

EDIT:
Disccused here: Fix for "Certificate has expired" error with Joplin Cloud and self-hosted sync targets - News - Joplin Forum

Yes, that’s a known bug in Joplin, shown up by the Let’s Encrypt change a few weeks back. It’s slated to be fixed in the 2.5 release. For now, you can work around it by telling Joplin not to verify certificates (which compromises security).

1 Like

working perfectly now. i love the ability to publish notes, more than anything.

what could be causing this error, when iexecuting docker-compose up -d
docker.errors.DockerException: Error while fetching server API version: UnixHTTPConnectionPool(host=‘localhost’, port=None): Read timed out. (read timeout=60)
[44474] Failed to execute script docker-compose

Is the above command issued automatically after every reboot?

not really, i eleive you should be able to add it permanently to the network

this is now NS8 ready: NS8-Joplin Server Module - Feature - NethServer Community

2 Likes

@dan35 it’s been a while since you posted that Joplin app wasn’t syncing well for you to NextCloud.

Have you tried it lately?

One of the reasons I started using NextCloud (NS7) was to sync my Joplin notes. I also dumped Dropbox once I had it running. I’ve been doing the sync using webdav.

Last I checked about 6 mo ago, I had about 875MB of notes in Joplin syncing to NextCloud. The apps sync great from Android and Mac. The joplin app on Win11 seems to occasionally hickup and cause a problem needing me to remove a file lock on NextCloud that shouldn’t be locked. While I think the joplin server addition is very cool and interesting, I’m quite happy doing the sync to my NextCloud for now.

IF nextcloud sync works, and works for you, thats ussually fine.

The Server Allows for Additional Fucntions, like sharing and collaborating your noted with someone else on your server.
Publishing notes, and HAving a public link available for Web viewing. no mor eneed for pasteboard