 So we're going to talk about NextCloud on FreeNAS, specifically on the FreeNAS MiniXL Plus. I happen to still have it. I haven't had to send it back just yet to the folks over at FreeNAS and IAX Systems, so I'm doing a couple more videos on it. So the NextCloud plugin is really cool. So if you're going, hey, I like the features I get with things like, you know, Google Drive or Microsoft, but I don't want that proprietary-ness. I want to be able to use something open source and host it myself. NextCloud is a pretty awesome project for that. So, yes, it's a fork of own cloud. And I'm bringing that up because a lot of people will start doing the comparisons of should I use own cloud or should I use NextCloud? And let me settle that debate real quick for you. The CEO who started own cloud has a presentation called Why I Forked My Own Company and Project. I will leave that video for you to make the decision which one you should use. I prefer NextCloud. And NextCloud, to give it a summary rather than the PR that is on their website, NextCloud is a suite of client server software for creating file hosting services. NextCloud application functionality is similar to Dropbox. Unlike Dropbox, NextCloud does not offer off-premise storage file hosting. NextCloud is free and open source. So essentially what you're doing is you're hosting a similar system to Dropbox. Or as I mentioned, Google Drive and OneDrive also have a similar functionality. And it's got a ton of plugins. And I'm not going to dive deep into all of its features. I just want to cover how to get it going on freelance so you can start playing with it. Now, we're going to go through how to create the dataset and we'll create the plugins. Well, install the plugin and really create it. So, we'll go here to available plugins and we'll type NextCloud. And we're going to go ahead and install. I leave all my stuff at DHCP. I've mentioned this before. The reason I do that is that way I can have my firewall hand out addresses and I know where everything's at and I manage it via the firewall. So, I'll just let it create an address and then you can restart it once you've decided to assign that address to the system. Now, when it does the install, it's going to go ahead and download and set up all the plugin for you. But almost, not completely set it up, almost set it up. And that's why I want to do a video on this because there's a few steps that do need to be done when you get this going and selling the packages. We'll fast forward to this though. Because once the plugin is done, hey, look, plugin installed successfully. That's what we're looking for. And here's the admin portal and all kinds of fun stuff. Yep. All right. Everything's good and running. It doesn't seem to have any errors in there. So, we'll hit close. So, the NextCloud plugin is installed, status up. The IP address it got was 192.1683.188. Go ahead and click the three dots over here and we're going to hit management. And we're prompted with username password to create the admin account. We have the location of the data where the data folder stored. But we need a database user, database password, database name. Those are important aspects that we have to go get. And we're going to cover that. But before we get into that, we're going to have to create a data set to store all the data. So, let's go ahead and we'll just close this because I don't need to open right now. And we're going to stop the plugin. Because you want the plugins not running when you map the storage to them. So, wait for the plugin to stop. Then we're going to go over here to storage pools. And let's add a data set. We'll call it NextCloudStorage. Next, she spelled right. Cloud storage. Data set. Save. Now, we got to set some permissions on it. So, it doesn't complain. And I'm not going to get too advanced. I'm just going to set the basics here. But we're going to go ahead and click the three dots. Go to edit permissions. www. Uncheck the other. You can leave the group permissions on. But uncheck the other permissions. Apply recursive leaders. Nothing in here. But we'll go ahead and say yes. All right. So, now we have the data set. How do we map data in here? This is where a lot of people get stuck is understanding how the jails map data. So, mount points. Jails are nested within FreeNAS. So, when you're inside of a jail, picture it as any other operating system running. It shares the kernel with FreeNAS. But it doesn't share the same base of the file system. In the Linux or Unix world, it is slash is where the forward slash is the base of it. But the base where you see forward slash inside of a jail is actually already several directories deep into FreeNAS. So, we have to do is go here. We're going to add a mount point. And the source, because this is inside the FreeNAS, that's what the source is, is going to be mount slash mnt. So, we're starting with slash and we go to mnt, then we go to tank, then we go to next cloud storage destination. It starts nested in here. So, slash mnt slash tank slash iok slash jail slash next cloud slash root. Now, this is not root, there's actually two roots root as in the root user and root of the jail. So, there's the root of the jail. And if you remember from while looking at the management, and I put it in my notes here, this is where it's located. This is the default spot for the data user local www next cloud data. And we can customize that. But you'll see when we go back to it, I just put this in my notes here. So, we'll go here, user is here, local www next cloud. And we need to find the data folder. There we go. There's the data folder, save. Oh, destination directory must be empty. That's an important aspect on there. So, let's just call it something like data two, we'll actually just create a folder there. There's different ways to do this. But what we have to do is call it data. Well, make sure we'll call it next cloud data. And it'll create this folder, but it's really important that we know this. So, let me go over here, because this is kind of small to read. This is the default location inside the jail. If we do it here, and call it next cloud data. So, you notice how this is the full path. But inside of, we'll start here. That's what it's going to be inside of next cloud. So, this is what it was. And we're just adding another folder on there. It solves the problem of the folder not being empty. We can change it. There's different ways to do it. The other way to do it was actually delete the data that's in folder. It just creates a, I believe, a .htx file that gets recreated when you move the data in there. So, I could just do it this way, or I could go and log into the jail and remove that data. So, let's go over here. And it save, it'll auto create that folder. Alright, that folder is created. So, the source inside a free NAS destination inside the jail, where these two folders are just being mirrored, essentially. So, it's saying take this folder, take such next cloud storage and map it to this. Now, this is why jails are important. It's because the jail, because you implicitly allow it only certain folders and certain access. This is how the jail is kept from if someone were to break into one of these jails. Breaking in a jail sounds odd, but you don't want to break in the jail because then you can get out of the jail. But you're jailing it, essentially, to not allow it to traverse the rest of the file system. The jail can only traverse the data by which you map inside of it. Alright, now that we've got that done, we're going to go here to the plugins. We're going to go look at the installed plugins again, and we're going to start it. Alright, now it started, and we're going to go back over here to management. Now, we have to get that information and fill it in. So, how do we get that data? Well, first thing we're going to do is, as we said here, we're not going to call it next cloud data, next cloud slash data, we're calling it next cloud slash and this cloud data. So, we're going to go ahead and take this folder, change it. So, now it matches. So, that part's done. Now we got to get this database username password. This is pretty easy, but might feel complicated. So, we're going to SSH into not the jail, but instead into FreeNAS. So, root at 192.168.3.197. Now, there's actually more than one way to do this. You could open up the jail, open up a terminal jail and get it as well. I just like doing it this way. Tank, IO, oops, IO cage, jails, next cloud, root, oops, root. So, I'm inside the jail. So, I'm logged into FreeNAS, but then going all the way into here. And what there is is a script that was run. So, it says post install dot SH. And part of the reason we're in here is it's just easy to copy and paste from a terminal when you SSH into FreeNAS. And of course, you have to have SSH turned on. But we have the details. So, we're going to just cat, plug in info. We could also type vi and go into it. But all we're doing is dumping it to the screen. So, the database name, next cloud, dbadmin. And there's the password it created for us. And this was done on the install of it automatically. So, now here's all that data. So, the database name dbadmin is the user. And then this fun password right here. And obviously, you don't want to type it. Copy, paste is way better. Now, I will show real quick the alternative way of doing it is go over here to the jails. And you can open a shell right here in the jail. And we're going to go to CD slash root. And we can do the same thing. We can go cat, plug in info. And it's on the screen here. I think can I copy paste? Maybe. Sort. Control C kills the foreground process. So, that's not how we copy. Anyways, you can see that sometimes the channels are copying and pasting and typing that would be a pain. But maybe there's a way to copy and paste. I'm just not aware of inside here. But I'm not going to get into that. But you can also notice when you shall open a shell inside the jail, we go speed CD slash or do LS. And we look at folders like MNT. Notice there's no tank or anything like that. That's because of that nesting I talked about. But we're going to go ahead and close this and start populating the data. We're just going to copy paste this data in here. So, create a user called Tom. Give it a fun password. I had a nice long pattern, longer complicated password I set somewhere else. Then we're going to do these things here. So, it's next cloud is the database name. It's kind of out of order here. dbadmin. It's a database user. And then here's the password. And view it is to make sure it's the same one. And remember we changed this already because we called it next cloud data instead of just data and finished setup. Let's see if we have any errors and see if I did this right. And we'll just fast forward to the setup part. If you want to know what it's doing, you can see it's pulling some processing power right here to set up the next cloud. So, you can see it's using some CPU. It's doing all the configuring, the database and building it. And it's done. Depending on how fast your processor and things are, it's going to take some time on there. And it's going to load some default things into next cloud. So, it's got some photos, some documents. Looks like you can probably change the, yeah, okay, grid view. We got a cute squirrel in here. The next cloud team, hummingbird, nice photo of some water, some rocks. But that's it for getting it set up. It's now configured. Now, a couple of things I want to note. Real specifically here, I created the user and it's working. And now we can start loading the plugins and everything else on here. But please note about the not secure by default when it installs inside of FreeNAS. It does not open up all the SSL to it. That is a completely separate config that you have to do on your own. A lot of people put proxies in front of this. So, if you can leave it running, because once you start modifying the config, if you update the jail, some of your modifications may get overwritten. Therefore, one of the ways, and this will be a completely separate video, is putting a proxy in front of it. But remember, the communication between the proxy and this is going to be unencrypted. So, make sure that's done on a private network or however you want to configure that. But one of the things that might be a good idea is putting something proxy that runs Let's Encrypt right in front of this. And then that could act as a way to get all the Let's Encrypt and the cert bot and everything going as a separate proxy because the default config inside of FreeNAS, as of right now in August of 2019, is non-SSL. But you can see it works perfectly fine. You can start file syncing with it and everything else. But it's just this web interface, like I said, that you can't just switch it doesn't even open up the SSL port. So, if I were to open up HTTPS to this, not be reached, connection refused, because it does not have it. Now, under the hood, it is running engine X. So, you can go through and start editing engine X and adding your own self-signed SSL cert, like I said, goes beyond the scope of this video. But there are options for doing that. Well, that's it for getting started with NextCloud. It is an awesome project. It is actively developed. There are so many features on here. It goes, like I said, well beyond the scope of this, but you can do some digging and find a lot of things that you may want to be doing with NextCloud and all kinds of plugins and add-ons and everything else. So, but the first thing that's required is to get it installed. And that's what this video is about. Just getting it installed, getting it set up so you can start your journey into playing with NextCloud. And thanks. Leave your questions, comments, concerns below or carry on the conversation over in our forums. Thanks for watching. If you liked this video, give it a thumbs up. If you want to subscribe to this channel to see more content, hit that subscribe button and the bell icon, and maybe YouTube will send you a notice when we post. If you want to hire us for a project that you've seen or discussed in this video, head over to launchsystems.com where we offer both business IT services and consulting services and are excited to help you with whatever project you want to throw at us. Also, if you want to carry on the discussion further, head over to forums.lornsystems.com where we can keep the conversation going. And if you want to help the channel out in other ways, we offer affiliate links below, which offer discounts for you and a small cut for us that does help fund this channel. And once again, thanks again for watching this video and see you next time.