# Obsidian OnlyOffice Plugin Integrate the powerful OnlyOffice document editors directly into Obsidian. Edit `.docx` files seamlessly within your vault. ## How It Works This plugin uses Docker to run a local instance of the OnlyOffice Document Server. It then serves your vault files to this server, allowing you to edit them in a secure, self-contained environment. ## Getting Started For a complete, step-by-step tutorial from scratch (including how to set up a Docker environment on Windows), please follow our detailed setup guide: ➡️ **[Click here for the Complete Setup Guide](./GUIDE.md)** ## Quick Setup (If you already have Docker) 1. **Ensure your Docker environment is running.** 2. Navigate to the plugin folder: `/.obsidian/plugins/OnlyOffice/`. 3. Run `start-onlyoffice.bat` (Windows) or `./start-onlyoffice.sh` (macOS/Linux). 4. In Obsidian's OnlyOffice plugin settings, ensure the **JWT Secret** matches the one in the scripts. ## Managing the Server You can manage the OnlyOffice server using the other scripts in the plugin folder: - `stop-onlyoffice`: Stops the server to free up system resources. - `update-onlyoffice`: Downloads the latest version of OnlyOffice and prepares for an update. Run `start-onlyoffice` again after updating. - `remove-onlyoffice`: Completely removes the OnlyOffice container from your system. - `check-setup`: A diagnostic script to verify your setup. ## Troubleshooting If the plugin isn't working, run the `check-setup.bat` (Windows) or `./check-setup.sh` (macOS/Linux) script. It will diagnose common problems with your Docker setup and server connection. ### Step 3: Configure the Plugin 1. Open Obsidian's settings and go to "OnlyOffice". 2. Ensure the **JWT Secret** in the settings matches the one in the script files. **For better security, you should change the default secret:** 1. Open the `start-onlyoffice`, `update-onlyoffice`, and `check-setup` scripts and change the `JWT_SECRET` variable to a new, unique value. 2. Copy your new secret into the "JWT Secret" field in the plugin settings. 3. If the server is already running, use the `remove-onlyoffice` and `start-onlyoffice` scripts to restart it with the new secret. That's it! You can now open `.docx` files in Obsidian. ## Managing the Server You can manage the OnlyOffice server using the other scripts in the plugin folder: - `stop-onlyoffice`: Stops the server to free up system resources. - `update-onlyoffice`: Downloads the latest version of OnlyOffice and prepares for an update. Run `start-onlyoffice` again after updating. - `remove-onlyoffice`: Completely removes the OnlyOffice container from your system. - `check-setup`: A diagnostic script to verify your setup. ## Troubleshooting If the plugin isn't working, run the `check-setup.bat` (Windows) or `./check-setup.sh` (macOS/Linux) script. It will diagnose common problems, including: - If Docker is installed. - If the Docker service is running. - If the OnlyOffice container is running. - If the server is accessible. - If your JWT secret matches the one in the scripts.