How to deploy on windows server

I have been troubled by this problem for a long time!
help me please!!!
I deploy on windows,Go to cmd:mup.cmd setup
Started TaskList: Setup Docker
[192.168.21.56] - Setup Docker
events.js:167
throw er; // Unhandled ‘error’ event
^

Error: connect ECONNREFUSED ***.***.***.***:22
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1113:14)
Emitted ‘error’ event at:
at Socket. (C:\Users\Administrator\AppData\Roaming\npm\node_modules\mup\node_modules\nodemiral\node_modules\ssh2\lib\client.js:218:10)
at Socket.emit (events.js:187:15)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
PS C:\Users\Administrator\cww.deploy>

The error thrown:
Error: connect ECONNREFUSED ***.***.***.***:22
Spells out that mup could not connect to the server on port 22 (ssh).

This is probably because the credentials used to connect are incorrect. It could also be that ssh is running on a different port on the server, or it is locked behind a firewall.

Are you able to manually connect to the server yourself with ssh?

thank you for your reply!
I would like to ask how to choose the port, I have tried a lot of ports that are not occupied still can’t

Wait, are you using mup to try deploying from your windows desktop to another computer running windows server?

Yes, I tried, I guess my problem is in my port selection, I don’t know how to choose the port.

module.exports = {
servers: {
one: {
// TODO: set host address, username, and authentication method
host: ‘server_IP’,
username: ‘username’,
// pem: ‘./path/to/pem’
password: ‘passwd’,
opts: {
port: 8013
}
// or neither for authenticate from ssh-agent
}
},

app: {
// TODO: change app name and path
name: ‘demo’,
path: ‘…/’,

servers: {
  one: {},
},

buildOptions: {
  serverOnly: true,
},

env: {
  // TODO: Change to your app's url
  // If you are using ssl, it needs to start with https://
  ROOT_URL: 'http://server_IP:1024',
  MONGO_URL: 'mongodb://mongodb/meteor',
  MONGO_OPLOG_URL: 'mongodb://mongodb/local',
  PORT:1024
},

docker: {
  // change to 'abernix/meteord:base' if your app is using Meteor 1.4 - 1.5
  image: 'abernix/meteord:node-8.4.0-base',
},

// Show progress bar while uploading bundle to server
// You might need to disable it on CI servers
enableUploadProgressBar: true

},

mongo: {
version: ‘3.4.1’,
servers: {
one: {}
}
},

// (Optional)
// Use the proxy to setup ssl or to route requests to the correct
// app when there are several apps

// proxy: {
// domains: ‘mywebsite.com,www.mywebsite.com’,

// ssl: {
// // Enable Let’s Encrypt
// letsEncryptEmail: ‘email@domain.com’
// }
// }
};

Oh I missed that you were deploying to a Windows server!

Mup only supports Ubuntu, so you can’t use it to deploy to a windows server.

From the mup docs:

The server should:

  • Have at least 512MB of ram. 1GB is recommended.
  • Be running Ubuntu 14 or 16.

oh no
But I see the tutorial has mup.cmd deployment method

If I use ubuntu, can you tell me how to set up mup.js? Especially how to set the access port

mup.cmd is for deploying from a windows computer to an ubuntu server

If you use an ubuntu server, it will use the default port for ssh, as will mup so the port will not be an issue

Oh, you mean, is mup used to deploy from one computer to another? Is it like deploying from a development computer (windows) to a server (ubuntu)?

1 Like

Thank you for your help, then I will try another server.

@niconico yes it is precisely for deploying from any personal computer to an ubuntu server.

If you are looking into running (in development mode) or bundling (to be run as a node app on any node-capable server, including windows) the app on your local computer, please take a look at https://docs.meteor.com/commandline.html

yeah
thank you for your reply, I have successfully deployed