[SUPPORT] SmartPhoneLover - FileGator


Recommended Posts

filegator_banner.png

 

This docker template was created based on an already available docker image

 

WebSite: https://filegator.io/

GitHub: https://github.com/maxime1907/docker-filegator
GitHub (original): https://github.com/filegator/filegator
DockerHub: https://hub.docker.com/r/maxime1907/filegator
Documentation: https://docs.filegator.io/
My Repository: https://github.com/SmartPhoneLover/unraid-docker-templates

 

DESCRIPTION
FileGator is a free, open-source, self-hosted web application for managing files and folders.

 

Features and goals:

- Multiple storage adapters (Local, FTP, Amazon S3, Dropbox, DO Spaces, Azure Blob and many others via Flysystem)

- Multiple auth adapters with roles and permissions (Store users in json file, database or use WordPress)

- Multiple session adapters (Native File, Pdo, Redis, MongoDB, Memcached and others via Symfony)

- Single page front-end (built with Vuejs, Bulma and Buefy)

- Chunked uploads (built with Resumable.js)

- Zip and bulk download support

- Highly extensible, decoupled and tested code

- No database required

- Framework free

 

Typical use cases:

- Share a folder with colleagues, your team, friends or family

- Give students access to upload their work

- Allow workers to upload field data / docs / images

- Use as cloud backup

- Manage cdn with multiple people

- Use as ftp/sftp replacement

- Manage s3 or other 3rd party cloud storage

- Use to quickly zip and download remote files

 

Live demo:
https://github.com/filegator/filegator#demo

 

NOTES
• The default credentials: admin/admin123 (user/pass).
• This image was based on Linuxserver.io's alpine nginx.
• Run the following cmds before building the container: 'mkdir -m755 -p /mnt/user/appdata/filegator/config_file' and 'curl https://raw.githubusercontent.com/filegator/filegator/master/configuration_sample.php --output /mnt/user/appdata/filegator/config_file/configuration.php'.
• You can customize the interface and how FileGator works even deeper, by editing its 'configuration.php' file. Check 'https://docs.filegator.io/configuration/basic.html' to know more.

 

VERSION
1.1 (2022-02-11)


If you are going to report a bug or request something to be added/modified, please, take into consideration that I will only be able to apply changes for the work I own only. For example, if I create a docker template for an already existing docker image (not created by me), I won't be able to do more for that image than forward your report or request to the owner of the project.


If you like my work, please consider making a little donation.
- DONATE -
Thank you very much 🙂

Edited by SmartPhoneLover
  • Like 1
Link to comment

Is there way to have multiple folder passed through to the docker? or can only "/data" be used? 

I made a new path variable say "/media" and mapped to /mnt/user/media" but it didn't show up.

 

Update: I am a nuff nuff...

Shared it as "/data/media" and mapped to "/mnt/user/media" and "/data/disks" for "/mnt/disks/" also DO NOT share path as "read-only" the docker check EVER file and log it as read-online. 

Edited by darkmesh
Link to comment

Hi @darkmesh

The 2 only extra directories I'm aware of, are: '/repository' and '/private'. Both directories are already mounted, but with symlinks inside that image. So, no more mount points are required for this container, except the ones I have added into the template.

 

See below...

Here you can see that the 2 extra folders are the same ones I have mentioned before (repository and data).

Here and here you can see that the owner of the image has added the link to /repository, mounting it under '/data'. The root of '/data'.

And below (image attached) you can see where both '/private' and 'repository' directories are symlinked inside the image.

 

In short, there's no need to mount any extra folder from inside the container.

 

/data...

Contains all the uploaded files and/or folders created within FileGator. In other words, the same data that could be found inside '/repository'.

 

/config...

Contains all the relevant files and subfolders from its configurations, including the '/private' dir, but under '/www'.

 

Hope that clarifies what you were asking about.

36336366.JPG

Edited by SmartPhoneLover
Link to comment

first of all thanks for this - its just what i was looking for,

 

But i can only access the configuration.php and those folders through terminal - is there any way i could access them through maybe windows explorer - through maybe appdata folder or something?

 

Thanks

 

Ric

Link to comment
3 hours ago, glancy said:

first of all thanks for this - its just what i was looking for,

 

But i can only access the configuration.php and those folders through terminal - is there any way i could access them through maybe windows explorer - through maybe appdata folder or something?

 

Thanks

 

Ric

 

I have updated the template with your request. Now you can use your own 'configuration.php' file locally.

Link to comment

thanks - i have no idea what to do next - since you updated - but thank you for updating - do i re download the unraid docker or just wait for it to tell me theres an update

 

