Here is a an untested draft of installation instructions.
Install nethserver-docker and docker-compose
yum install nethserver-docker
curl -L "https://github.com/docker/compose/releases/download/1.28.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Install Joplin server
mkdir /opt/joplin-server
cd /opt/joplin-server
curl https://raw.githubusercontent.com/laurent22/joplin/dev/.env-sample > .env
nano .env
Uncomment all the lines under the “Production Config Example” section. Set APP_BASE_URL
to the URL for a virtual host that you’ll set up later–e.g., https://notes.example.com
. Set POSTGRES_PASSWORD
to a secure database password. Set POSTGRES_PORT
to 5433
. The other variables can be left at their defaults.
nano docker-compose.yml
. Its contents should be:
# This is a sample docker-compose file that can be used to run Joplin Server
# along with a PostgreSQL server.
#
# All environment variables are optional. If you don't set them, you will get a
# warning from docker-compose, however the app should use working defaults.
version: '3'
services:
db:
image: postgres:13.1
volumes:
- ./data/postgres:/var/lib/postgresql/data
ports:
- "5433:5433"
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DATABASE}
command: -p 5433
app:
image: joplin/server:latest
depends_on:
- db
ports:
- "22300:22300"
restart: unless-stopped
environment:
- APP_PORT=22300
- APP_BASE_URL=${APP_BASE_URL}
- DB_CLIENT=pg
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DATABASE=${POSTGRES_DATABASE}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PORT=${POSTGRES_PORT}
- POSTGRES_HOST=db
docker-compose up -d
docker network connect aqua joplin-server_app_1
Reverse proxy
Log in to Cockpit, go to Applications, Web Server, Settings, Reverse Proxy, and add a new reverse proxy. The name should be the hostname you used above, e.g., notes.example.com
. The destination URL should be http://localhost:22300
. Open the Advanced settings, and check the box for Require SSL encrypted connection.
SSL Certificate
You’ll now need a SSL certificate for this host. The simplest way to handle this to add notes.example.com
to your existing system certificate.
Set admin password
Browse to http://notes.example.com. You should see it redirect you to HTTPS, and then give you a login page. Log in as admin@localhost
with password admin
and change the password.
Next steps
Create another user here, and use that user for synchronization. I’m not currently aware of the server being able to authenticate against a LDAP server, or otherwise using SSO–unless it has that capability, the Joplin server will have its own user/password database independent of Nethserver or anything else.