Update README with proper standalone instructions
This commit is contained in:
97
README.md
97
README.md
@@ -1,6 +1,6 @@
|
||||
# ONLYOFFICE Docs for Runtipi
|
||||
|
||||
This is a Runtipi-compatible app configuration for [ONLYOFFICE Document Server](https://www.onlyoffice.com/office-suite.aspx).
|
||||
This is a Runtipi-compatible app configuration for [ONLYOFFICE Document Server](https://www.onlyoffice.com/office-suite.aspx). It also includes standalone docker-compose files for use without Runtipi.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -10,7 +10,7 @@ This is a Runtipi-compatible app configuration for [ONLYOFFICE Document Server](
|
||||
3. Configure your JWT secret and other options
|
||||
4. Start the app
|
||||
|
||||
### Option 2: Manual Installation (Custom App Store)
|
||||
### Option 2: Manual Installation (Runtipi Custom App Store)
|
||||
1. Copy the `onlyoffice-docs` folder to your Runtipi custom apps directory:
|
||||
```bash
|
||||
cp -r onlyoffice-docs /path/to/runtipi/apps/
|
||||
@@ -18,37 +18,52 @@ This is a Runtipi-compatible app configuration for [ONLYOFFICE Document Server](
|
||||
2. Restart Runtipi or refresh the app list
|
||||
3. Install from the UI
|
||||
|
||||
### Option 3: Direct Docker Compose
|
||||
### Option 3: Standalone Docker Compose (No Runtipi)
|
||||
|
||||
For standalone deployments without Runtipi:
|
||||
|
||||
```bash
|
||||
cd onlyoffice-docs
|
||||
# Edit the .env file with your settings
|
||||
git clone https://git.alexzaw.dev/alexz/runtipi-onlyoffice-docs.git
|
||||
cd runtipi-onlyoffice-docs
|
||||
|
||||
# Copy and edit the environment file
|
||||
cp .env.example .env
|
||||
nano .env
|
||||
nano .env # Set JWT_SECRET at minimum
|
||||
|
||||
# Start with basic configuration (internal PostgreSQL)
|
||||
docker-compose up -d
|
||||
# Basic deployment (self-contained with internal PostgreSQL)
|
||||
docker-compose -f docker-compose.standalone.yml up -d
|
||||
|
||||
# Or use external database configuration for production
|
||||
docker-compose -f docker-compose.external-db.yml up -d
|
||||
# Production deployment (external Postgres/Redis/RabbitMQ)
|
||||
docker-compose -f docker-compose.standalone-external-db.yml up -d
|
||||
```
|
||||
|
||||
Data is stored in `./data/` relative to the compose file.
|
||||
|
||||
## Configuration
|
||||
|
||||
### Required Settings
|
||||
|
||||
| Variable | Description |
|
||||
|----------|-------------|
|
||||
| `ONLYOFFICE_JWT_SECRET` | Secret key for JWT authentication. **Required** for security. |
|
||||
|
||||
### Optional Settings
|
||||
### Standalone Variables
|
||||
|
||||
| Variable | Default | Description |
|
||||
|----------|---------|-------------|
|
||||
| `ONLYOFFICE_JWT_ENABLED` | `true` | Enable/disable JWT validation |
|
||||
| `ONLYOFFICE_JWT_HEADER` | `Authorization` | HTTP header for JWT token |
|
||||
| `ONLYOFFICE_JWT_IN_BODY` | `false` | Allow JWT in request body |
|
||||
| `ONLYOFFICE_USE_UNAUTHORIZED_STORAGE` | `false` | Accept self-signed certs |
|
||||
| `ONLYOFFICE_WOPI_ENABLED` | `false` | Enable WOPI protocol |
|
||||
| `JWT_SECRET` | *required* | Secret key for JWT authentication |
|
||||
| `ONLYOFFICE_PORT` | `8044` | Port to expose |
|
||||
| `JWT_ENABLED` | `true` | Enable/disable JWT validation |
|
||||
| `JWT_HEADER` | `Authorization` | HTTP header for JWT token |
|
||||
| `JWT_IN_BODY` | `false` | Allow JWT in request body |
|
||||
| `USE_UNAUTHORIZED_STORAGE` | `false` | Accept self-signed certs |
|
||||
| `WOPI_ENABLED` | `false` | Enable WOPI protocol |
|
||||
| `DB_PASSWORD` | `onlyoffice` | PostgreSQL password (external-db only) |
|
||||
|
||||
### Runtipi Variables
|
||||
|
||||
When installed via Runtipi, these are configured through the UI:
|
||||
|
||||
| Variable | Description |
|
||||
|----------|-------------|
|
||||
| `ONLYOFFICE_JWT_SECRET` | Secret key for JWT authentication |
|
||||
| `ONLYOFFICE_JWT_ENABLED` | Enable/disable JWT validation |
|
||||
| `ONLYOFFICE_USE_UNAUTHORIZED_STORAGE` | Accept self-signed certs |
|
||||
| `ONLYOFFICE_WOPI_ENABLED` | Enable WOPI protocol |
|
||||
|
||||
## Integration Examples
|
||||
|
||||
@@ -57,52 +72,56 @@ docker-compose -f docker-compose.external-db.yml up -d
|
||||
1. Install the ONLYOFFICE connector app in Nextcloud
|
||||
2. Go to Settings → ONLYOFFICE
|
||||
3. Configure:
|
||||
- **Document Editing Service address**: `https://onlyoffice-docs.yourdomain.com` or `http://your-ip:8044`
|
||||
- **Secret key**: Same as `ONLYOFFICE_JWT_SECRET`
|
||||
- **Document Editing Service address**: `http://your-ip:8044` or `https://onlyoffice-docs.yourdomain.com`
|
||||
- **Secret key**: Same as `JWT_SECRET`
|
||||
|
||||
### Seafile Integration
|
||||
|
||||
1. Add to `seahub_settings.py`:
|
||||
```python
|
||||
ONLYOFFICE_APIJS_URL = 'https://onlyoffice-docs.yourdomain.com/web-apps/apps/api/documents/api.js'
|
||||
ONLYOFFICE_JWT_SECRET = 'your-jwt-secret'
|
||||
```
|
||||
Add to `seahub_settings.py`:
|
||||
```python
|
||||
ONLYOFFICE_APIJS_URL = 'http://your-ip:8044/web-apps/apps/api/documents/api.js'
|
||||
ONLYOFFICE_JWT_SECRET = 'your-jwt-secret'
|
||||
```
|
||||
|
||||
## File Structure
|
||||
|
||||
```
|
||||
onlyoffice-docs/
|
||||
├── config.json # Runtipi app configuration
|
||||
├── docker-compose.yml # Main compose file (self-contained)
|
||||
├── docker-compose.external-db.yml # Alternative with external DB
|
||||
├── description.md # App description for Runtipi UI
|
||||
├── .env.example # Example environment variables
|
||||
└── README.md # This file
|
||||
├── config.json # Runtipi app configuration
|
||||
├── docker-compose.yml # Runtipi compose (uses Runtipi vars)
|
||||
├── docker-compose.external-db.yml # Runtipi compose with external DB
|
||||
├── docker-compose.standalone.yml # Standalone compose (no Runtipi)
|
||||
├── docker-compose.standalone-external-db.yml # Standalone with external DB
|
||||
├── description.md # App description for Runtipi UI
|
||||
├── .env.example # Example environment variables
|
||||
└── README.md # This file
|
||||
```
|
||||
|
||||
## Data Persistence
|
||||
|
||||
Data is stored in `${APP_DATA_DIR}/data/`:
|
||||
**Standalone:** Data is stored in `./data/` (relative to compose file):
|
||||
- `logs/` - Application logs
|
||||
- `data/` - Certificates and configuration
|
||||
- `lib/` - File cache and temporary files
|
||||
- `db/` - PostgreSQL database (basic config)
|
||||
- `fonts/` - Custom fonts
|
||||
|
||||
**Runtipi:** Data is stored in `${APP_DATA_DIR}/data/` (managed by Runtipi)
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Container won't start
|
||||
- Check logs: `docker logs onlyoffice-docs`
|
||||
- Ensure port 8044 is not in use
|
||||
- Verify JWT_SECRET is set
|
||||
- Verify `JWT_SECRET` is set (required)
|
||||
|
||||
### Integration issues with Nextcloud
|
||||
- Ensure both services can reach each other
|
||||
- If using self-signed certs, enable `USE_UNAUTHORIZED_STORAGE`
|
||||
- If using self-signed certs, set `USE_UNAUTHORIZED_STORAGE=true`
|
||||
- Check that JWT secrets match exactly
|
||||
|
||||
### Performance issues
|
||||
- Use the `docker-compose.external-db.yml` configuration
|
||||
- Use the external-db compose variant
|
||||
- Increase container memory limits
|
||||
- Check disk I/O performance
|
||||
|
||||
|
||||
Reference in New Issue
Block a user