Deploy Deploy Doca Collaborative Docs

Self-hosted co-editing docs, sheets, slides and knowledge base

Deploy Deploy Doca Collaborative Docs

Just deployed

/data

Deploy and Host self hosted Doca (Collaborative Docs) on Railway

This template deploys Doca, an open-source collaborative document workspace, as one container with SQLite and local files on a persistent volume.

About Hosting Doca open-source software on Railway (self hosted Doca template)

Doca is MIT-licensed open-source software for documents, sheets, slides, canvas and a knowledge base, with real-time co-editing. This is an independent Railway packaging template, not an official or endorsed listing.

Why Deploy Doca, the open-source collaborative document workspace on Railway (Railway Free Trial)

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 Doca 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.

Railway vs Other Hosting Providers and VPS for Doca self hosting

Doca runs as one container with data on a volume. The table compares Railway with three common options.

ProviderWhat You Get with RailwayWhat You Get with the Other Provider
DigitalOceanA template with the master key generated, the admin created, and health checks and volume set up.A virtual server with full control, but you install Docker, the reverse proxy, TLS and backups.
AWSA managed service with a public domain and persistent storage set up for this template.Broad control over networking and scaling, with many services to configure first.
HetznerUsage-based hosting with the one-container layout ready and no server maintenance to plan.Low-cost servers where you handle OS updates, hardening and Docker setup.

Pick Railway for a fast start, a VPS for full control.

Common Use Cases for hosted Doca

  • Real-time team documents and comments: Draft proposals or meeting notes together, comment on passages, and check document history.
  • Shared budgets in sheets: Keep a team budget or tracker in a spreadsheet several people edit at once.
  • Presentations and infinite canvases: Build project-update slides or map a workflow on an infinite board everyone sees together.
  • Knowledge libraries with source evidence: Organize documents into knowledge libraries with a document tree so references stay findable.
  • Optional AI document assistance and MCP integrations: Once you add a model provider key in the admin area, the built-in assistant can help with authorized documents, and compatible AI clients can connect over MCP. Both are optional, and the workspace works fine without them.

Dependencies for Doca Docker hosted on Railway

This template runs one Doca container built from the onepush-dev 0.2.32 image, which wraps the upstream smartdoca/doca release.

Deployment Dependencies for Managed Doca Service (one Doca container with SQLite and local files on /data; no Redis or Postgres in this template)

VariablePurpose
DOCA_ORIGINPublic HTTPS origin, set from your Railway domain. Include the https:// prefix, not just the hostname. Must match the domain in use.
DOCA_CREDENTIAL_MASTER_KEY64 hex characters that encrypt stored credentials. Generated for you. If you lose it, stored credentials become unreadable, so keep a copy with your volume backups. Backup and restore have not been tested on Railway.
DOCA_ADMIN_PASSWORDPassword for the first administrator, generated at deploy time. Change it after first sign-in.

The template pre-fills all three, so you enter nothing. Optional external PostgreSQL, Redis and S3 are not included template services and would need to be added yourself.

Implementation Details for Doca (Using the onepush-dev 0.2.32 image based on upstream smartdoca/doca)

The startup script creates the first administrator from DOCA_ADMIN_LOGIN, which defaults to admin, because upstream normally needs an interactive shell command.

How does Doca compare against other tools

Doca vs Notion (Notion Alternative)

  • Hosting model: Notion is a hosted workspace run by its vendor. Doca runs on infrastructure you control, which suits teams that need their documents on their own host.
  • Where Notion wins: Notion has a mature ecosystem of integrations, templates, and mobile apps. Doca is narrower, with fewer ready-made connections.
  • Doca's angle: One container covers documents, sheets, slides, canvas, and a knowledge base, with real-time co-editing built in.

Doca vs Nextcloud Office (Nextcloud Office Alternative)

  • Approach: Nextcloud Office is a collaboration layer added to a broader file-sharing platform. Doca is a single workspace focused on documents and knowledge.
  • Where Nextcloud wins: If you already run Nextcloud for files and calendars, its office integration fits that stack well.
  • Doca's angle: Less to operate for a small team wanting only a shared workspace.

