Auto-start feature
One of Aceplay’s key features is automatic engine management. When you run a play command, Aceplay:- Checks if acestream-engine is already running
- If not found, automatically starts it
- Waits for the engine to be ready
- Connects and streams content
- Optionally stops the engine when done (if Aceplay started it)
acestream-launcher tool.
How engine detection works
Aceplay searches for a running acestream-engine instance by checking multiple common ports:/webui/app/127323294/template/api//ace/getstream?content_id=test
The engine is considered running if any of these endpoints return an HTTP response (even errors like 404 or 500 indicate the server is alive).
Starting the engine
If no running engine is found and auto-start is enabled, Aceplay starts acestream-engine:Engine startup parameters
When Aceplay starts the engine, it uses these parameters:--client-console- Run in console mode (no GUI)--http-port 6878- Use the default HTTP port
Engine executable lookup
Aceplay searches for theacestreamengine binary in your PATH:
Configuring the engine
Host and port
You can specify a custom engine location:Timeouts
Configure how long to wait for the engine:Port detection
If you’re running acestream-engine on a non-standard port, Aceplay will try to detect it on common ports: 6878, 45615, 8080, 9999. To force a specific port:Stopping the engine
Aceplay tracks whether it started the engine:If acestream-engine was already running when you started Aceplay, it will not be stopped when Aceplay exits. Only engines that Aceplay started are stopped.
Manual engine management
If you prefer to manage the engine yourself:Start the engine manually
Run in the background
Use systemd (recommended)
Create/etc/systemd/system/acestream-engine.service:
Remote engine
You can run acestream-engine on a separate machine:Troubleshooting
Engine not found in PATH
Engine not found in PATH
Error:
acestream-engine not found in PATHSolutions:-
Install acestream-engine:
-
Verify it’s in PATH:
-
Add to PATH if needed:
- Or use a manually-started engine
Engine fails to start within 30 seconds
Engine fails to start within 30 seconds
Error:
acestream-engine failed to start within 30 secondsSolutions:-
Check if the engine is actually starting:
-
Try starting manually to see errors:
-
Check port 6878 isn’t already in use:
-
Increase timeout in config:
Can't connect to engine on different host
Can't connect to engine on different host
Error: Connection refused or timeout when using
--engine-hostSolutions:-
Verify engine is running on remote host:
-
Test connectivity:
-
Check firewall on remote host:
- Verify the engine is listening on all interfaces, not just localhost
Multiple engines detected on different ports
Multiple engines detected on different ports
Behavior: Aceplay finds an engine on a different port than expectedSolutions:
-
Stop unwanted engine instances:
-
Force a specific port:
-
Set default in config:
Engine health check
You can verify your engine is working:Performance tuning
Connection timeout
Control how long to wait for engine connection:Stream timeout
Control how long to wait for stream to be ready:Reference
- Engine manager:
internal/acestream/client.go:40-144 - Port detection:
internal/acestream/client.go:146-161 - Health check:
internal/acestream/client.go:268-291 - Default port:
internal/acestream/client.go:21(6878) - Startup command:
internal/acestream/client.go:98