Skip to content

Hamzelot/lufi-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Image for Lufi

Lufi means Let's Upload that FIle. It's a E2E encrypted file sharing software.

Owner

The writer of the lufi-software is Luc Didry his project is licensed under the GNU Affero General Public License v3.0.

Installation

Docker Compose

Please adjust the environment variables in the .docker-compose file then start

docker-compose build
docker-compose up

The build command is optionally

Docker

Adjust the environment variable and execute the run command

docker build -t hamzelot/lufi .

docker run -itd \
-e CONTACT_HTML="<a href= 'your-website.eu'>here</a>" \
-e REPORT="name@email.eu" \
-e SITE_NAME="SiteName" \
-v UPLOADED/FILES/LOCATION:/usr/lufi/files \
-p 8080:8081 \
 --name lufi hamzelot/lufi

The build command is optionally

Variables

CONTACT_HTML [STRING]

Put a way to contact you here
Default: "<a href= 'example.com'>here"

REPORT_EMAIL [STRING]

Put an URL or an email address to receive file reports
Default: "abc@example.com"

SITE_NAME [STRING]

Name of the instance, displayed next to the logo
Default: "lufi"

URL_LENGTH [NUMBER]

The length of the generated links
Default: 4

MAX_FILE_SIZE [NUMBER]

The maximum upload size in bytes
Default: 104857600 (100MBytes)

MAX_DEALY [NUMBER]

Number of days after which the files will be deleted, even if they were uploaded with "no delay" (or value superior to max_delay)
Default: 0 (no limit)

USE_PROXY [NUMBER]

if you use Lufi behind a reverse proxy like Nginx, you want to set proxy to 1
Default: 0

ALLOW_PWD [NUMBER]

Allow to add a password on files, asked before allowing to download files
Default: 1

THEME [STRING]

Choose a theme. See the available themes in themes directory
Explanation of use below
Default: "default"

PROVIS_STEP [NUMBER]

How many URLs will be provisioned in a batch ?
Default: 5

PROVISIONING [NUMBER]

Max number of URLs to be provisioned
Default: 100

TOKEN_LENGTH [NUMBER]

Length of the modify/delete token
Default: 32

PIWIK_IMAGE_TRACKER [STRING]

If you want to have piwik statistics, provide a piwik image tracker
Default: (no default, optional)

BROADCAST_MESSAGE [STRING]

Broadcast_message which will displayed on the index page
Default: (no default, optional)

LIMIT_FILE_DESTROY_DAYS [NUMBER]

Default time limit for files
Default: 0 (no limit)

URL_PREFIX [STRING]

URL sub-directory in which you want Lufi to be accessible
Default: "/"

FORCE_BURN_AFTER_READING [NUMBER]

Force all files to be in "Burn after reading mode"
Default: 0 (disabled, optional)

X_FRAME [STRING]

X-Frame-Options header that will be sent by Lufi
Default: "DENY"

X_CONTENT_TYPE [STRING]

X-Content-Type-Options that will be sent by Lufi
Default: "nosniff"

X_XSS_PROTECTION [STRING]

X-XSS-Protection that will be sent by Lufi
Default: "1; mode=block"

KEEP_IP_DURING [NUMBER]

Number of days senders' IP addresses are kept in database
Default: 365

DELETE_NO_LONGER_VIEWED_FILES_DAYS [NUMBER]

Files which are not viewed since delete_no_longer_viewed_files days will be deleted by the cron cleanfiles task
Default: (no default, optional)

WORKER [NUMBER]

Number of worker processes
Default: 30

CLIENTS [NUMBER]

Maximum number of accepted connections each worker process
Default: 1

DELAY_FOR_SIZE [HASHTABLE]

Size thresholds: if you want to define max delays for different sizes of file
Default (no default, optional)

    environment:
      DELAY_FOR_SIZE: >-
        10000000 => 90,
        50000000 => 60, 
        1000000000 => 2

between 10MB and 50MB => max is 90 days, less than 10MB => max is max_delay (see above)
between 50MB ans 1GB => max is 60 days
more than 1GB => max is 2 days

ABUSE [HASHTABLE]

Abuse reasons
Set an integer in the abuse field of a file in the database and it will not be downloadable anymore
The reason will be displayed to the downloader, according to the reasons you will configure here.
Default (no default, optional)

    environment:
      ABUSE: >-
        0 => 'Copyright infringment',
        1 => 'Illegal content',
ALLOWED_DOMAINS [ARRAY]

Array of authorized domains for API calls.
Default (no default, optional)

FIXED_DOMAIN [STRING]

If set, the files' URLs will always use this domain
Default (no default, optional)

DISABLE_MAIL_SENDING [NUMBER]

Disable sending mail through the server
Default 1

MAIL_SENDER [STRING]

Email sender address
Default (no default, optional)

MAIL [HASHTABLE]

Mail configuration
See https://metacpan.org/pod/Mojolicious::Plugin::Mail#EXAMPLES
Default (no default, optional)

    environment:
      MAIL: >-
        how => 'smtp',
        howargs => ['smtp.example.org']

Valid values are 'sendmail' and 'smtp'

Own Themes

For a custom theme, you need to create a volume. This must point to the /usr/lufi/themes folder.

After that you can copy your theme into the container with docker cp /PATH/TO/THEME lufi:/usr/lufi/themes/, after editing the variable with the name of the theme restart the container

Alternatively, of course, the selected storage area may already contain the theme.

docker-compose volume
    volumes:
      - "data:/usr/lufi/files"
      - "themes:/usr/lufi/themes"
    environment:
      THEME: "NAMEOFTHEME"
docker volume

Add the -v THEMES/FILES/LOCATION:/usr/lufi/themes -e THEME="NAMEOFTHEME" suffix to the command in the Docker header.

Access

Access is now via http://SERVER_IP:8080.

TLS Proxy

How to use a Nginx or Apache proxy is described here.

!Important! Set the environment variable "USE_PROXY" to 1

About

Docker Image for Lufi, it means Let's Upload that FIle. It's a E2E encrypted file sharing software.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published