Using ARGON2 password hashing with copyparty in a Docker container
It's easy, just takes a second.
In order to do this, run the Docker container once with any old plaintext password assigned to your user in the config file. This causes copyparty to generate a file in the ./copyparty/ cache folder which lives adjacent to your copyparty.conf file.
In there, is a file called 'ah-salt.txt' - open this and there will be a random string of text. This is a cryptographic salt which the copyparty server will always use for this particular dockerised copyparty container.
Now to generate the password. To do this, download the regular copyparty-sfx.py file from the Github repo, and run the following:
python copyparty-sfx.py --ah-alg argon2 --ah-cli --ah-salt #YOURSALTHERE#`
(If you receive an error about not having argon2 installed, your OS may not have the python library to run argon2 . On ArchLinux a simple `pacman -S python-argon2-cffi` remedies this. Other distros may need something similar, but the package should be easy to find)
Follow the instructions in the copyparty CLI app, and you'll receive an argon2 hash which is based upon the salt unique to your instance of dockerised copyparty.
Now, take that hash and place it where your password would normally go in your copyparty.conf file.
Finally, enable this whole argon2 functionality by placing ah-alg: argon2
in the [global] section of the config file. As an example:
[global]
e2dsa # enable file indexing and filesystem scanning
e2ts # enable multimedia indexing
ansi # enable colors in log messages
ah-alg: argon2
Restart the container and you're done.