---
title: "Deploy Railway Shell Function"
description: "Quickly run any shell script in a Railway container."
category: "Other"
url: https://railway.com/deploy/railway-shell-function
---

# Deploy Railway Shell Function

Quickly run any shell script in a Railway container.

**[Deploy Railway Shell Function on Railway](https://railway.com/template/railway-shell-function)**

- **Creator:** Noah templates
- **Category:** Other
- **Total deploys:** 27

## Template content

### railway-function-shell https://www.svgrepo.com/show/353478/bash-icon.svg

- **Image:** ghcr.io/thesamgordon/railway-function-shell
- **Start command:** `/bin/sh -c "exec ./run.sh $SCRIPT"`

## Documentation

# Deploy a Shell Script on Railway

Quickly execute a shall script on a Railway hosted container. 

## Hosting a Shell Scriot

Encode your script to a base64 string using any tool of your choice. I used https://www.base64encode.org/.

Take the output string and put it in the `SCRIPT` environmental variable. Deploy the container and it will run the script you provided.

## 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/railway-shell-function
