Skip to content

Latest commit

 

History

History
39 lines (35 loc) · 2.26 KB

README.md

File metadata and controls

39 lines (35 loc) · 2.26 KB

maven.sock

Actions License
Stable Beta
Discord

A small Maven upload backend over a UNIX socket, meant for use with reverse proxies such as Caddy.

Installation & Usage

  1. Be sure you're on a system that supports unix sockets. Required for as that's the only method of connecting to the server.
  2. Grab the latest stable release available.
  3. Grab Java 17 from either your vendor or Adoptium.
  4. Create the Maven repository folder you want to use.
  5. 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.
  6. Setup the environment. You can set the environment variables maven and unix_socket.
    • An example configuration is to use maven=/var/www/maven and unix_socket=/run/maven.sock.
  7. Setup the reverse proxy/webserver.
    • Note that this server only supports PUT. Anything else will return 501 Not Implemented, even on GET and HEAD.
    • 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
      }
  8. Setup the clients using HTTP Basic Authorization.