---
title: "Deploy SeaweedFS | (Just Updated) S3 Object Store, Public URL and Keys Set"
description: "SeaweedFS S3 store. Keys set from boot, public URL, data kept on volume"
category: "Storage"
url: https://railway.com/deploy/seaweedfs-or-just-updated-s3-object-stor
---

# Deploy SeaweedFS | (Just Updated) S3 Object Store, Public URL and Keys Set

SeaweedFS S3 store. Keys set from boot, public URL, data kept on volume

**[Deploy SeaweedFS | (Just Updated) S3 Object Store, Public URL and Keys Set on Railway](https://railway.com/template/seaweedfs-or-just-updated-s3-object-stor)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/seaweedfs-or-just-updated-s3-object-stor/manifest.json

- **Creator:** SuperSlowSloth
- **Category:** Storage

## Template content

### seaweedfs

- **Image:** chrislusf/seaweedfs:4.48@sha256:4e61d15fd35994cb1e43e1e553dff106794841fd9a99ade2fc8c8bfce4d7872d
- **Start command:** `/bin/sh -c 'set -e; D=/data/seaweedfs; mkdir -p $D; export AWS_ACCESS_KEY_ID=$S3_ACCESS_KEY AWS_SECRET_ACCESS_KEY=$S3_SECRET_KEY; echo "[railway] s3 on :${PORT:-8080} owner=$(stat -c %u:%g $D) key=${S3_ACCESS_KEY%"${S3_ACCESS_KEY#????}"}..."; exec weed server -dir=$D -ip.bind=0.0.0.0 -s3 -s3.port=${PORT:-8080} -volume.port=8082 -master.volumeSizeLimitMB=256 -volume.max=1000'`
- **Public domain:** Yes

## Documentation

# Deploy and Host SeaweedFS on Railway

SeaweedFS is a distributed object and file store with an S3-compatible API. It stores small and
large blobs cheaply, and any S3 client (aws-cli, boto3, rclone, MinIO SDKs) can talk to it.

This template runs SeaweedFS 4.48 as one service from a digest-pinned official image: master,
volume server, filer and S3 gateway together, the S3 API on a public Railway domain, and all data
on a Railway volume.

## About Hosting SeaweedFS

- **The S3 API needs keys from the first request.** A stock `weed server -s3` container accepts
  anonymous writes: an unauthenticated `PUT /bucket` returned 200. Here an access key and secret
  key are generated per deploy and anonymous requests are rejected with 403.
- **It has a public URL.** The S3 gateway listens on Railway's `PORT` and the template creates the
  domain, so clients outside Railway can connect straight away. Services in the same project use
  the private endpoint.
- **Data survives redeploys.** Objects live on the attached volume, in a subdirectory so the
  volume's `lost+found` never lands in the data directory. An object written before a redeploy was
  read back after it.
- **Many buckets work on a small volume.** SeaweedFS gives each bucket its own volume files and
  works out how many it may create from the free disk divided by the volume-file size (30 GB by
  default). On a 5 GB Railway volume that allowed three, and the first upload after creating a
  bucket failed with `No writable volumes and no free volumes left`. Here files are capped at
  256 MB and the slot count is set explicitly, so buckets and uploads work from the first request.

## Common Use Cases

- An S3-compatible bucket for application uploads, backups and static assets
- A cheaper object store for AI datasets, model files and embeddings snapshots
- A MinIO or S3 replacement for services that only need the S3 API
- Blob storage behind a filer with directories and TTLs

## Dependencies for SeaweedFS Hosting

- One Railway volume for the data directory (created by the template)

### Deployment Dependencies

- SeaweedFS documentation: https://github.com/seaweedfs/seaweedfs/wiki
- Official image: https://hub.docker.com/r/chrislusf/seaweedfs

### Implementation Details

| Variable | Purpose |
| --- | --- |
| `S3_ACCESS_KEY` | S3 access key id, generated per deploy. |
| `S3_SECRET_KEY` | S3 secret key, generated per deploy. |
| `S3_ENDPOINT` | Public HTTPS endpoint, for clients outside Railway. |
| `S3_PRIVATE_ENDPOINT` | Private endpoint, for services in the same project. |

```sh
export AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY=
aws --endpoint-url  --region us-east-1 s3 mb s3://my-bucket
aws --endpoint-url  --region us-east-1 s3 cp file.txt s3://my-bucket/
```

Use path-style addressing. The master, volume and filer ports stay on the private network and are
not exposed by the template.

## Why Deploy SeaweedFS 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 SeaweedFS 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

- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.
- [Redis](https://railway.com/deploy/redis-1) — Self Host Latest Redis with Railway
- [EasyImg](https://railway.com/deploy/easyimg) — Simple self-hostable Nuxt.js personal image hosting system.

Open this page in a browser: https://railway.com/deploy/seaweedfs-or-just-updated-s3-object-stor
