How to run Nginx in the same container as Joplin Server? And what ports to use?

Joplin 1.7.11 user here on Windows and Android, using Nextcloud WebDAV as the backend sync. This is an excellent product and I love it. Sync is working well, but can occasionally be slow, so I am interested in running Joplin's native sync server.

I have a home server running Nextcloud within the Linuxserver.io SWAG image which includes nginx and automates the SSL certificate process all within one docker container.

I would like to run Joplin Server using Laurent's Joplin Server docker-compose file. However, it states that I need to have Nginx or another reverse proxy running on the host system. However, as stated, my server is not running a reverse proxy; the only instance of this is running within a different docker container.

Should I try to add an Nginx docker image to Laurent's Joplin Server docker-compose yml file?

Or....should I try to run Joplin Server within the SWAG container? There are already three services listed in the docker-compose yml for SWAG (the swag image, nextcloud, and mariadb). I'm not sure if I can add Joplin plus Postgres to the same container.

I'm new to docker, but it seems less tidy to run nginx and/or apache (if needed?) on the host system when it could be running within the same docker container.

Furthermore, Nextcloud is listening on ports 80 and 443, but it appears (looking at this guide to running Joplin Server on RaspPi) that Joplin Server will need to listen to those ports as well. Will there be a conflict?

Thanks for any help!

Hi! I don't know anything about Docker, so I can't answer your question about Nginx in Docker.

As for the second part regarding ports: Again, I don't know anything about Nextcloud, but I can tell you that port 80 is not really needed. This should only remain open for Lets-Encrypt. What does the URL structure of Nextcloud look like? Is there a chance that "/joplin" will never appear there anyway? Then you could still write the reverse proxy into the configuration just the same, since they wouldn't get in each other's way...at least that's my idea, let me know if it works out :smiley:

Best regards
MrKanister

Okay thanks for your response. I am still learning about web hosting myself.

I have www.mydomain.io registered and I can access Nextcloud at nextcloud.mydomain.io

So I guess what you're saying is that even if they're listening on the same port, www.mydomain.io/joplin and the nextcloud domain won't conflict? Cool, if so. I will try to figure out how to shoehorn it into my existing server running in the docker container. Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.