SERVEFILE(1)
π SERVEFILE(1) π
okay bestie, welcome to the servefile page β it's a tiny HTTP server for temporary file transfer, and honestly? it's giving main character energy for exactly five minutes and then it dips. periodt.
β¨ NAME β¨
servefile β small HTTP-Server for temporary file transfer πΈ
π¦ SYNOPSIS π¦
servefile [-h] [--version] [-p PORT] [-u] [-s MAX_UPLOAD_SIZE] [-l]
[--ssl] [--key KEY] [--cert CERT] [-a user:password]
file/directory
π DISCLAIMER π
okay so do NOT use this as a normal web server. like, fr fr. this thing is optimized for running a short time and yeeting files at other people β it is not here to do high-performance static file serving. she's a sprinter, not a marathon runner, and we respect that π
π DESCRIPTION π
Servefile is a small HTTP-server built for temporary file transfer, mostly in the local network. Her whole goal is making transferring single files as painless as humanly possible, and replacing those tar/netcat solutions that nobody wants to deal with anymore. iconic behavior.
With just a file as argument, servefile serves just that one file and redirects all HTTP requests to that file. no detours, no side quests.
Uploads can be done with curl, wget (peep the EXAMPLES section π«Ά) or a normal browser. In upload mode with -u, servefile creates a directory and saves all uploaded files into that directory. When you're uploading with curl or wget, the filename is extracted from the path part of the url you used for the upload. iykyk.
For SSL support, pyopenssl (python3-openssl) needs to be installed. If no key and cert is given, servefile will generate a key pair for you and display its fingerprint. she's self-sufficient like that β¨
In --tar mode, the given file or directory will be packed on (each) request and piped to the client through the HTTP connection, thus serving always the latest content of the directory and preventing temporary file creaton. Tar files will be created containing only the lowest directory name from the full path, so using /path/to/dir/ as file/directory argument will create a tar file starting with the dir/ directory. When giving a file as argument, only the file without any path will be in the tarfile. Symlinks will not be dereferenced. no cap, that's the whole vibe.
π COMMAND SUMMARY π
π positional arguments:
file/directoryβ file or directory (with-lor-u) which should be served or uploaded to π
π optional arguments:
-h,--helpβ Show a help message and exit π--versionβ Show program's version number and exit β¨-p PORT,--port PORTβ Port to listen on π₯-u,--uploadβ Enable uploads to a given directory π€-s MAX_UPLOAD_SIZE,--max-upload-size MAX_UPLOAD_SIZEβ Limit upload size in kB. Size modifiers are allowed, e.g.2G,12MB,1B. π-l,--list-dirβ Show directory indexes and allow access to all subdirectories π¦--sslβ Enable SSL. If no key/cert is specified one will be generated. π--key KEYβ Key file to use for SSL. If no cert is given with--certthe key file will also be searched for a cert ποΈ--cert CERTβ Certfile to use for SSL π-a user:password,--auth user:passwordβ Set user and password for HTTP basic authentication π«Ά--realm REALMβ Set a realm for HTTP basic authentication. This is an arbitrary string which is displayed when doing HTTP basic authentication π-t,--tarβ Enable on the fly tar creation for given file or directory. Note: Download continuation will not be available. π-c method,--compression methodβ Set compression method, only in combination with--tar. Can be one ofnone,gzip,bzip2,xz. π-4,--ipv4-onlyβ Listen on IPv4 only 4οΈβ£-6,--ipv6-onlyβ Listen on IPv6 only 6οΈβ£
π EXAMPLES π
Serving a single file with SSL and HTTP Basic auth:
servefile --ssl --auth foo:bar the_file
Enabling uploads to a directory:
servefile -u dir/
Uploading file foo as bar to servefile via command line:
curl -X PUT http://ip:port/bar --data-binary @foo
curl -X POST http://ip:port/bar --data-binary @foo
wget http://ip:port/bar --post-file=foo
Serving a on the fly generated tar.gz file of a directory:
servefile --tar -c gzip path/to/dir
π AUTHOR π
servefile is developed by Sebastian Lohff <seba@someserver.de> β shoutout to the dev, absolute legend π«Ά
ok that's the whole page bestie, you're officially fluent in servefile. go transfer some files, slay, and remember: short-lived server, long-lived main character energy. πβ¨
this was servefile version 0.5.4, dated January 2023 β mwah, catch you on the next manpage ππ
π¦ where this page comes from
- debian bookworm: servefile 0.5.4-3 Β· GPL-3.0-or-later
- debian trixie: servefile 0.5.4-3.2 Β· GPL-3.0-or-later
- ubuntu noble: servefile 0.5.4-3 Β· GPL-3.0-or-later
- ubuntu questing: servefile 0.5.4-3.2
- ubuntu resolute: servefile 0.5.4-3.2build1 Β· GPL-3.0-or-later
- ubuntu stonking: servefile 0.5.4-3.2build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms