Skip to content

Install SickGear [801] NGiNX

SickGear edited this page Feb 25, 2023 · 1 revision

NGiNX configuration of Sickgear as a subsite to an existing server

2023 May 28

Unsure if this advanced guide still works. Someone reported having an issue but didn't stick around in IRC. If you find an issue, please contribute a solution. If you find no issue, please let us know via an issue so that this notice can be deleted.


  1. In your server block, add the following location: Substitute the correct value for web_host, port, and web_root that is set in SickGear's config.ini
location /sickgear {
   proxy_pass http://web_host:port/web_root;
   proxy_set_header Host $host; 
   proxy_set_header X-Real-IP $remote_addr;
   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
   access_log /var/log/nginx/sickgear.access.log; # optional; if not set, accesses will appear in the main NGiNX log
   error_log /var/log/nginx/sickgear.error.log; # optional; if not set, errors will appear in the main NGiNX error log
}
  1. Save the NGiNX config and restart NGiNX.

  2. In your running SickGear instance,

  • Enable the checkbox for General/Interface/Web Interface/Reverse proxy headers
  • Shut down SickGear.
  1. Edit config.ini in your favorite editor and update the following lines:
  • web_host=0.0.0.0 # optional, you can also specify a specific IP from this box. All 0's allow SG to be reached from all IPs on this box
  • web_root="sickgear" # make sure this matches the suffix used in proxy_pass in your NGiNX config
  1. Then update web_root in \autoProcessTV\autoProcessTV.cfg to match both proxy_pass in the NGiNX config and web_root in the config.ini

  2. Start SickGear back up and remember to access it with the new suffix!

Example of a completed setup

Where SickGear previously ran on http://raspberrypi:8081 and NGiNX is on http://frontend

NGiNX config snippet:

   location /sickgear {
       proxy_pass http://raspberrypi:8081/mysickgear; # use the correct web_host, port, and web_root as set in SickGear's config.ini
       proxy_set_header Host $host; 
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       access_log /var/log/nginx/sickgear.access.log; # optional; if not set, accesses will appear in the main NGiNX log
       error_log /var/log/nginx/sickgear.error.log; # optional; if not set, errors will appear in the main NGiNX error log
   }

SickGear config.ini snippet:

  web_host=0.0.0.0
  web_root="mysickgear"

Now you access SickGear by using the URL http://frontend/sickgear


Contribution from barbequesauce.

Clone this wiki locally