Install docker
See Docker install
Docker Compose
1version: '3'
2
3services:
4 shaarli:
5 image: shaarli/shaarli:latest
6 container_name: shaarli
7 restart: unless-stopped
8# ports:
9# - 8093:80
10 environment:
11 PUID: 1000
12 PGID: 1000
13 volumes:
14 - ./cache:/var/www/shaarli/cache
15 - ./data:/var/www/shaarli/data
16 networks:
17 - shaarli-npm
18networks:
19 shaarli-npm:
NOTE: The permissions of the ./cache
and ./data
folders is especially important in Shaarli. They should have the same owner as the Shaarli process in the docker container or alternatively set chmod og+rwx -R cache data
but this is insecure. Another way to fix the permissions is to start the docker container, then run (needs to be done only once)
docker exec -ti shaarli chown -R nginx:nginx /var/www/shaarli/data
docker exec -ti shaarli chown -R nginx:nginx /var/www/shaarli/cache
Configure Nginx Proxy Manager
Basic NPM setup instructions: NPM Docker
Add to docker-compose.yaml
1services:
2 app:
3 networks:
4 - shaarli_shaarli-npm
5networks:
6 shaarli_shaarli-npm:
7 external: true
Make Shaarli bookmarklet working
When the + Shaare link
bookmarklet is dragged to the bookmarks toolbar to quickly add a link, it does not work by default. Clicking on that button opens a window for https:///admir/post? ...
something like that. To fix this, right-click on the bookmarklet and edit the bookmark URL so that the window.open()
function begins with https://your.domain.tld/admin/
instead of the default https:///admin/
The full value for the URL in my case is:
javascript:( function(){ var%20url%20=%20location.href; var%20title%20=%20document.title%20||%20url; var%20desc=document.getSelection().toString(); if(desc.length>4000){ desc=desc.substr(0,4000)+'...'; alert('The%20selected%20text%20is%20too%20long,%20it%20will%20be%20truncated.'); } window.open( 'https://bookmarks.seapost.org/admin/shaare?post='%20+%20encodeURIComponent(url)+ '&title='%20+%20encodeURIComponent(title)+ '&description='%20+%20encodeURIComponent(desc)+ '&source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1' ); } )();