Kodi is still relevent
Today we will install nginx for our local web server to host all over media hosted on our NAS/local-drive and to view it on kodi on any device ANY DEVICE. If you have a browser you can see all the NAS content or if you want cheeky artwork like you see on netflix then just install kodi on any device.
Mobile
WebOS
Firestick
or whatever that runs kodi.
My setup
I have proxmox so i created Alpine linux with docker compose container with few containers within it.
But you can have any machine with docker compose installed.
Create folder
I have named it nginxformedia or you can name it anything.
Note down your local ip address for kodi or just viewing the files from our NAS or local drive and then go into folder
1
2
3
ip a
mkdir mginxformedia
cd nginxformedia
Create docker compose file
Copy yaml provided:
- Here we will install nginx to show all files in our local network.
- Filebrowser to easily navigate and make and edit files as Alpine-linux is CLI only.
- Transmission our lovely torrent downloader for downloading everything.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
services:
nginx:
container_name: nginx
image: nginx:latest
ports:
- "9999:80"
volumes:
- ./nginxformedia:/config
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- /data/media:/data/media:ro
restart: unless-stopped
filebrowser:
container_name: filebrowser
image: filebrowser/filebrowser:latest
restart: unless-stopped
ports:
- 8080:80
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Stockholm
- FB_NOAUTH=true
volumes:
- ./filebrowser:/config
- /:/srv
transmission:
container_name: transmission
image: linuxserver/transmission:latest
restart: unless-stopped
ports:
- 9091:9091
- 51413:51413
- 51413:51413/udp
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Stockholm
volumes:
- ./transmission:/config
- /data/media:/data/torrents:rw
Now you can see all the data is on /data/media and is connected to your torrent client.
Now make another file in the same folder where you will save docker-compose.yaml file and name it nginx.conf.
Nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
events {}
http {
include /etc/nginx/mime.types;
server {
listen 80 default_server;
server_name localhost;
root /data/media;
# index index.html index.htm;
location / {
autoindex on;
}
}
}
Install Kodi
Install kodi on your TV or Mobile or Tablet anywhere - where you want.
Configuring kodi
- Go to gear icon/settings icon on right side under kodi
- Click Media under settings
- Click Videos
- Add video source
- Browse
- Add Network Location
- In Protocol - change it to Web server directory(http)
- Put the IP address that you saved previous from Step “Create folder”
- Change Port number to 9999
- Press OK
- Now your IP address will show in the same list - Click that to check
- Give the connect a name to easily troubleshoot for later if anything happens
- Set content can be Movies if you have downloaded movies from torrent.
- Activate Movies are under separate folders and finally press OK
- Refresh the Indo in Path - press yes
Now go back to homepage and see movies artwork like netflix.
Dont download in x265 as it is not supported by most TVs. Use x264 or mkv
Transmission can be accessed from same IP as your nginx and port 9091