Deploy File Viewer
Browser-side previewer for Office, PDF, CAD and 3D files
file-viewer
Just deployed
Deploy and Host self hosted File Viewer (Other) on Railway
This template deploys File Viewer, an independent community packaging of flyfish-dev/file-viewer v3.3.4 (Apache-2.0), as one static site on Railway. It is not affiliated with or endorsed by File Viewer or flyfish-dev.
About Hosting File Viewer open-source software on Railway (self hosted File Viewer template)
File Viewer is an Apache-2.0 browser previewer, and this template runs the unmodified upstream flyfishdev/file-viewer:3.3.4 static nginx image as one public service on port 8080.
Railway handles building the wrapper image, routing your domain to port 8080, running the health check on / and restarting the service if it stops.
Why Deploy File Viewer, the self-hosted browser file previewer on Railway
Desktop apps need a licence for each format, and upload-based converters send your files to someone else's servers.
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 File Viewer 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 File Viewer self hosting
Here is how running the File Viewer template on Railway compares with running the same static site on other providers.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | A one-click deploy with a public domain on port 8080 and a health check on / already set. | A droplet you size and secure yourself, including Docker, TLS, firewall and updates. |
| AWS | One service with no variables or volume to configure before the site is live. | Fine-grained control over networking and compute, with more setup before a comparable preview is public. |
| Hetzner | A managed deploy of the unmodified upstream image without touching a server. | Low-cost servers where you install Docker, set up the domain and certificates, and keep the host patched. |
Pick based on how much server administration you want to own.
Common Use Cases for hosted File Viewer
- Previewing shared documents in the browser: Teams can point File Viewer at a URL and open Word, Excel, PowerPoint and PDF files without installing Office. The pinned upstream README lists 275 registered extensions (225 stable, 50 experimental). Rendering happens in the visitor's browser, so the server only delivers the static site and the file.
- Reviewing CAD, 3D and design files: Engineers can check DWG, DXF, STEP, IFC and 3D model files from a link. The optional DWG and DWF runtime is AGPL-3.0-only, so review that license first.
- Browsing archives and source code: Support or review staff can inspect archive contents and read code files without an upload step or a database.
- Comparing two documents: The compare page at /compare.html shows two revisions side by side for contract or spec changes.
- Embedding previews in your own app: The iframe.html page can be loaded inside another site with a browser-reachable file URL, provided CORS headers are set.
Dependencies for File Viewer Docker hosted on Railway
This template deploys one static web service with no database, no volume, and no inputs to fill in.
Deployment Dependencies for Managed File Viewer Service
The template contains one service, file-viewer, exposed publicly on port 8080. It has no volume and no template variables. Keep the replica count at one.
Implementation Details for File Viewer
The image ghcr.io/onepush-dev/file-viewer:3.3.4 is the unmodified upstream flyfishdev/file-viewer:3.3.4 static nginx image. If the sed does not match, the build fails on purpose.
How does File Viewer compare against other tools
File Viewer vs opening files in desktop apps (Desktop Office and Viewer Apps)
- Visitor access: File Viewer runs in the visitor browser, so anyone with the link can preview a file without installing Word, Excel, a PDF reader or a CAD tool. Desktop apps win when people already have them and need full editing.
- Editing: File Viewer is a read-only viewer, not an editor.
- Data handling: Files are rendered in the visitor browser and nothing is uploaded. The demo has no access control, so add your own authentication for sensitive files.
File Viewer vs a conversion-server preview stack (Conversion Server Previewers)
- Infrastructure: Upstream File Viewer renders in the browser and needs no separate conversion server, so there is less to operate. A conversion stack is more practical when you need server-side output.
- Offline use: Workers, WASM and fonts can be self-hosted for networks without outside access.
- Scope: A dedicated conversion pipeline can offer more control over output for a narrow format list.
File Viewer with Docker vs Railway (Docker Self Hosting and Railway Deploy)
- Setup: Running the unmodified upstream image with Docker gives full control over networking and nginx. Railway deploys this template from a Dockerfile as a single public service with no variables to set.
- Port and health checks: The template changes nginx from port 80 to 8080 and uses / as the health check path with a 60-second timeout, because upstream /healthz returns 204, which Railway does not count as healthy.
- Operations: Railway handles hosting, domains and restarts with the restart policy set to Always. Docker self hosting means you manage the host, updates and networking yourself.
How to use File Viewer on Railway?
- Open the public domain Railway gives your File Viewer service. The static site loads directly, with no login screen.
- Drop a file onto the page or pick one with the file picker. Office, PDF, image, archive and code files preview in your browser tab, and nothing is uploaded to the server.
- To compare two documents, open /compare.html on the same domain and choose the files.
- To embed a previewer in your own app, use the iframe.html page with a file URL your visitor's browser can reach, such as iframe.html?url=https://your-domain/example/word.docx. Cross-origin files need proper CORS headers.
- The demo has no access control, so anyone who can reach the domain can open it. Add your own auth in front if the files are sensitive.
- Keep one replica for this service.
Health check path: /
Health check timeout: 60 seconds
How to self host File Viewer on other VPS Services (File Viewer self hosting guide)
Clone the Repository
Clone the upstream repository and check out the release you want to run, which is v3.3.4 in this template.
git clone https://github.com/flyfish-dev/file-viewer.git
cd file-viewer
git checkout v3.3.4
Install Dependencies
The simplest route is the upstream flyfishdev/file-viewer:3.3.4 container image, which needs only Docker on your VPS.
npm install
Configure Environment Variables
This template has no template variables, and the upstream static site needs no environment configuration.
Start the File Viewer Application
Run the documented upstream container, mapping port 80 on your host to the container, then open your-domain in a browser.
docker run -d -p 80:80 flyfishdev/file-viewer:3.3.4
Railway handles the build, the HTTPS domain, and the restart behavior for you, so this manual setup is only needed off Railway.
Pricing and License of File Viewer (File Viewer pricing)
File Viewer is open-source software released under the Apache-2.0 license, so you can self-host it at no license cost.
File Viewer hosted vs self hosted comparison (Pricing, features, costs, and more)
This template packages the Apache-2.0 File Viewer software, and the optional DWG/DWF CAD runtime is AGPL-3.0-only. No hosted File Viewer plan prices are quoted here.
Monthly cost of self hosting File Viewer on Railway
Railway bills on usage, so your monthly cost depends on the RAM and CPU the service uses and what else runs in the project.
System Requirements for Hosting File Viewer on a VPS
File Viewer renders files in the visitor's browser, so the server only serves static files. No specific minimum CPU or RAM is guaranteed here.
After each deploy, open the public domain and confirm the health check passes before you treat the service as ready. Keep one replica of any service that holds local persistent state, because a second replica would not see the same volume data. Copy the generated values from the Variables tab into your own records, and keep signing or encryption keys stable across redeploys. If you attach a custom domain, update the public URL variables to that origin before you rely on callbacks, invites, media links or sign-in. Optional mail, AI or agent features need credentials you supply later and are not required to boot this template. Untested upgrades, backups and restores stay your responsibility; this overview only reports the recorded first-deploy checks. When something fails, start with the service logs and the health path before you rotate.
Frequently Asked Questions (FAQs)
Are my files uploaded to the server?
No. Files are rendered in the visitor's browser, and nothing is uploaded to the server in this demo.
Is there a login?
No. The demo has no access control, so place it behind your own authentication if the files are sensitive.
Why does the health check use / and not /healthz?
Upstream /healthz returns 204, which Railway does not count as healthy. The template uses / with a 60-second timeout instead.
What should I back up?
Nothing on a volume, because this service is stateless and has no local data to back up.
What about DWG or DWF files?
The optional DWG/DWF/DWFX CAD runtime is AGPL-3.0-only, while the viewer itself is Apache-2.0.
Template Content
file-viewer
ghcr.io/onepush-dev/file-viewer:3.3.4