 Hello today, we are going to be setting up a next cloud server. I have a fresh debian install on a vulture server Vulture is just the VPS. I use you can use you can do this at home or on a virtual server like this But this is a fresh install a debian. It's minimal and we are going to install it Locally natively. I don't know what we'll have to say We're not using any packages like Docker or flat patch or anything like that. There's a lot of tutorials out there I'm doing that. I don't really use those type of things So I want to show you how to set up a patchy set up the database and then install next cloud She'll only take maybe 10 minutes. I have all the notes. So let's go ahead and jump right in over here on The computer I'm gonna not edit any of this There's gonna be a few parts where we have to wait for things to go But I want you to see how long this takes first of all so on the left here We are at the fresh debian install and over on the right. We're at films by chris.com Let's go ahead and go to software here, and then we will click on notes Right here and here you can search through all my notes And I'm just gonna type in next cloud and I'm gonna go to this next cloud install and set up This is the script that we're gonna be following or the commands We're gonna be following there should be a link directly to this in the description of this video So first thing we're gonna do is we're gonna set some variables I'm gonna download next cloud from the website just the zip file The current at the time recording this is 28. I would go there and make sure you have the most current version Right before I recorded this video I was following these notes and I had written them a while ago And it was version 24 and when I went to install it it wasn't compatible with the current PHP modules I had installed so make sure you have the most current here and your devians up to date And I recommend using debian stable because I once tried debian Unstable with next cloud and the the packages were too new for next cloud at that point. Anyway I'm gonna set some variables here just for later on in the script for where we're gonna download from and the Password for our next cloud database. So you're gonna want to You know create your own Password for the database next we're going to update our Package manager our repositories and they're gonna install Apache 2 and Maria database both server and client So I have it set up. I set up a domain name for this Next test to Dot films by Chris so the sub domain. It's not gonna work once you guys see this video I'm gonna remove it after that and as you can see I'm going to it and nothing's happening But Apache is running on the server. So why can't we do this if you're at home? You're gonna have to open up a port on your router. I've in your virtual machine You may need to open up those ports as well. So on vulture. I'm just gonna use IP tables here and this will open up port 80 and port 443 now Theoretically if I come here, there we go debians up and running Okay, going back to our notes here next. We're gonna install some PHP modules We need for next cloud. So we're just gonna install those using our package manager. That should only take a moment and Once that is done, I am then going to use my SQL as route and you're gonna want to you know set up your database Settings, you know set passwords and stuff and we're setting up here for next cloud So what it's gonna do is it's going to go into our next cloud are our this server's my SQL And it's going to create a database called next cloud DB Then it's going to create a user called next cloud or next cloud user And it's going to set that user's password to this. This is not the user you're logging in as this is the Username and password that next cloud itself in the background is going to use to access the database So we're creating that database setting users and we're flushing the privileges Next I'm just going to move into my temp directory and we're going to download Next cloud so we're downloading this zip file here, which again make sure you're using most current ones So you can just take this URL and just cut off the last part to releases and see what the newest version is currently It's twenty eight point zero point two once that is unzipped I have a lot of pseudo commands in here but I am running as root over here just because it's a Brand new machine that doesn't have any users But I'm gonna move into my web directory and then I'm going to unzip that zip file We just downloaded then we're going to recursively change all the permissions for the next cloud Folder to be Www dash Www dash data. That's the Apache web user on and group on your device and then we're also going to change all the permissions on Those files to seven seven five. So that's just permission stuff to make sure everything works Next let's go ahead and set up cert bot So we're going to install cert bot and Python cert bot for Apache Once that's done, we will then run the command now again if you're running this at home and you open up a port You may not be using port 80 when I'm at home here I use a different port to connect to my next cloud server for many reasons But I'm pretty sure cert bot needs port 80 to be open and pointed to this web server So take that into account if you're doing this at home And you have your forwarding ports on the router while setting up cert bot which you'll have to do at least every three months I think you have to research You're gonna have to open up that port 80 on your router and point it to your server. I'm not gonna go over that in this video I actually have a script that runs automatically in a cron job cron job that opens up that port port on the On the router points it to the correct machine runs cert bot and then closes that port So here it's gonna ask you some questions So it's gonna ask for an email address that it will send Information to when it's needed to update. I'm just gonna give it my junk mail account. Feel free to email that account It's my junk mail account. I use it for junk. I won't see anything you send to it Okay, next it's asking If we trust if we agreed to It's Licensing yes next I ask if it's okay if they share your email address or something I'm gonna say no to that and then here it's asking for the domain and in my case again I open I set the domain to Next test to dot films by Chris calm We oops Let me see thought I could I'll just type it out because I don't think it wants the HTTP next test to films by Chris Dot com so that's just where it's going to look It's going to create certificates and try to test them against that domain and that's why you need port 80 open should only take a moment and We're good. We now have SSH installed or sorry HTTPS secure SSL certificates. So now I can go to this server with HTTPS and it should yep so I'm at the same web server with Security enabled which you definitely want when you're running with the next code server This next part of the script is if you don't have a domain name It just gives you your IP address and you can go to it because you can access the next cloud server without Security keys, but you don't want that because everyone will see your traffic. So we should in theory be able to go to next cloud The folder on our servers so that and it actually worked that time earlier when I test it It told me a whole bunch of modules weren't loaded and although I could Enable those modules individually. I have the notes here, you know, if you get that error the easiest thing right there is to just reboot Okay, so now Next class up and running I'm gonna create a user So this is a user going to be logging in as and we will set up a password I don't care what it is at this point But a password you're going to remember It should automatically have the proper folder for next cloud unless you are linking things differently, which some people do next it's asking for your user for the database the password and the user names or the database name Which are all stuff we set in our script here. So if we go back here We're using Next cloud DB is the name of the database. So the database name next We'll look at the user which we set these are all things we set up here when we created the database So I just called next cloud underscore user for the user and this is all stuff That's gonna be running in the background This is not what you're logging in as with next cloud and then the password I set up here Of course, it would be whatever password you do and of course It's gonna be connecting back to the local host meaning when it's doing database stuff It's not going out to the network. It's just doing everything locally. I'll click install It should only take a few moments here, but it's going to set up things. It's going to create this user Using these credentials that will use that password and then it should log us in Now here for some reason it's trying to forward us to next cloud Like the website and I don't know why it does that it may be a glitch in the current version of next I'm using but I'll just go back to my next cloud to Film so I chris.com and there we go Since I just filled that out. It's logging in as that user I created it gives me a welcome screen and we now have next cloud up and running and I am logged in currently as You know administrative user So now I can go start installing applications like calendars and contacts and office stuff I also have a quick note here at the bottom Oh So yeah, actually a few more things to do these aren't required but suggested you're gonna be want to upload, you know Larger files, so you're gonna want to change some Apache configuration stuff So if you just run this command, it should automatically If if the configuration file doesn't change this is just changing a memory limits once you do that You're going to want to restart Apache. That should only take a moment and then I am going to go into this file For Apache and let me just forward session look for grant and this one that says a var www because that's where my Next cloud is I am going to change that from none to all Save that and again. I'll just restart Apache and that's just Making sure sim links are working properly and that you set up larger file limits and then down here This is just a command so when you're next cloud you can do pretty much everything through the web interface But you can also do stuff through the shells So if you wanted to for in this case, I am you can install Applications like this. That's just an example But I'm not going into the use of next cloud in this video. I'm just going into how to install it But again, that's how you install next cloud It looks like all together this video was 10 minutes and then includes the little intro and stuff so yes less than 10 minutes of Install time from beginning to end so I do thank you for watching films by Chris comm again I'll try to link to my notes there But again, I showed you at the beginning films by Chris comm click on software go to notes and then search for next cloud So you can look there and follow those notes again I don't update that script regularly because I'm not regularly installing new instances of next cloud But make sure you're using the most current version of next cloud and so you don't get any module in Modules can't connect because it for if you're using Debbie and stable You should be good if you're using those current version of next cloud if you're using Debbie and unstable You're gonna have to new of modules in some cases and if you're using an older version of next cloud the modules might be too New for or to yeah, same thing gonna be too new So just make sure you do things up to date and I once a month Make sure that I update my next cloud which can be done through the web interface or the shell But thank you for watching films by Chris comm. That's Chris of the K. I hope you found this useful And I hope that you have a great day