Transfer-more

From ArchWiki

Merge-arrows-2.pngThis article or section is a candidate for merging with List of applications/Internet#Specialized web servers.Merge-arrows-2.png

Notes: Still a work in progress although the page was created in 2018. Single contributor to the content, which looks to be the author of this software, who did not contribute to any page other than this one. No votes on the AUR package, which hints at a low popularity of this tool. (Discuss in Talk:Transfer-more)

Transfer More is a minimalist open-source upload http server to store and share files temporarily, written in Crystal, and based on Kemal [1].

Installation

Install the transfer-moreAUR package. It only requires crystal and shards in order to compile the initial binary, because pre-built binaries are not provided. There is not 3rd database or service dependencies.

Running

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: Many of the sections lack content (Discuss in Talk:Transfer-more)

Starting

Run the transfer-more binary manually from a terminal.

Autostarting

TODO

System service

[Unit]
Description=Tranfer more file sharing
Documentation=https://wiki.archlinux.org/index.php/Transfer-more

[Service]
ExecStart=/usr/share/transfer-more/transfer-more --port 10003 --bind 127.0.0.1
Restart=on-failure
RestartSec=5
Environment="TRANSFER_SSL_ENABLED=true"
WorkingDirectory=/usr/share/transfer-more/

# Hardening
MemoryDenyWriteExecute=true
SystemCallArchitectures=native
CapabilityBoundingSet=
NoNewPrivileges=true
RemoveIPC=true
LockPersonality=true

ProtectControlGroups=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectClock=true
ProtectHostname=true
ProtectProc=noaccess

RestrictRealtime=true
RestrictSUIDSGID=true
RestrictNamespaces=true
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6

ProtectSystem=full
ProtectHome=true
PrivateDevices=true
PrivateTmp=true


[Install]
WantedBy=default.target

User service

TODO

Configuration

Parameters

$ /usr/share/transfer-more/transfer-more --port 3000 --host 0.0.0.0

Environment variables

  • TRANSFER_SSL_ENABLED: if true you should see this page
  • TRANSFER_BASE_STORAGE: the base path where the upload should be stored
  • TRANSFER_SECURE_SIZE: the size of the salt (minimum 1)
  • TRANSFER_STORAGE_DAYS: default 7, number of days minimum to keep the files stored
  • TRANSFER_TIME_FORMAT: default %y%m%d%H, a part of the URL to access the files (also the path in the filesystem)

Behind Nginx

You could configure your nginx with /etc/nginx/servers-enabled/transfer-more.conf:

 server {
   listen 443 ssl;
   server_name up.sceptique.eu;
   client_max_body_size 1G;
   proxy_set_header Host              $host;
   proxy_set_header X-Real-IP         $remote_addr;
   proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;
   location / {
       proxy_pass http://localhost:3000;
   }
 }

See also