How to self host librarian on docker compose

Librarian is a front-end for Odysee, Just like invidious for youtube. So you can use librarian to watch odysee videos without being tracked or without crypto sh!t

It's easy to host it but before I start I will assume that: * You are running debian 11 * You already have a VPS: * Your linux distro is up-to-date (sudo apt update && sudo apt upgrade) * You have a domain name: * Have sudo access or root account * Already installed docker and docker-compose: * Already installed Nginx: * Already have a reverse proxy conf file: * Already have certbot to issue cert:

Changes in DNS (domain side)

You really do not need to add any dns entries except if you want to create subdomain for this container then you go in your domain's dns panel and add either CNAME entry that looks like and make it's target the root domain or A entry with and make it's target the IP of your VPS

librarian docker-compose file

We need a docker-compose.yml file so we can start librarian, for me I use this file:

version: '3'

    #build: .
    image: nineteengladespool/librarian:latest
      - ./data/config.yml:/app/config.yml
    restart: unless-stopped

Optional stuff to change: The IP and port number for librarian (so we can use it later for nginx to reverse proxy it) ./data/config.yml: Where our config file for librarian will be saved at

config.yml file (just take an idea how it looks like)

auth_token: [**SECRET**]
blocked_claims: claimid,claim2
enable_live_stream: false
fiber_prefork: false
hmac_key: [**SECRET**]
image_cache: "false"
image_cache_dir: /var/cache/librarian
  data_collected_device: true
  data_collected_diagnostic_only: false
  data_collected_ip: true
  data_collected_url: true
  data_not_collected: false
  instance_cloudflare: false
  instance_country: Canada
  instance_provider: Kimsufi
  message: ""
  privacy_policy: ""
port: "3000"
use_http3: false
video_streaming_url: ""

[SECRET]: are tokens that I deleted to protect myself

Spin it up!

Now after we done editing, and everything is cool. We need to run our container so just run:

docker-compose up -d

the -d option does not let docker post logs of running application but if you want to see logs you can run:

sudo docker-compose logs -f -t

To check if there any weird behaviors or errors


Now after we make sure it's running well. We need to serve it over the internet (called reverse proxy) so without much talk, here is our server block for librarian:

server {
        listen [::]:80;
        listen 80;
        server_name [domain name] ;

       location / {
               include /etc/nginx/reverse-proxy.conf;

server_name: Change this to match domain name of librarian include: is our reverse proxy file proxy_pass: the IP and port of our running docker image

After this you should be up and running for librarian! :) just do not forget to run certbot --nginx to make it secure with https://

Update it

Of course after some time the image will be outdated and you need to update and what I love about docker that it's easy to update, really just to do it run:

docker-compose down && docker-compose pull && docker-compose up -d

What it does is: 1) Stops the container, 2) Pull last update (download last update) and 3) Re-run the container back!


If you use firewall (ufw for example) you really do not need any ports other than 443 and 80 as we use nginx reverse proxy

#howto #selfhost #docker

Like my work?, support me: