Skip to content

Commit 6ac1eb5

Browse files
committed
Add guide how to use DocumentServer and NPM
1 parent 209a6ba commit 6ac1eb5

File tree

2 files changed

+160
-0
lines changed

2 files changed

+160
-0
lines changed

nginx-proxy-manager/README.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
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+
- Email: `[email protected]`
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+
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
services:
2+
nginx-proxy-manager:
3+
image: 'docker.io/jc21/nginx-proxy-manager:latest'
4+
restart: unless-stopped
5+
ports:
6+
- '80:80'
7+
- '81:81'
8+
- '443:443'
9+
volumes:
10+
- ./data:/data
11+
- ./letsencrypt:/etc/letsencrypt
12+
onlyoffice-documentserver:
13+
container_name: onlyoffice-documentserver
14+
image: onlyoffice/documentserver:latest
15+
depends_on:
16+
- onlyoffice-postgresql
17+
- onlyoffice-rabbitmq
18+
environment:
19+
- DB_TYPE=postgres
20+
- DB_HOST=onlyoffice-postgresql
21+
- DB_PORT=5432
22+
- DB_NAME=onlyoffice
23+
- DB_USER=onlyoffice
24+
- AMQP_URI=amqp://guest:guest@onlyoffice-rabbitmq
25+
# Uncomment strings below to enable the JSON Web Token validation.
26+
#- JWT_ENABLED=true
27+
#- JWT_SECRET=secret
28+
#- JWT_HEADER=Authorization
29+
#- JWT_IN_BODY=true
30+
stdin_open: true
31+
restart: always
32+
expose:
33+
- '80'
34+
stop_grace_period: 60s
35+
volumes:
36+
- /var/www/onlyoffice/Data
37+
- /var/log/onlyoffice
38+
- /var/lib/onlyoffice/documentserver/App_Data/cache/files
39+
- /var/www/onlyoffice/documentserver-example/public/files
40+
- /usr/share/fonts
41+
42+
onlyoffice-rabbitmq:
43+
container_name: onlyoffice-rabbitmq
44+
image: rabbitmq
45+
restart: always
46+
expose:
47+
- '5672'
48+
49+
onlyoffice-postgresql:
50+
container_name: onlyoffice-postgresql
51+
image: postgres:12
52+
environment:
53+
- POSTGRES_DB=onlyoffice
54+
- POSTGRES_USER=onlyoffice
55+
- POSTGRES_HOST_AUTH_METHOD=trust
56+
restart: always
57+
expose:
58+
- '5432'
59+
volumes:
60+
- postgresql_data:/var/lib/postgresql
61+
62+
volumes:
63+
postgresql_data:

0 commit comments

Comments
 (0)