v1.0.0 Stable

Aaxion Drive Documentation

Turn your legacy hardware into a high-performance, secure file cloud. Stream files efficiently with zero-buffer technology.

Introduction

Aaxion is engineered to breathe new life into old hardware. By running a highly optimized Go server, you can transform an old laptop or desktop with spare storage into a dedicated cloud node for your main devices.

Zero-Buffer Streaming

Streams data directly to disk. 10GB transfers use only ~32KB RAM.

Chunked Uploads

Split-file upload support handles heavy files on unstable networks.

Secure Sharing

Generate one-time, time-limited secure links for external sharing.

Efficient

Minimal footprint. Runs on Linux (systemd) and Windows.

Installation

1. Download Binary

Get the latest release for your operating system.

Visit Releases Page

2. Setup & Run

TERMINAL

For Linux/macOS:

bash
1# Make executable
2chmod +x aaxion-linux-amd64
3
4# Run server
5./aaxion-linux-amd64

For Windows:

powershell
1# Just run the executable
2.\aaxion-windows-amd64.exe

Usage Guide

Connect via Mobile App

  1. 1Download the Aaxion Mobile App from the release page.
  2. 2Launch the app and go to Settings tab.
  3. 3Enter your server IP (e.g., 192.168.1.x) and Port (8080).
  4. 4Save configuration and start browsing your files.

How It Works

Aaxion operates by serving a file system tree over a RESTful JSON API. Security is handled via path sanitization to prevent directory traversal. The server automatically filters out hidden files (dotfiles) to keep the view clean.

  • Systemd Integration: Designed to run as a background service on Linux.
  • Low Resource Mode: Idle memory usage is ~10MB.

API Reference

A concise, developer-friendly reference for the aaxion file-service API. Use the examples below to interact with a local server.

Base URL (local): http://localhost:8080/

🔐 Authentication

Most endpoints require authentication. You must obtain a token and include it in the `Authorization` header.

Header format: Authorization: Bearer <your_token>

Quick examples

Login:

bash
1curl -X POST -d '{"username":"your_user","password":"your_pass"}' "http://localhost:8080/auth/login"

Logout:

bash
1curl -H "Authorization: Bearer $TOKEN" -X POST "http://localhost:8080/auth/logout"

👤 User Management

POST/auth/register

Register the first user. Fails if a user already exists.

Body: {"username": "...", "password": "..."}

Response

json
1{ "message": "User created successfully" }
POST/auth/login

Authenticate and receive a session token.

Response

json
1{
2  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
3  "expires_in": 3600
4}

📁 View Files and Folders

GET/files/view?dir={directory_path}

Return the contents of a directory. ⚠️ dir must be within monitored root

bash
1curl -H "Authorization: Bearer $TOKEN" "http://localhost:8080/files/view?dir=/home/swap/documents"

Response

json
1[
2  {
3    "name": "Project-Alpha",
4    "is_dir": true,
5    "size": 4096,
6    "path": "/home/user/docs",
7    "raw_path": "/home/user/docs/Project-Alpha"
8  },
9  {
10    "name": "report.pdf",
11    "is_dir": false,
12    "size": 1048576,
13    "path": "/home/user/docs",
14    "raw_path": "/home/user/docs/report.pdf"
15  }
16]

Create Directory

POST/files/create-directory?path={directory_path}

Create a new directory at the specified path.

bash
1curl -H "Authorization: Bearer $TOKEN" -X POST "http://localhost:8080/files/create-directory?path=/home/swap/new_folder"

Response

json
1{ "message": "Directory created successfully" }

📤 Upload System

Support for both single requests and chunked uploads for large files.

Single File Upload

POST/files/upload?dir={directory_path}
bash
1curl -H "Authorization: Bearer $TOKEN" -F "file=@/tmp/example.txt" "http://localhost:8080/files/upload?dir=/home/swap/documents"

Response

json
1{ "message": "File uploaded successfully" }

Chunked Upload (Large Files)

1. Start Session

POST /files/upload/chunk/start?filename=...

Initialize a chunked upload session. Returns session info.

bash
1curl -H "Authorization: Bearer $TOKEN" -X POST "http://localhost:8080/files/upload/chunk/start?filename=large.zip"

Response

json
1{ "upload_id": "uid_12345", "chunk_size": 1048576 }

2. Upload Chunk (Binary Body)

POST /files/upload/chunk?filename=...&chunk_index=0

Upload a single chunk via raw binary body. Increment index from 0.

bash
1curl -H "Authorization: Bearer $TOKEN" --data-binary @chunk0.bin "http://localhost:8080/files/upload/chunk?filename=large.zip&chunk_index=0"

Response

json
1{ "status": "chunk_received", "index": 0 }

3. Complete & Merge

POST /files/upload/chunk/complete?filename=...&dir=...

Merge all uploaded chunks into final file.

bash
1curl -H "Authorization: Bearer $TOKEN" -X POST "http://localhost:8080/files/upload/chunk/complete?filename=large.zip&dir=/home/swap/documents"

Response

json
1{ "message": "Upload completed successfully", "path": "/home/swap/documents/large.zip" }

🔗 Temporary File Sharing

1. Generate Link

GET/files/d/r?file_path=...
bash
1curl "http://localhost:8080/files/d/r?file_path=/home/user/file.txt"

Response

json
1{
2  "share_link": "/files/d/t/a1b2c3d4e5f6",
3  "token": "a1b2c3d4e5f6"
4}

2. Download via Token

GET/files/d/t/{token}

No Auth Required (Public)

bash
1curl -O "http://localhost:8080/files/d/t/abcdef..."

🖼️ Images & Thumbnails

GET/files/view-image?path=...

Serve raw image file (supports caching).

GET/files/thumbnail?path=...

Get resized JPEG thumbnail (max 200px).

Supports ?tkn= param for <img> tags.

bash
1curl "http://localhost:8080/files/thumbnail?path=...&tkn=$TOKEN"

System Info

GET/api/system/get-root-path
json
1{ "root_path": "/home/swap" }