LogoLogo
DownloadBlog
  • Overview
  • Getting started
    • Meshnet explained
    • How to start using Meshnet
      • Using Meshnet on Windows
      • Using Meshnet on Android
      • Using Meshnet on iPhone/iPad
      • Using Meshnet on macOS
      • Using Meshnet on Linux
      • Using Meshnet on Android TV
    • How to use Meshnet securely
  • Features
    • Linking devices in Meshnet
      • Linking external Meshnet devices on Windows
      • Linking external Meshnet devices on Android
      • Linking external Meshnet devices on iPhone/iPad
      • Linking external Meshnet devices on macOS
      • Linking external Meshnet devices on Linux
      • Linking external Meshnet devices on Android TV
    • Explaining permissions
      • Remote access permissions
      • File sharing permissions
      • Traffic routing permissions
      • Local network permissions
    • Renaming devices in Meshnet
      • Renaming devices on Windows
      • Renaming devices on Android
      • Renaming devices on iPhone/iPad
      • Renaming devices on macOS
      • Renaming devices on Linux
    • Sharing files in Meshnet
      • Sharing files on Windows
      • Sharing files on Android
      • Sharing files on iPhone/iPad
      • Sharing files on macOS
      • Sharing files on Linux
      • Sharing files on Android TV
    • Routing traffic in Meshnet
      • Routing traffic from Windows
      • Routing traffic from Android
      • Routing traffic from iPhone/iPad
      • Routing traffic from macOS
      • Routing traffic from Linux
      • Routing traffic from Android TV
  • How-to guides
    • Gaming
      • How to set up a private Minecraft server with Meshnet
      • How to set up a private Stardew Valley server with Meshnet
      • How to play Quake 3 Arena over Meshnet
      • How to set up a private Team Fortress 2 server with Meshnet
      • How to set up a remote game-streaming server for Moonlight
      • How to set up a Palworld dedicated server
      • How to play Fallout: New Vegas multiplayer over Meshnet
      • How to set up a private Factorio server with Meshnet
    • Remote files and media access
      • How to set up and access shared folders
        • Configure and access shared folders on Windows
        • Configure and access shared folders on macOS
        • Configure and access shared folders on Linux
        • Access shared folders from Android
        • Access shared folders from iPhone/iPad
        • Access shared folders from Android TV
      • How to watch videos over Meshnet using Kodi
      • How to configure and access a Jellyfin media server remotely
      • How to set up a Plex media server and access it remotely
      • How to set up a remote NAS using OpenMediaVault and Meshnet
      • How to set up a remote picture library with LibrePhotos and Meshnet
      • How to use Syncthing for remote continuous file synchronization
      • How to set up a remote Airsonic music server
      • How to set up HTTP File Server for remote file access
      • How to set up a remote audiobook server
      • How to host a remote Kavita e-book server
      • How to set up and remotely access Immich using Meshnet
    • Remote device access
      • How to log in to your PC remotely over Meshnet
        • Connect to a Windows device
        • Connect to a macOS device
        • Connect to a Linux device
      • How to access remote systems over Meshnet using SSH
      • How to access your IP camera over Meshnet
      • How to use Home Assistant remotely over Meshnet
      • How to make secure macOS Time Machine backups from anywhere
      • How to use Ansible over Meshnet
      • How to access files in your NAS from anywhere without compromising its security
      • How to set up a phone as a security camera with remote access
      • How to assign custom host names to Meshnet services using Nginx proxy manager
      • How to use Proxmox VE remotely over Meshnet
      • How to set up a remotely controlled 3D printer
      • How to set up and remotely access a CasaOS server
    • Joint projects
      • How to set up an NGINX web server and remotely access it over Meshnet
      • How to use Nextcloud file syncing with Meshnet
      • How to set up pair programming using tmux
      • How to set up a Visual Studio Code server for remote development over Meshnet
      • How to host a Focalboard server for remote project management
      • How to use Meshnet for multi-screen Node.js development
      • How to use the Multi-user editing plugin in Unreal Engine over Meshnet
      • How to set up a private Mumble voice chat server
      • How to host a private Rocket.Chat server
    • Own VPN server setup
      • How to set up a VPN server through self-hosting or with DigitalOcean
      • How to create a VPN server with Microsoft Azure
      • How to create a VPN server with AWS
      • How to create a VPN server with Google Cloud
      • How to create a VPN server with Linode
      • How to create a VPN server with Hetzner
    • Network protection
      • How to set up your network protection with Pi-hole
      • How to set up your own DNS server
      • How to protect your network with AdGuard Home
      • How to use the self-hosted Whoogle search engine remotely
      • How to set up a VPN router using Meshnet
  • Troubleshooting
    • Common issues on Windows
    • Common issues on Android
    • Common issues on iPhone/iPad
    • Common issues on macOS
    • Common issues on Linux
