1AIOManager Self-Host Deployment + Troubleshooting (Oracle Free VPS)
2=======================================================================
3
4Purpose
5-------
6Deploy AIOManager on a 100% free VPS with:
7- 24/7 uptime
8- stable domain
9- HTTPS (required)
10- autopilot working
11- minimal overhead
12- auto-start on reboot
13- reliable upgrades
14
15
161) Final Architecture (Working Setup)
17-------------------------------------
18Stremio / Browser
19 ↓
20https://your-subdomain.duckdns.org
21 ↓
22Caddy (HTTPS reverse proxy + automatic Let’s Encrypt TLS)
23 ↓
24Docker container: ghcr.io/sonicx161/aiomanager:latest
25 ↓
26Persistent volume: SQLite database + encryption key stored in host folder
27
28
292) VPS Setup (Oracle Always Free)
30---------------------------------
31Recommended instance:
32- Ubuntu 22.04
33- Shape: VM.Standard.E2.1.Micro
34- 1 OCPU, 1GB RAM
35- Public IP enabled
36
37Common blocker: “Out of capacity”
38Cause: Free-tier capacity shortage
39Fix: Retry later OR pick another Availability Domain / Region.
40
41
423) Networking: The #1 Reason HTTPS Fails
43----------------------------------------
44You MUST allow ports:
45- 80 (HTTP)
46- 443 (HTTPS)
47- (optional) 1610 only for debugging, not required in final setup
48
49Oracle Cloud firewall (required)
50VCN → Subnet → Security List → Ingress rules
51Add:
52- TCP 80 from 0.0.0.0/0
53- TCP 443 from 0.0.0.0/0
54
55OS firewall (Ubuntu)
56Oracle often blocks even if the app listens.
57
58Allow:
59sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT
60sudo iptables -I INPUT -p tcp --dport 443 -j ACCEPT
61
62Persist rules:
63sudo apt update
64sudo apt install -y netfilter-persistent
65sudo netfilter-persistent save
66
67
684) Domain: DuckDNS
69------------------
70Create DuckDNS subdomain:
71- your-subdomain.duckdns.org
72
73Update DuckDNS IP to your VPS public IP.
74
75Verify DNS resolves (from PC):
76nslookup your-subdomain.duckdns.org
77
78
795) Install Docker + Docker Compose
80----------------------------------
81On Ubuntu:
82sudo apt update
83sudo apt install -y docker.io docker-compose-plugin
84sudo systemctl enable --now docker
85
86Verify:
87docker --version
88docker compose version
89
90
916) Deploy AIOManager via Docker Compose
92---------------------------------------
93Create folder:
94mkdir -p ~/apps/AIOManager
95cd ~/apps/AIOManager
96mkdir -p aio-data
97
98Create docker-compose.yml:
99
100services:
101 aiomanager:
102 image: ghcr.io/sonicx161/aiomanager:latest
103 container_name: aiomanager
104 restart: unless-stopped
105 ports:
106 - "1610:1610"
107 env_file:
108 - .env
109 volumes:
110 - ./aio-data:/app/data
111 healthcheck:
112 test: ["CMD", "/nodejs/bin/node", "server/healthcheck.js"]
113 interval: 1m
114 timeout: 10s
115 retries: 5
116 start_period: 15s
117
118Start:
119docker compose up -d
120
121Check:
122docker ps
123docker logs aiomanager --tail 120
124
125Expected logs:
126- SQLite initialized
127- Server listening on port 1610
128- “Autopilot started”
129
130
1317) Fix: Data Folder Permission Issues
132-------------------------------------
133Sometimes the data folder gets created as root-owned.
134
135Fix:
136cd ~/apps/AIOManager
137sudo chown -R $USER:$USER aio-data
138
139
1408) Install Caddy (HTTPS Reverse Proxy)
141--------------------------------------
142Install:
143sudo apt update
144sudo apt install -y caddy
145
146
1479) Configure Caddy for AIOManager
148---------------------------------
149Edit:
150sudo nano /etc/caddy/Caddyfile
151
152Use:
153
154your-subdomain.duckdns.org {
155 reverse_proxy localhost:1610
156}
157
158Restart:
159sudo systemctl restart caddy
160sudo systemctl enable caddy
161
162
16310) HTTPS Blocker: ERR_SSL_PROTOCOL_ERROR / Invalid Response
164------------------------------------------------------------
165Symptoms:
166- Browser says SSL protocol error
167- Caddy logs show:
168 - Error getting validation data
169 - ACME challenge failed
170
171Cause:
172Let’s Encrypt cannot reach your VPS on port 80/443.
173
174Fix checklist:
1751. Oracle Security List ingress rules allow 80/443
1762. iptables allows 80/443
1773. Caddy is listening:
178 sudo ss -tulpn | grep -E ':80|:443'
179
180Once ports are reachable, Caddy will successfully issue TLS.
181
182
18311) Confirm Public Connectivity
184-------------------------------
185From Windows PowerShell:
186Test-NetConnection your-subdomain.duckdns.org -Port 80
187Test-NetConnection your-subdomain.duckdns.org -Port 443
188
189Both should show:
190TcpTestSucceeded : True
191
192
19312) Confirm Site Works
194----------------------
195On VPS:
196curl -I https://your-subdomain.duckdns.org
197
198Expected:
199- HTTP/2 200
200- via: 1.1 Caddy
201
202
20313) Autopilot Offline Issue (UI)
204--------------------------------
205Symptom:
206UI shows:
207- AUTOPILOT: OFFLINE
208
209Note:
210This is usually temporary right after boot, or a UI sync delay.
211
212Verify real autopilot status:
213docker logs aiomanager --tail 200
214
215If you see:
216Autopilot | Autonomous Engine started
217Then autopilot is actually running.
218
219
22014) Add Stremio Accounts
221------------------------
222Once UI loads, you can add accounts normally.
223
224
22515) Addons: Fallback addon enabled or disabled?
226------------------------------------------------
227Best practice:
228- Keep fallback addon enabled
229- AIOManager will manage priority and failover chains.
230
231In Stremio, yes it may look like you have multiple addons installed, but that is normal.
232
233
23416) Does addon order matter?
235----------------------------
236Yes — Stremio addon order can affect:
237- which addon returns results first
238- which metadata/streams are preferred
239
240Recommended:
241- Put AIOManager-managed addons above weaker / fallback addons.
242
243
24417) Auto-start on reboot (Important)
245------------------------------------
246Docker already restarts containers if:
247- docker is enabled at boot
248- restart policy is set
249
250We used:
251restart: unless-stopped
252
253This is enough for most cases.
254
255
25618) Updating AIOManager (Safe Procedure)
257----------------------------------------
258Create a script ~/update-aiomanager.sh:
259
260#!/usr/bin/env bash
261set -e
262
263cd ~/apps/AIOManager
264
265echo "== AIOManager update started =="
266
267echo "[1/4] Pulling latest image..."
268docker compose pull
269
270echo "[2/4] Recreating container..."
271docker compose up -d
272
273echo "[3/4] Showing container status..."
274docker ps
275
276echo "[4/4] Cleaning old unused images..."
277docker image prune -f
278
279echo "== Done =="
280
281Make executable:
282chmod +x ~/update-aiomanager.sh
283
284Run:
285~/update-aiomanager.sh
286
287
28819) SQLite Locked / Cannot Login / UUID Issues
289----------------------------------------------
290Symptoms:
291- UI says database is locked
292- login fails even with correct UUID/password
293- old session becomes unusable
294
295Cause:
296SQLite DB corruption, WAL lock issue, or encryption mismatch.
297
298Fast fix: Reset and start fresh
299Stop:
300cd ~/apps/AIOManager
301docker compose down
302
303Delete database:
304rm -rf aio-data/*
305
306Start again:
307docker compose up -d
308
309This generates a new encryption key and new DB.
310
311
31220) WARNING: Resetting DB Deletes Everything
313--------------------------------------------
314If you wipe aio-data, you lose:
315- accounts
316- chains
317- rules
318- UUID
319- stored config
320
321Only do this if you are intentionally resetting.
322
323
32421) Minimal Background Services (Performance)
325---------------------------------------------
326On a 1GB Oracle free VPS:
327- keep only Docker + Caddy running
328- avoid extra monitoring stacks unless needed
329- avoid unnecessary containers
330
331
33222) Final Verification Checklist
333--------------------------------
334On VPS:
335docker ps
336sudo systemctl status caddy --no-pager
337sudo ss -tulpn | grep -E ':80|:443|:1610'
338
339From browser:
340- https://your-subdomain.duckdns.org loads
341- TLS certificate valid
342- AIOManager UI works
343- accounts can be added
344
345
34623) Optional: Discord Notifications Setup
347-----------------------------------------
348In Discord:
349- Channel → Settings → Integrations → Webhooks → New Webhook
350- Copy webhook URL
351
352Paste into AIOManager:
353Settings → Global Notifications → Discord Webhook URL → Save
354
355
356FINAL RESULT
357------------
358✔ Oracle Always Free VPS
359✔ Docker deployment
360✔ Caddy HTTPS with Let’s Encrypt
361✔ DuckDNS stable domain
362✔ Auto restart
363✔ Low overhead
364✔ Works with Stremio
365✔ Autopilot active
366