staltz / easy-ssb-pub

An easy-to-host server that runs an SSB "Pub"
GNU Affero General Public License v3.0
209 stars 35 forks source link

Is there a way to change the port addresses ? #6

Closed freedomtrain closed 7 years ago

freedomtrain commented 7 years ago

Is there a way to change the port addresses ? I need to change port 80 to another port number as port 80 is taken on my sever

Thanks

staltz commented 7 years ago

I think with this command you can redirect guest 80 to another port on host. Notice -p 80:80

docker run -e "PUB_URL=publicurltoyourserv.er" -v $HOME/.ssb:/root/.ssb -p 80:80 -p 8008:8008 -p 8007:8007 -m 450M --memory-swap 1G --restart=unless-stopped --name ssb-pub -d staltz/easy-ssb-pub

freedomtrain commented 7 years ago

I 'am receiving the error below because I have an app using port 80 Is there are way to change the default port from 80 to another port. I have non docker install

Error: listen EADDRINUSE :::80 at Object.exports._errnoException (util.js:1022:11) at exports._exceptionWithHostPort (util.js:1045:20) at Server._listen2 (net.js:1259:14) at listen (net.js:1295:10) at Server.listen (net.js:1391:5) at EventEmitter.listen (/var/www/vhosts/douglass.io/invite.douglass.io/easy-ssb-pub/node_modules/express/lib/application.js:618:24) at Object.createExpressApp (/var/www/vhosts/douglass.io/invite.douglass.io/easy-ssb-pub/dist/http.js:51:9) at Object. (/var/www/vhosts/douglass.io/invite.douglass.io/easy-ssb-pub/dist/index.js:8:8) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10)

staltz commented 7 years ago

We don't have a config from the command line but you can modify this file https://github.com/staltz/easy-ssb-pub/blob/master/src/config.ts (or /lib/config.js if you don't want to modify the TypeScript source).

freedomtrain commented 7 years ago

I will give this a try

Thanks so much for your help !!!