In this Tutorial we are going to setup Nginx Proxy Manager, so we can redirect public incoming request to a correct machine and/or application in our homelab without compromising our public IP address at home.
In this video I demonstrate how to install the Nginx Proxy Manager on a Digital Ocean Droplet.
- A registered Hostname (spikyspam.site). I've used HostGator.
- A DNS Provider. I've used Digital Ocean in this tutorial.
- Logged in into the Digital Ocean Dashboard
-
Open a Terminal and execute following commands to create a private/public key-pair:
ssh-keygen -f $HOME/.ssh/do
-
Open the Digital Ocean website and navigate to Settings ➡️ Security
-
Click Add SSH Key.
-
Paste in the content of your public key:
cat $HOME/.ssh/do.pub
-
Give it a name (do) and click Add SSH Key
- Navigate to Droplets
- Click Create Droplet
- Region: (near you)
- Image: Ubuntu 22.04 (LTS) x64
- Type: Basic
- CPU: Regular
- Price: 4$/mo
- Authentication Method: SSH
- Hostname: npm
- Remember the IP address of your droplet. For this tutorial it will be 46.101.80.89
-
SSH into your Droplet as root
ssh [email protected] -i $HOME/.ssh/do
-
Execute following commands:
sudo apt update && sudo apt upgrade -y reboot
-
SSH into your Droplet as root
ssh [email protected] -i $HOME/.ssh/do
-
Execute following commands:
adduser spiky-spam usermod -aG sudo spiky-spam cp -r ~/.ssh /home/spiky-spam chown -R spiky-spam:spiky-spam /home/spiky-spam/ exit
- SSH into your Droplet as spiky-spam
See the Install Docker section in 02. Setting up our Project Structure
ssh [email protected] -i $HOME/.ssh/do
-
SSH into your Droplet as spiky-spam
ssh [email protected] -i $HOME/.ssh/do
-
Create the following docker-compose file.
nano docker-compose.yaml
Tutorials/SS/SS.APP/docker/npm/docker-compose.yaml
Lines 1 to 17 in 6c2f4e4
-
Deploy it using following command
docker compose up
- Navigate to the Networking section of Digital Ocean.
- Click the tab Domains and add an A-record to your domain (spikyspam.site) that points to your NPM Droplets IP address.
- Before you can use this domain name, it needs to propagate through the internet. You can check the status here.
- Login to the Admin UI at http://spikyspam.site:81
- Email:
[email protected]
- Password:
changeme
- Email:
- Change your username and password to the secrets stored in your no-regrets.sh file.
- Email:
$TF_VAR_NPM_USER
- Password:
$TF_VAR_NPM_PASSWORD
echo $TF_VAR_NPM_USER echo $TF_VAR_NPM_PASSWORD
- Email:
- Domain Names:
- npm.spikyspam.site
- Scheme: http
- Forward IP: 46.101.80.89 (💡 IP address of the NPM Droplet)
- Port: 81
- Block Common Exploits
- Websockets Support
- SSL:
- Let's Encrypt
- Force SSL
- Login to the Admin UI at https://npm.spikyspam.site