-
as root run
joplin-requirements.sh
to install the joplin requirements but please take this script with causion since it is not well tested in existing environments. Root privileges are needed to get the packages to be installed. You can runsudo bash -x joplin-requirements.sh
to see what it's doing.You could also create the requirements by yourself by:
- create user joplin with home
/home/joplin
- install nodejs 18
- install packages
vim git build-essential python curl dirmngr apt-transport-https lsb-release ca-certificates
- checkout your desired version from https://github.com/laurent22/joplin.git to
/home/joplin
- create user joplin with home
-
collect expected files and folders and build joplin by running
joplin.sh build
. This must be run as the joplin user. If you run it with debug flagsudo -u joplin bash -x joplin.sh build
you could see what's it's doing. -
create a new db
joplin
in postgres (running on the same or on another server) and adaptrun.sh
with your db credentials. You can usepsql
to do this, for example:sudo -u postgres psql CREATE USER joplin WITH PASSWORD 'your-secret-password-here'; CREATE DATABASE joplin; ALTER DATABASE joplin OWNER TO joplin; GRANT ALL PRIVILEGES ON DATABASE joplin TO joplin; \q
-
create a new file
.joplinrc
containing the variables you want to overwrite from therun.sh
's defaults. e.g.POSTGRES_PASSWORD="your-secret-password-here" APP_BASE_URL="https://joplin.mydomain.org"
-
test
run.sh
- To do that run it as the joplin user:
sudo -u joplin run.sh
and it should provide you with a URL to test like this:App: Call this for testing: 'curl https://yourdomain/api/ping'
- To do that run it as the joplin user:
-
if
run.sh
works as expected thecurl
reports:{"status":"ok","message":"Joplin Server is running"}
then, you can usejoplin.service
to run joplin as a systemd service as follows:- edit the
joplin.service
file to make sure in particular thatExecStart
points to a copy ofrun.sh
that is executeable and you tested above. sudo cp joplin.servce /etc/systemd/system
sudo systemctl daemon-reload
sudo systemctl enable joplin
sudo service joplin start
sudo service joplin status
- Then to the curl test again
- edit the
-
in the
webserver
folder you find an configuration examples how to access the Joplin server from your reverse proxy (if your webserver is not included, and you get it configured please contribute a config example) -
Once it's running you can surf to the server you tested with curl above in your browser (https://yourdomain), then login with the email
admin@localhost
and passowrdadmin
. Change the admin password, create yourself a new user and you're rolling.
sudo systemctl stop joplin
then as user joplin:
cd ~/joplin
./joplin.sh checkout-latest
./joplin.sh build
if build run successfull you could install and test:
./joplin.sh install
./joplin.sh run
if joplin server starts without error you could exit with ctl-c and start the service
sudo systemctl start joplin