Deploying PsiTransfer
Introduction
PsiTransfer is a simple, open-source, self-hosted file sharing solution. It allows you to share files with others through a web interface without requiring user registration. Files are automatically deleted after a configurable retention period, making it perfect for temporary file sharing.
Built with Node.js and Vue.js, PsiTransfer offers a clean, modern interface that works well on both desktop and mobile devices. It supports resumable uploads, download limits, and password protection for added security.
Key highlights of PsiTransfer:
- No Registration Required: Share files instantly without creating accounts
- Automatic Expiration: Files are automatically deleted after the retention period
- Resumable Uploads: Large file uploads can be resumed if interrupted
- Password Protection: Optionally protect downloads with a password
- Download Limits: Set maximum download counts for shared files
- One-Time Downloads: Files can be set to delete after first download
- Drag and Drop: Easy file uploads with drag and drop support
- Mobile Friendly: Responsive design works on all devices
- QR Code Sharing: Generate QR codes for easy mobile access
- Open Source: Licensed under BSD-2-Clause
This guide walks through deploying PsiTransfer on Klutch.sh using Docker.
Why Deploy PsiTransfer on Klutch.sh
Deploying PsiTransfer on Klutch.sh provides several advantages:
Simplified Deployment: Klutch.sh automatically detects your Dockerfile and builds PsiTransfer without complex configuration.
Persistent Storage: Attach persistent volumes for uploaded files.
HTTPS by Default: Klutch.sh provides automatic SSL certificates for secure file sharing.
GitHub Integration: Connect your repository directly from GitHub for automatic deployments.
Scalable Storage: Allocate storage based on your file sharing needs.
Custom Domains: Assign a custom domain for professional file sharing.
Prerequisites
Before deploying PsiTransfer on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your PsiTransfer configuration
- Basic familiarity with Docker and containerization concepts
- (Optional) A custom domain for your PsiTransfer instance
Preparing Your Repository
Create a GitHub repository containing your Dockerfile for PsiTransfer deployment.
Repository Structure
psitransfer-deploy/├── Dockerfile├── config.js└── .dockerignoreCreating the Dockerfile
Create a Dockerfile in the root of your repository:
FROM node:18-alpine
WORKDIR /app
# Install PsiTransferRUN npm install -g psitransfer
# Copy configurationCOPY config.js /app/config.js
# Create data directoryRUN mkdir -p /data
# Set environment variablesENV PSITRANSFER_UPLOAD_DIR=/dataENV NODE_ENV=production
EXPOSE 3000
CMD ["psitransfer", "--config", "/app/config.js"]Creating config.js Configuration
Create a config.js file with your PsiTransfer configuration:
module.exports = { // Upload directory uploadDir: process.env.PSITRANSFER_UPLOAD_DIR || '/data',
// Retention period in seconds (default: 1 week) retentionSeconds: 604800,
// Maximum file size in bytes (default: 2GB) maxFileSize: 2 * 1024 * 1024 * 1024,
// Port to listen on port: 3000,
// Default downloads limit (0 = unlimited) defaultDownloads: 0,
// Require password for all uploads requirePassword: false,
// Admin password (for admin interface) adminPassword: process.env.ADMIN_PASSWORD || '',
// Disable admin interface disableAdmin: false,
// File name length sidLength: 6,
// One-time download option available oneTimeDownloadEnabled: true,
// Maximum bucket size in bytes maxBucketSize: 10 * 1024 * 1024 * 1024,
// SSL configuration (handled by Klutch.sh) ssl: false,
// Branding title: 'PsiTransfer',
// Language language: 'en',
// Plugins plugins: []};Creating the .dockerignore File
Create a .dockerignore file:
.git.github*.mdLICENSE.gitignore*.log.DS_Storenode_modulesDeploying PsiTransfer on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 3000
- Detect your Dockerfile automatically
- Build the container image
- Attach the persistent volumes
- Start the PsiTransfer container
- Provision an HTTPS certificate
Push Your Repository to GitHub
Initialize your repository and push to GitHub:
git initgit add Dockerfile config.js .dockerignoregit commit -m "Initial PsiTransfer deployment configuration"git remote add origin https://github.com/yourusername/psitransfer-deploy.gitgit push -u origin mainCreate a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project. Give it a descriptive name like “psitransfer” or “file-share”.
Create a New App
Within your project, create a new app. Connect your GitHub account if you haven’t already, then select the repository containing your PsiTransfer Dockerfile.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Add the following environment variables:
| Variable | Value |
|---|---|
ADMIN_PASSWORD | Your admin interface password |
PSITRANSFER_UPLOAD_DIR | /data |
Attach Persistent Volumes
Add the following volumes:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/data | 50+ GB | File storage (adjust based on needs) |
Deploy Your Application
Click Deploy to start the build process. Klutch.sh will:
Access PsiTransfer
Once deployment completes, access your PsiTransfer instance at https://your-app-name.klutch.sh. Start sharing files immediately.
Using PsiTransfer
Uploading Files
- Navigate to your PsiTransfer instance
- Drag and drop files or click to browse
- Configure options:
- Set expiration time
- Add password protection
- Set download limit
- Enable one-time download
- Click upload
- Copy and share the download link
Downloading Files
- Open the shared link
- Enter password if required
- Click download for individual files or download all
Admin Interface
Access the admin interface at /admin:
- View all active uploads
- Monitor storage usage
- Delete uploads manually
- View download statistics
Configuration Options
Retention Periods
Configure how long files are kept:
| Period | Seconds |
|---|---|
| 1 hour | 3600 |
| 1 day | 86400 |
| 1 week | 604800 |
| 1 month | 2592000 |
File Size Limits
Adjust maximum file size in config.js:
// 500MBmaxFileSize: 500 * 1024 * 1024,
// 5GBmaxFileSize: 5 * 1024 * 1024 * 1024,Download Limits
Set default download limits:
// Unlimited downloadsdefaultDownloads: 0,
// Maximum 10 downloadsdefaultDownloads: 10,Troubleshooting Common Issues
Upload Fails
Solutions:
- Check file size against configured limit
- Verify storage space is available
- Review browser console for errors
- Check server logs
Files Not Expiring
Solutions:
- Verify retention period configuration
- Check that cleanup job is running
- Review file metadata for expiration time
Cannot Access Admin
Solutions:
- Verify admin password is set
- Access via /admin path
- Check disableAdmin setting
Additional Resources
Conclusion
Deploying PsiTransfer on Klutch.sh gives you a simple, effective file sharing solution that requires no registration or account management. With automatic file expiration, password protection, and a clean interface, PsiTransfer makes temporary file sharing easy and secure.
Whether you’re sharing documents with colleagues, sending files to clients, or just need a quick way to transfer files between devices, PsiTransfer provides a straightforward solution.