iv-org / documentation

The official Invidious documentation
https://docs.invidious.io
Creative Commons Zero v1.0 Universal
599 stars 158 forks source link

[New instance] invidious.yourdevice.ch #521

Closed warioishere closed 5 months ago

warioishere commented 7 months ago

URL

https://invidious.yourdevice.ch

Mandatory checks

Maintainer chart

Host country

germany

Man in the Middle

No response

Source code URL

No response

Additional information

no ipv6 IP rotation yet, will do this in future.

Greetings

Wario

github-actions[bot] commented 7 months ago

Hello! Your instance has been added to our monitoring system:

You need to wait 30 days before we add your instance, this is to evaluate that your instance will keep a good uptime for one month.

Make sure you double checked all the mandatory checks or this will slow down the process of adding your instance!

Please consult these two important tutorials:

It is highly recommended to follow these tutorials because it will allow the instance to stay stable and performant over the long term.

Please consider joining the Matrix room for public instance maintainers by joining our Matrix room: https://matrix.to/#/#invidious:matrix.org then pinging @ unixfox, @ TheFrenchGhosty and @ SamantazFox for asking to be invited to the Matrix room. We discuss troubles managing a public instance, sharing some advices and more.

warioishere commented 7 months ago

ah shit, I've been waiting 30d to post this here because I read about the waiting time. Didnt know the 30d starts now. If you wanna add the server right now, you can, it has been up since a month now with no downtime.

grettings

syeopite commented 7 months ago

Hmm. It'd probably be a good idea for us to clarify that on the template and instance rules.

warioishere commented 7 months ago

maybe hehe, additional info: running the docker version with 6 instances up restarting all in different intervals.

bugmaschine commented 6 months ago

@warioishere Got an update on ipv6 rotation?

unixfox commented 6 months ago

User say that he can't do ipv6 rotation using classic ipv6 rotator because his hosting provider does not support it.

bugmaschine commented 6 months ago

The only problem I see with it, is that Google is going to ban his IP someday which will become a problem

warioishere commented 6 months ago

I know, I was not checking ionos if they allow ipv6 rotation. I can only set ipv6 adresses manually. @unixfox suggested me to use the ionos api to asign new IPs from time to time. But I dont know how to do that because I am not an IT guy. Just hobby networker and hobby server admin.

Ill check docs of ionos if I manage to do this.

perennialtech commented 6 months ago

@warioishere Do you have any updates on implementing IPv6 rotation on your instance?

If you're still having issues with Ionos, it may be worth considering switching to a different hosting provider with better IPv6 support, or if that's infeasible, using a tunnelbroker for IPv6 connectivity.

warioishere commented 6 months ago

as I've read on invidious docs, its not suggested to use a free tunnelbroker because it puts a lot of strain to their servers. As i pay already 16Euros per month for this server, I dont wanna spend further money because it would be too expensive for me at all to now buy another tunnelbroker service. I have no ideas how to use the ionos api to change the IP adress by a script I could run. I will write ionos tomorrow if they can gimme a hint if this is generally possible via api to request new ipv6 adresse periodically. For me, i dont udnerstand much reading those docs and I've no idea how to do, arrange or create this:

https://api.ionos.com/docs/activitylog/v1/#tag/Data-centers/operation/datacentersPut

warioishere commented 5 months ago

do you guys have an hint for a hoster that supports free ipv6 asignments? Maybe I'll check costs and rent another one. Unless someone helps me with the apis, I cant make this to work. maybe @perennialtech ? base in germany would be best

perennialtech commented 5 months ago

@warioishere Most Invidious instances in Germany are hosted on Hetzner or Netcup. They support IPv6 /64 subnets IIRC and don't cost much, so they might be a good choice.

warioishere commented 5 months ago

bought something on netcup, shuting down the old instance, will let you know when I am ready

warioishere commented 5 months ago

@perennialtech @unixfox

