How do I access the Glassfish admin console? Print

  • 30

        If you have a hosting with a 

dedicated java application server

       (JAVA-* account), you have the possibility to install GlassFish. This article explains how to access the admin console of your GlassFish server.

Step 1: Identify the access port

      Your application server is running on a hardware server running several application servers. To avoid port conflicts, each application server runs on a dedicated port that is not the standard port (8080).

      To identify your server's administration port, open the following file (via FTP or the control panel's file manager):


      This file was created in your account when you installed Glassfish.

      This file contains the definition of several variables. The one you are interested in is the following:


According to the example above, the administration console of your server uses port 4990.

2nd step: Securing access

      By default, and to avoid malicious connections using the default password, the administration port is blocked by our firewall.

      You have the choice between accessing this port via an SSH tunnel (more secure variant) or directly. For direct access, you must first secure the access to the administration console:

      1. Connect via SSH to your account (the user and password are the same as those that allow you to access the control panel):
        • On Mac or Linux, open a terminal and type the command: ssh
        • On Windows, use a program such as Putty.exe to connect

      2. Once connected, run the following commands to enable https access on the console (replacing the port number with the one you found in step 1):

        cd appservers/glassfish-4x/
        ./bin/asadmin --port 4990 enable-secure-admin

      3. The asadmin command asks for the admin user and password. By default, this is admin / adminadmin. Once the command is executed, you should see the message "Command enable-secure-admin executed successfully."

      4. Then run the following command to change the default password:

        ./bin/asadmin --port 4990 change-admin-password

      5. The password change is confirmed by the message: "Command change-admin-password executed successfully".

      6. Finally, to take the changes into account, restart the application server with the following command:

        ./bin/asadmin --port 4990 restart-domain domain1

Step 3: Access to the interface

      To access the GlassFish administration interface, you have two options:

    1. Through an SSH tunnel

    1. The port on which your application server is running is closed on our firewall, which guarantees maximum security. To access your admin console, run the following command (or the equivalent in Putty) to create an SSH tunnel to this port:

      ssh -L 8080:localhost:4990

      You must run this command from your local computer, which is the machine you will use to connect to your GlassFish server.

      Using Putty, the configuration should look like this:

      Configuration Putty pour tunnel SSH

      Once connected, you will be able to access the administration console from your browser at the following address:


    2. Live

    1. After performing the operations in step 2, you can also ask us to open the port in our firewall by writing to
      technical support. In this case, once the port is opened, your administration console will be available at the following address:

Was this answer helpful?