[object Object]

← back to Exo

8000 -> 52415 (#915)

9815283a82944d9cc6caad9a857e5a4da1e99db3 · 2025-12-18 18:39:44 +0000 · Evan Quiney

* 8000 -> 52415

* dont grab the api port for placement

---------

Co-authored-by: rltakashige <rl.takashige@gmail.com>

Files touched

Diff

commit 9815283a82944d9cc6caad9a857e5a4da1e99db3
Author: Evan Quiney <evanev7@gmail.com>
Date:   Thu Dec 18 18:39:44 2025 +0000

    8000 -> 52415 (#915)
    
    * 8000 -> 52415
    
    * dont grab the api port for placement
    
    ---------
    
    Co-authored-by: rltakashige <rl.takashige@gmail.com>
---
 README.md                           | 2 +-
 dashboard/vite.config.ts            | 8 ++++----
 src/exo/main.py                     | 5 +++--
 src/exo/master/api.py               | 2 +-
 src/exo/master/placement.py         | 3 ++-
 src/exo/worker/main.py              | 4 ++--
 src/exo/worker/utils/net_profile.py | 2 +-
 tmp/run_llm.py                      | 2 +-
 tmp/run_llm.sh                      | 2 +-
 9 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/README.md b/README.md
index 782af931..b873341f 100644
--- a/README.md
+++ b/README.md
@@ -40,7 +40,7 @@ You can download the latest build here: [EXO-latest.dmg](https://assets.exolabs.
 
 To run from source, clone the repo, build the dashboard with `cd dashboard && npm install && npm run build` and run `uv run exo`.
 
-After starting with either of these methods go to `http://localhost:8000` in your browser, and you'll have EXO.
+After starting with either of these methods go to `http://localhost:52415` in your browser, and you'll have EXO.
 
 ---
 
diff --git a/dashboard/vite.config.ts b/dashboard/vite.config.ts
index 4d22f688..1c0a2471 100644
--- a/dashboard/vite.config.ts
+++ b/dashboard/vite.config.ts
@@ -6,10 +6,10 @@ export default defineConfig({
 	plugins: [tailwindcss(), sveltekit()],
 	server: {
 		proxy: {
-			'/v1': 'http://localhost:8000',
-			'/state': 'http://localhost:8000',
-			'/models': 'http://localhost:8000',
-			'/instance': 'http://localhost:8000'
+			'/v1': 'http://localhost:52415',
+			'/state': 'http://localhost:52415',
+			'/models': 'http://localhost:52415',
+			'/instance': 'http://localhost:52415'
 		}
 	}
 });
diff --git a/src/exo/main.py b/src/exo/main.py
index 7c2bf867..3ce0d617 100644
--- a/src/exo/main.py
+++ b/src/exo/main.py
@@ -205,7 +205,8 @@ class Args(CamelCaseModel):
     verbosity: int = 0
     force_master: bool = False
     spawn_api: bool = False
-    api_port: PositiveInt = 8000
+    api_port: PositiveInt = 52415
+    tb_only: bool = False
 
     @classmethod
     def parse(cls) -> Self:
@@ -241,7 +242,7 @@ class Args(CamelCaseModel):
             "--api-port",
             type=int,
             dest="api_port",
-            default=8000,
+            default=52415,
         )
 
         args = parser.parse_args()
diff --git a/src/exo/master/api.py b/src/exo/master/api.py
index ffbf3fde..7778ca3d 100644
--- a/src/exo/master/api.py
+++ b/src/exo/master/api.py
@@ -90,7 +90,7 @@ class API:
         node_id: NodeId,
         session_id: SessionId,
         *,
-        port: int = 8000,
+        port: int,
         # Ideally this would be a MasterForwarderEvent but type system says no :(
         global_event_receiver: Receiver[ForwarderEvent],
         command_sender: Sender[ForwarderCommand],
diff --git a/src/exo/master/placement.py b/src/exo/master/placement.py
index f3856f93..e580c254 100644
--- a/src/exo/master/placement.py
+++ b/src/exo/master/placement.py
@@ -33,7 +33,8 @@ from exo.shared.types.worker.instances import (
 
 
 def random_ephemeral_port() -> int:
-    return random.randint(49152, 65535)
+    port = random.randint(49153, 65535)
+    return port - 1 if port <= 52415 else 52414
 
 
 def add_instance_to_placements(
diff --git a/src/exo/worker/main.py b/src/exo/worker/main.py
index a5c049dc..8be6947f 100644
--- a/src/exo/worker/main.py
+++ b/src/exo/worker/main.py
@@ -421,10 +421,10 @@ class Worker:
                         local_node_id=self.node_id,
                         send_back_node_id=nid,
                         # nonsense multiaddr
-                        send_back_multiaddr=Multiaddr(address=f"/ip4/{ip}/tcp/8000")
+                        send_back_multiaddr=Multiaddr(address=f"/ip4/{ip}/tcp/52415")
                         if "." in ip
                         # nonsense multiaddr
-                        else Multiaddr(address=f"/ip6/{ip}/tcp/8000"),
+                        else Multiaddr(address=f"/ip6/{ip}/tcp/52415"),
                     )
                     if edge not in edges:
                         logger.debug(f"ping discovered {edge=}")
diff --git a/src/exo/worker/utils/net_profile.py b/src/exo/worker/utils/net_profile.py
index 1c8c5fe4..b7ef0a1e 100644
--- a/src/exo/worker/utils/net_profile.py
+++ b/src/exo/worker/utils/net_profile.py
@@ -13,7 +13,7 @@ async def check_reachability(
     sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     sock.settimeout(1)  # 1 second timeout
     try:
-        result = await to_thread.run_sync(sock.connect_ex, (target_ip, 8000))
+        result = await to_thread.run_sync(sock.connect_ex, (target_ip, 52415))
     except socket.gaierror:
         # seems to throw on ipv6 loopback. oh well
         # logger.warning(f"invalid {target_ip=}")
diff --git a/tmp/run_llm.py b/tmp/run_llm.py
index 89a2e50b..2b99c244 100644
--- a/tmp/run_llm.py
+++ b/tmp/run_llm.py
@@ -7,7 +7,7 @@ import requests
 
 
 def stream_chat(host: str, query: str) -> None:
-    url = f"http://{host}:8000/v1/chat/completions"
+    url = f"http://{host}:52415/v1/chat/completions"
     headers = {"Content-Type": "application/json"}
     payload = {
         "model": "mlx-community/Llama-3.2-1B-Instruct-4bit",
diff --git a/tmp/run_llm.sh b/tmp/run_llm.sh
index b9dbb61b..1f592b70 100755
--- a/tmp/run_llm.sh
+++ b/tmp/run_llm.sh
@@ -10,7 +10,7 @@ HOST="$1"
 shift
 QUERY="$*"
 
-curl -sN -X POST "http://$HOST:8000/v1/chat/completions" \
+curl -sN -X POST "http://$HOST:52415/v1/chat/completions" \
   -H "Content-Type: application/json" \
   -d "{
         \"model\": \"mlx-community/Kimi-K2-Thinking\",

← 658cf5cc remove tb_only from master  ·  back to Exo  ·  Update README.md 74bae3ba →