# Connecting to a remote Windows server

The following documentation explains how to install the Windows server code, start the server daemon, and make a connection to a remote Windows server. Look here for setting up a server on Linux, General UNIX or Mac, and additional configuration options.

Installing the server code

1. Create a directory where you want to install the server code. The remainder of these instructions will assume the directory name and location is C:\rseserver, but you are free to use any directory you choose.
2. Find the package that contains the server. The server code is usually packaged with a containing product and you should refer to that product's documentation for finding and installing the server package. The server is also available, however, on the Eclipse Target Management download site as the package rseserver-<version>-<os>.zip. For example, rseserver-2.0-windows.zip contains the release 2.0 server for Windows.
3. Copy the rseserver.zip to the C:\rseserver directory (this could be on a different machine).
4. Using an unzip utility to extract the server code to the C:\rseserver directory.

Starting the server

You can start the RSE communications server with the server manually, or with a daemon.

To start the server with a the server daemon:

1. Simply double click the `daemon.bat` program to start a server daemon.
2. You can edit the `daemon.bat` file to change properties for the daemon, like a specific daemon port to use or to force a port range for the server (in order to comply with firewalls).

> Note that the server daemon does not enforce any user authentication. If you run the server daemon, any user can connect to the machine, work with the file system and run commands. Use of the server daemon on Windows systems is not recommended.

> The server daemon runs on port 4075 by default. You can pass the optional daemonPort argument to force a different port if you want.
> If your daemon runs behind a firewall, you may want to specify the optional serverPortRange argument to restrict selected server ports to the range given:

>     daemon.bat 4075 10000-10010

To start the server manually:

1. Simply double click on the `server.bat` program to start a dstore server. The server will pick the first port available and print the port number. By default, it is usually 4033. You will then have to enter this port number in port property for the Files subsystem for your connection in the Remote System Explorer.
2. For security reasons, the server will only wait a limited time until a client connects (12000 seconds by default).
3. In order to start the server with an exactly specified port or timeout, open a Windows command prompt and enter:

       c:

       cd \rseserver

       server.bat [port] [timeout]

4. When you connect RSE to the server, the server will terminate as soon as you disconnect the client. The daemon, however, will not terminate.

To connect to a remote Windows server:

1. Switch to the Remote System Explorer perspective.
2. In the Remote Systems view, New Connection is automatically be expanded to show the various remote systems you can connect to through the Remote System Explorer. Expand Windows to invoke a dialog and configure a connection.
3. Enter a name for your first profile and click Next. (This step only occurs if you have never defined a connection before.)
4. Enter a connection name. This name displays in your tree view and must be unique to the profile.
5. Enter the name or TCP/IP address of your Windows server in the Host Name field, for example, jsandler.
6. Enter a Description(optional); the description appears in the Properties view after the connection is created.
7. Click Finish to define your system.

Note: To check your port number, right-click your connection or subsystem from the Remote Systems view and select Properties. Click Subsystem to see the relevant information. If your port is "0," then your Remote System Explorer communications server will pick any free port on the Windows server. If you specified a port number when starting the server, you need to enter it here, for example, to work with a firewall.