Powered by GitBook

© 2025 Nord Security. All Rights Reserved.

On this page
  • Introduction
  • Prerequisites
  • Creating DNS rewrites
  • Setting up the Nginx proxy manager
  • Create a Docker Compose file
  • Deploy NPM
  • Log in to your NPM web interface
  • Create proxy redirects
  • Accessing Meshnet services using the reverse proxy

Was this helpful?

  1. How-to guides
  2. Remote device access

How to assign custom host names to Meshnet services using Nginx proxy manager

Learn how to use the Nginx proxy manager to create custom host names for Meshnet services.

PreviousHow to set up a phone as a security camera with remote accessNextHow to use Proxmox VE remotely over Meshnet

Last updated 1 month ago

Was this helpful?

Introduction

As the popularity of self-hosted services continues to grow, so does the challenge of managing multiple IP addresses, host names, and port numbers. It can quickly become overwhelming to keep track of which port number to enter for services like , , or .

While a custom can help overcome the problem of remembering the IP addresses or host names of your peer devices, it's not enough to handle requests that need to be forwarded to a specific port number. This is where a , such as the (NPM), can come in handy. With NPM, you can easily create reverse proxies without needing prior networking knowledge. By combining a custom DNS server with NPM, you can eliminate the need to remember and enter port numbers altogether.

This article showcases the process of setting up the Nginx proxy manager alongside a DNS server to create custom host names for your services, simplifying their management.

Prerequisites

Before you begin the setup process, make sure that:

  • You have and installed on your system.

  • You have a custom DNS server set up on your network. For example, .

  • You have changed the DNS addresses of your devices to your custom DNS server.

  • Port 80 is not in use by any service on your system.

Creating DNS rewrites

Note

For this configuration, a standard AdGuard Home installation is used as an example DNS server. If you are running your DNS server using Docker, the steps may differ.

To start, you need a way to create DNS rewrites from a custom host name to a specific IP or host name. While this can be achieved by editing your operating system’s hosts file, a much more convenient and easily manageable alternative is a custom DNS server.

To create a DNS rewrite using AdGuard Home:

  1. Open your AdGuard Home web interface.

  2. From the menu bar, select Filters > DNS rewrites.

  3. Click Add DNS rewrite.

  4. In the pop-up window, fill in the following information:

    • In the upper field, enter a custom host name that you want to use to access a specific service.

    • In the lower field, enter localhost.

      Example

  5. Click Save.

You should now see a new entry in the DNS rewrites table. Repeat this procedure for any other host names you want to create.

Tip

Setting up the Nginx proxy manager

With the DNS rewrites created, you can deploy your Nginx proxy manager instance. To set up NPM, you need to use Docker Compose.

