---
title: "Deploy Alexandrie"
description: "Self-hosted Markdown notes and knowledge base with persistent storage."
category: "Other"
url: https://railway.com/deploy/alexandrie
---

# Deploy Alexandrie

Self-hosted Markdown notes and knowledge base with persistent storage.

**[Deploy Alexandrie on Railway](https://railway.com/template/alexandrie)**

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

- **Creator:** dardan
- **Category:** Other
- **Total deploys:** 1

## Template content

### MySQL https://devicons.railway.app/i/mysql.svg

- **Image:** mysql:8.0.46@sha256:7dcddc01f13bab2f15cde676d44d01f61fc9f99fe7785e86196dfc07d358ae2b
- **Start command:** `docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=256M`

### gateway https://devicons.railway.app/i/caddy.svg

- **Image:** caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648
- **Start command:** `/bin/sh -c 'printf "%s\n" "$CADDY_CONFIG" > /etc/caddy/Caddyfile && exec caddy run --config /etc/caddy/Caddyfile --adapter caddyfile'`
- **Health check:** /_health
- **Public domain:** Yes

### rustfs https://rustfs.com/favicon-32x32.png

- **Image:** rustfs/rustfs:1.0.0-rc.5@sha256:c36b3efea3d1e503f1a2581abd0e7611e0e5820dd30e1850a52384b3fc52bda4
- **Health check:** /health

### backend https://github.com/Smaug6739/Alexandrie/blob/3204e623c5ec85bf0d0c7aae8ac0b071ec909800/frontend/public/icons/icon-512.png?raw=true

- **Image:** ghcr.io/smaug6739/alexandrie-backend:v8.14.0

### frontend https://github.com/Smaug6739/Alexandrie/blob/3204e623c5ec85bf0d0c7aae8ac0b071ec909800/frontend/public/icons/icon-512.png?raw=true

- **Image:** ghcr.io/smaug6739/alexandrie-frontend:v8.14.0
- **Health check:** /login

## Documentation

# Deploy and Host Alexandrie with Railway

Alexandrie is a self-hosted Markdown note-taking and knowledge-base application for personal notes, research collections, and shared documentation. This community template deploys Alexandrie v8.14.0 with persistent database and file storage, automatically generated credentials, and a Railway-provided HTTPS domain. No custom domain, separate registry account, or manual secret generation is required.

## About Hosting Alexandrie

Five services run in one Railway project: the frontend, backend, MySQL, RustFS, and a Caddy gateway. Only the gateway has a public domain; the other services use private networking.

MySQL stores notes and account data, while RustFS stores uploaded files. Both have persistent volumes so their data survives service redeployments. Infrastructure passwords and signing secrets are generated separately for each installation. You create your own account after deployment, then configure administrator access or close registration if needed. Email delivery and single sign-on are optional; the default installation supports username-and-password login without them.

## Common Use Cases

- Personal Markdown notebooks.
- Research notes and study collections.
- Documentation and shared knowledge bases.

## Dependencies for Alexandrie Hosting

- **MySQL 8.0.46** — stores notes, accounts, and application data.
- **RustFS 1.0.0-rc.5** — S3-compatible storage for uploads and backup archives.
- **Caddy 2.11.4-alpine** — routes web, API, and file traffic through one gateway.

**RustFS is a release candidate.** This template uses single-node storage, not high availability. Evaluate that limitation and arrange backups before storing important data.

### Deployment Dependencies

- [Alexandrie source and documentation](https://github.com/Smaug6739/Alexandrie)
- [Alexandrie configuration reference](https://github.com/Smaug6739/Alexandrie/blob/v8.14.0/docs/content/6.deploy/6.configurations-list.md)
- [Railway volume backups](https://docs.railway.com/volumes/backups)

### Implementation Details

#### Getting Started

1. Deploy with the default settings. Allow a few minutes for startup, wait for all five services to reach `SUCCESS`, and open the gateway service’s generated URL.
2. Visit `/signup` and create your account. Registration is enabled initially.
3. **The first account is not automatically an administrator.** For admin access, log in and open `/api/users/@me` on the same domain. Copy `result.id`, set the backend variable `ADMIN_ACCOUNTS` to that ID, and redeploy the backend. Log out and back in afterward. Multiple admin IDs can be comma-separated.
4. To prevent further registrations, set backend `CONFIG_DISABLE_SIGNUP=true` and redeploy both backend and frontend. Create your account before disabling signup.

Enable two-factor authentication in your account settings for additional account protection.

#### Optional Email and SSO

SMTP is not configured by default, so password-reset emails will not work. To enable them, add backend variables `SMTP_HOST`, `SMTP_MAIL`, and `SMTP_PASSWORD`, optionally set `SMTP_MAIL_FROM`, and redeploy the backend.

For single sign-on, follow the [Alexandrie OIDC guide](https://github.com/Smaug6739/Alexandrie/blob/v8.14.0/docs/content/6.deploy/5.oidc-and-ldap.md). Keep native login enabled until your SSO configuration works.

#### Storage, Privacy, and Backups

- Uploaded objects in the main `alexandrie` bucket are **publicly readable by URL**. Do not treat an unguessable image URL as private access control.
- Application backup ZIPs are stored privately, use signed download URLs and are configured to expire after 24 hours. Download and retain your exports separately; restore them through Alexandrie’s import UI.
- Enable Railway backups for **both the MySQL and RustFS volumes**. Scheduled volume backups are not enabled by this template, and application exports do not replace full infrastructure backups. Test restoration before relying on backups.
- Deleting a volume can permanently destroy its stored data.
- Default upload limits are approximately **20 MB per file** and **1 GiB per user**.

#### Costs and Updates

Five running services and two persistent volumes incur normal Railway usage charges. Costs depend on resource use, storage, and traffic.

Image auto-updates are disabled. Updates require deliberate image-version changes; back up your data and test upgrades before applying them to an important installation.

### Why Deploy Alexandrie on Railway?

Railway brings deployment logs, generated HTTPS, private networking, persistent storage, and resource controls into a single project.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

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