Deploy ONLYOFFICE Docs
ONLYOFFICE Docs 10 online editors for docs, sheets, slides and PDF
ONLYOFFICE Docs
Just deployed
/data
Deploy and Host ONLYOFFICE Docs on Railway
ONLYOFFICE Docs (Document Server) is an open-source online office suite with editors for text documents, spreadsheets, presentations, forms and PDF, compatible with Microsoft Office formats. It has no file manager of its own: apps such as Nextcloud, Seafile, ownCloud or Moodle connect to it to open and co-edit files.
About Hosting ONLYOFFICE Docs
This template runs ONLYOFFICE Docs Community Edition 10.0.0, built from the official onlyoffice/documentserver image pinned by version and digest. Everything runs in a single service: nginx, the document service and the converter. A Railway volume at /data holds the WOPI keys, the document cache and any custom fonts, so they survive redeploys. JWT is on, with a secret generated for each deploy, so only apps that know the secret can open documents. The first boot takes about three minutes while it builds font and script caches. Plan for about 1 GB of RAM.
Common Use Cases
- Edit and co-edit Office documents inside Nextcloud, Seafile, ownCloud or Moodle
- Add document, spreadsheet and presentation editing to your own web app through the ONLYOFFICE API
- Convert documents between formats (DOCX, XLSX, PPTX, PDF, ODT and more) with the conversion API
Dependencies for ONLYOFFICE Docs Hosting
- A Railway volume for the document cache and keys (included)
- An app that connects to ONLYOFFICE Docs (for example Nextcloud with the ONLYOFFICE connector)
Deployment Dependencies
- ONLYOFFICE DocumentServer on GitHub (release v10.0.0)
- Official Docker image and settings
- Template source: aalfath/onlyoffice-railway-template
Implementation Details
After deploy:
- Wait until
https://YOUR-DOMAIN/healthcheckanswerstrue.https://YOUR-DOMAIN/welcome/shows the welcome page. - Copy the service's
JWT_SECRETvariable. - In your app's ONLYOFFICE connector (in Nextcloud: Administration settings, then ONLYOFFICE), set the Document Server address to
https://YOUR-DOMAIN/and the secret key toJWT_SECRET.
Variables: JWT_SECRET (generated) and PORT (80). There is nothing to fill in when you deploy. Optional upstream settings, such as WOPI_ENABLED=true, or ALLOW_PRIVATE_IP_ADDRESS=true when your app reaches ONLYOFFICE over Railway's private network, can be added later as service variables.
Updates: the service builds from the template's GitHub repo. When we move to a new ONLYOFFICE release, Railway shows an "update available" notice in your project, and you choose when to apply it. The changelog is in the repo, and your volume stays as it is.
ONLYOFFICE Docs Community Edition is licensed under AGPL-3.0.
Why Deploy ONLYOFFICE Docs on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying ONLYOFFICE Docs on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
ONLYOFFICE Docs
aalfath/onlyoffice-railway-template