Allow External Access
Secure external access
Use an NGINX reverse proxy to publish approved NIM experiences without exposing NIM Studio or administrative APIs.
Apps such as onboarding, password reset, and SAML sign-in are often intended for users outside the internal network. Place NGINX on a separate Windows Server in your DMZ and use it as the only public entry point; keep the NIM Service on the internal network or VPN.
Do not expose NIM Studio or the administrative API to the public internet. Work with your network and security teams to validate the DNS, network paths, certificates, and allowed application routes before publishing a service.
Recommended architectureDirect link to Recommended architecture
Internet
│ HTTPS (443) and HTTP (80, certificate renewal only)
▼
NGINX reverse proxy in the DMZ
│ Publishes approved apps, password reset, onboarding, and SAML sign-in
│ Denies Studio, administrative APIs, and other internal-only endpoints
▼
NIM Service on the internal network
NIM administrator accounts are not allowed to sign in through the NGINX deployment, including to published Apps. Administrators must connect directly to NIM over the internal network or VPN. Use a non-administrator account with the required App permissions to sign in through the public hostname.
For the broader security checklist and administrative-access guidance, see Security and access.
This separation follows CISA's Internet Exposure Reduction guidance: publish only services that require internet access. NIST's Zero Trust Architecture also treats network position as insufficient proof of trust, so continue to enforce sign-in and App access rules on the routes you publish.
Plan the NGINX serverDirect link to Plan the NGINX server
Provision a dedicated virtual machine for the reverse proxy, separate from the NIM Service and database. The recommendations below are a starting point for the Windows deployment in this guide, not vendor minimums or a tested concurrent-user capacity. Size for peak simultaneous requests, TLS processing, logging, and any monitoring or endpoint-protection agents.
Recommended starting configurationDirect link to Recommended starting configuration
| Component | Recommendation |
|---|---|
| Operating system | A patched, supported 64-bit Windows Server release, such as Windows Server 2022 or 2025. Meet the selected OS requirements and the requirements of your certificate client and service wrapper. |
| CPU | Start with 2 vCPUs. Monitor the active NGINX worker during peak traffic before increasing resources. |
| Memory | Start with 4 GB RAM. Use 8 GB if the installed management and security agents or observed workload need more headroom. |
| Storage | Start with an 80 GB SSD-backed system disk for Windows, updates, NGINX, certificate tooling, and bounded local logs. Increase storage for your log-retention policy; configure log rotation or central forwarding. |
| Network | Use a stable private IP in the DMZ and a 1 Gbps virtual network adapter as a starting point. Check actual bandwidth and latency to the internal NIM Service. |
| Public endpoint | A public DNS hostname, such as apps.example.com, routed through your firewall or NAT to the proxy. The hostname must match the NIM External host URL and the certificate. |
| Software | NGINX for Windows, a service wrapper such as NSSM, and a certificate-renewal client such as win-acme when using Let's Encrypt. IIS is not required for this NGINX deployment; ensure another service is not already using ports 80 or 443. |
Check Microsoft's Windows Server requirements and win-acme's system requirements when selecting the server image and software packages. The sizing above is a planning recommendation for the complete proxy host, not a minimum published by either vendor.
NGINX's Windows documentation describes the Windows build as beta and notes that only one worker actually handles traffic, even if several are started. Adding CPU cores alone does not remove that limitation. Load-test the expected peak traffic before publication. Have high-concurrency or high-availability deployments reviewed with your infrastructure team and Tools4ever before choosing the proxy platform and topology.
Required network pathsDirect link to Required network paths
| Source | Destination | Access needed |
|---|---|---|
| External users | Public NGINX hostname | Inbound TCP 443 for HTTPS. |
| Certificate authority | Public NGINX hostname | Inbound TCP 80 for the HTTP-01 validation and renewal method used in this guide. Keep the ACME challenge path reachable. |
| NGINX server | Internal NIM Service | Only the configured upstream TCP address and HTTP or HTTPS port. The public network must not connect directly to this upstream. |
| NGINX server | Approved DNS and time services | Name resolution and time synchronization, using your infrastructure team's approved services. |
| NGINX server | Certificate authority and update services | Outbound HTTPS for certificate issuance/renewal and the approved software-update process. Account for your certificate provider's validation requirements. |
| Authorized administrators | NGINX server | Management access through the internal management network or VPN; keep RDP and other management ports off the public internet. |
The proxy does not need a connection to the NIM database for this architecture. Limit DMZ-to-internal access to the required NIM upstream rather than opening broad access to internal servers.
Service operation and maintenanceDirect link to Service operation and maintenance
- Run the proxy service under a dedicated identity with only the local permissions it needs: read/execute for NGINX, read access to configuration and TLS keys, and write access to its log and temporary directories. Grant the renewal task the separate permissions it needs to update certificates and reload the proxy.
- Configure automatic service startup and recovery, then verify the public App and renewal task still work after a server restart.
- Monitor service health, certificate expiry, disk space, worker CPU, memory, request latency, and proxy errors. Set log retention so a busy public endpoint cannot fill the system disk.
- Back up the reviewed proxy configuration and renewal settings. Protect private-key backups according to your organization's policy, and schedule OS, NGINX, and supporting-tool updates.
During load testing, include both client and upstream connections in the connection budget: worker_connections counts both. Do not translate its value directly into a supported number of users.
Prepare NGINXDirect link to Prepare NGINX
- Provision the Windows Server using the server planning recommendations, and verify the required public, upstream, and management network paths.
- Create a public DNS record for the external hostname, such as
apps.example.com, that resolves to the NGINX server. - Download and extract the Windows build of NGINX, for example to
C:\nginx. - Start NGINX with
./nginx.exeto verify it runs, then stop it with./nginx.exe -s stop. - Use NSSM to run NGINX as a Windows service. Set its startup directory to
C:\nginx, configure the service to start automatically, and restart it after configuration changes.
Generate the NGINX configuration in NIM StudioDirect link to Generate the NGINX configuration in NIM Studio
NIM Studio can generate a configuration that separates approved public routes from internal-only routes.
- Sign in to NIM Studio as an administrator and go to Settings › HTTP.
- Select Download nginx config.
- Enter the internal NIM address and port that the NGINX server can reach.
- Choose whether to allow all hosted apps, expose only selected apps, or deny selected apps.
- Save the downloaded file as
C:\nginx\conf\nimsuite.confand include it inside thehttp { }block inC:\nginx\conf\nginx.conf.
# Inside the existing http { } block
include nimsuite.conf;
Confirm that the generated upstream block uses the internal NIM address and port. Re-download the configuration after changing NIM’s listening settings or changing the list of public apps.
Expose the self-service portalDirect link to Expose the self-service portal
The Self-Service Portal provides an anonymous entry page at /portal for approved onboarding and password-reset profiles, with an optional default-app tile.
- Configure the portal app and its visible profiles in NIM Studio.
- In Configuration > Settings > Preferences, select Self-service portal app. Set Default route to Self-service portal app if visitors should reach the portal from the root URL
/. - Regenerate the NGINX configuration after setting up the portal. The generated configuration allows the portal by default, like onboarding and password reset.
- Review Deny self-service portal in the NGINX configuration dialog. Leave it cleared to publish the portal, or select it to block the portal while keeping onboarding and password reset reachable.
- Replace the deployed
nimsuite.conf, runnginx -t, and restart or reload NGINX. - From outside the internal network, open
https://apps.example.com/portalin a private browser window. Check each published profile tile. If the portal is the default route, also testhttps://apps.example.com/.
The portal does not require sign-in, but opening its default-app tile still requires authentication. Review the names and descriptions of all visible tiles before publishing them. Confirm Studio and administrative routes remain denied after updating the proxy configuration.
Keep administrative routes internalDirect link to Keep administrative routes internal
Use the Studio-generated configuration as the source of truth for route restrictions. It should deny NIM Studio, /api/cmd/admin, the internal system-integration API routes, and the MCP endpoint unless you have deliberately designed and reviewed an exception.
Only expose the hosted apps that external users need. The default app is normally kept public by the configuration generator; review the generated allow or deny selection before deploying it.
Use Let’s Encrypt with NGINXDirect link to Use Let’s Encrypt with NGINX
NGINX terminates the public HTTPS connection, so it needs its own certificate. On Windows, win-acme is a practical ACME client for obtaining and renewing a free Let’s Encrypt certificate.
- Download win-acme and extract it, for example to
C:\win-acme. - Create an ACME webroot at
C:\win-acme\webrootand add the following location inside the port 80 server block innimsuite.conf:
location /.well-known/acme-challenge/ {
root C:/win-acme/webroot;
}
- Run
nginx -t, then restart the NGINX service. - Run
wacs.exe, choose a new certificate with simple options, enter the public hostname, and use FileSystem validation withC:\win-acme\webroot. - Add the generated certificate and key paths to the HTTPS server block:
ssl_certificate C:/ProgramData/win-acme/.../apps.example.com-chain.pem;
ssl_certificate_key C:/ProgramData/win-acme/.../apps.example.com-key.pem;
- Run
nginx -tand restart NGINX again.
Port 80 must remain publicly reachable for HTTP-01 validation and renewal. win-acme creates a scheduled renewal task; ensure NGINX reloads after a successful renewal so it serves the updated certificate.
Verify the deploymentDirect link to Verify the deployment
- Confirm an approved app loads at
https://apps.example.com/app/<app-name>using a non-administrator account with the required App permissions. - Confirm Studio and
/api/cmd/adminreturn403from the public hostname. - Confirm onboarding, password reset, and SAML sign-in work as expected.
- If published, confirm
/portalopens without sign-in, its profile tiles work, and the default-app tile requires sign-in. If Deny self-service portal is selected, confirm the public portal is blocked while approved onboarding and password-reset routes still work. - Optionally run
./wacs.exe --renew --force, restart NGINX, and confirm the certificate has been updated.
For eligible organizations, CISA Cyber Hygiene Services can provide external vulnerability and web application scanning. Use the results to review the public NGINX host and approved Apps, then recheck route restrictions after changes. Coordinate scanning with your security team and service owners.
TroubleshootingDirect link to Troubleshooting
Choose the card that matches the symptom. After changing the proxy configuration, run nginx -t, restart NGINX, and repeat the affected check from Verify the deployment.
NGINX does not startDirect link to NGINX does not start
Problem
NGINX does not start
Likely cause
The NGINX configuration has an error, or the NSSM service uses the wrong startup directory.
Resolution
Run nginx -t from C:\nginx and correct any reported error. Confirm the NSSM service startup directory is C:\nginx, then restart it.
502 Bad GatewayDirect link to 502 Bad Gateway
Problem
502 Bad Gateway
Likely cause
NGINX cannot reach the NIM Service at the configured upstream address or port.
Resolution
Verify the generated upstream address and port, then confirm the NGINX server can reach the NIM Service. Test the public app again after correcting the connection.
HTTP 403 after signing in as a NIM administratorDirect link to HTTP 403 after signing in as a NIM administrator
Problem
HTTP 403 and automatic logout after sign-in
Symptom
The public App dashboard displays: Some error occurred (HTTP 403). You are logged out automatically. Please login again.
Likely cause
The account signing in is a NIM administrator. NIM administrator accounts are not allowed to sign in through the NGINX deployment, even when the requested App is published.
Resolution
- Open the public App in a private browser window and sign in with a non-administrator account that has permission to use the App.
- For administrative work, connect directly to NIM over the internal network or VPN using your administrator account.
See Keep administrative routes internal for the related deployment restrictions.
A public app failsDirect link to A public app fails
Problem
A public app fails
Likely cause
The generated proxy configuration does not allow that app, or its route selection is out of date.
Resolution
Re-download the configuration from NIM Studio, review the app allow or deny selection, then test the approved public route.
Studio is reachable publiclyDirect link to Studio is reachable publicly
Problem
Studio is reachable publicly
Likely cause
The proxy configuration is missing or bypassing the restrictions for Studio and administrative routes.
Resolution
Stop using the configuration. Re-download it from Studio, verify the restrictive routes are present, and confirm public requests to Studio and /api/cmd/admin are denied before resuming access.
ACME validation failsDirect link to ACME validation fails
Problem
ACME validation fails
Likely cause
The public hostname, port 80 route, or ACME challenge location is unavailable to the certificate authority.
Resolution
Confirm the hostname resolves to NGINX, port 80 is reachable, and the ACME location has been loaded. Retry validation after correcting the path.
Certificate renewal failsDirect link to Certificate renewal fails
Problem
Certificate renewal fails
Likely cause
The win-acme renewal task failed or did not complete.
Resolution
Check the win-acme renew (main) scheduled task and run ./wacs.exe --renew to view the error. Resolve it, then confirm NGINX serves the renewed certificate.