---
title: "Deploy Claude Code on mobile"
description: "Use Claude Code on mobile via SSH"
category: "Other"
url: https://railway.com/deploy/claude-code-on-mobile
---

# Deploy Claude Code on mobile

Use Claude Code on mobile via SSH

**[Deploy Claude Code on mobile on Railway](https://railway.com/template/claude-code-on-mobile)**

- **Creator:** Mehdi Gatbache's Projects
- **Category:** Other
- **Total deploys:** 17

## Template content

### claude-code-mobile

- **Source:** https://github.com/MehdiG44/claude-code-railway

## Documentation

# Deploy and Host

Deploy a fully-configured Ubuntu 22.04 development environment with SSH access on Railway. This template provides a complete containerized workspace with development tools, CLI utilities, and remote SSH connectivity for cloud-based development.

## About Hosting

This template creates a Docker container running Ubuntu 22.04 with SSH server enabled, allowing you to connect remotely to your Railway deployment. Unlike traditional VPS hosting, this runs as a containerized environment on Railway's infrastructure, providing instant deployment and automatic scaling capabilities.

## Why Deploy

- **Instant Development Environment**: Get a fully-configured Ubuntu workspace in seconds
- **Remote Access**: SSH directly into your Railway container for command-line development
- **Pre-installed Tools**: Comes with Node.js, Ruby, Rails, GitHub CLI, Railway CLI, and Claude Code
- **Zero Configuration**: Automatic setup of development tools and authentication
- **Cloud-Based**: Access your development environment from anywhere
- **Cost-Effective**: Pay only for what you use with Railway's pricing model

## Common Use Cases

- **Remote Development**: Access a Linux development environment from any device
- **CI/CD Testing**: Use as a staging environment for testing deployments
- **Learning & Education**: Provide students with consistent development environments
- **Temporary Workspaces**: Quick setup for short-term projects or experimentation
- **Cross-Platform Development**: Develop on Linux from Windows or macOS machines
- **Team Collaboration**: Shared development environments for team projects

## Dependencies for

### Deployment Dependencies

- **Docker**: The template uses a custom Ubuntu 22.04 Docker image
- **Railway Account**: Required for deployment and hosting
- **SSH Client**: For connecting to the deployed container (available on most systems)

### Runtime Dependencies

- **Ubuntu 22.04**: Base operating system
- **OpenSSH Server**: For SSH connectivity
- **Node.js 18+**: JavaScript runtime with npm, pnpm, yarn
- **Ruby 3.2**: With Rails and bundler pre-installed
- **System Tools**: git, curl, wget, build-essential, network utilities

### Optional Dependencies

- **GitHub Personal Access Token**: For GitHub CLI authentication
- **Railway CLI**: For managing Railway projects (installed automatically)
- **Claude Code**: AI development assistant (pre-installed)

## Features

- **SSH Server**: OpenSSH pre-configured with clean login (no welcome messages)
- **Security**: Root login disabled, user with sudo permissions
- **Development Tools**: Complete Node.js and Ruby development stack
- **CLI Tools**: GitHub CLI, Railway CLI, PostgreSQL client, Redis tools
- **Package Managers**: npm, pnpm, yarn, bundler
- **Automated Setup**: Git configuration, CLI authentication ready

## Setup Instructions

### 1. Configure SSH Credentials

**Option A: Environment Variables (Recommended)**
1. Deploy the template to Railway
2. In your project settings, add environment variables:
   - `SSH_USERNAME` - Your desired username
   - `SSH_PASSWORD` - Your desired password
   - `GH_TOKEN` - GitHub token (optional)
   - `GITHUB_EMAIL` - Git email (optional)
   - `GITHUB_NAME` - Git name (optional)

**Option B: Modify Configuration File**
1. Fork this repository
2. Edit `ssh-user-config.sh` with your credentials
3. Deploy your fork to Railway

### 2. Configure TCP Proxy

1. Go to your Railway project → Settings → Networking
2. Under Public Networking, click TCP Proxy
3. Add port `22` for SSH access
4. Redeploy the project

### 3. Connect via SSH

```bash
ssh {username}@{domain} -p {port}
```

Railway will provide the domain and port in your project dashboard.

## ⚠️ Important Limitations

- **No Persistent Storage**: Data is lost on redeployment (use Railway volumes for persistence)
- **Container Environment**: This is not a VPS - it's a containerized application
- **Temporary File System**: Files created during runtime are not preserved across deployments

## Security Considerations

- Always change default SSH credentials before production use
- Consider using SSH keys instead of passwords
- Root login is disabled by default for security
- The default user has sudo privileges for administrative tasks

## License

This project is licensed under the terms included in the LICENSE file.

## 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/claude-code-on-mobile
