Follow these steps once — after that your app runs 24/7 at a public URL with zero local setup needed.
- A free account at https://railway.app (sign up with GitHub)
- Git installed on your machine (https://git-scm.com)
- Your VoiceNotes project folder with all files
Your folder must look exactly like this before you start:
voicenotes/
├── app.py
├── requirements.txt
├── Dockerfile
├── railway.toml
├── .gitignore
└── templates/
├── index.html
├── reader.html
└── editor.html
Copy the four new files (Dockerfile, railway.toml, requirements.txt, .gitignore) into your voicenotes/ folder alongside app.py.
Open a terminal in your voicenotes/ folder and run:
git init
git add .
git commit -m "initial commit"Then go to https://github.com/new and create a new repository called voicenotes.
Leave it empty (no README). Copy the commands GitHub shows you under
"push an existing repository" — they look like:
git remote add origin https://github.com/YOUR_USERNAME/voicenotes.git
git branch -M main
git push -u origin main- Go to https://railway.app and log in
- Click "New Project"
- Choose "Deploy from GitHub repo"
- Authorise Railway to access your GitHub if asked
- Select your
voicenotesrepository - Railway detects the Dockerfile automatically — click "Deploy"
That's it. Railway builds the Docker image (takes 3–5 minutes the first time because it installs LibreOffice).
- Once the build is green, click on your service in Railway
- Go to Settings → Networking → Generate Domain
- Railway gives you a URL like
voicenotes-production.up.railway.app
Open it in any browser — your app is live.
Railway's free tier gives you 500 hours/month — enough for ~16h/day. If you want it always on:
- Go to your project → Settings → Sleeping
- Set "Never sleep" (uses ~720h/month — requires a $5 credit top-up, but Railway often gives free credits on signup)
Alternatively just leave it on the default — it stays up as long as you use it and sleeps when idle. Wake time is under 10 seconds.
Whenever you change any file locally:
git add .
git commit -m "describe what you changed"
git pushRailway automatically detects the push and redeploys. Zero downtime.
Storage: Railway's free tier has no persistent disk. This means:
- Audio files you generate (TTS) are stored in memory for the session only
- If the app restarts, the Library tab will be empty
- Downloaded files are saved to your computer permanently
To get persistent storage (keep the Library across restarts):
- Go to Railway → your project → "Add Plugin" → "Volume"
- Mount it at
/app/output— costs ~$0.25/GB/month
LibreOffice cold start: The first docx/pdf conversion after a fresh deploy takes ~5 seconds while LibreOffice initialises. Subsequent ones are fast.
Build fails with "no space left" → LibreOffice is large (~500MB). Railway free tier has 1GB build cache. Go to Settings → clear build cache → redeploy.
App crashes on start → Click "View Logs" in Railway. The most common cause is a missing environment variable or a Python import error.
Docx renders as text instead of images → LibreOffice is still initialising. Wait 10 seconds and try again.
"Application failed to respond" → The app is waking from sleep. Refresh after 10–15 seconds.