i requested it btw as the official documentation stated:

 

You can edit configuration.php file to change the basic things like logo image, title, language and upload restrictions.

Note: if you've made a mistake in configuration file (forgot to close a quote?) the script will fail to load or throw an error. Please use provided default configuration_sample.php to put everything back to normal.

 

Ric

Link to comment

Hey SPL,

not sure whats going on -  but i now have 

 

FileGator and filegator directories mixed (which i have sorted)

 

I have a folder called configuration.php (i suspect this is where the problem lies)

 

and also my log file now says:

 

and

 

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
generating self-signed keys in /config/keys, you can replace these with your own keys if required
Generating a RSA private key
............+++++
............+++++
writing new private key to '/config/keys/cert.key'
-----
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 50-config: executing...
Creating base folders
New container detected, installing FileGator
chown: changing ownership of '/var/www/localhost/filegator/configuration.php': Read-only file system
Setting permissions
[cont-init.d] 50-config: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

 

 

Edited by glancy
Link to comment

Do you mean you have the following dirs?

- /.../appdata/FileGator

- /.../appdata/filegator

 

- - - - - - - - - - - - - -

 

UPDATE (1): Very sorry about that, it was my fault, not buildind the template, but explaining how to set it up in the NOTES section. I made a little mistake on the config file while downloading it. The correct filename is 'configuration.php', not 'configuration_sample.php'.

cmd1: mkdir -m755 -p /mnt/user/appdata/filegator/config_file

cmd2: curl https://raw.githubusercontent.com/filegator/filegator/master/configuration_sample.php --output /mnt/user/appdata/filegator/config_file/configuration.php

 

UPDATE (2): About having two subdirectories with the same, but one with capital letters and the other not, I think this is something related to unRAID. I will report that, I have noticed this time ago in some docker templates as well, but didn't give importance to that. To solve that problem, just be sure to edit the paths from template. I will always use non-capital letters for all the paths I configure on my templates.

Edited by SmartPhoneLover
Link to comment
  • 1 month later...

Hi @SmartPhoneLover,

I've installed the container but WebUI doesn't work.

Here's my config:

 

<?php

return [
    'public_path' => APP_PUBLIC_PATH,
    'public_dir' => APP_PUBLIC_DIR,
    'overwrite_on_upload' => true,
    'timezone' => 'America/New_York', // https://www.php.net/manual/en/timezones.php
    'download_inline' => ['pdf'], // download inline in the browser, array of extensions, use * for all

    'frontend_config' => [
        'app_name' => 'FileGator',
        'app_version' => APP_VERSION,
        'language' => 'english',
        'logo' => 'https://filegator.io/filegator_logo.svg',
        'upload_max_size' => 100 * 1024 * 1024, // 100MB
        'upload_chunk_size' => 1 * 1024 * 1024, // 1MB
        'upload_simultaneous' => 3,
        'default_archive_name' => 'archive.zip',
        'editable' => ['.txt', '.css', '.js', '.ts', '.html', '.php', '.json', '.md'],
        'date_format' => 'YY/MM/DD hh:mm:ss', // see: https://momentjs.com/docs/#/displaying/format/
        'guest_redirection' => '', // useful for external auth adapters
        'search_simultaneous' => 5,
        'filter_entries' => [],
    ],

    'services' => [
        'Filegator\Services\Logger\LoggerInterface' => [
            'handler' => '\Filegator\Services\Logger\Adapters\MonoLogger',
            'config' => [
                'monolog_handlers' => [
                    function () {
                        return new \Monolog\Handler\StreamHandler(
                            __DIR__.'/private/logs/app.log',
                            \Monolog\Logger::DEBUG
                        );
                    },
                ],
            ],
        ],
        'Filegator\Services\Session\SessionStorageInterface' => [
            'handler' => '\Filegator\Services\Session\Adapters\SessionStorage',
            'config' => [
                'handler' => function () {
                    $save_path = null; // use default system path
                    //$save_path = __DIR__.'/private/sessions';
                    $handler = new \Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler($save_path);

                    return new \Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage([
                            "cookie_samesite" => "Lax",
                            "cookie_secure" => null,
                            "cookie_httponly" => true,
                        ], $handler);
                },
            ],
        ],
        'Filegator\Services\Cors\Cors' => [
            'handler' => '\Filegator\Services\Cors\Cors',
            'config' => [
                'enabled' => APP_ENV == 'production' ? false : true,
            ],
        ],
        'Filegator\Services\Tmpfs\TmpfsInterface' => [
            'handler' => '\Filegator\Services\Tmpfs\Adapters\Tmpfs',
            'config' => [
                'path' => __DIR__.'/private/tmp/',
                'gc_probability_perc' => 10,
                'gc_older_than' => 60 * 60 * 24 * 2, // 2 days
            ],
        ],
        'Filegator\Services\Security\Security' => [
            'handler' => '\Filegator\Services\Security\Security',
            'config' => [
                'csrf_protection' => true,
                'csrf_key' => "123456", // randomize this
                'ip_allowlist' => [],
                'ip_denylist' => [],
                'allow_insecure_overlays' => false,
            ],
        ],
        'Filegator\Services\View\ViewInterface' => [
            'handler' => '\Filegator\Services\View\Adapters\Vuejs',
            'config' => [
                'add_to_head' => '',
                'add_to_body' => '',
            ],
        ],
        'Filegator\Services\Storage\Filesystem' => [
            'handler' => '\Filegator\Services\Storage\Filesystem',
            'config' => [
                'separator' => '/',
                'config' => [],
                'adapter' => function () {
                    return new \League\Flysystem\Adapter\Local(
                        __DIR__.'/repository'
                    );
                },
            ],
        ],
        'Filegator\Services\Archiver\ArchiverInterface' => [
            'handler' => '\Filegator\Services\Archiver\Adapters\ZipArchiver',
            'config' => [],
        ],
        'Filegator\Services\Auth\AuthInterface' => [
            'handler' => '\Filegator\Services\Auth\Adapters\JsonFile',
            'config' => [
                'file' => __DIR__.'/private/users.json',
            ],
        ],
        'Filegator\Services\Router\Router' => [
            'handler' => '\Filegator\Services\Router\Router',
            'config' => [
                'query_param' => 'r',
                'routes_file' => __DIR__.'/backend/Controllers/routes.php',
            ],
        ],
    ],
];
>

