Accessing the NAS storage files from a website?

hotsaucebg3

Cadet
Joined
Nov 7, 2020
Messages
2
Hello. I'm currently building new website where users can watch TV show series online.
I have a home server and installed TrueNAS on it, and it is working good.
What I want to do, is to connect the NAS storage to the web server somehow (so the web server can access my NAS server files directly). The NAS server will only be accessible by the web server's IP address(and also locally lol).

Can I get some general guidelines how can I do that?
Ideally, I want to be able to retrieve the video via an URL, lets say for example 65.104.23.15/nas_storage/episodes/ep1.mkv, then I will load that up in the web video player.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
FreeNAS, by default, is not set up to be exposed outside your network. If you use a system like Plex to manage your media, you can allow people to watch your content by sharing through Plex. If course, that means they need to register an account with Plex in order for you to share your content with them.

However, if you want to manage all this yourself, you can do what you want by setting up a reverse proxy. Details for this are outside the scope of this forum.
 

no_connection

Patron
Joined
Dec 15, 2013
Messages
480
Can't you mount network share as a folder on the web server? Even inside www folder for example. Assuming it runs Linux.
It really depends on how you run the web server and how you run the NAS.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Nextcloud is great at that and you can even watch the videos right away in your browser without downloading them first.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Can't you mount network share as a folder on the web server? Even inside www folder for example. Assuming it runs Linux.
It really depends on how you run the web server and how you run the NAS.
I suppose so. As long as you know how to secure your system. That's what reverse proxies are for...
Nextcloud is great at that and you can even watch the videos right away in your browser without downloading them first.
I have no experience in using Nextcloud for sharing files outside of an organization, so I cannot comment. However, I don't think it would be nearly as convenient as using something like Plex - which has this capability baked in. Not to mention that Plex runs on just about any device. But then again, I like Plex.
 

hotsaucebg3

Cadet
Joined
Nov 7, 2020
Messages
2
Thanks for the replies!
@no_connection I have ended up using ubuntu and mounting the hard drives into the apache www folder(I wasn't aware that I can mount a hard drive into a folder, the linux file system is different from windows). So in my case freeNAS was not needed.
Thanks!
 
Top