---
title: "Deploy Enclosed"
description: "Private, end-to-end encrypted notes and files that expire or self-destruct"
category: "Storage"
url: https://railway.com/deploy/enclosed
---

# Deploy Enclosed

Private, end-to-end encrypted notes and files that expire or self-destruct

**[Deploy Enclosed on Railway](https://railway.com/template/enclosed)**

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

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

## Template content

### Enclosed https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/enclosed.png

- **Source:** https://github.com/aalfath/enclosed-railway-template
- **Health check:** /api/ping
- **Public domain:** Yes

## Documentation

# Deploy and Host Enclosed on Railway

Enclosed is a minimal, open-source web app for sending private notes and files. Your browser encrypts each note with AES-GCM before it leaves, and the key stays in the part of the link after `#`, so the server never sees the content. Notes can have a password, an expiry time and "delete after reading".

## About Hosting Enclosed

This template runs Enclosed 1.16.1 from the official `corentinth/enclosed` image, pinned by version and digest, as one Node.js service with a public HTTPS domain. Notes and attachments are stored as encrypted files on a Railway volume at `/app/.data`, so they survive restarts and redeploys. Railway checks `/api/ping` before it switches traffic. The JWT secret is generated for each deploy, so upstream's `change-me` default is never used. There is nothing to fill in and no admin account to create: open the URL and write a note. Expired notes are removed every hour. The service builds from a GitHub repo, so Railway tells you when we publish a new Enclosed version, and you choose when to apply it.

## Common Use Cases

* Send a password, API key or other secret to a colleague with a link that expires or self-destructs after reading
* Share a confidential file without leaving a copy in chat or email history
* Run a private note-sharing service for your team, optionally limited to signed-in users

## Dependencies for Enclosed Hosting

* One Railway service built from `aalfath/enclosed-railway-template` (official `corentinth/enclosed` image)
* One Railway volume for the encrypted notes and attachments

### Deployment Dependencies

* Enclosed source: https://github.com/CorentinTh/enclosed
* Release 1.16.1: https://github.com/CorentinTh/enclosed/releases/tag/v1.16.1
* Self-hosting docs: https://docs.enclosed.cc/self-hosting/docker
* Configuration reference: https://docs.enclosed.cc/self-hosting/configuration
* Template repository: https://github.com/aalfath/enclosed-railway-template

### Implementation Details

After deploy, open the service's public domain and create a note. By default anyone who finds the URL can create notes. To allow only your own users, add these service variables and redeploy:

```
PUBLIC_IS_AUTHENTICATION_REQUIRED=true
AUTHENTICATION_USERS=you@example.com:BCRYPT-HASH
```

Make the `email:bcrypt-hash` pairs (comma-separated) with upstream's key generator at https://docs.enclosed.cc/self-hosting/users-authentication-key-generator. Other optional settings: `PUBLIC_DEFAULT_NOTE_TTL_SECONDS` (3600, 86400, 604800 or 2592000), `PUBLIC_DEFAULT_DELETE_NOTE_AFTER_READING`, `PUBLIC_IS_SETTING_NO_EXPIRATION_ALLOWED` and `NOTES_MAX_ENCRYPTED_PAYLOAD_LENGTH` (bytes, 50 MB by default).

**Updates:** when we bump the pinned Enclosed version in the template repo, Railway shows an "update available" notice on your project. Read the repo's `CHANGELOG.md` first; your notes stay on the volume.

## Why Deploy Enclosed 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 Enclosed 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/enclosed
