Best cloud storage services with CLI for NixOS: (Comparison)

TopLinux

Best Cloud Storage with CLI for NixOS

NixOS users often seek robust, scriptable cloud storage solutions with first-class Command-Line Interface (CLI) support. This article reviews top contenders—pCloud, MEGA, Proton Drive, Filen, Tresorit, Icedrive—and a couple of extra picks. We compare features, pricing, encryption, NixOS packaging, and show how to install use each service via CLI on NixOS. Troubleshooting tips are included.

Comparison Table

Service Free Tier Encryption Official CLI Link
pCloud 10 GB Client-side (optional) pcloudcc pCloud.com
MEGA 20 GB ( bonuses) End-to-end megacmd mega.io
Proton Drive 1 GB End-to-end via rclone proton.me/drive
Filen 20 GB End-to-end filen-cli filen.io
Tresorit 3 GB End-to-end tresor-cli tresorit.com
Icedrive 10 GB Client-side icedrive-cli icedrive.net
rclone (generic) Varies by backend rclone rclone.org

Which One to Choose?

  • Scripted Backups Sync: MEGA (megacmd) or rclone with S3/SFTP backends.
  • Privacy-First: Proton Drive via rclone or Filen CLI for end-to-end encryption.
  • NixOS Integration: pCloud (pcloudcc) and megacmd are packaged in nixpkgs.
  • Team Collaboration: Tresorit for granular sharing and compliance.
  • Lightweight Mount: Icedrive CLI and pcloudcc FUSE mounts.

Installing Using Each CLI on NixOS

Prerequisite: enable FUSE if you plan to mount drives in NixOS:

# configuration.nix
{
  boot.kernelModules = [ fuse ]
  security.wrappers.fuse = [ fusermount ]
  users.users.yourUser.extraGroups = [ fuse ]
}

pCloud (pcloudcc)

Official FUSE-based client with CLI commands for mount and sync.

  1. Install:
nix-env -iA nixos.pcloudcc
# or in configuration.nix:
environment.systemPackages = with pkgs [ pcloudcc ]
  • Authenticate mount:
  • pcloudcc --username you@example.com --password yourpass --mountpoint ~/pcloud
    
  • Sync a folder:
  • pcloudcc --sync local/dir /pcloud/remote/dir
    

    MEGA (megacmd)

    1. Install:
    nix-env -iA nixos.megacmd
    # or in configuration.nix:
    environment.systemPackages = with pkgs [ megacmd ]
    
    1. Login:
    mega-login you@example.com yourpassword
    
  • Upload download:
  • mega-put localfile /Root/Backup/
    mega-get /Root/Docs remote-copy.txt
    
  • Sync:
  • mega-sync local/dir /Root/remote/dir
    

    Proton Drive (via rclone)

    Proton Drive has no native CLI yet use rclone.

    1. Install rclone:
    nix-env -iA nixos.rclone
    # or in configuration.nix:
    environment.systemPackages = with pkgs [ rclone ]
    
  • Configure remote:
  • rclone config
    # Choose new remote, type protondrive, follow prompts for OAuth.
    
  • Use it:
  • rclone ls protondrive:
    rclone copy local/dir protondrive:Backup
    

    Filen (filen-cli)

    1. Install:
    nix-env -iA nixos.filen-cli
    # or configuration.nix:
    environment.systemPackages = with pkgs [ filen-cli ]
    
    1. Login:
    filen-cli login
    # follow interactive prompt, paste token
    
  • Upload/Download:
  • filen-cli upload ./localfile /remote/path/
    filen-cli download /remote/path/file ./localcopy
    

    Tresorit (tresor-cli)

    1. Install:
    nix-env -iA nixos.tresorit-cli
    # or configuration.nix:
    environment.systemPackages = with pkgs [ tresorit-cli ]
    
    1. Login:
    tresor-cli login
    # opens browser for OAuth, then store token
    
  • Sync a folder:
  • tresor-cli sync start ~/LocalFolder Tresorit/RemoteFolder
    

    Icedrive (icedrive-cli)

    1. Install:
    nix-env -iA nixos.icedrive-cli
    # or configuration.nix:
    environment.systemPackages = with pkgs [ icedrive-cli ]
    
    1. Authenticate mount:
    icedrive-cli login you@example.com yourpass
    icedrive-cli mount ~/icedrive
    

    Extra: AWS S3 via s3cmd

    For pure S3 storage, s3cmd is an option.

    nix-env -iA nixos.s3cmd
    s3cmd --configure   # follow prompts for access key/secret
    s3cmd put file s3://mybucket/
    

    Typical Problems Troubleshooting

    • FUSE device not found: Ensure fuse module is loaded and your user is in “fuse” group.
    • Sandboxing issues: On NixOS with strict sandbox, grant mount point access or disable sandbox in nix.conf.
    • OAuth/browser login: Some CLIs open a browser if headless, copy-paste the auth URL on another machine.
    • Token storage: CLI tools often store tokens under ~/.config/ltservicegt. Backup or protect that folder.
    • Rate limits: Rclone with Proton Drive may hit API limits—batch your transfers or add --tpslimit.

    Conclusion

    NixOS offers a rich ecosystem of packaged CLI clients for modern cloud storage services. Choose MEGA or pCloud for straightforward mounts and scripting Filen or Proton Drive (via rclone) if end-to-end encryption and privacy are paramount Tresorit for enterprise features Icedrive for a lightweight encrypted drive. With proper configuration in configuration.nix and attention to FUSE/sandboxing, you’ll have reliable, automated backups and synced folders directly from the NixOS command line.

    Be the first to leave a comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *