How To Install Cloud-Torrent Docker Application To Google Cloud?
Installing Cloud-Torrent on Google Cloud
Cloud-Torrent is a self-hosted remote torrent client that runs in your browser. This guide will walk you through deploying it on Google Cloud using Docker.
Prerequisites
- Google Cloud account with billing enabled
- Basic knowledge of Linux terminal commands
- SSH client installed on your local machine
Step 1: Create a Google Cloud Instance
- Go to the Google Cloud Console
- Navigate to Compute Engine > VM instances
- Click Create Instance
- Configure your instance:
- Name: cloud-torrent-server
- Region: Choose closest to your location
- Machine type: e2-medium (2 vCPU, 4GB RAM)
- Boot disk: Ubuntu 20.04 LTS (20GB)
- Under Firewall, check:
- Allow HTTP traffic
- Allow HTTPS traffic
- Click Create
Step 2: Configure Firewall Rules
Create a firewall rule to allow Cloud-Torrent’s default port:
- Go to VPC Network > Firewall
- Click Create Firewall Rule
- Configure:
- Name: allow-cloud-torrent
- Targets: All instances in the network
- Source IP ranges: 0.0.0.0/0
- Protocols and ports: tcp:3000
- Click Create
Step 3: Connect to Your Instance
Use SSH to connect to your instance:
gcloud compute ssh cloud-torrent-server --zone=YOUR_ZONE
Step 4: Install Docker
Update the package list and install Docker:
sudo apt update
sudo apt install -y docker.io
sudo systemctl start docker
sudo systemctl enable docker
sudo usermod -aG docker $USER
Log out and back in for group changes to take effect.
Step 5: Deploy Cloud-Torrent
Run the Cloud-Torrent container:
docker run -d \
--name cloud-torrent \
--restart=always \
-p 3000:3000 \
-v /home/$USER/downloads:/downloads \
jpillora/cloud-torrent
Optional: Configure Authentication
To add password protection:
docker run -d \
--name cloud-torrent \
--restart=always \
-p 3000:3000 \
-v /home/$USER/downloads:/downloads \
jpillora/cloud-torrent --auth "username:password"
Step 6: Access Cloud-Torrent
- Find your instance’s external IP in the Google Cloud Console
- Open your browser and navigate to:
http://YOUR_EXTERNAL_IP:3000 - You should see the Cloud-Torrent interface
Downloading Torrents
- Paste a magnet link or upload a
.torrentfile - Cloud-Torrent will start downloading to the
/downloadsdirectory - Access downloaded files via SSH or configure a file server
Maintenance Tips
Checking Container Status
docker ps -a
Viewing Logs
docker logs cloud-torrent
Restarting the Container
docker restart cloud-torrent
Updating Cloud-Torrent
docker stop cloud-torrent
docker rm cloud-torrent
docker pull jpillora/cloud-torrent
# Run the docker run command again
Cost Considerations
- Google Cloud offers $300 in free credits for new users
- After credits expire, an e2-medium instance costs approximately $24/month
- Consider using preemptible instances to reduce costs
Security Recommendations
- Use strong authentication: Always set a strong username and password
- Enable HTTPS: Use a reverse proxy like Caddy or nginx with Let’s Encrypt
- Restrict access: Limit firewall rules to your IP address
- Regular updates: Keep Docker and Cloud-Torrent updated
Troubleshooting
Cannot Access Web Interface
- Verify firewall rules are correctly configured
- Check if Docker container is running:
docker ps - Ensure port 3000 is not blocked by Google Cloud firewall
Downloads Not Working
- Check available disk space:
df -h - Verify the downloads directory permissions
- Review container logs for errors
Conclusion
You now have a fully functional Cloud-Torrent instance running on Google Cloud. This setup provides a convenient way to download torrents remotely and access them from anywhere.