From 7dbd759ce1546acedafbad23f668267615f2ee59 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Sun, 20 Aug 2023 04:30:55 -0600 Subject: add yourls usage --- .../blog/a/jellyfin_server_with_sonarr_radarr.html | 10 +++++----- live/blog/a/mail_server_with_postfix.html | 2 +- live/blog/a/pastebin_alt_with_privatebin.html | 22 ++++++++++++++++------ live/blog/a/torrenting_with_qbittorrent.html | 2 +- live/blog/a/website_with_nginx.html | 4 ++-- 5 files changed, 25 insertions(+), 15 deletions(-) (limited to 'live/blog/a') diff --git a/live/blog/a/jellyfin_server_with_sonarr_radarr.html b/live/blog/a/jellyfin_server_with_sonarr_radarr.html index 3bdcb53..44f0d0a 100644 --- a/live/blog/a/jellyfin_server_with_sonarr_radarr.html +++ b/live/blog/a/jellyfin_server_with_sonarr_radarr.html @@ -334,7 +334,7 @@ systemctl start sonarr.service
Profiles

This is a bit different than with Radarr, the way it is configured is by setting “Release profiles”. I took the profiles from TRaSH: WEB-DL Release profile regex. The only possible change I’ll do is disable the Low Quality Groups and/or the “Golden rule” filter (for x265 encoded video).

For me it ended up looking like this:

-
+
Sonarr: Release profiles
Sonarr: Release profiles
@@ -379,12 +379,12 @@ systemctl start sonarr.service

Once you click on “Add X” it will add it to the Series section and will start as monitored. So far I haven’t noticed that it immediately starts downloading (because of the “Start search for missing episodes” setting) but I always click on unmonitor the series, so I can manually check (again, due to the low quality of my indexers).

When it automatically starts to download an episode/season it will send it to qBitTorrent and you can monitor it over there. Else you can also monitor at Activity -> Queue. Same thing goes if you download manually each episode/season via the interactive search.

To interactively search episodes/seasons go to Series and then click on any series, then click either on the interactive search button for the episode or the season, it is an icon of a person as shown below:

-
+
Sonarr: Interactive search button
Sonarr: Interactive search button

Then it will bring a window with the search results, where it shows the indexer it got the result from, the size of the torrent, peers, language, quality, the score it received from the configured release profiles an alert in case that the torrent is “bad” and the download button to manually download the torrent you want. An example shown below:

-
+
Sonarr: Interactive search results
Sonarr: Interactive search results
@@ -479,12 +479,12 @@ systemctl start jellyfin.service

The initial setup wizard makes you create an user (will be the admin for now) and at least one library, though these can be done later. For more check Jellyfin: Quick start.

Remember to use the configured directory as mentioned in Directory structure. Any other configuration (like adding users or libraries) can be done at the dashboard: click on the 3 horizontal lines on the top left of the Web UI then navigate to Administration -> Dashboard. I didn’t configure much other than adding a couple of users for me and friends, I wouldn’t recommend using the admin account to watch (personal preference).

Once there is at least one library it will show at Home along with the latest movies (if any) similar to the following (don’t judge, these are just the latest I added due to friend’s requests):

-
+
Jellyfin: Home libraries
Jellyfin: Home libraries

And inside the “Movies” library you can see the whole catalog where you can filter or just scroll as well as seeing Suggestions (I think this starts getting populated after a while) and Genres:

-
+
Jellyfin: Library catalog options
Jellyfin: Library catalog options
diff --git a/live/blog/a/mail_server_with_postfix.html b/live/blog/a/mail_server_with_postfix.html index 0540673..defe607 100644 --- a/live/blog/a/mail_server_with_postfix.html +++ b/live/blog/a/mail_server_with_postfix.html @@ -453,7 +453,7 @@ systemctl enable spamassassin.service
  • Password: your user password (as in the password you use to login to the server with that user)
  • All that’s left to do is test your mail server for spoofing, and to see if everything is setup correctly. Go to DKIM Test and follow the instructions (basically click next, and send an email with whatever content to the email that they provide). After you send the email, you should see something like:

    -
    +
    DKIM Test successful
    DKIM Test successful
    diff --git a/live/blog/a/pastebin_alt_with_privatebin.html b/live/blog/a/pastebin_alt_with_privatebin.html index a511a41..85f05cf 100644 --- a/live/blog/a/pastebin_alt_with_privatebin.html +++ b/live/blog/a/pastebin_alt_with_privatebin.html @@ -110,6 +110,7 @@
  • SSL certificate
  • +
  • Usage
  • PrivateBin
      @@ -218,20 +219,20 @@ extension=mysqli

      Create a new user and database as described in MariaDB: Create users/databases.

      Configuration

      -

      The default configuration file is self explanatory, it is located at /etc/webapps/yourls/config.php.

      -

      Set the user/database YOURLS will use and either create a cookie or get one from URL provided. It is important to change the $yours_user_passwords variable, YOURLS will hash the passwords on login so it is not stored in plaintext. Password hashing can be disabled with:

      +

      The default configuration file is self explanatory, it is located at /etc/webapps/yourls/config.php. Make sure to correctly set the user/database YOURLS will use and either create a cookie or get one from URL provided.

      +

      It is important to change the $yours_user_passwords variable, YOURLS will hash the passwords on login so it is not stored in plaintext. Password hashing can be disabled with:

      define( 'YOURLS_NO_HASH_PASSWORD', true );
       

      I also changed the “shortening method” to 62 to include more characters:

      define( 'YOURLS_URL_CONVERT', 62 );
       
      -

      Lastly, the $yourls_reserved_URL variable will need more blacklisted words depending on the use-case. YOURLS_SITE needs to match whatever is set in nginx.

      +

      The $yourls_reserved_URL variable will need more blacklisted words depending on the use-case. Make sure the YOURLS_PRIVATE variable is set to true (default) if the service will be exposed to the public.

      Nginx

      Create a yourls.conf at the usual sites-<available/enabled> path for nginx:

      server {
           listen 80;
           root /usr/share/webapps/yourls/;
      -    server_name short.yourdomain.com;
      +    server_name short.example.com;
           index index.php;
       
           location / {
      @@ -251,6 +252,15 @@ extension=mysqli
       

      Restart the nginx service for changes to take effect:

      systemctl restart nginx.service
       
      +

      Usage

      +

      The admin area is located at https://short.example.com/admin/, login with any of the configured users set with the $yours_user_passwords in the config. Activate plugins by going to the “Manage Plugins” page (located at the top left) and clicking in the respective “Activate” button by hovering the “Actin” column, as shown below:

      +
      +YOURLS: Activate plugin +
      YOURLS: Activate plugin
      +
      +

      I personally activated the “Random ShortURLs” and “Allow Hyphens in Short URLs”. Once the “Random ShortURLs” plugin is activated it can be configured by going to the “Random ShortURLs Settings” page (located at the top left, right below “Manage Plugins”), only config available is “Random Keyword Length”.

      +

      The main admin area can be used to manually shorten any link provided, by using the automatic shortening or by providing a custom short URL.

      +

      Finally, the “Tools” page (located at the top left) conains the signature token, used for YOURLS: Passwordless API as well as useful bookmarklets for URL shortening while browsing.

      PrivateBin

      PrivateBin is a minimalist self-hosted alternative to pastebin.

      Install from the AUR with yay:

      @@ -300,7 +310,7 @@ opt[12] = true ; PDO::ATTR_PERSISTENT
      server {
           listen 80;
           root //usr/share/webapps/privatebin/;
      -    server_name bin.yourdomain.com;
      +    server_name bin.example.com;
           index index.php;
       
           if ($pastebin_badagent) {
      @@ -344,7 +354,7 @@ opt[12] = true    ; PDO::ATTR_PERSISTENT
         

      And that’s it, at this point you can already look at the default initial page of Nginx if you enter the IP of your server in a web browser. You should see something like this:

      -
      +
      Nginx welcome page
      Nginx welcome page
      @@ -187,7 +187,7 @@ cd sites-available systemctl restart nginx

      If everything goes correctly, you can now go to your website by typing domain.name on a web browser. But you will see a “404 Not Found” page like the following (maybe with different Nginx version):

      -
      +
      Nginx 404 Not Found page
      Nginx 404 Not Found page
      -- cgit v1.2.3-70-g09d2