Back to articles
Technology Insight

Scaling Secure File Distribution: Deploying Sharry on VPS for One-Time Large File Transfers

June 1, 2026

The Evolution of Secure File Distribution

In the modern digital landscape, the paradox of choice regarding file-sharing services is real. While platforms like WeTransfer or Dropbox offer convenience, they often impose strict limitations on file sizes for free tiers and, more importantly, retain control over your data’s metadata and residency. For businesses handling sensitive intellectual property, high-resolution media assets, or confidential legal documents, the 'black box' nature of public clouds is a significant security risk.

Enter Sharry: an open-source, self-hosted file-sharing solution designed specifically for individuals and organizations that prioritize security and efficiency. Sharry specializes in one-time download links, ensuring that once a recipient accesses the data, the link expires, effectively neutralizing the risk of link leakage. This blog post provides a comprehensive technical walkthrough on deploying Sharry on a Virtual Private Server (VPS), enabling you to build a private, high-performance sharing infrastructure.

Why Sharry? The Enterprise Case for Self-Hosting

Before diving into the technical deployment, it is essential to understand why Sharry stands out in a crowded market of self-hosted tools. Unlike general-purpose cloud storage like Nextcloud, Sharry is a specialized utility. It isn't meant for long-term storage but rather for the secure transit of data.

  • Privacy and Sovereignty: Your data remains on your VPS hardware. No third-party analytics or surveillance.
  • Unlimited File Sizes: Constraints are defined by your VPS storage and bandwidth, not by a subscription tier.
  • One-Time Download Links: A critical security feature for time-sensitive or highly confidential assets.
  • Administrative Control: Manage users, monitor transfer logs, and set global expiration policies.
"Self-hosting file-sharing software is no longer just for enthusiasts; it is a strategic necessity for businesses that must comply with strict data protection regulations like GDPR."

System Requirements and Prerequisites

To ensure a smooth deployment, your VPS should meet the following minimum specifications. Since Sharry is built using Scala and runs on the JVM, memory management is key.

1. Hardware Specifications

  • CPU: 1 Core (2 Cores recommended for high-volume traffic).
  • RAM: 2GB Minimum (4GB recommended to handle large file uploads effectively).
  • Storage: SSD or NVMe storage equivalent to the maximum size of files you intend to share at any given time.
  • Network: 1Gbps uplink for fast uploads and downloads.

2. Software Environment

We will be utilizing Docker and Docker Compose for this installation. This method ensures environment consistency and simplifies future updates. Ensure your VPS is running a modern Linux distribution such as Ubuntu 22.04 LTS or Debian 12.

Step-by-Step Deployment Guide

Follow these steps to initialize your Sharry instance. We will assume you have already SSH'ed into your server and have root or sudo privileges.

Phase 1: Environment Setup

First, update your system and install the necessary dependencies:

sudo apt update && sudo apt upgrade -y
sudo apt install docker.io docker-compose -y

Phase 2: Database Configuration

Sharry requires a database to manage user accounts, link metadata, and transfer states. While H2 is supported for testing, PostgreSQL is strongly recommended for production environments. Create a dedicated directory for your project:

mkdir ~/sharry-app && cd ~/sharry-app

Phase 3: The Docker Compose File

Create a docker-compose.yml file. This configuration will define the Sharry application container and the database backend. It is vital to use persistent volumes so your data isn't lost when containers restart.

Key configuration points in your Sharry setup include:

  • SHARRY_REST_ALIAS: Your domain name (e.g., share.yourcompany.com).
  • Storage Path: Ensure the host directory for file storage has sufficient permissions.

Phase 4: Configuring Sharry (sharry.conf)

Sharry uses a configuration file to define its behavior. You must specify the backend storage (where files are physically saved) and the authentication method. You can choose between internal databases or link it to an existing LDAP/Active Directory system for enterprise integration.

Optimizing for Large File Transfers

When sharing files in the range of 10GB to 100GB, default web server configurations will likely fail. You must tune your Reverse Proxy (Nginx or Traefik) to handle these loads.

Nginx Configuration Tweaks

If using Nginx, you must adjust the client_max_body_size. Setting this to 0 disables size checking at the proxy level, allowing Sharry to handle the limits:

client_max_body_size 0;
proxy_read_timeout 3600;
proxy_send_timeout 3600;

Additionally, ensure that SSL/TLS is properly configured via Let's Encrypt. Transmitting large files over unencrypted HTTP is a significant security vulnerability and often triggers browser warnings.

Best Practices for Link Management

The core value of Sharry lies in its link management. To maximize security, administrators should implement the following policies:

  1. Mandatory Expiry: Set a global policy where links expire after 7 days, regardless of user settings.
  2. One-Time Use Enforcement: Encourage the use of the "One-Time Download" feature for sensitive assets. Once the download counter reaches 1, the file is deleted from the server.
  3. Password Protection: Layering a password on top of a secret link provides a secondary defense against unauthorized access.

Monitoring and Maintenance

A self-hosted VPS solution requires ongoing maintenance. Monitor your disk usage regularly. Since Sharry is designed for ephemeral sharing, it includes a cleanup task that removes expired files. Ensure this task is running correctly to prevent your VPS disk from reaching capacity.

Log Rotation: Configure Docker log rotation to ensure that log files do not consume excessive disk space over months of operation.

Conclusion

Deploying Sharry on a VPS provides a robust, professional, and secure alternative to commercial file-sharing platforms. By following this guide, you have moved from relying on third-party privacy policies to establishing a sovereign data pipeline. Whether you are sending raw video footage, large software builds, or confidential financial reports, Sharry ensures your data is delivered safely, quickly, and with total transparency.

Ready to take control of your data? Start by selecting a high-performance VPS provider and deploying your Sharry instance today.

Scaling Secure File Distribution: Deploying Sharry on VPS for One-Time Large File Transfers | DPTCloud