Skip to content

FileFighter Setup Scripts for clients to download and run

Notifications You must be signed in to change notification settings

FileFighter/ClientSetup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileFighter Setup

Setup Scripts for clients to install FileFighter.
Release

Table of Contents

Table of contents generated with markdown-toc

Requirements

Operating Systems

Linux Distributions

We support all common Linux Distributions with unzip, wget and curl.
This code was tested under Linux Mint, Ubuntu 12, and Pop_!OS.

macOS

Currently, macOS is on our roadmap. You will still be able to run FileFighter with docker-compose.

Windows

Currently, we support only Unix-like operating systems like Ubuntu. For Windows systems you could use wsl. To set that up read more here.
Alternatively you can use docker-compose to run the application.

Dependencies

One of the of goals of FileFighter is, that the client, that's you, only needs to met one single dependency.
You need Docker, or if you are using docker-compose you will need that too.
Docker is a way to organise and run multiple applications. You can imagine it like a virtual machine (technical it`s a bit different), with a small file- and operating system within your machine. Sounds more scary than it actually is. Different Applications run in different containers, these only contain the necessary software to run the application.
The containers use the resources of the host machine, depending on the load.
Advantages are security and the possibility to easily shutdown and update the services. See more under Running FileFighter.

Docker

First check whether you have Docker already installed.
To do that run:

docker -v

If you see something like that (your version might be different):

Docker version 19.03.13, build 4484c46d9f

You are good to go, and you can skip to Installing FileFighter.

To install Docker on Unix you can either use snap or apt as a package manager.
With snap, it's easier but of course it's not always possible to use snap.

Install with Snap

To install Docker with snap you can run:

sudo snap install docker

Install with Apt

Installing with apt is a bit more difficult you can read here more about it.

Installing FileFighter

When docker is ready to go you can install FileFighter.
You can install FileFighter as a commandline tool with many features, or if you are using a non linux operating system like Windows or macOS, with docker-compose.

Installing the command line application

When you are running a linux distribution you can either use this command

curl https://raw.githubusercontent.com/FileFighter/ClientSetup/master/Download.sh | bash

or you can download the necessary scripts as a zipfile here.
You can ignore the docker-compose.zip and download the first zip.
It should be named like FileFighter-v1.*
Unpack the zip file, navigate into the folder, and you should see this README.md, and a Install.sh script.

dev@filefighter:~/Downloads/FileFighter-1.6 $ ls
config.cfg  ffighter  Install.sh  lib  README.md

You can execute the script:

dev@filefighter:~/Downloads/FileFighter-1.6 $ ./Install.sh

And you should see something like that:

dev@filefighter:~/Downloads/FileFighter-1.6 $ ./Install.sh
  _____   _   _          _____   _           _       _
 |  ___| (_) | |   ___  |  ___| (_)   __ _  | |__   | |_    ___   _ __
 | |_    | | | |  / _ \ | |_    | |  / _` | | '_ \  | __|  / _ \ | '__|
 |  _|   | | | | |  __/ |  _|   | | | (_| | | | | | | |_  |  __/ | |
 |_|     |_| |_|  \___| |_|     |_|  \__, | |_| |_|  \__|  \___| |_|
                                     |___/
                   Version v1.6 Last updated: 24.01.21
              Developed by Gimleux, Valentin, Open-Schnick.
             Development Blog: https://blog.filefighter.de
       The code can be found at: https://www.github.com/filefighter

-------------------------< Initial Install >---------------------------

Creating Install Location under /home/dev/filefighter
Copying Scripts to new location...
Copying FileFighter Application to /usr/bin...
This may need administrator rights (sudo) if you are not root.
[sudo] password for dev:

Successfully installed FileFighter!
You can delete the downloaded files (/home/dev/Downloads/ClientSetup) if you want.

usage: ffighter <args>

  status    - show status of the FileFighter application.
  install   - install the FileFighter application.
  start     - start the services.
  stop      - stop the services.
  remove    - remove all services.
  update    - update all the services that have a new version available.

Running this command will add the FileFighter Application to your System.

Installing with docker-compose

Installing with docker-compose is very easy. First you need the command line tool docker-compose if it isn't already installed.
Then download the latest zipfile here. Be carefully to download only the zip that is named like FileFighter-v1.*-docker-compose
Unpack the zip file, navigate into the folder, and you should see this README.md, and a docker-compose.yml file. Open this file in any text editor of your choice, and you will see a lot of configuration stuff. The only things that are important for you, are the keys MONGO_INITDB_ROOT_PASSWORD and DB_PASSWORD change these to a password of your choice but make sure it's the same one on both keys. Also keep in mind, that choosing a strong password is very important, and we won't take any responsibilities for possible inconveniences. After that you can just run the following command:

docker-compose up

You can stop FileFighter with this command:

docker-compose stop

Read more about docker-compose here.
Note: All steps below are only for users of the command line application.

Running FileFighter

You can use the FileFighter Application with the command ffighter
Running this command should show you something like that:

dev@filefighter:~/Downloads/FileFighter-1.6 $ ffighter
  _____   _   _          _____   _           _       _
 |  ___| (_) | |   ___  |  ___| (_)   __ _  | |__   | |_    ___   _ __
 | |_    | | | |  / _ \ | |_    | |  / _` | | '_ \  | __|  / _ \ | '__|
 |  _|   | | | | |  __/ |  _|   | | | (_| | | | | | | |_  |  __/ | |
 |_|     |_| |_|  \___| |_|     |_|  \__, | |_| |_|  \__|  \___| |_|
                                     |___/
                   Version v1.6 Last updated: 24.01.21
              Developed by Gimleux, Valentin, Open-Schnick.
             Development Blog: https://blog.filefighter.de
       The code can be found at: https://www.github.com/filefighter

-------------------------< Show Usage >---------------------------

usage: ffighter <args>

  status    - show status of the FileFighter application.
  install   - install the FileFighter application.
  start     - start the services.
  stop      - stop the services.
  remove    - remove all services.
  update    - update all the services that have a new version available.

You can see all the available options to run with ffighter.

Option Description
status This command shows you information about the status of the application, like installation status, whether its running or not etc...
install Download and create all necessary services.
start Start the services if already downloaded.
stop Stop the services if running.
remove Remove all services.
update Update all the services that have a new version available.

To start the Application just run:

ffighter install

And after that

ffighter start

After the script succeeds you should be able to see the FileFighter application in your browser.
Depending on your configuration file (see below), you should see the application after running the script here.
You should see a login page. For the first setup you can use the credentials. username=admin and password=admin To be sure everything is set up correctly click here. If everything is green you are good to go.

Configuration

The script uses a config.cfg file that stores information in key=value format.
Valid keys to configure how FileFighter behaves are listed here:

Key Possible Values Default Description
app_port 0-65535 80 The port of the application. You can visit the FileFighter application over this port.
db_user any string root The name of the Database running in the background.
db_password any string none (see below) The password of the database. (The database won't be exposed to the internet, but passwords never hurt.)
db_name any string filefighter The name of the database.
use_stable_versions true / false true When set to true the latest stable versions will be used. When set to false always the latest (possible unstable) versions will be used.

All of these keys use the default values if you don't overwrite those values.
It is also possible to have an empty config.cfg file as the default values will be used. If the db_password key is empty, a random password will be generated.

Be carefully as the developers of FileFighter won't take responsibility when you are using the application or configuration options wrong or in a not intended way.

Updating

To update us the update command:

ffighter update

This will check if new versions of the different services are available and will apply the updates. Depending on the configuration the update will either use the current stable version (recommended), or the newest latest version (experimental).

In case you are using the latest versions you will also need to install regclient. Download the right version depending on your operating system and architecture, rename it to 'regctl', make it executable and move it to a folder that is in your path variable.

Auto update

To achieve automatic updates you can set up a cron job as described in this article with the update command.

This will also start all services and make them available here.

Removing FileFighter

Removing the command line application

The application is installed under /usr/bin/ffighter. Remove it by typing:

sudo rm /usr/bin/ffighter

Remove the remaining scripts by removing the folder filefighter in your home directory (/home/$USER/filefighter) by typing

rm-rf /home/$USER/filefighter

Be aware of the fact that the default location of uploaded files and folders will also be in this directory, and thus also deleted!

Removing docker-compose version of FileFighter

Navigate to the location of the docker-compose file and type:

docker-compose down

Hint: This command won't remove the files uploaded.

Troubleshooting

If you encounter error messages like "No Permission" try giving you the permission to execute files for all scripts (/home/YOUR_USERNAME/filefighter).

Remaining Files

All the remaining not explicitly explained files are important for the scripts to work and should not be changed manually.

Help

For further help, feedback or questions write us an email.