Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New instance] invidious.yourdevice.ch #521

Closed
9 tasks done
warioishere opened this issue Mar 27, 2024 · 20 comments
Closed
9 tasks done

[New instance] invidious.yourdevice.ch #521

warioishere opened this issue Mar 27, 2024 · 20 comments
Assignees
Labels
instance-add passed-checks Passed the required manual checks for a public instance

Comments

@warioishere
Copy link

warioishere commented Mar 27, 2024

URL

https://invidious.yourdevice.ch

Mandatory checks

  • Instance has a domain name
  • Instance is served over HTTPS
  • Statistics (/api/v1/stats) are enabled
  • Instance is properly configured (including the mandatory post install configuration)
  • Instance has an automatic hourly restart setup of Invidious
  • If dash, proxy + download is enabled (default settings), the instance has unlimited traffic/bandwidth or close to unlimited (100TB minimum)
  • Instance is not running any kind of analytics

Maintainer chart

  • Ensure that my instance is up to date (less than one month old)
  • Ensure a proper uptime of my instance (around 90%)

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

Copy link

github-actions bot commented Mar 27, 2024

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.

@github-actions github-actions bot added the wait-30-days Wait 30 days good uptime label Mar 27, 2024
@warioishere
Copy link
Author

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
Copy link
Member

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

@warioishere
Copy link
Author

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

@bugmaschine
Copy link
Collaborator

@warioishere Got an update on ipv6 rotation?

@unixfox
Copy link
Member

unixfox commented May 6, 2024

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

@bugmaschine
Copy link
Collaborator

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

@warioishere
Copy link
Author

warioishere commented May 6, 2024

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
Copy link
Collaborator

@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
Copy link
Author

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
Copy link
Author

warioishere commented May 25, 2024

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
Copy link
Collaborator

@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
Copy link
Author

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

@warioishere
Copy link
Author

@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
Copy link
Author

warioishere commented May 25, 2024

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

@warioishere
Copy link
Author

@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 bugmaschine added the passed-checks Passed the required manual checks for a public instance label May 31, 2024
@bugmaschine
Copy link
Collaborator

Your Instace has been now added

@github-actions github-actions bot removed the wait-30-days Wait 30 days good uptime label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
instance-add passed-checks Passed the required manual checks for a public instance
Projects
None yet
Development

No branches or pull requests

6 participants