To start the server for the first time, run the file teamwork_server.exe from the bin folder and browse the license key when prompted. Note that the key will only be required the first time the server is run. For more information about node locked license activation, see at Activating the Teamwork Server commercial license.

Starting the server using GUI

To start Teamwork Server


  1. Do one of the following:
    • Start Teamwork Server the same way you would start any application on your operating system. 
    • Run teamwork_server.exe in the server bin folder. The Teamwork Server startup dialog opens. 
  2. Click the Start Server button.

Teamwork Server startup dialog


To change the server license key


  1. Run teamwork_server.exe in the server bin folder. The Teamwork Server startup dialog opens.
  2. Click the License Manager button. The Teamwork Server License Manager dialog opens.
  3. On the opened dialog, click the Select License Key Files button to browse for a file with the Teamwork Server license key.
  4. In a browser, open a new license key file.
  5. Click OK after you have changed the server license key.

Restart the server to apply changes. Make sure all users are logged out before restarting the server.


To change the server port for the current launch


  1. Run teamwork_server.exe in the server bin folder. The Teamwork Server startup dialog opens.
  2. Click the Change Server Port button and enter the new server port. This port is used when launching the server, or when adding the Windows service.

The Teamwork Server exports remote objects through one port: RMI registry port.

Starting the server without using GUI


To start Teamwork Server from the command line


  1. Do one of the following:
    • Add the parameter NOGUI when starting the server from the command line.
    • Run teamwork_server_nogui.exe in the server bin folder.
  2. Type I agree and press Enter.
  3. Type the path to the license key file and the file name. For example, C:\key\MagicDraw_17_0_5_TeamworkServer_key.txt and press Enter.
    • If you have the commercial license that requires activation, before applying the license key, activate the license. For more information, see http://www.nomagic.com/support/installation-and-use/teamwork-server-install.html#activating
  4. Press y and Enter, to apply the key.
  5. Type I agree and press Enter.
  6. Press Enter.
  7. Do one of the following:
    • Press y, if you want to import projects that were stored in earlier versions of Teamwork Server and press Enter. Then, specify the location to the previous installation and press Enter. Press y if you want to import all projects.
    • Press n, if you do not want to import earlier projects and then press Enter.
  8. Do one of the following:
    • Press y and then Enter, if you want to start the Teamwork Server with administrative permissions.
    • Press n and then Enter if you want to start the Teamwork Server without administrative permissions.


To add Teamwork Server to Windows services


  1. Run teamwork_server.exe in the server bin folder. The Teamwork Server startup dialog appears.
  2. Click the Add Windows Service button.
  3. After the service is added, select one of the following:
    • Start this service from the Windows Services list.
    • Reboot the computer and the Service will start automatically.
    • To run the server, click the Start Server button.

This feature is available only on Windows operating systems.

Windows 7 OS and Windows Vista OS Firewall do not allow remote connections. Hence after adding Teamwork Server to Windows 7 or Windows Vista services, you have to add the Teamwork Server port number 1100 in Windows Firewall Exceptions list. Only then all remote connections to Teamwork Server will be allowed.


To start Teamwork Server as a service on Red Hat Linux


  1. Create a new service script file named “teamwork”.
  2. Copy the following script code and paste it into the file.

    Script code
    #!/bin/bash
    #
    # chkconfig: - 91 60
    # description: MagicDraw TeamWork Server
    
    
    ### BEGIN INIT INFO
    # Provides: teamwork
    # Required-Start: $local_fs $network $named $remote_fs $syslog
    # Required-Stop: $local_fs $network $named $remote_fs $syslog
    # Short-Description: MagicDraw TeamWork Server
    # Description: This script is used to start MagicDraw TeamWork Server
    ### END INIT INFO
    
    
    RETVAL=0 TEAMWORK_HOME="/var/MagicDraw_Teamwork_Server/bin"
    prog="teamwork_server_nogui"
    prog_stop="stop_teamwork_server"
    desc="MagicDraw Teamwork Server"
    args="SERVICE"
    
    
    check() {
    if [ -f /var/lock/$prog ]; then
     if ps -p $(cat /var/lock/$prog 2>/dev/null) >/dev/null; then
             return 0
     fi
    fi
    return 3
    }
    
    
    status() {
    check
    if [ $? -eq 0 ]; then
     echo $"${desc} is running..."
     return 0
    fi
    echo $"${desc} is stopped"
    return 3
    }
    
    
    start() {
    check
    if [ $? -eq 0 ]; then
       echo $"${desc} is already started..."
       return 2
    fi
    
    
    echo -n $"Starting $desc ($prog): "
    $TEAMWORK_HOME/$prog $args &
    RETVAL=$?
    SCRIPT_PID=$!
    
    
    COUNT=0
    while [ "$COUNT" -le 15 ] && [ -z $JAVA_PID ]
    do
      JAVA_PID=$(pgrep -P $SCRIPT_PID java)
      let COUNT=COUNT+1
      sleep 1
    done
    [ $RETVAL -eq 0 ] && echo $JAVA_PID >/var/lock/$prog echo
    }
    
    
    stop() {
    echo -n $"Shutting down $desc ($prog): "
    $TEAMWORK_HOME/$prog_stop
    RETVAL=$?
    [ $RETVAL -eq 0 ] && rm -f /var/lock/$prog
    return $RETVAL
    }
    
    
    case "$1" in
        start)
           start
           RETVAL=$?
           ;;
        stop)
           stop
           ;;
        restart)
           stop
           start
           RETVAL=$?
           ;;
        status)
           status teamwork
           RETVAL=$?
           ;;
        *)
           echo $"Usage: $0 {start|stop|restart|status}"
           exit 3
           esac
    exit $RETVAL

    This script can also be used in non-RedHat based GNU/Linux distributions.

  3. Change the value of the TEAMWORK_HOME variable according to the path of the Teamwork Server installation bin folder.
  4. Save the file and move it into the system directory “/etc/init.d”. 5. In the command line, type the following commands:

    cd /etc/rc3.d
    ln -s ../init.d/teamwork S99teamwork
  5. You can also configure the service for runlevel using the following command: chkconfig --level 3 teamwork on
  6. In the command line, type the following command: 

    service teamwork start


To change the server license key from the command line


  1. Stop the Teamwork Server (see Stopping Teamwork Server).
  2. Start the Teamwork Server from the command line. Add the following argument: 
    "-changeKey -key:<path to the key file location>".

This is the sample for the Windows OS:

teamwork_server_nogui.exe -changeKey -key:C:\MagicDraw_16_0_TeamworkServer_key.xml

The path to the key file should be fully qualified and without spaces.