- Create a directory in the docker directory (change the directory names if you find them confusing)
cd docker && mkdir npm && cd npm
- Create a new yml file and add the following contents to it (read the comments)
nano docker-compose.yml
version: '3'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports: # Change the ports if they are already used on your network
- '80:80'
- '81:81' # Remember this as it will be used for opening the dashboard
- '443:443'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
networks:
default:
name: my-main-net
external: false # Change based on your network (trail and error if not sure)
- Create the container
docker-compose up -d
- Open the dashboard in your browser and change your mail and password
http://<your server ip address>:81/login #change the port if you changed it in the compose file
# default mail: [email protected]
# default password: changeme
To continue this tutorial you need to have a domain name tied to a static ip or dynamic dns. If you do not have this refer to "setting up DDNS"" and "managing and buying domin name" tutorials before you continue.
- Forward the following ports on your router (How to do so is different for every router)
80
443
3478 # for nextcloud talk only
3012 # for nextcloud talk only
-
Create a new proxy host using nginx proxy managerny adding your chosen domain name along with the server ip and the port used for managing nextcloud.
-
Add an SSL certificate by editing the proxy host. Go to the SSL tab, request a new let's encrypt certificate if ypu do not have one and enable all the security options. (optional)
- Access the container files
docker ps # to find the container name or id
docker exec -it <container_name_or_id> /bin/bash
- install a text editor if ther is not one
apt update
apt install nano
- Navigate to the directory that includes the config file amd open it
cd /var/www/html/config
nano config.php
- Add your domain to the trusted domains array
example before editing:
'trusted_domains' =>
array (
0 => 'localhost',
),
example after editing:
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'yourdomain.com',
),
- exit the container and restart it (you might not need to restart)
exit
docker restart <container_name_or_id>