---
title: "Deploy Debian Slim"
description: "[Jul'26] Debian Bookworm Slim with SSH & persistent storage"
category: "Other"
url: https://railway.com/deploy/debian-bookworm-slim
---

# Deploy Debian Slim

[Jul'26] Debian Bookworm Slim with SSH & persistent storage

**[Deploy Debian Slim on Railway](https://railway.com/template/debian-bookworm-slim)**

- **Creator:** codestorm
- **Category:** Other
- **Total deploys:** 11

## Template content

### debian https://raw.githubusercontent.com/docker-library/docs/b449be7df57e9ed9086bb5821bfb5d6cdc5d67a4/debian/logo.png

- **Image:** debian:bookworm-slim
- **Start command:** `bash -lc 'echo "Debian container is running on Railway"; tail -f /dev/null'`

## Documentation

# Deploy and Host Debian Bookworm Slim SSH on Railway

Debian Bookworm Slim SSH is a lightweight cloud-hosted Debian workspace that can be accessed through Railway SSH. It uses the official `debian:bookworm-slim` image, a smaller Debian 12 Bookworm variant, and supports persistent storage through Railway Volume for storing files, scripts, logs, and project data across restarts.

![Imgur](https://imgur.com/PXl01aE.png)

## About Hosting Debian Bookworm Slim SSH

Hosting Debian Bookworm Slim SSH on Railway involves deploying a minimal containerized Debian 12 Bookworm environment that can be accessed securely using Railway CLI SSH. The `debian:bookworm-slim` image provides a smaller base system compared to the standard Debian image, making it suitable for lightweight Linux workflows, diagnostics, testing, and development tasks. Railway manages the deployment, runtime, networking, environment, and infrastructure layer, so you do not need to provision a VPS manually. After deployment, you can connect to the running Debian container from your local terminal, install only the packages you need with `apt`, run commands, test scripts, inspect the environment, and use a mounted Railway Volume for persistent files.

## Common Use Cases

* Remote Debian Bookworm shell for diagnostics, testing, and debugging
* Minimal Linux development sandbox with SSH access and persistent storage
* Running scripts, package tests, Linux commands, and isolated workflows

## Dependencies for Debian Bookworm Slim SSH Hosting

* Railway account for deploying and managing the Debian service
* Railway CLI installed locally or on your VPS to access the container through SSH
* Railway Volume for persistent storage across restarts and redeployments

### Deployment Dependencies

This template uses the following components and resources:

* Official Debian Docker image: [`debian:bookworm-slim`](https://hub.docker.com/_/debian)
* Railway CLI: [https://docs.railway.com/cli](https://docs.railway.com/cli)
* Railway SSH guide: [https://docs.railway.com/guides/ssh](https://docs.railway.com/guides/ssh)
* Railway Volumes: [https://docs.railway.com/reference/volumes](https://docs.railway.com/reference/volumes)

The `debian:bookworm-slim` tag uses Debian 12 Bookworm in a smaller slim variant. It is designed to provide a lightweight Debian base image while still allowing you to install additional tools and packages as needed with `apt`.

## How to Use This Template via Railway Console

After deploying this template, you can use the Railway Console to run commands directly inside the deployed service environment.

This is useful for setup commands, authentication commands, maintenance tasks, debugging, or running CLI tools provided by the application.

### Steps

1. Open your Railway project.
2. Select the service created from this template.
3. Open the **Console** tab.
4. Wait until the console session is ready.
5. Type or paste the command you want to run.
6. Press **Enter** to execute the command.

Example:

```bash
cat /etc/os-release
```

## How to Use This Template via Railway CLI

After the template is deployed, install and log in to the Railway CLI:

```bash
npm install -g @railway/cli
railway login
```

For headless environments or VPS usage, use browserless login:

```bash
railway login --browserless
```

To connect to the deployed Debian Bookworm Slim container, copy the SSH command from the Railway dashboard:

1. Open your Railway project.
2. Right-click the deployed Debian Bookworm Slim service.
3. Select **Copy SSH Command**.
4. Paste and run the command in your terminal.

The command will look similar to this:

```bash
railway ssh --project= --environment= --service=
```

Once connected, verify the Debian environment:

```bash
cat /etc/os-release
```

You should see Debian GNU/Linux 12 Bookworm information.

Check the mounted persistent volume:

```bash
df -h
ls -la /data
```

Create a test file inside the volume:

```bash
echo "hello from railway debian bookworm slim" > /data/test.txt
cat /data/test.txt
```

Install packages as needed:

```bash
apt update
apt install -y curl nano htop ca-certificates
```

Because this is a slim image, some common tools may not be preinstalled. Install only the packages required for your workflow to keep the environment lightweight.

## Why Deploy Debian Bookworm Slim SSH on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Debian Bookworm Slim SSH on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — [Jul'26] 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/debian-bookworm-slim