I've added the '>' at the end, the downloaded config didn't have it which seems wrong having open tag "<?php" and no closing '>'.

 

image.thumb.png.5a1fd8eda59eb4374ad09a4e3062d2bc.png

 

And this is the log:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...
usermod: no changes

-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/


Brought to you by linuxserver.io
-------------------------------------

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 50-config: executing...
Creating base folders
Setting permissions
Setting permissions
[cont-init.d] 50-config: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

Any idea what I'm doing wrong?

I tried both http and https on the different ports to no avail.

image.thumb.png.25339f0e1bf3d959a98699625532a72b.png

Link to comment
  • 2 weeks later...
  • 1 month later...
On 3/20/2022 at 4:27 AM, shpitz461 said:

All is well, I removed the container, deleted the appdata folder, then downloaded the config and now it's working.

 

I install it but, no way : WebUI doesn't work.

How did you resolve it ?

 

"downloaded the config" : can you explain me more ?

 

Thanks.

Edited by PicPoc
Link to comment

Sure, just read the docker description again, e.g.

Quote

Run the following cmds before building the container: 'mkdir -m755 -p /mnt/user/appdata/filegator/config_file' and 'curl https://raw.githubusercontent.com/filegator/filegator/master/configuration_sample.php --output /mnt/user/appdata/filegator/config_file/configuration.php'. • You can customize the interface and how FileGator works even deeper, by editing its 'configuration.php' file. Check 'https://docs.filegator.io/configuration/basic.html' to know more.

Link to comment
  • 8 months later...
  • 4 weeks later...

Tried a few apps and then found this one, I really like its simplicity as my family are not technical.

I have setup in docker but cannot get large downloads to work.

If the download takes more than say 8+ minutes it has a network error in chrome and resuming starts the download from the beginning.

As long as the same file/s download in less than 5 minutes its fine, it's like something is timing out.

I have NPM running as normal, other dockers are fine but I do see the docker comes bundled with NGINX itself and I assume that is the issue.

Is there a solution, I have checked logs and apart from the initial GET log there is nothing.

 

Additional 19/02/23:
I have tested and confirmed the issue is having it behind NPM.

If forwarding is directly configured to the container it works fine, I need it to work behind NPM.
I can see there is a Github issue for this exact issue a year old so is this project still being developed?

Edited by ados
Link to comment
  • 2 weeks later...

I just cant get the web UI to work!
I had filegator running previously and had catastrophic disk errors that rendered everything cactus. 
Waiting on a replacement drive cable but in the meantime set up two large USB sticks just so I could get filegator running.
No matter what I do, it just wont work and I have NFI what to try next.
Even after uninstalling, remnants are left behind and I think this may be why it just wont work.

I have ran the two commands above prior to installing and that doesn't make a difference.

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.