Transfer-more - ArchWiki

Jump to content

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

This article or section needs expansion.

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

- https://git.sceptique.eu/Sceptique/transfer_more#usage to get the last version of the documentation.
- https://kemalcr.com/guide/ to understand how the web framework behind transfer-more works.

Category:

- Web applications

Hidden category:

- Pages or sections flagged with Template:Expansion