Deploy Filestash | (Just Updated) Self-Hosted Web File Manager, Dropbox Alternative for S3, SFTP, WebDAV, FTP, Admin Login Generated

Filestash web file manager for S3, SFTP, WebDAV, FTP, SMB, Google Drive

Deploy Filestash | (Just Updated) Self-Hosted Web File Manager, Dropbox Alternative for S3, SFTP, WebDAV, FTP, Admin Login Generated

Just deployed

/app/data

Deploy and Host Filestash on Railway

Built for an LLM agent to deploy and use. The deploy form has no fields to fill: the admin password is generated, the server cannot start without it, and the configuration and database live on a volume. Filestash is a self-hosted web file manager that puts S3, SFTP, FTP, WebDAV, SMB, Google Drive, Dropbox and other storage behind one browser UI, with an admin console, sharing, and plugins for image, video and office viewers, an open-source alternative to Dropbox, Google Drive and ownCloud as a front end for storage you already own.

About Hosting Filestash

This template runs one service, filestash: the upstream Filestash image, pinned by digest, through a thin wrapper, with a volume at /app/data that holds the configuration and database in state, and the home of the local storage backend in files. One public domain serves the file manager at / and the admin console at /admin. The server listens on Railway's injected PORT, and the healthcheck is GET /healthz.

What the wrapper fixes. Upstream Filestash starts with no admin password, so the first visitor to /admin chooses one and owns the instance, including every storage credential saved in its configuration. It listens on the 8334 baked into the image and ignores Railway's PORT, it runs as uid 1000 and cannot write a root-owned Railway volume, and it takes ADMIN_PASSWORD only as a bcrypt hash, so a plain password put there is stored as given and every login is refused. The wrapper refuses to start without ADMIN_PASSWORD (12 to 72 characters), hashes it with bcrypt at every start, listens on PORT, fixes the volume owner and then drops to uid 1000. Measured on an unmodified Filestash image run locally: with no variables an anonymous request read /admin/api/config, and with a plain ADMIN_PASSWORD the correct password answered Invalid Password. On the wrapper an anonymous read and write of the configuration answer 403, the generated password signs in and returns an admin token, and a start without the password exits with a message. Not reproduced on a Railway control of the incumbent listing.

Using it. Open the domain, go to /admin, and sign in with ADMIN_PASSWORD. Add storage backends (S3, SFTP, WebDAV, FTP, SMB, Google Drive and others) and enable the plugins you want, then open the domain and connect to a backend from the login page. The admin configuration is also reachable through the API at /admin/api/config, so an agent can read and change settings without the console. Setting ADMIN_PASSWORD again overrides a password changed in the console at the next restart. Redeploys keep the same login and the same configuration.

Agent contract

  • Public URL: https://RAILWAY_PUBLIC_DOMAIN (the generated domain of the filestash service)
  • Private URL: http://filestash.railway.internal:8080
  • Credentials: the variable ADMIN_PASSWORD on the filestash service is the admin login, given as plain text
  • Auth: POST /admin/api/session with a JSON body {"password":"..."}, an Origin header equal to the public URL and the header Accept: application/json returns access_token; send it as the header Authorization with the value Bearer plus a space plus the token on every /admin/api call. Without the token a read or write of /admin/api/config answers 403. There is no account registration.
  • Health: GET /healthz returns 200 without credentials
#!/bin/sh
# needs: RAILWAY_PUBLIC_DOMAIN, ADMIN_PASSWORD (variables of the filestash service); also curl, sed.
R="https://$RAILWAY_PUBLIC_DOMAIN"
J="Content-Type: application/json"
O="Origin: $R"
n=0; until [ "$(curl -s -o /dev/null -w '%{http_code}' "$R/healthz")" = 200 ]; do n=$((n+1)); [ "$n" -le 60 ] || break; sleep 5; done
curl -s -o /dev/null -w "health: %{http_code}\n" "$R/healthz"
# signup: none - Filestash has one admin login, set by ADMIN_PASSWORD, and no account registration
# a stranger cannot read or write the admin configuration: no token and a wrong token are both refused
curl -s -o /dev/null -w "read without key: %{http_code}\n" -H "$O" "$R/admin/api/config"
curl -s -X POST -H "$J" -H "$O" -d '{}' "$R/admin/api/config" -o /dev/null -w "write without key: %{http_code}\n"
curl -s -X POST -H "$J" -H "$O" -H "Authorization: Bearer not-a-token" -d '{}' "$R/admin/api/config" -o /dev/null -w "write with wrong key: %{http_code}\n"
# a wrong password is refused, the generated one returns an admin token
curl -s -X POST -H "$J" -H "$O" -d '{"password":"not-the-admin-password"}' "$R/admin/api/session" -o /dev/null -w "login with wrong password: %{http_code}\n"
TOKEN=$(curl -s -X POST -H "$J" -H "$O" -H "Accept: application/json" -d "{\"password\":\"$ADMIN_PASSWORD\"}" "$R/admin/api/session" | sed -n 's/.*"access_token": *"\([^"]*\)".*/\1/p')
if [ -n "$TOKEN" ]; then echo "login with key: ok"; else echo "login with key: FAILED"; fi
A="Authorization: Bearer $TOKEN"
# with the token the configuration is read and written back unchanged
curl -s -H "$A" -H "$O" -H "Accept: application/json" "$R/admin/api/config" -o /tmp/filestash-config.json -w "read with key: %{http_code}\n"
curl -s -X POST -H "$J" -H "$A" -H "$O" --data-binary @/tmp/filestash-config.json "$R/admin/api/config" -o /dev/null -w "write with key: %{http_code}\n"

Expected output against a fresh deploy (measured on the Railway demo and on a control deploy of the published code; the output is recorded in template.md):

health: 200
read without key: 403
write without key: 403
write with wrong key: 403
login with wrong password: 403
login with key: ok
read with key: 200
write with key: 200

The refusals are the contract: write without key: 403 and write with wrong key: 403 on the configuration, and login with wrong password: 403. There is no sign-up route, which the # signup: none line in the snippet states.

Why Deploy Filestash 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 Filestash 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.

  • Agent-ready - no deployer fields, a contract block, and one script that proves the server is healthy, a stranger cannot read or write the configuration, and the generated password signs in.
  • Locked from the first request - the server will not start without an admin password, so nobody can claim /admin before you do.
  • Works on first deploy - the listener follows Railway's injected PORT, the login accepts the plain generated password, and the volume is writable.
  • Data survives redeploys - the configuration, database and local files live on one volume.
  • Pinned - the upstream image is pinned by digest and the wrapper by tag and digest.

Common Use Cases

  • One web front end for S3, SFTP and WebDAV storage - browse, upload, preview and share files from several backends in one place.
  • A file portal for a team or a client - give people access to a bucket or a server without handing out its credentials.
  • Self-hosted alternative to Dropbox and Google Drive - keep the files on storage you control.

Dependencies for Filestash Hosting

  • The filestash service with its volume, created by the template. A storage backend (an S3 bucket, an SFTP host, a WebDAV server) is yours to supply when you add one in the admin console.

Deployment Dependencies


Template Content

More templates in this category

View Template
RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set
S3-compatible object store, keys and public URL preset, volume kept

SuperSlowSloth
0
View Template
TimescaleDB
A PostgreSQL-based time-series database for analytics on Railway.

Rakit
1
View Template
Neo4j 2026.10 Community
Neo4j graph database with APOC, Browser, Bolt TCP proxy and a volume

My Projects
0