Railway

Deploy File Browser

File Browser — web-based file manager for managing files and folders.

Deploy File Browser

Just deployed

/srv

File Browser — Railway Template

Deploy on Railway

Deploy File Browser — a web-based file manager — on Railway in minutes.

File Browser provides a file managing interface within a specified directory. Upload, delete, preview, rename, and edit your files through a clean web UI. It supports multiple users, share links, and granular permissions.

Features

  • Single-file binary — Go-based, minimal resource usage (~15 MB)
  • Web-based file management — upload, download, rename, delete, preview
  • Multi-user support — each user can have their own directory
  • Share links — create time-limited, password-protected shares
  • Text editor — edit files directly in the browser
  • Image thumbnails — automatic preview generation
  • Search — full-text and filename search
  • Archive support — upload and extract zip/tar/gz archives

Architecture

                      ┌──────────────┐
                      │   Browser    │
                      └──────┬───────┘
                             │ HTTPS
                      ┌──────▼───────┐
                      │   Railway    │
                      │  Edge Proxy  │
                      └──────┬───────┘
                             │ HTTP :PORT
                      ┌──────▼───────┐
                      │  Filebrowser │
                      │  (Go binary) │
                      │  :$PORT      │
                      ├──────────────┤
                      │  /srv root   │
                      │  (ephemeral) │
                      └──────────────┘

Note: File Browser supports a persistent database at /srv/filebrowser.db. On Railway, this is ephemeral unless you attach a volume.

Quick Start

Click the Deploy button above, then configure these environment variables:

VariableDefaultDescription
PORT8080HTTP port (Railway sets this automatically)
ROOT/srvRoot directory to serve
FB_USERNAMEadminDefault admin username (first run only)
FB_PASSWORD(unset)Default admin password (plain text, first run)

On first startup, File Browser creates an admin user automatically. You can log in with credentials configured via env vars.

Local Development

# Clone the repository
git clone git@github.com:INAPP-Mobile/railway-filebrowser.git
cd railway-filebrowser

# Build the Docker image
podman build -t railway-filebrowser .

# Run the container
podman run -d \
  --name filebrowser \
  -p 8080:8080 \
  -e PORT=8080 \
  -v /path/to/your/files:/srv \
  railway-filebrowser

# Visit http://localhost:8080

Configuration

File Browser supports environment variables for configuration. These are passed as CLI flags:

FlagEnvironmentDefaultDescription
--portPORT8080HTTP listen port
--address0.0.0.0Bind address
--rootROOT/srvRoot directory to serve
--databaseFB_DATABASE/srv/filebrowser.dbDatabase path
--usernameFB_USERNAMEadminFirst user's username
--passwordFB_PASSWORD(auto-gen)First user's password (hashed)
--noauthfalseDisable authentication (not recommended)
--baseurlFB_BASEURL""Base URL for reverse proxy
--cache-dir""File cache directory

Advanced: Custom Configuration File

File Browser also supports a .json or .yaml configuration file. Generate one:

filebrowser config init > filebrowser.json

Then mount it at /srv/filebrowser.json or use --config flag.

Troubleshooting

Unable to log in

The default admin credentials are set via FB_USERNAME and FB_PASSWORD. If these are not set, File Browser generates a random password on first startup. Check your Railway logs for the generated credentials.

Files not visible

Ensure the root directory (/srv) contains files. File Browser serves the contents of this directory. If you've attached a Railway volume, mount it at /srv.

Port conflict

Railway sets the PORT environment variable automatically. The Dockerfile binds to ${PORT}. If you see EADDRINUSE errors, ensure no other service is using the port.

Slow thumbnails

Image processing is CPU-intensive. Adjust the --img-processors flag if needed (default: 4).

Dependencies for File Browser

Deployment Dependencies

Technical Dependencies

  • Go binary — self-contained, no runtime dependencies
  • Alpine Linux 3.20 — base image (~5 MB)

Deploy and Host

Deploy File Browser to Railway in one click. No local environment setup required — the containerized image includes everything needed for your file management needs on production-grade infrastructure with automatic HTTPS.

Deploy on Railway

Quick Deploy Steps

  1. Click the Deploy to Railway button above
  2. Set FB_USERNAME and FB_PASSWORD environment variables (optional but recommended)
  3. Click Deploy — the build takes ~30 seconds
  4. Visit your new file browser at the generated *.up.railway.app URL

Environment Variables

VariableRequiredDefaultDescription
PORTNo8080HTTP listen port (Railway sets this automatically)
ROOTNo/srvRoot directory to serve files from
FB_USERNAMENoadminFirst admin username (ignored if admin already exists)
FB_PASSWORDNoauto-generatedDefault password on first run — set explicitly for reproducibility

Persistent Storage

File Browser stores its SQLite database at /srv/filebrowser.db by default. To persist data across deployments, attach a Railway Volume and mount it at /srv. The volume preserves your files and the embedded database automatically.

About Hosting

How It Works on Railway

File Browser runs inside a single Alpine-based container (Alpine 3.20, ~30 MB). The Dockerfile downloads the File Browser Go binary (v2.63.17) at build time and configures it to listen on the port assigned by Railway via the PORT environment variable. A health check pings /health to verify the container is serving requests.

The service is self-contained — no external database, cache, or dependencies are needed. All user data (files + metadata) lives inside the container's filesystem at /srv.

Resource Profile

MetricValue
Image size~30 MB uncompressed
RAM usage15–50 MB idle (~100 MB under heavy file operations)
CPU usageNegligible idle; burst during thumbnail generation
Startup time~2 seconds after image pulled

Why Deploy

  • Zero-config deployment — one-click deploy, no Docker knowledge required
  • No external dependencies — single binary, SQLite for metadata, no Redis or Postgres
  • Automatic HTTPS — Railway provisions TLS certificates on your *.up.railway.app domain
  • Persistent storage — attach a volume to keep files and the database across deployments
  • Lightweight — runs perfectly on the smallest Railway Hobby tier

Common Use Cases

  • Personal media server — store and access photos, documents, and videos from anywhere
  • Team file sharing — share folders via public links with time-limited, password-protected access
  • Backup destination — serve as a remote backup location for files from other servers or desktops
  • Static site content — host images, PDFs, and assets for Jekyll, Hugo, or custom static sites
  • Cross-device sync — replace Dropbox/Google Drive with your self-hosted file manager

License

This template is licensed under the MIT License.

File Browser itself is licensed under Apache License 2.0.


Template Content

More templates in this category

View Template
Garage S3 Storage
Ultra-light S3 server: fast, open-source, plug-and-play.

PROJETOS
7
View Template
Postgres Backup to Cloudflare R2 (S3-Compatible)
Automated PostgreSQL backups to S3-compatible storage with encryption

Artour
7
View Template
ReadySet
A lightweight caching engine for Postgres

Milo
34