Install nginx sudo apt install nginx (you can ignore this step if you ran it above for the above install)Įnable the service to start on boot sudo systemctl enable nginx Nginx Method Installing nginx if it’s not installedįirst, update the repo to get latest versions sudo apt update This will make files appear in ~/dockers/nextcloud/data/data folder /var/www/html/dataĪdd the nextcloud database settings. Once on the site, create an admin account, open storage and database, and paste your data folder into there from the docker redirect. Under trusted_domains, add your url so it looks like this Sudo nano ~/dockers/nextcloud/data/config/config.php These are for advanced Nginx configs.Īfter this, test going to your https url and it should work Finishing setup I tick Force SSL, HTTP/2 Support, HSTS Enabled. SSL, select your SSL Certificate created. For other projects you might need to use this for subfolders. Tick Block Known Exploits and WebSocket Support. Port is my nextcloud install port, so 8081. Go to Hosts, Proxy Hosts, Add Proxy Host.ĭomain names, fill in the url you have setup. I have a DNS record for .uk, with a DNS rewrite for that URL to go to my server ip. I use Adguard as my DNS server, so added a DNS Rewrite here to point back to my Nginx Proxy Manager. This presumes you have set your DNS record for your domain name. Your SSL Certificate should now be created and renewed automatically. ![]() ![]() If your current DNS provider isn’t there, sign up for a free Cloudflare account and use their DNS, pointing your existing DNS Name Servers (ns) to Cloudflare.Īgree to the terms and conditions and Save. In the domain name type *.domainname, so *.uk for example. Go to SSL Certificates, select “Add SSL Certificate”. Creating a wildcard certificate with DNS Challenge Save this and you will get the main login screen. You will then be prompted to change the password. version: '3'īrowse to and you will get the login screen. If you want to save the data to another directory change the volumes to point to the directories you want to. mkdir ~/dockers/nginxproxymanagerĬhange directory to this folder cd ~/dockers/nginxproxymanagerĬreate 2 directories, data and letsencrypt, for nginxproxymanager to save to:- mkdir data letencrypt Now create a folder for Nginx Proxy Manager to live in. If you want HTTPS, follow the next part, otherwise jump to Finish SetupĪdding HTTPS using Nginx Proxy Manager Install Nginx Proxy Manager Browse to the server ip and the port mentioned in the compose file, eg and you should get the default page.Run the docker-compose file with the following:- docker-compose up -d Save the file with ctl + x, then y to save. Ch -Ĭommand: -transaction-isolation=READ-COMMITTED -binlog-format=ROW Change the MYSQL_PASSWORD and MYSQL_ROOT_PASSWORD. Change the 8081 part of 8081:80 if you want it to listen on an alternative port to port 8081. mkdir ~/dockers/nextcloud ~/dockers/Ĭreate a folder for the Now create a folder for Nextcloud to live in. ![]() If it doesn’t exist already, create this folder:- mkdir ~/dockers ![]() I keep all my dockers in a dockers folder in my home directory. Test it has installed correctly by getting the docker-compose version docker-compose -version Give permissions to this sudo chmod +x /usr/local/bin/docker-compose This downloads v2.16.0, just change this if the version updates to a later version sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose I also install docker-compose as some dockers need you to compose from a yml file. Test it has installed correctly by getting the docker version docker -version This is to apply the permissions in the above step Once you have run this command close and reopen your session if you accessing remotely. Give your user permissions to docker, replacing user with your username sudo usermod -aG docker user Set Docker to start on startup sudo systemctl enable -now docker Install the latest version sudo apt install docker.io Update the repo to get latest versions sudo apt update Docker-Compose Method - Recommended Install Docker
0 Comments
Leave a Reply. |