Nginx Cheat Sheet

broken image


Unraid Cheat Sheet - Plex, Sonarr, Radarr, Home Assistant, Tautulli, VPN, Deluge, Jackett, Nginx. Linux/Unix Command Line Cheat Sheet. It provides a set of essential commands with a detailed description of how to do it. Linux Cheat Sheet. It gives general commands instruction on logging on to the Linux server, copying files to and from the server, directory commands, working with modules and programs, etc.

Results

Watchman

Watchman exists to watch files and record when they change. It can also trigger actions (such as rebuilding assets) when matching files change.

Rollup.Js

Rollup Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application.

Bluebird.Js

Sheet

Bluebird is a fully-featured Promise library for JavaScript. The strongest feature of Bluebird is that it allows you to 'promisify' other Node modules in order to use them asynchronously. Promisify is a concept applied to callback functions.

Flow

Flow is a static type checker for your JavaScript code. It does a lot of work to make you more productive. Making you code faster, smarter, more confidently, and to a bigger scale.

Node.Js Api

Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.

C Preprocessor

Quick reference for the C macro preprocessor, which can be used independent of C/C++.

Sass

Sass is a preprocessor scripting language that is interpreted or compiled into Cascading Style Sheets. SassScript is the scripting language itself. Sass consists of two syntaxes.

Nginx Cheat Sheet

Activeadmin

Sheet

Active Admin is a Ruby on Rails plugin for generating administration style interfaces. It abstracts common business application patterns to make it simple for developers to implement beautiful and elegant interfaces with very little effort.

Fetch

The Fetch standard defines requests, responses, and the process that binds them: fetching.

Httpie

$ http POST http://example.com name='John' Host:example.com — JSON, cookies, files, auth, and other httpie examples.

135
  • Setup notes

Helpful Commands

Check if a parity operation is in-progress

Check the status of a parity operation. Wait for % complete is mdResyncPos/mdResyncSize.

  • https://www.youtube.com/channel/UCZDfnUn74N0WeAPvMqTOrtA/videos - Very good tutorials on just about every unraid topic.

Setup Community Applications

This will allow you to search and install applications (plugins and docker containers).

  • Click the Plugins tab
  • Click the Install a plugin tab
  • Add this URL: https://raw.githubusercontent.com/Squidly271/community.applications/master/plugins/community.applications.plg
  • Click install

VPN Setup

VPN Certificates

Create a share named vpn. Make it private so only you can read it.Next, download your VPN certs from your VPN provider's website and do the following:

  • Copy the following into that share: ca.crt, .crt, .key, ta.key, and one of the ovpn file you want to use
  • Rename the ovpn file to vpn.conf
  • Edit the vpn.conf file and put the full path where it references the certs. /vpn/ca.crt, etc..

VPN Container

  • Click the docker tab
  • Click Add container
  • Name: vpn
  • Repository: dperson/openvpn-client
  • Privileged: On
  • Path: /mnt/user/vpn/ -> Container Path: /vpn
  • Extra Parameters: --cap-add=NET_ADMIN --dns=8.8.8.8 --sysctl net.ipv6.conf.all.disable_ipv6=0
  • Container Device: /dev/net/tun
  • Variable:
    • Name: FIREWALL
    • Value: true
  • Click Apply

Go to the docker tab. Look at the last column on the right for the VPN container, look at the logs, make sure things are OK. Should say 'Initialization Sequence Completed'. May take 5 minutes or more to complete.

Deluge

First setup Deluge.

  • Go to 'Apps' tab and search for 'Deluge' and add it. I use captinsano/deluge
  • Name: Deluge
  • Extra Parameters: --net='container:vpn'
  • Network Type: None
  • Privileged: Off
  • Add your paths for the media

NOTE:Prior to Unraid 6.8 you'd add --net='container:vpn' as an 'extra parameter'. With Unraid 6.8, that broke. For 6.8, as of now until there's a better solution, open the console and type the following

