Skip to main content
Railway provides the simplest Openinary deployment: one click, one required variable, and a managed S3 bucket already connected.

Deploy on Railway

One-click deploy — opens the pre-configured Openinary template

What’s included in the template

ResourceDetails
Openinary Appopeninary/openinary Docker image
Assets StorageRailway-managed S3 bucket, pre-connected
Persistent volumeMounted at /app/data (database + API keys)

Deployment steps

1

Open the template

Click the Deploy on Railway card above. Sign in or create a Railway account if prompted.
2

Set BETTER_AUTH_SECRET

The template requires one variable: BETTER_AUTH_SECRET.Generate a secure value:
openssl rand -base64 32
Paste the output into the BETTER_AUTH_SECRET field in the template form.
Keep this secret private. It signs all authentication sessions and tokens.
3

Deploy

Click Deploy Now. Railway will provision the app and the S3 bucket, then start the container.Wait for both the Openinary App and Assets Storage services to show Deployed.
4

Set BETTER_AUTH_URL

Once deployed, Railway generates a public URL for your app (e.g. openinary-production.up.railway.app).Go to Openinary App → Settings → Variables and set:
BETTER_AUTH_URL=https://your-app.up.railway.app
Then redeploy the service. This is required for auth callbacks to work correctly.
If you later add a custom domain, update BETTER_AUTH_URL to match.
5

Complete initial setup

Visit your Railway URL. You’ll land on the setup page — create your administrator account.
Complete setup immediately. The /setup route is publicly accessible until an admin account is created.

Optional configuration

The Railway bucket is pre-connected — no storage variables needed. You can add optional variables under Openinary App → Settings → Variables:
# Use a custom domain for asset URLs
STORAGE_PUBLIC_URL=https://assets.example.com

# Stricter CORS (set to your frontend origin)
CORS_ORIGIN=https://yourapp.com

# Sign transformation URLs
API_SECRET=your-hex-secret
See Server configuration and Storage configuration for the full variable reference.

Troubleshooting

If deployment fails:
  1. Check the build logs under Openinary App → Deployments
  2. Confirm BETTER_AUTH_SECRET is at least 32 characters
  3. Confirm BETTER_AUTH_URL matches your Railway public URL exactly (no trailing slash)
If problems persist, open an issue on GitHub with your deployment logs.

Next steps

Image Transformations

Resize, crop, and convert images with URL parameters.

Video Transformations

Resize, trim, and extract thumbnails from videos.