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
2. Setup & Run
For Linux/macOS:
1# Make executable
2chmod +x aaxion-linux-amd64
3
4# Run server
5./aaxion-linux-amd64For Windows:
1# Just run the executable
2.\aaxion-windows-amd64.exeUsage Guide
Connect via Mobile App
- 1Download the Aaxion Mobile App from the release page.
- 2Launch the app and go to Settings tab.
- 3Enter your server IP (e.g., 192.168.1.x) and Port (8080).
- 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:
1curl -X POST -d '{"username":"your_user","password":"your_pass"}' "http://localhost:8080/auth/login"Logout:
1curl -H "Authorization: Bearer $TOKEN" -X POST "http://localhost:8080/auth/logout"👤 User Management
/auth/registerRegister the first user. Fails if a user already exists.
Body: {"username": "...", "password": "..."}
Response
1{ "message": "User created successfully" }/auth/loginAuthenticate and receive a session token.
Response
1{
2 "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
3 "expires_in": 3600
4}📁 View Files and Folders
/files/view?dir={directory_path}Return the contents of a directory. ⚠️ dir must be within monitored root
1curl -H "Authorization: Bearer $TOKEN" "http://localhost:8080/files/view?dir=/home/swap/documents"Response
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
/files/create-directory?path={directory_path}Create a new directory at the specified path.
1curl -H "Authorization: Bearer $TOKEN" -X POST "http://localhost:8080/files/create-directory?path=/home/swap/new_folder"Response
1{ "message": "Directory created successfully" }📤 Upload System
Support for both single requests and chunked uploads for large files.
Single File Upload
/files/upload?dir={directory_path}1curl -H "Authorization: Bearer $TOKEN" -F "file=@/tmp/example.txt" "http://localhost:8080/files/upload?dir=/home/swap/documents"Response
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.
1curl -H "Authorization: Bearer $TOKEN" -X POST "http://localhost:8080/files/upload/chunk/start?filename=large.zip"Response
1{ "upload_id": "uid_12345", "chunk_size": 1048576 }2. Upload Chunk (Binary Body)
POST /files/upload/chunk?filename=...&chunk_index=0Upload a single chunk via raw binary body. Increment index from 0.
1curl -H "Authorization: Bearer $TOKEN" --data-binary @chunk0.bin "http://localhost:8080/files/upload/chunk?filename=large.zip&chunk_index=0"Response
1{ "status": "chunk_received", "index": 0 }3. Complete & Merge
POST /files/upload/chunk/complete?filename=...&dir=...Merge all uploaded chunks into final file.
1curl -H "Authorization: Bearer $TOKEN" -X POST "http://localhost:8080/files/upload/chunk/complete?filename=large.zip&dir=/home/swap/documents"Response
1{ "message": "Upload completed successfully", "path": "/home/swap/documents/large.zip" }🖼️ Images & Thumbnails
/files/view-image?path=...Serve raw image file (supports caching).
/files/thumbnail?path=...Get resized JPEG thumbnail (max 200px).
Supports ?tkn= param for <img> tags.
1curl "http://localhost:8080/files/thumbnail?path=...&tkn=$TOKEN"System Info
/api/system/get-root-path1{ "root_path": "/home/swap" }