This commit is contained in:
2026-01-14 01:33:25 -08:00
parent 226367a6ea
commit e27e13b64c
10 changed files with 760 additions and 63 deletions

View File

@@ -13,7 +13,7 @@ server and uses it as a remote storage backend through the RemoteStorageBackend.
$ pip install flask flask-cors
3. Copy this file to your device
4. Run it (with optional API key):
$ python remote_storage_server.py --storage-path /path/to/storage --port 5000
$ python remote_storage_server.py --storage-path /path/to/storage --port 999
$ python remote_storage_server.py --storage-path /path/to/storage --api-key mysecretkey
5. Server prints connection info automatically (IP, port, API key)
@@ -22,7 +22,7 @@ server and uses it as a remote storage backend through the RemoteStorageBackend.
2. Add to config.conf:
[store=remote]
name="phone"
url="http://192.168.1.100:5000"
url="http://192.168.1.100:999"
api_key="mysecretkey"
timeout=30
Note: API key is optional. Works on WiFi or cellular data.
@@ -567,7 +567,7 @@ def main():
parser = argparse.ArgumentParser(
description="Remote Storage Server for Medios-Macina",
epilog=
"Example: python remote_storage_server.py --storage-path /storage/media --port 5000 --api-key mysecretkey",
"Example: python remote_storage_server.py --storage-path /storage/media --port 999 --api-key mysecretkey",
)
parser.add_argument(
"--storage-path",
@@ -584,8 +584,8 @@ def main():
parser.add_argument(
"--port",
type=int,
default=5000,
help="Server port (default: 5000)"
default=999,
help="Server port (default: 999)"
)
parser.add_argument(
"--api-key",
@@ -628,6 +628,13 @@ def main():
if args.api_key:
print(f'api_key="{args.api_key}"')
print("timeout=30")
print("\nOR use ZeroTier Networking (Server Side):")
print("[networking=zerotier]")
print(f'serve="{STORAGE_PATH.name}"')
print(f'port="{args.port}"')
if args.api_key:
print(f'api_key="{args.api_key}"')
print(f"\n{'='*70}\n")
try: