Nextcloud Nginx Proxy Manager ⏲️ in 10 Minutes!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
if you want to deploy nexcloud and protect it with nginx proxy manager and trusted ssl sorts then simply follow this tutorial i try to make it fast and easy for you guys so that will take like 10 minutes or so let's do it hey everyone this is christian and in this video let's deploy next cloud and protect it with real ssl sorts and nginx proxy manager so you can actually deploy your own next cloud installation and also expose that securely on the public internet as most of my tutorials i'm going to use docker and port hana to deploy it on my server so if you are not familiar with docker already then go and check out my other tutorials on it i've put you the link to the right playlist in the description below so no matter where you deploy it if you're using a cloud instance like on digitalocean or you're deploying this on a small home server or raspberry pi it doesn't really matter the only thing that is important is you only need a dns record that points to the public ip address of where the server is located and if you're using that on your home network you also need to forward the port 80 81 and 443 on your router to your local home server so that lats encrypt can actually connect via http to your local servers for trusted ssl certs and you can also access your next cloud installation from the public internet and as always you don't need to remember any commands i'm using in this tutorial just have a look at my written blog article i've put your link in the description below they can go read the full instructions and of course copy all the commands and the docker compose template we are going to use in this tutorial so don't waste time anymore because we only have 10 minutes let's go okay so let's just look at the docker compose file i have created for this tutorial you can find it on my written blog article and just copy and paste it so first we will start with five volumes that we're going to need for this project because we have two application containers and two database containers and of course we want all our data to be stored in a persistent location so that we are not losing it when we restart our containers i've also tried to separate the containers in two networks because i like to have a end network where all the applications are connected to and a back end where i only connect all databases so this doesn't really offer more security it's just for organizational stuff so the first service is our next cloud application we are storing the data in our first volume also make sure you are replacing the placeholders for the password with the secure one and connect this container to both networks the front end and the back end network the next cloud db is a mariadb image which i set up accordingly to the official next cloud documentation so you may going to replace it depending on your infrastructure so for example if you're using a raspberry pi and you need a more lightweight database you can replace this with any mariadb image so make sure you're also replacing the passwords here and connect this database service only to the backend network so note i'm not exposing any ports here on those two containers because i don't want anyone to access them directly so now come the reverse proxy the nginx proxy manager app container where we are exposing of reports one for http the web admin port and the https port we're using two volumes to store the configuration data and the ssl search we're going to obtain later the nginx proxy manager also needs a separate database container so also make sure you're replacing the passwords placeholders here of course and connected to the backend network if you deploy this on a fresh new linux server you only have install docker and darker compose this is how you can easily do it without portena so let's create a new folder in the opt directory and call it nexcloud i will now copy the docker compose file on my local instance to the server so now we should see the file is now on our remote server and we can just execute it with docker compose up dash d to run this in the background this will automatically pull down all necessary images and start the container so let's also check with docker compose ps if all containers are up and running so that should look like this here after this is finished you will first need to access the nginx proxy manager get an ssl cert and configure the proxy host but if you don't deploy this on a fresh server so maybe you already have a running portena instance and also nginx proxy manager like i've shown you in my other tutorial videos you can just deploy nexcloud without the nginx proxy manager part and connect this to your existing installation let's also have a look at this so just remove the nginx proxy manager configuration parts of the compose file copy everything else so now on the portena instance i've already created both networks the front end and the backend network so this may look a bit different depending on the network you have connected the nginx proxy manager to you need to adjust a few things in the compose file so let's go and create a new stack paste the compose file parts and now we can actually connect nexcloud to our existing nginx proxy manager installation so instead of creating two new docker networks inside the stack i want next cloud containers to connect to the already existing network on the server you can do it with this setting so just uncomment the line external true and set this accordingly to your existing network so make sure you're using the same names like the networks you have used for the nginx proxy manager installation so now you can simply manage next cloud installation with portena and you also will use that within your existing installation so no matter how you deployed this docker stack with portainer or you're using a fresh new docker and docker composed installation if all containers are up and running you should be able to access the public ip address of your server on port 81. if you deploy this the first time you also need to change the default password so let's first log in with admin example.com the default password is changeme so now we need to change the username and password confirm that and then we want to create a new proxy host so that we can actually protect the next cloud containers with real ssl certs and forward the client's connection to our containers so make sure you are using the same domain name like on your dnsa record that points to the public ip address of your server otherwise it won't work of course and fill in the name of the docker container this should be next cloud dash app as described in the compose file it will connect to the container on unencrypted http port 80 and also you can enable the block common exploits checkbox for a bit more security so now let's obtain a new ssl cert so now we can actually get a valid search from let's encrypt we can then force the https connection enable hsts for security reasons and https 2 for better performance so no if you see an error with the ssl sort validation here it's likely that let's encrypt couldn't connect to your nginx proxy manager instance via the domain name so you need to make sure that all your dns records are set up correctly and if your server is behind a router you also need to forward the port 80 because that's the part where let's encrypt uses to connect to your server and validate the ssl cert and if the proxy host is connected we should be able to reach our next cloud server when we just click it or just open it with the domain name and you can see it opens the next cloud admin and we have a valid ssl search from let's encrypt so this was easy right so we can now just proceed with the installation of our base applications on most servers this will probably work fine but i had a very big problem with this and i've also read about this in many forums online on social media that some people have problems that the next cloud installation is incredibly slow so you have requests that may time out it won't even load anymore right after proceeding with that and so that was on my cloud instance as well so if you're facing the same problem you should wipe the containers and do a fresh reinstallation and when you are at this point here uncheck the checkbox to install the recommended apps in my case the issue was caused by the built-in collabora code server that was automatically installed with this checkbox setting and this makes the next cloud installation extremely slow and basically unusable in my scenario so what you can do about this is you can deploy your own collaborate server somewhere or what i did is you simply proceed without the checkbox and then install the collabora online app manually so note don't install the built-in code server this will make the installation probably very slow but once you have installed the collabora online application you can just go to settings here and select the collaborate demo servers so note this will share data with the next cloud servers instances once you are editing any word document excel spreadsheets and so on but this is a quick and easy way to make the collaborator server working if you are running or facing the same problem with performance issues without setting up this yourself and running into this problem another problem that i discovered was my next cloud desktop client which was not able to synchronize with my next slot installation and this problem occurs because we're using a reverse proxy the nginx proxy manager in front of our next cloud installation so when you want to use a desktop sync client you should modify one line in the next cloud configuration file so let's do this you need to first connect to the shell of your server and let's first check the name of the next cloud container that's running so because i've deployed this with porteno stacks i need to use the name next cloud underscore and exclude hyphen app underscore one so let's first open the shell inside the next code app container by executing docker exec dash id then the container name and slash bin slash bash so now we are inside our app container because we don't have a text editor installed we first need to do that by updating our package sources with an app update and then we can install a text editor for example you can just use wim nano or whatever you prefer i usually want to install vim as my text editor so now we need to open the config.php file that's located in the config directory and in this configuration file we need to add this line here the overwrite protocol it's usually not existing in this configuration file so you need to add this accordingly to the documentation if you don't remember all these steps just check out my written blog article there i described everything in a written form and you just can copy and paste this so if you have saved this file you can see that my next cloud desktop app is now synchronizing to my server and it's downloading all the files so that's awesome i know that some other people on the internet have reported other issues especially with the calendar synchronization so for example there's a calendar plugin you can synchronize your next cloud calendars in outlook so i didn't have any issues with that it just worked for me out of the box with this configuration setting but if you're running into other issues for example you are seeing error messages in the next float interface you should check out the official documentation website of nextcloud and look for this reverse proxy article there are some additional recommended settings described you might need to add and change on your server depending on which errors you get as i said i didn't need to do that it just worked for me without these settings but if you're running into trouble you might need to look at this and add another entry in the configuration file for trusted proxies and you also can modify the redirect locations for your reverse proxies for the calendar synchronization so in nginx proxy manager you can easily do this in the advanced section and that's it i hope you have not successfully deployed your next slot server instance and protected it with nginx proxy manager hopefully this didn't took longer than 10 minutes and if you enjoyed this video and this was helpful to you guys then please don't forget to hit the like button and subscribe because that's really helping out my channel and as always if you have any questions or you want to reach out for help also have a look at our awesome discord community guys so one quick note i have also made other videos about nginx proxy manager so for example if you want to know how to lock down the access based on ip address access lists with nginx proxy manager so that not everybody can access your server then also take a look at my other videos i've put your link in the description below as well so thanks everybody for watching bye bye
Info
Channel: The Digital Life
Views: 21,467
Rating: undefined out of 5
Keywords: nextcloud nginx proxy manager, nginx proxy manager, nginx proxy manager docker, nginx proxy manager nextcloud, nginx proxy manager portainer, nginx proxy manager tutorial, raspberry pi nginx proxy manager, setup nginx proxy manager, nextcloud nginx reverse proxy, nextcloud, nextcloud docker, nextcloud tutorial, how to
Id: iFHbzWhKfuU
Channel Id: undefined
Length: 12min 54sec (774 seconds)
Published: Mon Mar 15 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.