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 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
Administrators should connect to NIM Studio directly over the internal network or VPN, not through the NGINX server.
Prepare NGINX
- Use a Windows Server in the DMZ that can receive public traffic on ports 80 and 443 and can reach the NIM Service on its configured HTTP or HTTPS port.
- 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 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.
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 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 deployment
- Confirm an approved app loads at
https://apps.example.com/app/<app-name>. - Confirm Studio and
/api/cmd/adminreturn403from the public hostname. - Confirm onboarding, password reset, and SAML sign-in work as expected.
- Optionally run
./wacs.exe --renew --force, restart NGINX, and confirm the certificate has been updated.
Troubleshooting
| Symptom | What to check |
|---|---|
| NGINX does not start | Run nginx -t from C:\nginx; confirm the NSSM service startup directory is C:\nginx. |
502 Bad Gateway | Verify the generated upstream address and port, and confirm NGINX can reach the NIM Service. |
| A public app fails | Re-download the Studio-generated configuration and review the app allow or deny selection. |
| Studio is reachable publicly | Stop using the configuration, re-download it from Studio, and verify the restrictive routes are present. |
| ACME validation fails | Confirm the public hostname resolves to NGINX, port 80 is reachable, and the ACME location has been loaded. |
| Certificate renewal fails | Check the win-acme renew (main) scheduled task and run ./wacs.exe --renew to view the error. |