Create a Docker Compose file

  1. Open PowerShell.

  2. Create a new folder called nginx-proxy-manager and navigate to it using this command:

    mkdir nginx-proxy-manager && cd nginx-proxy-manager

  3. Create a docker-compose.yml file and open it using Notepad with the following command:

    notepad docker-compose.yml

  4. In the Notepad window, paste the following information that specifies the NPM docker image, publishes the required ports, and creates two new folders in your working directory.

    version: '3.8'
    services:
      app:
        container_name: nginx-proxy-manager
        image: 'jc21/nginx-proxy-manager:latest'
        restart: unless-stopped
        ports:
          - '80:80'
          - '443:443'
          - '81:81'
        volumes:
          - ./data:/data
          - ./letsencrypt:/etc/letsencrypt

  5. Press Ctrl + S to save changes.

  6. Exit Notepad.

  1. Open Terminal.

  2. Create a new folder called nginx-proxy-manager and navigate to it using this command:

    mkdir nginx-proxy-manager && cd nginx-proxy-manager

  3. Create a docker-compose.yml file and open it using the Nano text editor with the following command:

    nano docker-compose.yml

  4. In the terminal window, paste the following information that specifies the NPM docker image, publishes the required ports, and creates two new folders in your working directory.

    version: '3.8'
    services:
      app:
        container_name: nginx-proxy-manager
        image: 'jc21/nginx-proxy-manager:latest'
        restart: unless-stopped
        ports:
          - '80:80'
          - '443:443'
          - '81:81'
        volumes:
          - ./data:/data
          - ./letsencrypt:/etc/letsencrypt

  5. Press Ctrl + X, Y, and Enter to save changes and exit.

Deploy NPM

With the Compose file created, while in the nginx-proxy-manager directory, execute the following command in the command line to create your NPM instance:

docker-compose up -d

Log in to your NPM web interface

Once the container is active, you can visit the NPM web interface.

  1. Open your internet browser.

  2. In the URL bar, enter localhost:81/ and press Enter.

  3. Log in using the default email (admin@example.com) and password (changeme).

After logging in, you will be asked to change the details of your account. Follow the on-screen instructions to update your credentials.

Create proxy redirects

Finally, you can create a proxy redirect for your created host name to reach a specific service.

  1. From the NPM dashboard, select Proxy hosts.

  2. Click Add proxy host.

  3. In the new window, specify the following information:

    • In the Forward hostname / IP field, type in the Nord name or the Meshnet IP address of your Meshnet peer device.

    • In the Forward port field, enter a port number that the peer device’s service is using. Example

  4. Click Save.

You should see a new entry for your proxy appear in the Proxy hosts table.

Accessing Meshnet services using the reverse proxy

Now you can access your Meshnet services without needing to specify the Nord name or the port that you want to reach. Simply enter the custom host name into the search field of your internet browser and your specified service will open.

AdGuard Home supports . You can use the format *.example.com to redirect all subdomains of example.com. This way, you don’t have to add new DNS entries for each service.

First, you need to create a containing instructions for NPM.

Docker will from Docker Hub and create the container.

In the Domain names field, enter the custom host name you created in the section.

Home Assistant
Jellyfin
LibrePhotos
DNS server
reverse proxy
Nginx proxy manager
Meshnet
Docker
Docker Compose
Docker Desktop instructions for Windows
Docker Desktop instructions for macOS
Docker Desktop Instructions for Linux
Docker Engine instructions for Linux (CLI only)
Docker Compose instructions for Linux (CLI only)
AdGuard Home
wildcard domain names
Docker Compose file
pull the NPM image
Creating DNS rewrites
Creating a new DNS rewrite to redirect 'jellyfin.mesh.net' to 'localhost'.
Creating a new DNS rewrite to redirect 'jellyfin.mesh.net' to 'localhost'.
DNS rewrites table in the AdGuard Home web interface with the newly created rewrite.
DNS rewrites table in the AdGuard Home web interface with the newly created rewrite.
Creating a new proxy host in NPM to redirect 'jellyfin.mesh.net' to 'secret.meerkat-fuji.nord:8096'.
A new entry visible in the Proxy hosts table in the NPM dashboard.
Accessing a Jellyfin server using the custom 'jellyfin.mesh.net' host name.