Joshndroid Posted August 3, 2021 Share Posted August 3, 2021 (edited) This is the support thread for the docker templates I have added to community apps. You can find my templates on GitHub at - Joshndroid I am more than happy for some help/pull requests Nitter Nitter is a free and open source alternative Twitter front-end focused on privacy. The source is available on GitHub at Zedeus/nitter You can find my community apps page for Nitter at - /link If you would like to roll-your-own docker straight from docker hub, have a look at the guide - Joshndroid/Nitter-Guide Quote Why use Nitter? It's basically impossible to use Twitter without JavaScript enabled. If you try, you're redirected to the legacy mobile version which is awful both functionally and aesthetically. For privacy-minded folks, preventing JavaScript analytics and potential IP-based tracking is important, but apart from using the legacy mobile version and a VPN, it's impossible. Using an instance of Nitter (hosted on a VPS for example), you can browse Twitter without JavaScript while retaining your privacy. In addition to respecting your privacy, Nitter is on average around 15 times lighter than Twitter, and in some cases serves pages faster. In the future a simple account system will be added that lets you follow Twitter users, allowing you to have a clean chronological timeline without needing a Twitter account. Libreddit An alternative private front-end to Reddit. The source is available on GitHub at Spikecodes/libreddit You can find my community apps page for Libreddit at - /link If you would like to roll-your-own docker straight from docker hub, have a look at the guide - Joshndroid/Libreddit-Guide Quote 10 second pitch: Libreddit is a portmanteau of "libre" (meaning freedom) and "Reddit". It is a private front-end like Invidious but for Reddit. Browse the coldest takes of r/unpopularopinion without being tracked. � Fast: written in Rust for blazing fast speeds and memory safety ☁️ Light: no JavaScript, no ads, no tracking, no bloat � Private: all requests are proxied through the server, including media � Secure: strong Content Security Policy prevents browser requests to Reddit Baikal Baïkal is a lightweight CalDAV+CardDAV server. It offers an extensive web interface with easy management of users, address books and calendars. It is fast and simple to install and only needs a basic php capable server. The data can be stored in a MySQL or a SQLite database. The source is available on GitHub at Sabre-io/Baikal The source for the docker is available on GitHub at Ckulka/baikal-docker You can find my community apps page for Baikal at - /link If you would like to roll-your-own docker straight from docker hub, have a look at the guide - Joshndroid/Baikal-Guide Quote Baïkal allows to seamlessly access your contacts and calendars from every device. It is compatible with iOS, Mac OS X, DAVx5 on Android, Mozilla Thunderbird and every other CalDAV and CardDAV capable application. Protect your privacy by hosting calendars and contacts yourself - with Baïkal. NOTE - Baikal seems to be a bit of a pain now with permissions on the creation of the docker. It is wise to create the /appdata folders prior to the installation of the application via the template to stop these permissions errors. Please see here for further Invidious An open source alternative front-end to YouTube The source is available on GitHub at iv-org/invidious The source for the docker is available on Quay.io at invidious/invidious You can find my community apps page for Invidious at - /link For setup assistance please see the Setup Post Quote Lightweight No ads No tracking No JavaScript required Light/Dark themes Customizable homepage Subscriptions independant from Google Notifications for all subscribed channels Audio-only mode (with background play on mobile) Support for Reddit comments Available in many languages, thanks to our translators Does not use official YouTube APIs Troddit A web client for Reddit Built with NextJS and Typescript. Styled with TailwindCSS. The source is available on github at burhan-syed/troddit Quote Features Secure logins with Reddit to enable voting, commenting, managing your subreddits and multireddits (aka feeds), and access to your personal front page. 'Offline mode' to follow subreddits and manage multis locally without login. Autogenerates a personal front page. Visit your subreddits multi, replace 'reddit' with 'troddit' in the URL, then use the 'Join All' option to quickly follow all subs locally. Search for subreddits with auto-complete. Filter posts by type (Images, Video/GIFs, Links, Self) View posts in single column, custom multi-column with a grid-masonry layout, or a simple row mode. All with infinite-scrolling. Choose your card style: Original for full post text in card, Compact to exclude post text, or Media to hide all text and card padding. Gallery view: Click on a post and navigate through the feed with on screen buttons or your arrow keys. Shows the post content as well as its comments from Reddit. Smart portrait mode to automatically arrange vertical photos and videos side by side with comments. Hover mouse over Reddit videos to play. Enable to Autoplay option to play videos automatically when entering the viewport. Enable the Audio option to play sound on hover as well. Responsive desktop and mobile layouts. PWA to download to your computer or phone. Docker support To assist with setup here is a snippet from the burhan-syed/troddit github regarding assistance on what is essentially required for the environment variables Quote Environment Variables To use login functionality the following environment variables need to be defined in a .env.local file placed in the root directory: CLIENT_ID=<ID of your Reddit app> CLIENT_SECRET=<Secret from your Reddit app> REDDIT_REDIRECT=http://localhost:3000/api/auth/callback/reddit NEXTAUTH_SECRET=<See https://next-auth.js.org/configuration/options#secret> NEXTAUTH_URL=http://localhost:3000 To create a Reddit app visit https://old.reddit.com/prefs/apps/. The redirect uri should match the REDDIT_REDIRECT variable. Rimgo Self-hosted frontend for imgur. Rewritten in Go. The source is available on github at video-prize-ranch/rimgo Quote Features URL-compatible with i.imgur.com - just replace the domain in the URL Images and videos (gifv, mp4) Galleries with comments Albums User page Tag page Microbin MicroBin is a super tiny, feature rich, configurable, self-contained and self-hosted paste bin web application. It is very easy to set up and use, and will only require a few megabytes of memory and disk storage. It takes only a couple minutes to set it up, why not give it a try now?. The source is available on github at szabodanika/microbin Quote Features Is very small Animal names instead of random numbers for pasta identifiers (64 animals) File uploads (eg. server.com/file/pig-dog-cat) Raw pasta text (eg. server.com/raw/pig-dog-cat) URL shortening and redirection Very simple database (JSON + files) for portability, easy backups and integration Listing and manually removing pastas (/pastalist) Private and public pastas Editable and final pastas Never expiring pastas Automatically expiring pastas Syntax highlighting Entirely self-contained executable, MicroBin is a single file! Automatic dark mode (follows system preferences) Very little CSS and absolutely no JS (see water.css) Most of the above can be toggled on and off! Apps previously supported but discontinued by developer Bibliogram Apps previously implemented but discontinued by me Cypht Edited November 4, 2022 by Joshndroid 1 Quote Link to comment
Joshndroid Posted August 19, 2021 Author Share Posted August 19, 2021 (edited) Invidious Docker Setup Post (including database setup that MUST be undertaken) Firstly I just want to take the opportunity to shout out @A75G . They have provided a second method for setting up Invidious that may be preferential to other users. They also have run through this following guide in their own setup of Invidious. Invidious is a tad tricky in that it has a number of config settings that are needed as well as being fairly hard coded into other areas. Invidious can also be a bit buggy at times. I have been running Invidious as a docker for approximately 4+ weeks with constant updates occurring essentially daily. I understand that from a security standpoint this may not be preferential for systems being truly exposed to the internet. I had to weigh up the ease of use for users as well as the security implications. For me, if someone has access to my database in my setup, I have far more to worry about than the invidious docker container. For those instances requiring more security I would look at doing some manual setup in various areas to provide some more security please see here for further https://docs.invidious.io/Installation.md specifically the 'Set up PostgresSQL' section. You can utilise the standard template that is bundled into the docker community apps. This will provide the basic mostly ready to go setup experience with minor changes required to the config file prior to starting invidious for the first time. To generate the config file run these commands in the console mkdir /mnt/user/appdata/invidious mkdir /mnt/user/appdata/invidious/config wget -O /mnt/user/appdata/invidious/config/config.yml https://raw.githubusercontent.com/iv-org/invidious/master/config/config.example.yml Then setup your config.yml with your settings prior to starting the container. Note if you have set up your appdata folder under the 'shares' tab to be exposed you can edit this file using a text editor such as atom. If you don't wish to use this method you can edit the file within the main console and navigate to /mnt/user/appdata/invidious/config/ and then use 'vi' editor to edit the config.yml For example; I have this config areas changed; Line 14 host: (set to the IP address of your postgres installation - make sure this is on the same network as your invidious install) This should be enough to get you going on a http accessed instance NOT behind a reverse proxy. If you wish to utilise a reverse proxy utilise these config lines as well Line 79 external_port: (set this to your reverse proxy port, for me its 443) Line 98 domain: (set this to your preferred domain, such as example.com) Line 109 https_only: (set this from false to true) NOTE - Please note that there are further configs that can be set within your template. These can be located within the invidious docs here - https://docs.invidious.io/Configuration.md Network Settings Note I am personally using a custom network 'proxynet' within unraid. I use this in conjunction with my reverse proxy to handle the SSL certs for my domain. Using a custom network enables the ability to handle DNS between containers when both on the 'proxynet' network. thanks @Syk0tic If you are wanting to use the br0 (or I imagine host network would be the same for this as well) please make a DNS entry for the domain 'postgres' on your DNS resolver. I use pi-hole on my network and was able to go into the setting 'local DNS' add 'postgres' to the domain field and then add in the 'IP' of the postgres database (which was also on br0) and invidious works as intended. For those wishing to bridge I can't recommend this method until i do some further research. Invidious Docker Database Setup Instructions (postgres) Note - Invidious is rather picky when it comes to the database labels/naming conventions. I had tried in the past to modify these values which would lead to the container not functioning at all. I had mentioned it when talking with the Invidious devs and they have acknowledged that the names are essentially ‘hard coded’ and basically from my understanding that you may as well leave them as is unless you want some headaches. I had utilised postgres10 in the past however I have this working with postgres12.5 as found on the Community apps page. I have the postgres12.5 container named postgres within the docker page of that specific docker. Once you have your postgres database installed we need to create the invidious database Lets assume that you have created the initial postgres database up with postgres as your user psql -U postgres CREATE DATABASE invidious; create user kemal with encrypted password 'kemal'; GRANT ALL PRIVILEGES ON DATABASE invidious TO kemal; exit This has setup the required database of ‘invidious’ with the required username and password Now we need to log back into the required database and create further entries for invidious to function correctly with the database. These commands can be found within each ‘.sql’ file located at https://github.com/iv-org/invidious/tree/master/config/sql First log into the container with the new user and to the database psql -d invidious -U kemal Now you need to copy these commands. You can either copy each paragraph section from the || CAPS LOCKS all the way to the first ; || OR you can copy the whole code block and paste into your terminal (I have tested this as working on a fresh setup) CREATE TABLE public.annotations ( id text NOT NULL, annotations xml, CONSTRAINT annotations_id_key UNIQUE (id) ); GRANT ALL ON TABLE public.annotations TO kemal; CREATE TABLE public.videos ( id text NOT NULL, info text, updated timestamp with time zone, CONSTRAINT videos_pkey PRIMARY KEY (id) ); GRANT ALL ON TABLE public.videos TO kemal; CREATE UNIQUE INDEX id_idx ON public.videos USING btree (id COLLATE pg_catalog."default"); CREATE TABLE public.channel_videos ( id text NOT NULL, title text, published timestamp with time zone, updated timestamp with time zone, ucid text, author text, length_seconds integer, live_now boolean, premiere_timestamp timestamp with time zone, views bigint, CONSTRAINT channel_videos_id_key UNIQUE (id) ); GRANT ALL ON TABLE public.channel_videos TO kemal; CREATE INDEX channel_videos_ucid_idx ON public.channel_videos USING btree (ucid COLLATE pg_catalog."default"); CREATE TABLE public.channels ( id text NOT NULL, author text, updated timestamp with time zone, deleted boolean, subscribed timestamp with time zone, CONSTRAINT channels_id_key UNIQUE (id) ); GRANT ALL ON TABLE public.channels TO kemal; CREATE INDEX channels_id_idx ON public.channels USING btree (id COLLATE pg_catalog."default"); CREATE TABLE public.nonces ( nonce text, expire timestamp with time zone, CONSTRAINT nonces_id_key UNIQUE (nonce) ); GRANT ALL ON TABLE public.nonces TO kemal; CREATE INDEX nonces_nonce_idx ON public.nonces USING btree (nonce COLLATE pg_catalog."default"); CREATE TABLE public.users ( updated timestamp with time zone, notifications text[], subscriptions text[], email text NOT NULL, preferences text, password text, token text, watched text[], feed_needs_update boolean, CONSTRAINT users_email_key UNIQUE (email) ); GRANT ALL ON TABLE public.users TO kemal; CREATE UNIQUE INDEX email_unique_idx ON public.users USING btree (lower(email) COLLATE pg_catalog."default"); CREATE TABLE public.session_ids ( id text NOT NULL, email text, issued timestamp with time zone, CONSTRAINT session_ids_pkey PRIMARY KEY (id) ); GRANT ALL ON TABLE public.session_ids TO kemal; CREATE INDEX session_ids_id_idx ON public.session_ids USING btree (id COLLATE pg_catalog."default"); CREATE TYPE public.privacy AS ENUM ( 'Public', 'Unlisted', 'Private' ); CREATE TABLE public.playlists ( title text, id text primary key, author text, description text, video_count integer, created timestamptz, updated timestamptz, privacy privacy, index int8[] ); GRANT ALL ON public.playlists TO kemal; CREATE TABLE playlist_videos ( title text, id text, author text, ucid text, length_seconds integer, published timestamptz, plid text references playlists(id), index int8, live_now boolean, PRIMARY KEY (index,plid) ); GRANT ALL ON TABLE public.playlist_videos TO kemal; Then you have to exit exit Now your database should be correctly setup. Maintaining the Database (which does get large over time) please see the steps within the documentation - https://docs.invidious.io/Database-Information-and-Maintenance.md Edited September 15, 2021 by Joshndroid 1 Quote Link to comment
Joshndroid Posted August 19, 2021 Author Share Posted August 19, 2021 this post is reserved for potential future use 2 Quote Link to comment
Joshndroid Posted August 19, 2021 Author Share Posted August 19, 2021 this post is reserved for potential future use 3 Quote Link to comment
stefan marton Posted August 19, 2021 Share Posted August 19, 2021 i have tried to install invidious with method 1 but there are this error : from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2' Caused by: Hostname lookup for postgres failed: No address found (Socket::Addrinfo::Error) i checked the database is accessible Quote Link to comment
Joshndroid Posted August 19, 2021 Author Share Posted August 19, 2021 3 hours ago, stefan marton said: i have tried to install invidious with method 1 but there are this error : from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2' Caused by: Hostname lookup for postgres failed: No address found (Socket::Addrinfo::Error) i checked the database is accessible What is the name of your postgres container? I had mentioned above that I changed my postgres12.5 or postgres10 to just postgres. Give that a try and let me know how you go. Quote Link to comment
stefan marton Posted August 19, 2021 Share Posted August 19, 2021 1 hour ago, Joshndroid said: What is the name of your postgres container? I had mentioned above that I changed my postgres12.5 or postgres10 to just postgres. Give that a try and let me know how you go. the name is postgress i have tried with Postgres and postgres no change Quote Link to comment
Joshndroid Posted August 19, 2021 Author Share Posted August 19, 2021 4 minutes ago, stefan marton said: the name is postgress i have tried with Postgres and postgres no change Is your postgres container on the same network as your invidious? I am reverse proxying mine through a network named proxynet both postgres and invidious are on this network type. Quote Link to comment
stefan marton Posted August 19, 2021 Share Posted August 19, 2021 1 minute ago, Joshndroid said: Is your postgres container on the same network as your invidious? I am reverse proxying mine through a network named proxynet both postgres and invidious are on this network type. all two container is under bridge i use adminer to manage postgres in bridge too Quote Link to comment
Joshndroid Posted August 19, 2021 Author Share Posted August 19, 2021 3 minutes ago, stefan marton said: all two container is under bridge i use adminer to manage postgres in bridge too Have a look at your config.yml file in the invidious console. Check the content of the file for hostname/database lines (from memory its right up the top) That error is basically when invidious can't find the database. Its picky as heck. I had a feeling that there may be some teething issues. I wrote the guide mostly well after I had set my instance up. There is potential I have missed a step. I am unable to be at my PC at present but will take another look when I get home. Quote Link to comment
Nesquik Posted August 19, 2021 Share Posted August 19, 2021 3 hours ago, Joshndroid said: What is the name of your postgres container? I had mentioned above that I changed my postgres12.5 or postgres10 to just postgres. Give that a try and let me know how you go. I am having the same issue. I have named my docker container postgres with no change. I have confirmed that the database is running and accessible both locally on the postgres container and remotely from my other linux machine using a postgres client. My DB_HOST is the ip address of my unraid machine, username/password/DB are all left at default in the template. I followed the instructions provided above to setup the postgres database using the kemal/kemal username/password. Quote Link to comment
Joshndroid Posted August 20, 2021 Author Share Posted August 20, 2021 1 hour ago, Nesquik said: I am having the same issue. I have named my docker container postgres with no change. I have confirmed that the database is running and accessible both locally on the postgres container and remotely from my other linux machine using a postgres client. My DB_HOST is the ip address of my unraid machine, username/password/DB are all left at default in the template. I followed the instructions provided above to setup the postgres database using the kemal/kemal username/password. Thanks mate for the feedback. I can't get in to do what I need to on mobile. Have a look at your config.yml file in the console. Check the database. Otherwise just hang on for a bit longer and I'll take a look when I get home Quote Link to comment
Nesquik Posted August 20, 2021 Share Posted August 20, 2021 18 minutes ago, Joshndroid said: Thanks mate for the feedback. I can't get in to do what I need to on mobile. Have a look at your config.yml file in the console. Check the database. Otherwise just hang on for a bit longer and I'll take a look when I get home No worries! I appreciate you taking a look at this. 1 Quote Link to comment
Joshndroid Posted August 20, 2021 Author Share Posted August 20, 2021 (edited) 10 hours ago, stefan marton said: all two container is under bridge i use adminer to manage postgres in bridge too 7 hours ago, Nesquik said: No worries! I appreciate you taking a look at this. I have nuked my invidious container on my local machine in the hope of replicating your issues and run again through my guide. I have found it easier to utilise the 'method 2' after my nuking so I have changed this to the default and only method. I am updating the template to remove those lines as in method 2 as well as updated the other setup pieces. I have been able to basically get mine working again in the last hour from scratch after spending the first hour trouble shooting through methods. I have updated the template on my end and it take a little bit of time for it to be updated within unraid community apps section. It removes the lines I had extra above (which I have now removed in the first thread for simplicity sake). I have not changed anything in relation to postgres on my end (apart from backing mine up, nuking it, playing with the check_tables config [which didnt work, citing permissions issues] and restoring). I can guess that due to using method 2 and essentially directly utilising the IP of your database, the naming requirement from progres10 or whatever to postgres will probably also be moot. I assume you may need to nuke your invidious from your system (if you have setup your database you can actually keep this ready for the newer template/setup). Then just wait a tad for unraid to recognise and import my changes, recheck my guide and try again. Please let me know how you go.\ Edited August 20, 2021 by Joshndroid Quote Link to comment
Nesquik Posted August 20, 2021 Share Posted August 20, 2021 21 minutes ago, Joshndroid said: I have nuked my invidious container on my local machine in the hope of replicating your issues and run again through my guide. I have found it easier to utilise the 'method 2' after my nuking so I have changed this to the default and only method. I am updating the template to remove those lines as in method 2 as well as updated the other setup pieces. I have been able to basically get mine working again in the last hour from scratch after spending the first hour trouble shooting through methods. I have updated the template on my end and it take a little bit of time for it to be updated within unraid community apps section. It removes the lines I had extra above (which I have now removed in the first thread for simplicity sake). I have not changed anything in relation to postgres on my end (apart from backing mine up, nuking it, playing with the check_tables config [which didnt work, citing permissions issues] and restoring). I can guess that due to using method 2 and essentially directly utilising the IP of your database, the naming requirement from progres10 or whatever to postgres will probably also be moot. I assume you may need to nuke your invidious from your system (if you have setup your database you can actually keep this ready for the newer template/setup). Then just wait a tad for unraid to recognise and import my changes, recheck my guide and try again. Please let me know how you go.\ Thank you so much for your hard work. I will go ahead and remove the invidious container/image and wipe the folder. I will get back to you soon when I get time to experiment a bit more. Quote Link to comment
Joshndroid Posted August 20, 2021 Author Share Posted August 20, 2021 15 minutes ago, Nesquik said: Thank you so much for your hard work. I will go ahead and remove the invidious container/image and wipe the folder. I will get back to you soon when I get time to experiment a bit more. Thanks mate, apologies for the muck around. I knew invidious was going to be a pain and it hasn't disappointed thus far lol. Quote Link to comment
Mathervius Posted August 20, 2021 Share Posted August 20, 2021 I tried to setup this container today following the new instructions (it failed to work yesterday with the original instructions). Unfortunately, it still has the same error for me as yesterday. Both containers are on my bro.10 network with static IPs. config.yml db: user: kemal password: kemal host: 192.168.20.231 port: 5432 dbname: invidious error from invidious log from lib/db/src/db/database.cr:57:16 in '->' from /usr/share/crystal/src/primitives.cr:266:3 in 'build_resource' from lib/db/src/db/pool.cr:47:34 in 'initialize' from lib/db/src/db/pool.cr:40:5 in 'new:initial_pool_size:max_pool_size:max_idle_pool_size:checkout_timeout:retry_attempts:retry_delay' from lib/db/src/db/database.cr:56:15 in 'initialize' from lib/db/src/db/database.cr:49:5 in 'new' from lib/db/src/db.cr:155:5 in 'build_database' from lib/db/src/db.cr:119:5 in 'open' from /usr/share/crystal/src/kernel.cr:386:3 in '???' from src/invidious.cr:38:1 in '__crystal_main' from /usr/share/crystal/src/crystal/main.cr:110:5 in 'main_user_code' from /usr/share/crystal/src/crystal/main.cr:96:7 in 'main' from /usr/share/crystal/src/crystal/main.cr:119:3 in 'main' from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2' Caused by: Cannot establish connection (PQ::ConnectionError) from lib/pg/src/pq/connection.cr:34:9 in 'initialize' from lib/pg/src/pq/connection.cr:19:5 in 'new' from lib/pg/src/pg/connection.cr:13:23 in 'initialize' from lib/pg/src/pg/connection.cr:7:5 in 'new' from lib/pg/src/pg/driver.cr:3:5 in 'build_connection' from lib/db/src/db/database.cr:57:16 in '->' from /usr/share/crystal/src/primitives.cr:266:3 in 'build_resource' from lib/db/src/db/pool.cr:47:34 in 'initialize' from lib/db/src/db/pool.cr:40:5 in 'new:initial_pool_size:max_pool_size:max_idle_pool_size:checkout_timeout:retry_attempts:retry_delay' from lib/db/src/db/database.cr:56:15 in 'initialize' from lib/db/src/db/database.cr:49:5 in 'new' from lib/db/src/db.cr:155:5 in 'build_database' from lib/db/src/db.cr:119:5 in 'open' from /usr/share/crystal/src/kernel.cr:386:3 in '???' from src/invidious.cr:38:1 in '__crystal_main' from /usr/share/crystal/src/crystal/main.cr:110:5 in 'main_user_code' from /usr/share/crystal/src/crystal/main.cr:96:7 in 'main' from /usr/share/crystal/src/crystal/main.cr:119:3 in 'main' from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2' Caused by: Hostname lookup for postgres failed: No address found (Socket::Addrinfo::Error) Quote Link to comment
Nesquik Posted August 20, 2021 Share Posted August 20, 2021 (edited) 2 hours ago, Mathervius said: I tried to setup this container today following the new instructions (it failed to work yesterday with the original instructions). Unfortunately, it still has the same error for me as yesterday. Both containers are on my bro.10 network with static IPs. config.yml db: user: kemal password: kemal host: 192.168.20.231 port: 5432 dbname: invidious error from invidious log from lib/db/src/db/database.cr:57:16 in '->' from /usr/share/crystal/src/primitives.cr:266:3 in 'build_resource' from lib/db/src/db/pool.cr:47:34 in 'initialize' from lib/db/src/db/pool.cr:40:5 in 'new:initial_pool_size:max_pool_size:max_idle_pool_size:checkout_timeout:retry_attempts:retry_delay' from lib/db/src/db/database.cr:56:15 in 'initialize' from lib/db/src/db/database.cr:49:5 in 'new' from lib/db/src/db.cr:155:5 in 'build_database' from lib/db/src/db.cr:119:5 in 'open' from /usr/share/crystal/src/kernel.cr:386:3 in '???' from src/invidious.cr:38:1 in '__crystal_main' from /usr/share/crystal/src/crystal/main.cr:110:5 in 'main_user_code' from /usr/share/crystal/src/crystal/main.cr:96:7 in 'main' from /usr/share/crystal/src/crystal/main.cr:119:3 in 'main' from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2' Caused by: Cannot establish connection (PQ::ConnectionError) from lib/pg/src/pq/connection.cr:34:9 in 'initialize' from lib/pg/src/pq/connection.cr:19:5 in 'new' from lib/pg/src/pg/connection.cr:13:23 in 'initialize' from lib/pg/src/pg/connection.cr:7:5 in 'new' from lib/pg/src/pg/driver.cr:3:5 in 'build_connection' from lib/db/src/db/database.cr:57:16 in '->' from /usr/share/crystal/src/primitives.cr:266:3 in 'build_resource' from lib/db/src/db/pool.cr:47:34 in 'initialize' from lib/db/src/db/pool.cr:40:5 in 'new:initial_pool_size:max_pool_size:max_idle_pool_size:checkout_timeout:retry_attempts:retry_delay' from lib/db/src/db/database.cr:56:15 in 'initialize' from lib/db/src/db/database.cr:49:5 in 'new' from lib/db/src/db.cr:155:5 in 'build_database' from lib/db/src/db.cr:119:5 in 'open' from /usr/share/crystal/src/kernel.cr:386:3 in '???' from src/invidious.cr:38:1 in '__crystal_main' from /usr/share/crystal/src/crystal/main.cr:110:5 in 'main_user_code' from /usr/share/crystal/src/crystal/main.cr:96:7 in 'main' from /usr/share/crystal/src/crystal/main.cr:119:3 in 'main' from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2' Caused by: Hostname lookup for postgres failed: No address found (Socket::Addrinfo::Error) Same issue for me as well. I removed the invidious image, deleted app data. Setup the config folder as instructed with the config.yaml file Tried localhost and my towers IP address as the host and both get connection refused / not able to connect to the postgres DB. I did find that my default appdata directory is: /mnt/user/docker/appdata/invidious but, the folder I made for the /config was here: /mnt/user/appdata/invidious/ So I updated the template, but unfortunately that did not fix it either. Edited August 20, 2021 by Nesquik Quote Link to comment
Syk0tic Posted August 20, 2021 Share Posted August 20, 2021 The problem is that the invidious container is trying to connect via a dns name (i.e postgres.) By design bro or bridge networks don't have container to container dns. when you create a custom network (i.e proxynet) it enables DNS for that network, there for adding both invidious and postgres to the custom network is why this works for Joshndroid. 1 Quote Link to comment
Nesquik Posted August 20, 2021 Share Posted August 20, 2021 18 minutes ago, Syk0tic said: The problem is that the invidious container is trying to connect via a dns name (i.e postgres.) By design bro or bridge networks don't have container to container dns. when you create a custom network (i.e proxynet) it enables DNS for that network, there for adding both invidious and postgres to the custom network is why this works for Joshndroid. Good Catch- I just changed both of my containers (postgres and invidious) to the LSIO from br0 network and it started right up. Quote Link to comment
Joshndroid Posted August 20, 2021 Author Share Posted August 20, 2021 6 hours ago, Mathervius said: I tried to setup this container today following the new instructions (it failed to work yesterday with the original instructions). Unfortunately, it still has the same error for me as yesterday. Both containers are on my bro.10 network with static IPs. config.yml db: user: kemal password: kemal host: 192.168.20.231 port: 5432 dbname: invidious error from invidious log from lib/db/src/db/database.cr:57:16 in '->' from /usr/share/crystal/src/primitives.cr:266:3 in 'build_resource' from lib/db/src/db/pool.cr:47:34 in 'initialize' from lib/db/src/db/pool.cr:40:5 in 'new:initial_pool_size:max_pool_size:max_idle_pool_size:checkout_timeout:retry_attempts:retry_delay' from lib/db/src/db/database.cr:56:15 in 'initialize' from lib/db/src/db/database.cr:49:5 in 'new' from lib/db/src/db.cr:155:5 in 'build_database' from lib/db/src/db.cr:119:5 in 'open' from /usr/share/crystal/src/kernel.cr:386:3 in '???' from src/invidious.cr:38:1 in '__crystal_main' from /usr/share/crystal/src/crystal/main.cr:110:5 in 'main_user_code' from /usr/share/crystal/src/crystal/main.cr:96:7 in 'main' from /usr/share/crystal/src/crystal/main.cr:119:3 in 'main' from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2' Caused by: Cannot establish connection (PQ::ConnectionError) from lib/pg/src/pq/connection.cr:34:9 in 'initialize' from lib/pg/src/pq/connection.cr:19:5 in 'new' from lib/pg/src/pg/connection.cr:13:23 in 'initialize' from lib/pg/src/pg/connection.cr:7:5 in 'new' from lib/pg/src/pg/driver.cr:3:5 in 'build_connection' from lib/db/src/db/database.cr:57:16 in '->' from /usr/share/crystal/src/primitives.cr:266:3 in 'build_resource' from lib/db/src/db/pool.cr:47:34 in 'initialize' from lib/db/src/db/pool.cr:40:5 in 'new:initial_pool_size:max_pool_size:max_idle_pool_size:checkout_timeout:retry_attempts:retry_delay' from lib/db/src/db/database.cr:56:15 in 'initialize' from lib/db/src/db/database.cr:49:5 in 'new' from lib/db/src/db.cr:155:5 in 'build_database' from lib/db/src/db.cr:119:5 in 'open' from /usr/share/crystal/src/kernel.cr:386:3 in '???' from src/invidious.cr:38:1 in '__crystal_main' from /usr/share/crystal/src/crystal/main.cr:110:5 in 'main_user_code' from /usr/share/crystal/src/crystal/main.cr:96:7 in 'main' from /usr/share/crystal/src/crystal/main.cr:119:3 in 'main' from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2' Caused by: Hostname lookup for postgres failed: No address found (Socket::Addrinfo::Error) Try using a different network that enables container to container DNS as mentioned by @Syk0tic 3 hours ago, Syk0tic said: The problem is that the invidious container is trying to connect via a dns name (i.e postgres.) By design bro or bridge networks don't have container to container dns. when you create a custom network (i.e proxynet) it enables DNS for that network, there for adding both invidious and postgres to the custom network is why this works for Joshndroid. Thanks mate for the insight on the network stuff in unraid 2 hours ago, Nesquik said: Good Catch- I just changed both of my containers (postgres and invidious) to the LSIO from br0 network and it started right up. Good to hear its working! Quote Link to comment
Joshndroid Posted August 20, 2021 Author Share Posted August 20, 2021 7 hours ago, Mathervius said: I tried to setup this container today following the new instructions (it failed to work yesterday with the original instructions). Unfortunately, it still has the same error for me as yesterday. Both containers are on my bro.10 network with static IPs. config.yml db: user: kemal password: kemal host: 192.168.20.231 port: 5432 dbname: invidious error from invidious log from lib/db/src/db/database.cr:57:16 in '->' from /usr/share/crystal/src/primitives.cr:266:3 in 'build_resource' from lib/db/src/db/pool.cr:47:34 in 'initialize' from lib/db/src/db/pool.cr:40:5 in 'new:initial_pool_size:max_pool_size:max_idle_pool_size:checkout_timeout:retry_attempts:retry_delay' from lib/db/src/db/database.cr:56:15 in 'initialize' from lib/db/src/db/database.cr:49:5 in 'new' from lib/db/src/db.cr:155:5 in 'build_database' from lib/db/src/db.cr:119:5 in 'open' from /usr/share/crystal/src/kernel.cr:386:3 in '???' from src/invidious.cr:38:1 in '__crystal_main' from /usr/share/crystal/src/crystal/main.cr:110:5 in 'main_user_code' from /usr/share/crystal/src/crystal/main.cr:96:7 in 'main' from /usr/share/crystal/src/crystal/main.cr:119:3 in 'main' from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2' Caused by: Cannot establish connection (PQ::ConnectionError) from lib/pg/src/pq/connection.cr:34:9 in 'initialize' from lib/pg/src/pq/connection.cr:19:5 in 'new' from lib/pg/src/pg/connection.cr:13:23 in 'initialize' from lib/pg/src/pg/connection.cr:7:5 in 'new' from lib/pg/src/pg/driver.cr:3:5 in 'build_connection' from lib/db/src/db/database.cr:57:16 in '->' from /usr/share/crystal/src/primitives.cr:266:3 in 'build_resource' from lib/db/src/db/pool.cr:47:34 in 'initialize' from lib/db/src/db/pool.cr:40:5 in 'new:initial_pool_size:max_pool_size:max_idle_pool_size:checkout_timeout:retry_attempts:retry_delay' from lib/db/src/db/database.cr:56:15 in 'initialize' from lib/db/src/db/database.cr:49:5 in 'new' from lib/db/src/db.cr:155:5 in 'build_database' from lib/db/src/db.cr:119:5 in 'open' from /usr/share/crystal/src/kernel.cr:386:3 in '???' from src/invidious.cr:38:1 in '__crystal_main' from /usr/share/crystal/src/crystal/main.cr:110:5 in 'main_user_code' from /usr/share/crystal/src/crystal/main.cr:96:7 in 'main' from /usr/share/crystal/src/crystal/main.cr:119:3 in 'main' from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2' Caused by: Hostname lookup for postgres failed: No address found (Socket::Addrinfo::Error) 3 hours ago, Nesquik said: Good Catch- I just changed both of my containers (postgres and invidious) to the LSIO from br0 network and it started right up. If you want to use this docker container using the br0 network based on the information i gleaned from above you will need to create a local custom DNS entry pointing to your database. I use pi-hole on my network so I was able to easily set 'postgres' to the database IP and it starts straight back up. If your wanting to use 'bridge' i was unable to get that working as yet, i will have another look at that later. Quote Link to comment
Joshndroid Posted August 20, 2021 Author Share Posted August 20, 2021 I have made further update to the Invidious setup post regarding network choices based on the above. At this time I can only recommend a br0 network type (and loosely host network) as well as the use of a custom network as I have both of these methods working. Check the setup post for the network note and potential further setup involved. Quote Link to comment
Syk0tic Posted August 20, 2021 Share Posted August 20, 2021 59 minutes ago, Joshndroid said: Thanks mate for the insight on the network stuff in unraid I have to thank you as well! I tried and failed to deploy from their instructions a few times but I don’t think I realized how hard coded the db info was. Glad I could give something back. Cheers! Quote Link to comment
Nesquik Posted August 20, 2021 Share Posted August 20, 2021 Thanks Josh! I will keep it on the LSIO network since I am going to put it behind the reverse proxy. Do most of the features work? I don't think I could get it to login. My goal is to get my YouTube subscriptions loaded. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.