Doca vs CryptPad (CryptPad Alternative)

  • Approach: CryptPad is another self-hostable collaboration approach with its own design goals. Check Doca's documentation before assuming any specific security properties.
  • Where CryptPad wins: If its particular design model is a requirement, CryptPad is the more established choice for that goal.
  • Doca's angle: Documents, sheets, slides, and a knowledge base in one place, with optional AI features that need model keys you add yourself.

Doca with Docker Compose vs Doca on Railway (Railway Deployment Alternative)

  • Setup effort: Docker Compose gives full control of files, proxy and volumes; Railway handles domain, volume and health checks.
  • Secrets: On Railway the master key and admin password are generated as service variables. Keep a copy of the master key, because losing it makes stored credentials unreadable.
  • Scaling: This template runs one container on SQLite. Multi-replica setups need external PostgreSQL, Redis, and S3-compatible storage that you configure yourself.

How to use Doca on Railway?

Once the deploy finishes, follow these first-day steps.

  1. Open the public domain Railway generated for the Doca service.
  2. Sign in as admin using the password stored in the Doca service Variables under DOCA_ADMIN_PASSWORD.
  3. Change that password inside the app right away. Editing the boot variable later will not reset an existing admin account.
  4. Create a folder, then a document, to confirm the workspace and file storage work.
  5. Invite your teammates from inside the workspace.
  6. Configure AI model providers only if you want the assistant features.

Check that the service is up from a terminal:

curl https://your-domain/health

The interface was tested in Chinese first.

How to self host Doca on other VPS Services (Doca self hosting guide)

Clone the Repository

Create a permanent deployment directory and download the standalone Docker Compose configuration from the upstream release that matches the version you plan to run.

mkdir doca && cd doca
# Download compose.yaml from the matching upstream release

Install Dependencies

You need Docker Engine, Docker Compose and an HTTP(S) reverse proxy serving your domain. Do not expose Doca over plain HTTP on the public internet.

Configure Environment Variables

Set DOCA_ORIGIN to your public HTTPS origin. Generate DOCA_CREDENTIAL_MASTER_KEY with openssl rand -hex 32.

openssl rand -hex 32
chmod 600 compose.yaml

Start the Doca Application

Start the stack, then create the first administrator inside the container. There is no default account, and the password must be at least 12 characters.

docker compose up -d
docker compose exec doca bash docker/admin.sh bootstrap

Once the reverse proxy is in front of the container and health checks pass, sign in and change the password in the app.

Official Pricing of Doca (Doca pricing)

Doca is MIT-licensed open-source software, so self-hosting it is free, though you pay for infrastructure and any model or mail provider you add.

Doca hosted vs self hosted comparison (Pricing, features, costs, and more)

Doca is MIT-licensed, so the software is free; you pay for infrastructure and gain data control.

Monthly cost of self hosting Doca on Railway

Railway bills on usage: memory and CPU, the /data volume size, and any extra services.

System Requirements for Hosting Doca on a VPS

A VPS needs enough memory and disk for the application, the SQLite database, local file storage and the office and PDF export tools.

Frequently Asked Questions (FAQs)

Where is the administrator password?

The Doca service Variables hold DOCA_ADMIN_PASSWORD, which the template generates for you, and the first administrator is created from it at boot. Changing that variable later does not reset an existing admin account, so change the password inside the app instead.

Must I keep the master key?

Yes. Losing the master key makes stored credentials unreadable, so keep it safe alongside your /data volume backups. Backup and restore have not been tested on Railway.

What if a custom domain gives a 421 error?

Doca rejects requests whose Host does not match DOCA_ORIGIN. When you add a custom domain, update DOCA_ORIGIN to that HTTPS origin so the app accepts it.

Is AI required?

No. The AI assistant is optional and only works after you add a model provider key in the admin area. Doca runs fully without it.

Can multiple replicas share the default SQLite volume?

No. Scaling out needs PostgreSQL, Redis and S3-compatible storage, which this template does not include.

Why is the image so large?

The image bundles LibreOffice and a PDF renderer so office and PDF export work out of the box. That adds size, so expect the first pull to take a minute or so.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
50
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51