Effortlessly Install and Secure Nextcloud with Portainer and NGINX Proxy Manager | Docker Series

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello there today I'm going to be showing you how to install nexcloud using portaner and Docker now this is going to require two things to be already set up first off portainer and second off n Jinx proxy manager I have covered both of these in two videos which will be linked in the description below as well as up here okay so first off we are going to need to install nextclub so let's go ahead and head over to the Linux service index Cloud image on Docker Hub so we're just going to copy the tag for Linux server slash latest so copy that go to our local containers and add container okay we're going to call this one next cloud and paste that in here just make sure you delete the docker pull part so Linux lever slash next Cloud colon latest perfect okay let's head back to the overview Tab and we will scroll on down until we find the usage perfect so we're going to first off start by setting our puid and PG ID so we can do that by sshing into our server okay so then once we are sshed into our machine we're just going to type ID and then our username okay so now we can see that I am uid1000 and gid1000 so that is the same thing as puid and PG ID so that is what we want to fill out for that okay so let's go ahead and start that so we're first going to go to the end tab two of those actually I think we'll need three so puid is one thousand and then PG ID whoops is also one thousand okay and next we're going to need to add our time zone if you don't know what yours is you can search through this list on Wikipedia I'll also have that Linked In the description below and that'll tell you what to enter there we are looking in this tab I am America Chicago so I'm just going to go ahead and copy that we'll do TZ and America Chicago perfect okay now let's head back here that looks like everything that we needed awesome and since we're SSH into our machine already that makes this nice and easy let's just go sudo Sue head into our root user okay now let's do CD slash SRV slash Docker data okay so now we have our folder from last time let's go ahead and create a new one for next cloud we'll call this next cloud data and then we are also going to have MK dir next cloud database now these will be two separate containers so that's why we have two separate folders so let's go ahead and pop into next cloud data first okay so then we are going to need one folder called config and we can do MK dir config and we're going to need another one called Data it doesn't necessarily have to be data this is just to keep consistent with what we are naming it on or what its name does in the container now if we do LS again we can see that we have both of those here perfect okay so then the next thing we're going to need to do is go over to our port hainer and add this into here as a volume so we're going to add two volumes we're going to do these as bind and we're going to do path in container slash data I believe was the first one and the second one was Slash config perfect so now we're going to paste in that path to it on our machine this doesn't have to be the exact path I used you can put it wherever you want on your machine I just like to put it in SRV so like if you had a separate hard drive and you wanted to mount that like slash MNT or mount that would be fine uh for your data I always like to put config on an SSD just so it's nice and fast but you can really put it anywhere you want so keep that in mind when you're setting this up Okay so we've got that set up let's head back over and see what else we need to do and then we will do Port 443 so we will do that so on the container we're going to need to do 443 but since nginx proxy manager already has 443 reserved we're gonna have to do something else I'm just going to do four four four oops perfect and let's make sure we didn't miss anything else oh yeah let's set the restart policy to unless stopped perfect okay so now let's go ahead and hit deploy container perfect so now that is set up and it says it's running if all you're wanting to do is have it hosted so you can access next Cloud locally you can stop here if you want to make it accessible from anywhere on the planet you have internet access of course keep watching so let's first head over to the address of our next Cloud instance so we'll do two one one or our IP address and then the port we entered I did 444 um we're also going to need to specify that as https because it won't know that 443 is https your browser will usually pick up on that but we're not using 443 so we will have to specify perfect so now it's going to want to use sqlite as the database by default that's going to be relatively slow as it's warning here so let's go ahead and set that up now so we're going to be using Maria DB that's just the one that I like to use okay so let's do next Cloud underscore database for the name whoops do it again okay and then we are going to just copy the command there and we'll just get rid of that Docker pull so we have Linux server slash Maria DB and we'll add the tag latest perfect and we're going to leave all these pull image ticked and now let's scroll down and see how they want to use this okay so we are going to add our environment variables first let's go ahead and do that add two of them I believe uh never mind we will need three of them actually we'll need more than that let's start with three just so we're doing the same as last time so our puid is one thousand our PG ID is also 1000 and then our time zone is whatever you determined from this list okay so next we are going to need to oops add a MySQL root password I'm just going to copy that so this is going to be an environment variable copy the key and then the value is going to be our root password um obviously set this to something secure enjoy blurring this future me for each um okay and then next we are going to need to set up a mySQL database so this will be the database name okay so let's go ahead mySQL database and we're just going to call this next cloud I'm sorry future me I'm going to have to scroll down oh no that's gonna suck okay and then we're gonna need a MySQL user uh this is also just going to be next cloud as well as a mySQL database password um again set this to something secure perfect and then that should be all we need for environment variables awesome so let's head to our volumes tab now your welcome future me and we will need to go over to our previous folder so CD space dot dot that'll move you back a directory as you can see and we'll move into our next Cloud database so we got nothing in there so let's go ahead mkdir config awesome as we can see we now have that older okay so now we are going to copy this once again Ctrl shift C head over here add a volume set it as bind and do such config and then the path in the container was Slash config let's just double check that to make sure I'm not a awesome okay so that should be that volume and then we need to open up Port 3306 let's go ahead publish a new network Port 3306 and 3306. um this might not work I think Ubuntu Server actually has a Maria deep era database that uses that Port by default we'll find out though um and then our restart policy is going to be unless stopped okay so let's go ahead and hit deploy container well let's make sure we didn't miss anything we are looking good okay deploy the container it looks like it created that successfully okay so now let's head back to our next Cloud we're going to choose Maria database we're actually going to create our admin account I'm just going to name it admin and do a relatively insecure password awesome okay so now our database user we called it next Cloud our database password is whatever you set your password to again you're going to want it to be secure and then our database name is also next cloud and then our database address is going to be localhost 3306 right yes and then we're going to hit install error hmm it didn't like that let's try that again database user database password that might be because we are using Docker so let's try this two one one or three three zero six so we're going to do our machines IP and then the port colon 3306. let's try that again and this one may take a moment it is a fairly big program okay never gotten that before let's just try and refresh it um I guess it's given up we're gonna say install recommended apps maybe that'll work different for you um I'm guessing Okay their servers are down or something okay so that's going to give us a little introduction and there you go they're just going to start using next cloud and boom that is next cloud there you go it's working as we can see they've really changed this a lot since I've used it regularly we can edit our files we can upload files download them all we want and that is awesome okay so now we have one last thing to do and that is create a proxy host so let's head over to engines proxy manager and select proxy hosts add proxy host and then we are going to determine our domain name um let's just do next cloud Dot archive.vet and then we will also have to head over to our DNS provider and add that as a um oops record so let's go nextcloud.archive.vet and then we're going to enter my IP address perfect and then I'm just going to do this Docker tutorial series amazing then we're just going to hit save so we can just have basically the same settings as for portaner which is awesome okay and we're going to need to do HTTP s since that is what we are accessing next Cloud through that is the only option we have okay so we're going to enter the IP we're hosting it on three one one and then the port 444 in my case okay and then we're going to head over to the SSL Tab and request a new SSL certificate we are going to force SSL and we are going to agree to the let's encrypt terms of service make sure you are entering your email hit save and hopefully that will work awesome okay so now we have our domain here and that is encrypted through let's encrypt awesome okay so now let's try to navigate to that so let's do nextcloud Dot archive.vet and see if it works and it is complaining that we are accessing it through an untrusted domain fantastic okay so let's go ahead and do that let's do docker exec Dash it next cloud Dash okay so that has basically opened up a bash shell within the docker container so now we're inside that container so we do LS we will see we are we've got this data directory that is not normally in Linux okay so now we are bashed into our next Cloud container let's go ahead and CD to slash config um and then I think it's www next Cloud okay now we've got this here and we will CD to config once again whoops okay and now clear Silas again okay so now we've got config.php and config.sample.php we are just going to edit config.php and head down to this array with the trusted domains hit enter and add another one we'll just call this um next cloud Dot archive.vet that and then there we go we're just going to control X yes and enter perfect now we're going to head over here and restart our container give it a moment here container successfully restarted so now let's head back hit F5 and see if it's come back up awesome so now we've got that pretty simple from here we just need to log in let's log in with our admin user don't save and get that out of here there you go it is simple as that we have successfully installed nexcloud set up a database and made it accessible to the internet so there you have it I hope this helped and if you learned something consider liking and subscribing as always I hope you had a great day and I will see you in the next one goodbye [Music] [Music] thank you [Music]
Info
Channel: Synthetic Everything
Views: 9,820
Rating: undefined out of 5
Keywords: Synthetic, Everything, nextcloud, install nextcloud, how to install nextcloud, nextcloud tutorial, nextcloud easy install, easy install, nginx proxy manager, reverse proxy, nextcloud ssl, nextcloud https, nextcloud nginx proxy manager, nextcloud portainer, portainer, dokcer, install nextcloud docker, nginx proxy manager nextcloud
Id: vAlgkKEvBMQ
Channel Id: undefined
Length: 17min 41sec (1061 seconds)
Published: Fri Jan 27 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.