root@invidious:~/invidious/ipv6rotator/smart-ipv6-rotator# sudo python3 smart-ipv6-rotator.py run --ipv6range=2a03:4000:6:d059::/64
Deprecation warning https://docs.pyroute2.org/ipdb_toc.html
[INFO] You have IPv6 connectivity. Continuing.
[INFO] No cleanup of previous setup needed.
[DEBUG] Debug info:
ranges --> ['2800:3f0:4000::/36', '2c0f:fb50:4000::/36', '2607:f8b0:4000::/36', '2404:6800:4000::/36', '2001:4860:4000::/36', '2a00:1450:4000::/36']
random_ipv6_address --> 2a03:4000:6:d059:6a41:9bf4:a56b:cfbf
gateway --> fe80::1
interface_index --> 2
interface_name --> eth0
ipv6_subnet --> 2a03:4000:6:d059::/64
random_ipv6_address_mask --> 64
[INFO] Correctly using the new random IPv6 address, continuing.
[INFO] Correctly configured the IPv6 routes for IPv6 ranges ['2800:3f0:4000::/36', '2c0f:fb50:4000::/36', '2607:f8b0:4000::/36', '2404:6800:4000::/36', '2001:4860:4000::/36', '2a00:1450:4000::/36'].
[INFO] Successful setup. Waiting for the propagation in the Linux kernel.

I think I am all setup up

warioishere commented 5 months ago

its throwing errors, freetube shows TypeError: Cannot read properties of undefined (reading 'url')

doesnt load previews and images. Invidious web plays videos but also doesnt show previews

invidious instances show

2024-05-25 19:15:27 UTC [info] 200 GET /feed/webhook/v1:1716664527:dbb7636e:0c75b9530d0a5ce0058dcfcc191a85efe022c7f0?hub.topic=https://www.youtube.com/xml/feeds/videos.xml%3Fchannel_id%3DUCzkY7wa8Ksxv4M5NyUYgTmA&hub.challenge=14064137630394849067&hub.mode=subscribe&hub.lease_seconds=432000 1.55ms

invidious-nginx shows

2024/05/25 19:16:04 [error] 29#29: *9776 connect() failed (111: Connection refused) while connecting to upstream, client: 172.20.0.1, server: , request: "GET /feed/webhook/v1:1716664564:06c32dd2:c4b38be506845b9be0c6dd1157255f3dc3138297?hub.topic=https://www.youtube.com/xml/feeds/videos.xml%3Fchannel_id%3DUCIPVJoHb_A5S3kcv3TJlyEg&hub.challenge=12040584745215315400&hub.mode=subscribe&hub.lease_seconds=432000 HTTP/1.1", upstream: "http://[2001:db9::8]:3000/feed/webhook/v1:1716664564:06c32dd2:c4b38be506845b9be0c6dd1157255f3dc3138297?hub.topic=https://www.youtube.com/xml/feeds/videos.xml%3Fchannel_id%3DUCIPVJoHb_A5S3kcv3TJlyEg&hub.challenge=12040584745215315400&hub.mode=subscribe&hub.lease_seconds=432000", host: "invidious.yourdevice.ch"

its the same setup as on the old server which ran fine

warioishere commented 5 months ago

additional:

docker-compose.yml:

version: "3"
services:
    invidious:
        image: quay.io/invidious/invidious:latest
        deploy:
            replicas: 6
        restart: unless-stopped
        environment:
            INVIDIOUS_CONFIG: |
                channel_threads: 0
                feed_threads: 0
                db:
                    dbname: invidious
                    user: kemal
                    password: kemal
                    host: invidious-db
                    port: 5432
                check_tables: true
                external_port: 443
                domain: invidious.yourdevice.ch
                https_only: true
                statistics_enabled: true
                force_resolve: ipv6
                hmac_key: "xxx"
                #  banner: "by yourdevice.ch"
                #  popular_enabled: true
                registration_enabled: true
                login_enabled: true
                captcha_enabled: true
                enable_user_notifications: true
                use_pubsub_feeds: true
                use_innertube_for_captions: true
        healthcheck:
            test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/stats || exit 1
            interval: 30s
            timeout: 5s
            retries: 2
        logging:
            options:
                max-size: "1G"
                max-file: "4"
        depends_on:
           - invidious-db

    invidious-refresh:
        image: quay.io/invidious/invidious:latest
        restart: unless-stopped
        environment:
            INVIDIOUS_CONFIG: |
                db:
                    dbname: invidious
                    user: kemal
                    password: kemal
                    host: invidious-db
                    port: 5432
                    check_tables: true
                check_tables: true
                external_port: 443
                domain: invidious.yourdevice.ch
                https_only: true
                statistics_enabled: true
                hmac_key: "xxxsame"
                #  banner: "by yourdevice.ch"
                #  popular_enabled: true
                registration_enabled: true
                login_enabled: true
                captcha_enabled: true
                enable_user_notifications: true
                use_pubsub_feeds: true
                use_innertube_for_captions: true

        healthcheck:
            test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/stats || exit 1
            interval: 30s
            timeout: 5s
            retries: 2
        logging:
            options:
                max-size: "1G"
                max-file: "4"
        depends_on:
           - invidious-db

    nginx:
        image: nginx:latest
        restart: unless-stopped
        volumes:
            - ./nginx.conf/nginx.conf:/etc/nginx/nginx.conf:ro
        depends_on:
            - invidious
        ports:
            - "127.0.0.1:3000:3000"

    http3-ytproxy:
        image: 1337kavin/ytproxy:latest
        restart: unless-stopped
        user: "33:33"
        network_mode: "host"
        environment:
            DISABLE_WEBP: 1
        volumes:
           - /opt/http3-ytproxy:/app/socket

    invidious-db:
        image: docker.io/library/postgres:14
        restart: unless-stopped
        volumes:
          - postgresdata:/var/lib/postgresql/data
          - ./config/sql:/config/sql
          - ./docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh
        environment:
            POSTGRES_DB: invidious
            POSTGRES_USER: kemal
            POSTGRES_PASSWORD: kemal
        healthcheck:
            test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]

