A small Maven upload backend over a UNIX socket, meant for use with reverse proxies such as Caddy.
- Be sure you're on a system that supports unix sockets. Required for as that's the only method of connecting to the server.
- Grab the latest stable release available.
- Grab Java 17 from either your vendor or Adoptium.
- Create the Maven repository folder you want to use.
- Create a user by running the server with
java -jar maven.sock-0.0.0-all.jar username
in a console.- It'll prompt you for each username given what you want the password to be. Be sure each one used is sufficiently strong, for as the username & password is the only form of authentication, guarded with Argon2id by default.
- The username cannot contain
:
or any form of newlines. Anything else is free range.
- Setup the environment. You can set the environment variables
maven
andunix_socket
.- An example configuration is to use
maven=/var/www/maven
andunix_socket=/run/maven.sock
.
- An example configuration is to use
- Setup the reverse proxy/webserver.
- Note that this server only supports
PUT
. Anything else will return 501 Not Implemented, even onGET
andHEAD
. - For Caddy, an example configuration is to use...
# /etc/caddy/Caddyfile maven.ampflower.gay { root * /var/www/maven file_server browse @put method PUT reverse_proxy @put unix//run/maven.sock }
- Note that this server only supports
- Setup the clients using HTTP Basic Authorization.