Nginx Cheat Sheet
Now (You'll probably need to reload the UI to get this to show up) in the Network Type drop down, select the network you just created, which is container:vpn

The above configures Deluge but you won't be able to reach the web UI since the network type is set to 'none'. To reach it, we'll create a proxy with nginx, see the next section

nginx

Go to 'Apps' tab and search for 'nginx' and add it. I use linuxserver/nginx. Enter these settings:

  • Name: nginx
  • Repository: dperson/nginx
  • Extra Parameters: --link vpn:deluge -p 8112:8112
  • Network Type: Bridge
  • Host Port 1: 8080
  • Host Port 2: 8443
  • AppData Config Path: /mnt/user/appdata/nginx

In the /mnt/user/appdata/nginx, edit the nginx configuration file as needed. Here's mine, which includes a proxy_pass for deluge.

Now you can reach the Deluge web UI by going to http://:8112/

Home Assistant

This will get Home Assistant running with a Z-Wave USB stick.

  • Go to apps, install home-assistant
  • Network type: Host
  • Extra Parameters: select device
    • Name: ttyACM0
    • Value: /dev/ttyACM0
  • Privileged: On
  • Start the container.

Now edit the file /mnt/user/appdata/home-assistant/configuration.yaml and add the following two lines and then restart Home Assistant.

Jackett

  • Got to apps and search for linuxserver/jackett
  • Name: Jackett
  • Network Type: Bridge
  • Privileged: off
  • Host Port 1: 9117
  • Host Path 2: /mnt/user/media/downloads/

Plex Media Server

  • Go to apps and search for PlexMediaServer. I used the one from limetech/plex
  • Name PlexMediaServer
  • Network Type: Host
  • Privileged: on
  • Add a container path variable: /mnt/user/media/

Tip: You might want to hook up PlexTraktSync to sync your watched state to Trakt. Mobile mouse remote.

Tautulli

  • Go to apps and search for tautulli. I use the one from linuxserver/tautulli
  • Name: Tautulli
  • Network Type: Bridge
  • Host Port 1: 8181
  • Host Path 1: /logs

Sonarr

  • Go to apps and search for sonarr. I use the one from linuxserver/sonarr
  • Name: Sonarr
  • Network Type: Bridge
  • Privileged: Off
  • Host Port 1: 8989

Nginx Cheat Sheet

Radarr

Nginx Security Cheat Sheet

Nginx Cheat Sheet

Bluebird is a fully-featured Promise library for JavaScript. The strongest feature of Bluebird is that it allows you to 'promisify' other Node modules in order to use them asynchronously. Promisify is a concept applied to callback functions.

Flow

Flow is a static type checker for your JavaScript code. It does a lot of work to make you more productive. Making you code faster, smarter, more confidently, and to a bigger scale.

Node.Js Api

Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.

C Preprocessor

Quick reference for the C macro preprocessor, which can be used independent of C/C++.

Sass

Sass is a preprocessor scripting language that is interpreted or compiled into Cascading Style Sheets. SassScript is the scripting language itself. Sass consists of two syntaxes.

Activeadmin

Active Admin is a Ruby on Rails plugin for generating administration style interfaces. It abstracts common business application patterns to make it simple for developers to implement beautiful and elegant interfaces with very little effort.

Fetch

The Fetch standard defines requests, responses, and the process that binds them: fetching.

Httpie

$ http POST http://example.com name='John' Host:example.com — JSON, cookies, files, auth, and other httpie examples.

135
  • Setup notes

Helpful Commands

Check if a parity operation is in-progress

Check the status of a parity operation. Wait for % complete is mdResyncPos/mdResyncSize.

  • https://www.youtube.com/channel/UCZDfnUn74N0WeAPvMqTOrtA/videos - Very good tutorials on just about every unraid topic.

Setup Community Applications

This will allow you to search and install applications (plugins and docker containers).

  • Click the Plugins tab
  • Click the Install a plugin tab
  • Add this URL: https://raw.githubusercontent.com/Squidly271/community.applications/master/plugins/community.applications.plg
  • Click install

VPN Setup

VPN Certificates

Create a share named vpn. Make it private so only you can read it.Next, download your VPN certs from your VPN provider's website and do the following:

  • Copy the following into that share: ca.crt, .crt, .key, ta.key, and one of the ovpn file you want to use
  • Rename the ovpn file to vpn.conf
  • Edit the vpn.conf file and put the full path where it references the certs. /vpn/ca.crt, etc..

VPN Container

  • Click the docker tab
  • Click Add container
  • Name: vpn
  • Repository: dperson/openvpn-client
  • Privileged: On
  • Path: /mnt/user/vpn/ -> Container Path: /vpn
  • Extra Parameters: --cap-add=NET_ADMIN --dns=8.8.8.8 --sysctl net.ipv6.conf.all.disable_ipv6=0
  • Container Device: /dev/net/tun
  • Variable:
    • Name: FIREWALL
    • Value: true
  • Click Apply

Go to the docker tab. Look at the last column on the right for the VPN container, look at the logs, make sure things are OK. Should say 'Initialization Sequence Completed'. May take 5 minutes or more to complete.

Deluge

First setup Deluge.

  • Go to 'Apps' tab and search for 'Deluge' and add it. I use captinsano/deluge
  • Name: Deluge
  • Extra Parameters: --net='container:vpn'
  • Network Type: None
  • Privileged: Off
  • Add your paths for the media

NOTE:Prior to Unraid 6.8 you'd add --net='container:vpn' as an 'extra parameter'. With Unraid 6.8, that broke. For 6.8, as of now until there's a better solution, open the console and type the following

Now (You'll probably need to reload the UI to get this to show up) in the Network Type drop down, select the network you just created, which is container:vpn

The above configures Deluge but you won't be able to reach the web UI since the network type is set to 'none'. To reach it, we'll create a proxy with nginx, see the next section

nginx

Go to 'Apps' tab and search for 'nginx' and add it. I use linuxserver/nginx. Enter these settings:

  • Name: nginx
  • Repository: dperson/nginx
  • Extra Parameters: --link vpn:deluge -p 8112:8112
  • Network Type: Bridge
  • Host Port 1: 8080
  • Host Port 2: 8443
  • AppData Config Path: /mnt/user/appdata/nginx

In the /mnt/user/appdata/nginx, edit the nginx configuration file as needed. Here's mine, which includes a proxy_pass for deluge.

Now you can reach the Deluge web UI by going to http://:8112/

Home Assistant

This will get Home Assistant running with a Z-Wave USB stick.

  • Go to apps, install home-assistant
  • Network type: Host
  • Extra Parameters: select device
    • Name: ttyACM0
    • Value: /dev/ttyACM0
  • Privileged: On
  • Start the container.

Now edit the file /mnt/user/appdata/home-assistant/configuration.yaml and add the following two lines and then restart Home Assistant.

Jackett

  • Got to apps and search for linuxserver/jackett
  • Name: Jackett
  • Network Type: Bridge
  • Privileged: off
  • Host Port 1: 9117
  • Host Path 2: /mnt/user/media/downloads/

Plex Media Server

  • Go to apps and search for PlexMediaServer. I used the one from limetech/plex
  • Name PlexMediaServer
  • Network Type: Host
  • Privileged: on
  • Add a container path variable: /mnt/user/media/

Tip: You might want to hook up PlexTraktSync to sync your watched state to Trakt. Mobile mouse remote.

Tautulli

  • Go to apps and search for tautulli. I use the one from linuxserver/tautulli
  • Name: Tautulli
  • Network Type: Bridge
  • Host Port 1: 8181
  • Host Path 1: /logs

Sonarr

  • Go to apps and search for sonarr. I use the one from linuxserver/sonarr
  • Name: Sonarr
  • Network Type: Bridge
  • Privileged: Off
  • Host Port 1: 8989

Nginx Cheat Sheet

Radarr

Nginx Security Cheat Sheet

Nginx Commands Cheat Sheet

  • Go to apps and search for radarr. I use the one from linuxserver/radarr
  • Name: Radarr
  • Network Type: Bridge
  • Privileged: Off
  • Host Port 1: 7878




broken image