Skip to content

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
└── .dockerignore

Creating the Dockerfile

Create a Dockerfile in the root of your repository:

FROM node:18-alpine
WORKDIR /app
# Install PsiTransfer
RUN npm install -g psitransfer
# Copy configuration
COPY config.js /app/config.js
# Create data directory
RUN mkdir -p /data
# Set environment variables
ENV PSITRANSFER_UPLOAD_DIR=/data
ENV 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
*.md
LICENSE
.gitignore
*.log
.DS_Store
node_modules

Deploying PsiTransfer on Klutch.sh

    Push Your Repository to GitHub

    Initialize your repository and push to GitHub:

    Terminal window
    git init
    git add Dockerfile config.js .dockerignore
    git commit -m "Initial PsiTransfer deployment configuration"
    git remote add origin https://github.com/yourusername/psitransfer-deploy.git
    git push -u origin main

    Create 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:

    • Select HTTP as the traffic type
    • Set the internal port to 3000

    Set Environment Variables

    Add the following environment variables:

    VariableValue
    ADMIN_PASSWORDYour admin interface password
    PSITRANSFER_UPLOAD_DIR/data

    Attach Persistent Volumes

    Add the following volumes:

    Mount PathRecommended SizePurpose
    /data50+ GBFile storage (adjust based on needs)

    Deploy Your Application

    Click Deploy to start the build process. Klutch.sh will:

    • Detect your Dockerfile automatically
    • Build the container image
    • Attach the persistent volumes
    • Start the PsiTransfer container
    • Provision an HTTPS certificate

    Access PsiTransfer

    Once deployment completes, access your PsiTransfer instance at https://your-app-name.klutch.sh. Start sharing files immediately.

Using PsiTransfer

Uploading Files

  1. Navigate to your PsiTransfer instance
  2. Drag and drop files or click to browse
  3. Configure options:
    • Set expiration time
    • Add password protection
    • Set download limit
    • Enable one-time download
  4. Click upload
  5. Copy and share the download link

Downloading Files

  1. Open the shared link
  2. Enter password if required
  3. 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:

PeriodSeconds
1 hour3600
1 day86400
1 week604800
1 month2592000

File Size Limits

Adjust maximum file size in config.js:

// 500MB
maxFileSize: 500 * 1024 * 1024,
// 5GB
maxFileSize: 5 * 1024 * 1024 * 1024,

Download Limits

Set default download limits:

// Unlimited downloads
defaultDownloads: 0,
// Maximum 10 downloads
defaultDownloads: 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.