volumes:
    postgresdata:

networks:
  default:
    enable_ipv6: true
    ipam:
      config:
        - subnet: 2001:0DB9::/112
          gateway: 2001:0DB9::1

nginx.conf:

user www-data;
events {
    worker_connections 1000;
}
http {
    server {
        listen 3000;
        listen [::]:3000;
        access_log off;

        location / {
            resolver 127.0.0.11;
            set $backend "invidious";
            proxy_pass http://$backend:3000;
            proxy_http_version 1.1; # to keep alive
            proxy_set_header Connection ""; # to keep alive
        }
    }
}

any ideas?

warioishere commented 5 months ago

nginx reverse proxy conf:

server {
    listen 80;
    listen [::]:80;
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name invidious.yourdevice.ch;

    access_log off;
    error_log /var/log/nginx/error.log crit;

    ssl_certificate /etc/letsencrypt/live/invidious.yourdevice.ch/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/invidious.yourdevice.ch/privkey.pem;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $host;    # so Invidious knows domain
        proxy_http_version 1.1;     # to keep alive
        proxy_set_header Connection ""; # to keep alive
    }

    location ~ (^/videoplayback|^/vi/|^/ggpht/|^/sb/) {
        proxy_buffering on;
        proxy_buffers 1024 16k;
        proxy_set_header X-Forwarded-For "";
        proxy_set_header CF-Connecting-IP "";
        proxy_hide_header "alt-svc";
        sendfile on;
        sendfile_max_chunk 512k;
        tcp_nopush on;
        aio threads=default;
        aio_write on;
        directio 16m;
        proxy_hide_header Cache-Control;
        proxy_hide_header etag;
        proxy_http_version 1.1;
        proxy_set_header Connection keep-alive;
        proxy_max_temp_file_size 32m;
        access_log off;
        proxy_pass http://unix:/opt/http3-ytproxy/http-proxy.sock;
        add_header Cache-Control private always;
}

    if ($https = '') { return 301 https://$host$request_uri; }  # if not connected to HTTPS, perma-redirect to HTTPS
}
warioishere commented 5 months ago

problem solved, wrong permissions of /opt/http3-ytproxy

warioishere commented 5 months ago

@unixfox anything that I am missing that noone of you replies? I run already two servers now, one was for nothing. Additional info for docs, maybe you could add info for providers that support ipv6 rotations and people are not renting servers for a year for nothing

bugmaschine commented 5 months ago

Your Instace has been now added

warioishere commented 2 months ago

@SamantazFox

Hello, Instance is up again with inv-sig-helper and the appropriate tokens cheeriooo and thaaaaaanks so much for this hard work of you damn cool guys!!!

warioishere commented 2 months ago

@SamantazFox @bugmaschine

any problems with my instances thats its not added anymore?

Greetings

bugmaschine commented 2 months ago

@warioishere Should be fixed now, didin't see the message before. Sorry about that.