---
title: "Deploy Gokapi"
description: "Self-hosted file sharing with expiring links, a Firefox Send alternative"
category: "Storage"
url: https://railway.com/deploy/gokapi
---

# Deploy Gokapi

Self-hosted file sharing with expiring links, a Firefox Send alternative

**[Deploy Gokapi on Railway](https://railway.com/template/gokapi)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/gokapi/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Storage

## Template content

### Gokapi https://cdn.jsdelivr.net/gh/Forceu/Gokapi@v2.2.4/internal/webserver/web/static/defaultFavicon.png

- **Source:** https://github.com/aalfath/gokapi-railway-template
- **Health check:** /login
- **Public domain:** Yes

## Documentation

# Deploy and Host Gokapi on Railway

Gokapi is a lightweight, self-hosted file sharing server and an alternative to the discontinued Firefox Send. Registered users upload files and share a link, and each file is removed automatically after a set number of downloads or days. It adds file requests, user roles, an API and optional end-to-end encryption.

## About Hosting Gokapi

Gokapi is a single Go binary with an embedded SQLite database, so hosting it needs one service and one persistent disk. This template builds the official `f0rc3/gokapi` v2.2.4 image, pinned by digest, from a public GitHub repo. On the first start a small wrapper writes Gokapi's configuration and creates the super-admin with a generated password, so the setup wizard is never exposed on the public URL. The config, database and uploaded files all live on one Railway volume at `/data`, and survive redeploys and updates. Railway's HTTPS domain becomes the public URL used in share links. A health check on `/login` gates each deploy.

## Common Use Cases

* Send large files to clients or colleagues with links that expire after a few downloads or days
* Collect files from other people with a file request link, without giving them an account
* Script uploads and link creation through Gokapi's REST API, for example from backups or CI

## Dependencies for Gokapi Hosting

* Gokapi service (this repo's Dockerfile on the official image), public HTTPS domain, port 53842
* Railway volume at `/data` for the config, the SQLite database and the files

### Deployment Dependencies

* Gokapi source and releases: https://github.com/Forceu/Gokapi (v2.2.4)
* Official documentation: https://gokapi.readthedocs.io/en/stable/
* Template repository: https://github.com/aalfath/gokapi-railway-template

### Implementation Details

After the deploy finishes, open `https://YOUR-DOMAIN/admin` and log in as `admin` with the `GOKAPI_ADMIN_PASSWORD` value from the Gokapi service's Variables tab. Change the password later in Gokapi itself; the variable is only read on the first start. Optional variables: `GOKAPI_PUBLIC_URL` after you add a custom domain, and `GOKAPI_RECONFIGURE=true` to open Gokapi's own setup page (S3 or Backblaze B2 storage, encryption, OIDC login); its login is printed in the deploy logs, and you remove the variable afterwards. Gokapi uses about 30 MB of RAM and runs on Railway's Free plan. Updates: the template builds from its GitHub repo, so when the pinned version is bumped Railway shows you an update notice; read the repo's CHANGELOG.md before you apply it.

## Why Deploy Gokapi 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 Gokapi 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.



## Similar templates

- [RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set](https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p) — S3-compatible object store, keys and public URL preset, volume kept
- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — A PostgreSQL-based time-series database for analytics on Railway.
- [Neo4j 2026.10 Community](https://railway.com/deploy/neo4j-202610-community) — Neo4j graph database with APOC, Browser, Bolt TCP proxy and a volume

Open this page in a browser: https://railway.com/deploy/gokapi
