---
title: "Deploy Public Bucket URLs"
description: "Get public bucket URLs and serve files with free egress"
category: "Storage"
url: https://railway.com/deploy/public-bucket-urls
---

# Deploy Public Bucket URLs

Get public bucket URLs and serve files with free egress

**[Deploy Public Bucket URLs on Railway](https://railway.com/template/public-bucket-urls)**

- **Creator:** timomeh
- **Category:** Storage
- **Total deploys:** 62

## Template content

### s3-public-presigner

- **Source:** https://github.com/timomeh/s3-public-presigner
- **Health check:** /_ah/up
- **Public domain:** Yes

## Buckets

- **public files**

## Documentation

# Deploy and Host Public Bucket URLs on Railway

Serve files from Railway Buckets using public, static URLs without a proxy. The service redirects to a presigned bucket URL, which then delivers the file to the user. This avoids paying for public egress when serving the file.

## Demo

https://bucket-public-presigner-demo.up.railway.app/duck.png

Open the link to view the file. Your browser will redirect to another URL: a presigned URL that grants temporary access to the object in your bucket. While this temporary URL will expire (by default after 1 hour), the original public URL will never expire.

## About Hosting Public Bucket URLs

Presigned URLs are temporary, signed URLs that grant time-limited access to specific objects in your bucket. This template generates them automatically and redirects requests to them. Users typically don't notice that the URL changed.

With S3-style storage, it’s common to use static URLs that perform an authorization check before redirecting to a presigned URL. This template skips the authentication and redirects to the file immediately.

**Caution: Only use this template if every file in your bucket should be publicly accessible.** If you need private files, use separate buckets or implement your own authenticated redirects. For an example implementation, check out the source code of this template: https://github.com/timomeh/s3-public-presigner

## Common Use Cases

- Serve public static files from a Railway Bucket
- Share files via public links
- Embed images or other assets using stable URLs

## Dependencies for Public Bucket URLs Hosting

There are no external dependencies. The template automatically provisions a Railway Bucket.

If you already have a bucket you want to expose publicly, update the variable references to point to your existing bucket.

### Deployment Dependencies

- [Railway Buckets](https://docs.railway.com/guides/storage-buckets)
- This template uses a lightweight Bun server: https://github.com/timomeh/s3-public-presigner

## Why Deploy Public Bucket URLs 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 Public Bucket URLs 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/public-bucket-urls
