charon - Share files over HTTP easily and conveniently


version 0.001003


Start up charon:

 $ charon
 serving /home/frew on with a query param auth of ?auth=br5Y2jX55

Now you can navigate to and download files under /home/frew.

Here's an example of using it with all the switches:

 charon ~ --listen *:8080 --autoshutdown 1h --query-param-auth '' --no-index


 Charon is the ferryman of Hades who carries souls of the newly deceased across
 the rivers Styx and Acheron that divided the world of the living from the world
 of the dead

charon is a tool for easily sharing files. I have found that at work I often have trouble ensuring all the various permissions are correct and all the various machines have the right tools and whatnot to serve files from one machine to another. charon helps with this by making some of what used to be Plack oneliners into a much more robust and convenient tool.


charon uses a configuration system I developed that allows the user to use either a file, or environment variables, or both. Currently all the configuration allows you to do is set defaults for the commandline options. Basically it works like this:

  • if CHARON_$FOO is set, use that to set foo

  • if $foo exists in the config file, use that to set foo

The location of the config file is similarly dynamic. The default is just .charonrc in the current directory. The location can be overridden by setting CHARON_CONFLOC. Currently the configuration file is JSONY.

So to be clear, if you wanted to set a default for --query-param-auth, you can either:

1. Set CHARON_QUERY_PARAM_AUTH=password=station
2. Put a line like query_param_auth: password=station in .charonrc
3. Set CHARON_CONFLOC to ~/.charonrc and add a line like the above to that file.


single positional argument

 charon ~/code/DBIx-Class-Candy

The one and only positional argument to charon is the directory or file to serve. The default is the current directory, but you can pass another directory or even file if you want to serve something else.

--listen -l

 charon --listen *:5000

 charon -l

If you want to choose the port and IP to listen on use this option. Currently only one --listen is supported, but I would be glad to add support for multiple in the future.


 charon --autoshutdown 30m

 charon --autoshutdown 1h3m20s

--autoshutdown requires a single argument that expresses a duration. The point is so that you can timebox your file sharing and then after the duration it will just go away, instead of you forgetting to shut it down and leaving it running forever.


 charon --query-param-auth 'password=station'

 charon --query-param-auth ''

Query param auth is just a handy way to be able to send moderately authenticated links to your friends. This is on by default and generates a password with the key of auth, so links will be http://foo:3001/bar.tar.gz?auth=bd75z4j. If you want to choose the key and value pass $key=$value, so if you pass password=42 you could use the link http://foo:3001/bar.tar.gz?password=42.

Note that while this is on by default I may decide to change that in the future.

--index --no-index

 charon --no-index

This option is on by default, and allows the client to get an html based directory listing. You might turn this off if you want to have a bit more security-through-obscurity to allow only sharing files you give people links to.

--help -h

 charon -h

Use --help to get a brief listing of the options.


Arthur Axel "fREW" Schmidt <>


This software is copyright (c) 2015 by Arthur Axel "fREW" Schmidt.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.