
Deploy Claude Code on mobile
Use Claude Code on mobile via SSH
claude-code-mobile
MehdiG44/claude-code-railway
Just deployed
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)
- Deploy the template to Railway
- In your project settings, add environment variables:
SSH_USERNAME
- Your desired usernameSSH_PASSWORD
- Your desired passwordGH_TOKEN
- GitHub token (optional)GITHUB_EMAIL
- Git email (optional)GITHUB_NAME
- Git name (optional)
Option B: Modify Configuration File
- Fork this repository
- Edit
ssh-user-config.sh
with your credentials - Deploy your fork to Railway
2. Configure TCP Proxy
- Go to your Railway project → Settings → Networking
- Under Public Networking, click TCP Proxy
- Add port
22
for SSH access - Redeploy the project
3. Connect via SSH
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.
Template Content
claude-code-mobile
MehdiG44/claude-code-railwayGH_TOKEN
For Github CLI
GITHUB_NAME
GITHUB_NAME
GITHUB_EMAIL
GITHUB_EMAIL
SSH_PASSWORD
SSH_PASSWORD
SSH_USERNAME
SSH_USERNAME