Docs

Everything you need to install akpa, share a folder, and lock it down.

On this page

Install #

One line. It detects your OS and CPU, verifies a SHA-256 checksum, and drops a single static binary in ~/.local/bin.

curl -fsSL https://akpa.victorabuka.com/install.sh | bash

If piping a script into your shell makes you uneasy — reasonably — read it first:

curl -fsSL https://akpa.victorabuka.com/install.sh -o install.sh
less install.sh
bash install.sh

Other ways in

Install a specific version:

AKPA_VERSION=v1.2.0 curl -fsSL https://akpa.victorabuka.com/install.sh | bash

Install somewhere else:

AKPA_INSTALL_DIR=/usr/local/bin curl -fsSL https://akpa.victorabuka.com/install.sh | bash

Or grab a binary from Releases and put it on your PATH.

Supported: macOS (Intel + Apple Silicon), Linux (x86-64 + ARM64). Windows binaries are published but untested.

Quick start #

cd into any folder and run akpa.

$ cd ~/photos
$ akpa

   ___   __ _____  ___
  / _ | / //_/ _ \/ _ |
 / __ |/ ,< / ___/ __ |
/_/ |_/_/|_/_/  /_/ |_|
  share a folder over one link

  … starting file server  http://127.0.0.1:39465 ✓
  … connecting to relay akpa.victorabuka.com:7000 ✓
  … waiting for tunnel id  hdy2yuyh63hhdh ✓

  serving  /home/vic/photos
  link     https://akpa.victorabuka.com/live/hdy2yuyh63hhdh

  ready. ctrl-c to stop.

Open that link on any device, anywhere, and you get the contents of the folder. Stop the process and the link dies.

Usage #

akpa [flags] [directory]

With no directory, akpa serves the one you are standing in.

FlagDefaultDescription
--relayakpa.victorabuka.com:7000Relay to connect through
--port0Local file-server port; 0 picks a free one
--passwordoffAsk visitors for this password before showing anything
--downloadoffForce files to download instead of rendering in the browser
--no-banneroffSkip the startup banner
--versionPrint version and exit
akpa                              # serve the current directory
akpa ~/Downloads                  # serve somewhere else
akpa --port 5174 ~/photos         # pin the local port
akpa --relay localhost:7000       # point at a relay running on this machine
akpa --password correct-horse     # put a password in front of the share

Passwords #

--password puts a login page in front of the share. Visitors see a password field, and nothing else, until they get it right.

akpa --password fireship-horse-tinder ~/photos

The check happens in the CLI process on your machine — the relay never sees the password and stores nothing for it. When someone enters the right one, akpa signs a session cookie with a key it generated at startup and kept in memory. That has a useful consequence: stop the process and every session it handed out becomes unverifiable, because the key that signed them is gone.

Sessions last 12 hours. The gate covers the local http://127.0.0.1 address too, so there is no way in that skips it.

A password on the command line lands in your shell history and in ps. To avoid both, pass it through the environment instead:

AKPA_PASSWORD=correct-horse-battery akpa ~/photos
Wrong guesses are slowed down, but nothing stops a determined visitor with the link from trying: pick a password worth typing, not 1234.

Configuration #

Settings resolve in this order, with later sources winning:

defaults  <  ~/.config/akpa/config  <  environment variables  <  flags

To set a permanent default, create ~/.config/akpa/config:

AKPA_RELAY=akpa.victorabuka.com:7000
# AKPA_PORT=5174
# AKPA_NO_BANNER=1
# AKPA_DOWNLOAD=1
# AKPA_PASSWORD=fireship-horse-tinder
VariableEffect
AKPA_RELAYRelay address
AKPA_PORTLocal port
AKPA_PASSWORDPassword to require, without putting it in your shell history
AKPA_NO_BANNERAny value hides the banner
AKPA_DOWNLOADAny value forces downloads
AKPA_DEVAny value makes akpa also read ./.env
NO_COLORAny value disables colored output
akpa deliberately does not read ./.env by default. It runs in whatever directory you are sharing, so picking up a stray .env from a cloned repo or a downloads folder would silently change your settings. Set AKPA_DEV=1 during development if you want that behaviour.

Updating #

Run the install command again. It resolves the newest release and replaces your existing binary in place.

curl -fsSL https://akpa.victorabuka.com/install.sh | bash

Uninstalling #

akpa is a single binary and writes nothing else to your machine.

rm ~/.local/bin/akpa
rm -rf ~/.config/akpa      # only if you created a config file

How it works #

   your machine                     akpa relay                    visitor
┌─────────────────┐            ┌──────────────────┐         ┌──────────────┐
│  akpa CLI       │            │  akpa server     │         │  browser     │
│                 │            │                  │         │              │
│  file server ───┼──┐         │  :7000  control  │         │              │
│  on 127.0.0.1   │  │         │  :8081  public   │         │              │
└─────────────────┘  │         └──────────────────┘         └──────────────┘
                     │                  ▲                          │
                     └──── outbound ────┘                          │
                          TCP, held open                           │
                                        ▲                          │
                                        └── GET /live/{id} ────────┘

The CLI dials out to the relay and keeps that connection open. Because it is outbound, it works from behind NAT, CGNAT, dorm WiFi, and office firewalls that drop everything inbound.

When someone opens your link, the relay looks up which connection owns that ID, forwards the HTTP request down it, and streams the response back. Your machine never accepts an inbound connection.

Security #

  • The link is the credential, unless you add one. IDs are random and long, but anyone holding the URL gets in. Share it like a password — or set --password so the URL alone is not enough.
  • Passwords are checked locally. The relay never receives one, and sessions are signed with a key that exists only inside the running process.
  • Tunnels are ephemeral. Stop the process and the link dies. Restarting gives you a new ID.
  • Nothing is stored. The relay proxies bytes; it does not save your files.
  • Serve only what you mean to. akpa in ~ shares your entire home directory.

Building from source #

git clone https://github.com/Abuka-Victor/akpa-cli
cd akpa-cli
go build -o akpa .

The CLI is MIT licensed. Source, releases and issues live on GitHub.