# Enable SSL for Nexus 3

Information noteTip: For more information on the Nexus directories, see the [Sonatype documentation](https://help.sonatype.com/en/directories.html).

## Procedure

1. Copy the keystore file into the $data-dir/etc/ssl folder.
2. Edit the $data-dir/etc/nexus.properties file to add the SSL port and the reference to the SSL configuration file.
   ```
   # Jetty section
   application-port=8081
   application-port-ssl=8441
   application-host=0.0.0.0
   nexus-args=${jetty.etc}/jetty.xml,${jetty.etc}/jetty-http.xml,${jetty.etc}/jetty-https.xml,${jetty.etc}/jetty-requestlog.xml
   nexus-context-path=/
   ```
3. Edit the SSL configuration file $install-dir/etc/jetty/jetty-https.xml for the certificate and password:
   ```
   <New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory">
     <Set name="KeyStorePath"><Property name="ssl.etc"/>/keystore.jks</Set>
     <Set name="KeyStorePassword">password</Set>
     <Set name="KeyManagerPassword">password</Set>
   ```

   The path must just be the name of the keystore file (preceded by a slash) as the file must be in a specific directory.
4. Start Nexus and you can login to Nexus URL using SSL port.