---
title: "Deploy eLabFTW Lab Notebook"
description: "Research notebooks and lab inventory with MySQL and stored uploads."
category: "Other"
url: https://railway.com/deploy/elabftw-lab-notebook
---

# Deploy eLabFTW Lab Notebook

Research notebooks and lab inventory with MySQL and stored uploads.

**[Deploy eLabFTW Lab Notebook on Railway](https://railway.com/template/elabftw-lab-notebook)**

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

- **Creator:** orenaksakal
- **Category:** Other

## Template content

### elabftw

- **Source:** orenaksakal/railway-templates
- **Health check:** /healthz
- **Public domain:** Yes

### mysql

- **Image:** mysql:8.4@sha256:0744ee5ef89ce6ccfa13de3e579fe6b9e27f93dd70da9c06d2c908b1b193fb8d

### core

- **Image:** elabftw/elabimg:6.0.4@sha256:43ce0bdd3400ea66691772cdcad4c4b61b48539fedfefe19ffdbfd8de0209124
- **Start command:** `sh -ec 'umask 077
mkdir -p /var/lib/elabftw/.railway /var/lib/elabftw/uploads /var/cache/elabftw
if [ ! -s /var/lib/elabftw/.railway/secret-key ]; then
php -d open_basedir='"'"''"'"' bin/init tools:genkey > /var/lib/elabftw/.railway/secret-key.tmp
mv /var/lib/elabftw/.railway/secret-key.tmp /var/lib/elabftw/.railway/secret-key
fi
export SECRET_KEY="$(cat /var/lib/elabftw/.railway/secret-key)"
exec /init'`

## Documentation

# Deploy and Host eLabFTW Lab Notebook on Railway

Research notebooks and lab inventory with MySQL and stored uploads.

**Draft status:** Configuration and upstream documentation reviewed. Container startup, Railway application workflows, restart behavior, backup restoration and costs remain unverified.

## About Hosting

Research notebooks and lab inventory with MySQL and stored uploads.

| Service | Role | Persistent path |
| --- | --- | --- |
| `mysql` | Private application or dependency | `/var/lib/mysql` |
| `core` | Private application or dependency | `/var/lib/elabftw` |
| `elabftw` | Public owner gateway | `None` |

## Why Deploy

Run this application in your own Railway project, with explicit configuration and storage under your control.

## Common Use Cases

- Document experiments and attach laboratory results.
- Maintain shared laboratory inventory and notebook templates.

## Dependencies for eLabFTW Lab Notebook

### Deployment Dependencies

The application images are pinned by registry digest. Database services, when included, stay on the private network. One replica is supported for each volume-backed service.

## First use

Open the `elabftw` service's HTTPS domain. Sign in to the owner gateway with username `admin` and its generated `ACCESS_PASSWORD`. Complete the application's own setup afterward.

API calls must also send `X-Template-Key` with that owner password. The gateway forwards native Bearer tokens, strips Basic Authorization, and limits requests to 32 MiB. Browser sessions receive a secure owner cookie. Native clients, webhooks and public sharing require specific compatibility checks before use. Gateway `/healthz` only checks the proxy, not application readiness.

Wait for initial MySQL schema installation, then complete first administrator/team setup.
The encryption key is stored under /var/lib/elabftw/.railway/secret-key; retain it in backups.

## Scope and limitations

- Unpublished draft; container startup, application workflows and recovery are not runtime-verified.
- Secret key is generated by upstream CLI once and retained outside web uploads; preserve it with the database and volume backup.
- Finish the first administrator/team setup behind owner access. OpenCloning integration is excluded.
- Upgrades require database backup and deliberate migration; AUTO_DB_UPDATE remains false.

## Acceptance checks before use

- Confirm the public endpoint rejects unauthenticated requests.
- Create a team, experiment and upload; verify exported notebook and restart persistence.
- Back up all persistent storage; restart and restore a copy before production use.
- Confirm generated credentials are distinct on a second fresh deployment.
- Back up every listed persistent path and database, then restore into a separate test project.
- Measure Railway usage with representative data and workload before estimating operating costs.

## Backups and upgrades

Back up databases, file volumes, encryption keys and configuration together. Keep a copy outside the running project. Review upstream migration notes before changing a digest; rollback can require restoring a compatible database and files, not just selecting an older image.

## Sources and selection evidence

- [Upstream deployment documentation](https://github.com/elabftw/elabftw/blob/6.0.4/containers/elabimg/docker-compose.yml-EXAMPLE): HTTP8080 when DISABLE_HTTPS; DB env, uploads and AUTO_DB_INIT.
- [Upstream deployment documentation](https://github.com/elabftw/elabftw/blob/6.0.4/src/Commands/GenSecretKey.php): tools:genkey generates the required Defuse ASCII-safe secret format.
- [Upstream deployment documentation](https://github.com/elabftw/elabftw/blob/6.0.4/containers/elabimg/Dockerfile): Native entrypoint /init with app path /elabftw.
- [Upstream project](https://www.elabftw.net/)

Product and alias searches found no matching public Railway listing during this research. This is a bounded search result; private, unindexed or differently named listings may exist. It is not evidence of demand or revenue.

Upstream software retains its own license and edition restrictions. This deployment draft does not imply upstream endorsement.


## 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/elabftw-lab-notebook
