|
| 1 | +# 🚀 Deploying an Application Behind Nginx Proxy Manager |
| 2 | + |
| 3 | +This guide will help you deploy ONLYOFFICE DocumentServer behind [Nginx Proxy Manager (NPM)](https://nginxproxymanager.com/) using `docker-compose`. NPM provides a simple web interface to configure HTTP/HTTPS proxying, including automatic SSL certificate provisioning via Let's Encrypt. |
| 4 | + |
| 5 | +## 🧰 What's Included |
| 6 | + |
| 7 | +- `docker-compose.yml` — for launching the DocumentServer and Nginx Proxy Manager |
| 8 | +- `README.md` — this setup guide |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +## 📦 Quick Start |
| 13 | + |
| 14 | +1. **Clone the repository:** |
| 15 | + |
| 16 | + ```bash |
| 17 | + git clone https://github.com/ONLYOFFICE/document-server-proxy.git |
| 18 | + cd ./document-server-proxy/nginx-proxy-manager |
| 19 | + ``` |
| 20 | + |
| 21 | +2. **Launch the containers:** |
| 22 | + |
| 23 | + ```bash |
| 24 | + docker compose up -d |
| 25 | + ``` |
| 26 | + |
| 27 | +3. **Access NPM's Web Interface:** |
| 28 | + |
| 29 | + Default URL: |
| 30 | + ``` |
| 31 | + http://<your-IP>:81 |
| 32 | + ``` |
| 33 | + |
| 34 | + **Default Login:** |
| 35 | + |
| 36 | + |
| 37 | + - Password: `changeme` |
| 38 | + |
| 39 | + You will be prompted to change these on first login. |
| 40 | + Also, please check [NPM github](https://github.com/NginxProxyManager/nginx-proxy-manager) repo to get more details about how this product works |
| 41 | + |
| 42 | +--- |
| 43 | + |
| 44 | +## 🌐 Configuring Proxy in NPM |
| 45 | + |
| 46 | +After logging into the NPM dashboard: |
| 47 | + |
| 48 | +1. Go to the **"Proxy Hosts"** tab |
| 49 | +2. Click **"Add Proxy Host"** |
| 50 | +3. Fill in the following: |
| 51 | + |
| 52 | + **Domain Names:** |
| 53 | + ``` |
| 54 | + example.com |
| 55 | + ``` |
| 56 | + |
| 57 | + or some ip, for example: |
| 58 | + |
| 59 | + ``` |
| 60 | + 129.1.2.3 |
| 61 | + ``` |
| 62 | + |
| 63 | + **Forward Hostname / IP:** |
| 64 | + ``` |
| 65 | + <DocumentServer address, in this docker-compose stand that should be 'onlyoffice-documentserver'> |
| 66 | + ``` |
| 67 | + |
| 68 | + **Forward Port:** |
| 69 | + ``` |
| 70 | + 80 |
| 71 | + ``` |
| 72 | + |
| 73 | + Optional Settings: |
| 74 | + - **Enable Websockets Support** — Should be enabled! ONLYOFFICE DocumentServer use websocket |
| 75 | + - **Block Common Exploits** — recommended |
| 76 | + |
| 77 | +4. Go to the **SSL** tab: |
| 78 | + |
| 79 | + - Choose **"Request a new SSL Certificate"** |
| 80 | + - Enable the following: |
| 81 | + - **Force SSL** |
| 82 | + - **HTTP/2 Support** |
| 83 | + - **HSTS Enabled** |
| 84 | + - Accept the Let's Encrypt Terms of Service |
| 85 | + |
| 86 | +5. Click **Save** |
| 87 | + |
| 88 | +--- |
| 89 | + |
| 90 | +## ✅ Benefits of Using Nginx Proxy Manager |
| 91 | + |
| 92 | +- 📋 **User-friendly web UI** — no need to edit configs manually |
| 93 | +- 🔐 **HTTPS support (Let's Encrypt)** — automatic and free SSL certificates |
| 94 | +- 🔁 **Flexible proxying** — by IP, domain, WebSocket-ready |
| 95 | +- 📈 **Logging and monitoring** — built-in request logs |
| 96 | +- 💡 **Minimal setup effort** — ideal for quick dev/test deployment |
| 97 | + |
0 commit comments