asapach / peerflix-server

Streaming torrent client for Node.js with web ui.
MIT License
1.31k stars 586 forks source link

Running Multiple instances of peerflix-server #127

Closed pavs closed 5 years ago

pavs commented 6 years ago

I want to run multiple instances of peerflix-server with it's own config file (ie, peerflix-server -config2.json) More specifically in regards to storing downloaded torrents location.

Is it possible?

asapach commented 6 years ago

I think you can run multiple instances if you specify a different HOME env for each one:

HOME=/tmp/1 peerflix-server
HOME=/tmp/2 peerflix-server

And something similar using USERPROFILE env on Windows.

zQueal commented 6 years ago

I've also confirmed this working with multiple unix users. Peerflix-server searches ~/.config/peerflix-server for the configuration files. So a new user is able to spawn its own instance by specifying a new port;

user1@host ~ # PORT=9000 peerflix-server &
user1@host ~ # su user2
user2@host ~ # PORT=9001 peerflix-server &