Filestash web file manager with Collabora Online for in-browser office editing, using Docker Compose.
Last updated: Oct 2026
Filestash is a web file manager that connects to many backends (local disk, SFTP, S3, SMB, WebDAV and more). This stack pairs it with Collabora Online (CODE) as a WOPI server so you can open and edit Word, Excel and PowerPoint files in the browser.
Why you'd want it: A single web front end for all your storage, with document editing built in.
| Item | Value |
|---|---|
| Stack folder | /opt/stacks/filestash |
| Category | Documents |
| Main image | machines/filestash:latest |
| Services | 2 |
| Web UI | https://files.<YOUR_DOMAIN> |
| Official docs | https://www.filestash.app/docs/ |
.env/.secret files from Docker Folders and EnvironmentFolder layout:
/opt/stacks/
├── _shared/
│ ├── .env # shared, non-secret settings
│ └── .secret # passwords, tokens and keys (chmod 600, never commit)
└── filestash/
└── compose.yaml
/opt/appdata/filestash/ # persistent application data
/opt/stacks/filestash/compose.yaml:
services:
filestash:
container_name: filestash
image: machines/filestash:latest
env_file:
- /opt/stacks/_shared/.env
- /opt/stacks/_shared/.secret
restart: always
user: 0:0
environment:
- APPLICATION_URL=files.<YOUR_DOMAIN> # bare hostname only - no scheme, Filestash derives it from X-Forwarded-Proto
- CANARY=true
- OFFICE_URL=http://wopi_server:9980
- OFFICE_FILESTASH_URL=http://filestash:8334
- OFFICE_REWRITE_URL=https://files.<YOUR_DOMAIN>
logging:
driver: json-file
options:
max-file: ${DOCKERLOGGING_MAXFILE:-10}
max-size: ${DOCKERLOGGING_MAXSIZE:-200k}
ports:
- 8334:8334
volumes:
- /opt/appdata/filestash/state:/app/data/state # Persistent storage for Filestash data
wopi_server:
container_name: filestash_wopi
image: collabora/code:24.04.10.2.1
env_file:
- /opt/stacks/_shared/.env
- /opt/stacks/_shared/.secret
restart: always
deploy:
resources:
limits:
cpus: '2.0'
memory: 2000M
environment:
- "extra_params=--o:ssl.enable=false"
- "aliasgroup1=https://files.<YOUR_DOMAIN>:443"
command:
- /bin/bash
- -c
- |
curl -o /usr/share/coolwsd/browser/dist/branding-desktop.css https://gist.githubusercontent.com/mickael-kerjean/bc1f57cd312cf04731d30185cc4e7ba2/raw/d706dcdf23c21441e5af289d871b33defc2770ea/destop.css
/bin/su -s /bin/bash -c '/start-collabora-online.sh' cool
user: root
ports:
- 9980:9980
Compose reads these from the shared files with --env-file. Replace every <PLACEHOLDER> with your own value.
/opt/stacks/_shared/.env:
PUID=1000
PGID=1000
TZ=<TZ>
DOCKERLOGGING_MAXFILE=10
DOCKERLOGGING_MAXSIZE=200k
| Variable | File | Purpose | Example |
|---|---|---|---|
PUID |
.env |
User ID the container runs as (see Docker Folders) | 1000 |
PGID |
.env |
Group ID the container runs as | 1000 |
TZ |
.env |
Time zone in tz database format, e.g. America/New_York | <TZ> |
DOCKERLOGGING_MAXFILE |
.env |
Number of rotated container log files to keep | 10 |
DOCKERLOGGING_MAXSIZE |
.env |
Maximum size of each container log file | 200k |
| Host port | Container port | Protocol | Service | Purpose |
|---|---|---|---|---|
| 8334 | 8334 | tcp | filestash |
Filestash web UI |
| 9980 | 9980 | tcp | wopi_server |
Collabora Online (WOPI) |
| Host path | Container path | Service | Purpose |
|---|---|---|---|
/opt/appdata/filestash/state |
/app/data/state |
filestash |
Persistent storage for Filestash data |
Recommended limits, already set in the compose file under deploy.resources. Raise them if the app is starved, or lower them on small hosts.
| Service | CPU limit | Memory limit | Memory reservation | GPU |
|---|---|---|---|---|
wopi_server |
2.0 | 2000M | - | - |
sudo mkdir -p /opt/stacks/filestash /opt/appdata/filestash
sudo chown -R $USER: /opt/stacks/filestash
/opt/stacks/_shared/.env and /opt/stacks/_shared/.secret (chmod 600 .secret)./opt/stacks/filestash/compose.yaml.cd /opt/stacks/filestash
docker compose --env-file ../_shared/.env --env-file ../_shared/.secret config --quiet
docker compose --env-file ../_shared/.env --env-file ../_shared/.secret up -d
docker compose logs -f.files.<YOUR_DOMAIN> to port 8334 and pass WebSocket upgrades through./admin..docx to test.Tip: create a small wrapper such as
alias dc='docker compose --env-file /opt/stacks/_shared/.env --env-file /opt/stacks/_shared/.secret'so every stack uses the same env files.
cd /opt/stacks/filestash
docker compose --env-file ../_shared/.env --env-file ../_shared/.secret pull
docker compose --env-file ../_shared/.env --env-file ../_shared/.secret up -d
docker image prune -f
Some images here are pinned to a version. Read the upstream release notes before changing the tag.
Back up /opt/appdata/filestash before major upgrades. Watchtower can automate updates for stateless apps.
docker compose ps and docker compose logs --tail=100.aliasgroup1 must match the public HTTPS URL exactly, including :443.APPLICATION_URL is the bare host name only (no https://).:?err): run the config command above to see which variable is not set in your env files.Educational example. Review every path, port and credential before you deploy, and never publish your .secret file.