Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Install Eclipse GlassFish on an Ubuntu VPS by installing a compatible JDK, unpacking the official GlassFish ZIP distribution, and starting the default domain1 with asadmin. GlassFish 8.0.5 requires JDK 21 or newer and implements Jakarta EE 11. GlassFish 7.1.1 is the alternative branch listed for Java 17, 21, or 25 compatibility. The default application listener is port 8080; the Administration Console uses port 4848. Keep 4848 private, preferably through an SSH tunnel, and change the administrator password before exposing the server to production traffic.

What you need before installing

This procedure assumes a newly provisioned Ubuntu VPS that you can reach over SSH with an account allowed to use sudo. The VPS provider, Ubuntu release, CPU allocation, memory size, storage, and network policy are deployment decisions rather than GlassFish requirements. Select a maintained Ubuntu release supported by your provider and leave enough memory for the application, the JVM, the operating system, and any database or reverse proxy running on the same machine.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • An Ubuntu VPS with a public IP address or private network address reachable from your administration workstation.
  • SSH access and a user with sudo privileges.
  • Storage for the GlassFish ZIP, the unpacked server, deployed applications, logs, and backups.
  • A supported Java Development Kit. GlassFish 8 requires JDK 21 or newer.
  • The application archive you intend to deploy, normally a Jakarta EE WAR or EAR file.
  • A plan for firewall rules, administrative access, TLS termination, backups, and automatic startup.

GlassFish is an application server implementing Jakarta EE. Your application may target a particular Jakarta EE level, so choose the GlassFish branch and Java runtime that match the application rather than selecting only by the newest version number.

Choose the GlassFish release and Java version

GlassFish release Jakarta EE level Java information When to choose it
8.0.5 Jakarta EE 11 JDK 21 or higher is required Use for applications built and tested for Jakarta EE 11 and a Java 21-or-newer runtime.
7.1.1 7.x branch Listed as tested with Java 17, 21, and 25 Use when the application depends on the GlassFish 7 generation or its tested Java compatibility.

The release information above reflects the Eclipse GlassFish download page observed on October 15, 2026. Confirm the exact maintenance release and compatibility notes on that page when you download the server. A newer Java runtime does not automatically make an older Jakarta EE application compatible; verify the application framework, namespace usage, and test environment first.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

Connect to the Ubuntu VPS

From your workstation, connect with the SSH account supplied by your VPS provider:

ssh ubuntu@SERVER_IP

Replace SERVER_IP with the address assigned to your VPS and use the account name configured by the provider. If SSH uses a nonstandard port or key file, add the corresponding SSH options. Once connected, update the package index before installing Java:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo apt update

Upgrading every package is an operational choice. If you do it, schedule the reboot, verify that SSH remains available, and make sure the VPS provider offers console access in case a kernel or networking change prevents login.

Install and verify a supported JDK

For GlassFish 8, install Ubuntu’s OpenJDK 21 package when it is available in the repositories for your Ubuntu release:

sudo apt install openjdk-21-jdk

Check the runtime and compiler versions:

java -version
javac -version

The output must show Java 21 or a newer JDK for GlassFish 8. A Java Runtime Environment without the development tools is not the intended prerequisite; install the JDK package so javac and the standard Java tooling are present. If several JDKs are installed, inspect and select the active one:

sudo update-alternatives --config java
sudo update-alternatives --config javac
java -version

Record the Java home directory if you will create a service account or a startup service. On Ubuntu it can commonly be discovered with:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
readlink -f $(which java)

Remove the final /bin/java component from that result to obtain JAVA_HOME. Do not guess the path: package layouts can differ between Ubuntu releases and manually installed JDKs.

Download the official GlassFish ZIP

Open the Eclipse GlassFish downloads page and choose either the Platform or Web Profile ZIP for the release you selected. The official installation method for GlassFish 8 is multi-platform ZIP distribution; installation consists of unpacking the archive into a directory of your choice. Downloading on your workstation and copying the file over SSH is often easier than installing a browser on the VPS.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

For a workstation-to-server transfer, use scp with the actual archive filename:

scp glassfish*.zip ubuntu@SERVER_IP:/tmp/

Alternatively, download the archive directly on the VPS using the download address displayed on the official page. Do not substitute a third-party mirror when you need a verifiable production installation. If the project publishes checksums for the selected file, verify the checksum before unpacking.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Unpack GlassFish into a stable directory

Create the installation location and unpack the ZIP as an administrative user:

sudo mkdir -p /opt
sudo unzip /tmp/glassfish*.zip -d /opt
ls -la /opt

The archive normally creates a directory named glassfish, resulting in /opt/glassfish. If the archive creates a versioned directory instead, choose one stable path and use it consistently in every command. Avoid repeatedly replacing a live directory in place; install a new version beside the old one and switch only after testing if you need controlled upgrades.

Confirm that the command-line administration tool exists:

ls -l /opt/glassfish/bin/asadmin

You can run asadmin by its full path, which avoids ambiguity when multiple GlassFish installations are present. If you prefer a shorter command, add the directory to the account’s PATH:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
echo 'export PATH=/opt/glassfish/bin:$PATH' >> ~/.profile
. ~/.profile
asadmin version

Use the full path for scripts and service definitions so an unrelated PATH change cannot select another installation.

Run GlassFish under a dedicated account

For a disposable evaluation, you can start GlassFish as your SSH user. A long-running VPS should use a dedicated, non-login account so a compromised application process has fewer privileges:

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
sudo useradd --system --home /opt/glassfish --shell /usr/sbin/nologin glassfish
sudo chown -R glassfish:glassfish /opt/glassfish

If you later place domains outside the installation tree, give the glassfish account ownership of those domain directories as well. Keep the ZIP and temporary upload files outside the runtime directory and remove them after verification.

Start the default domain for the first time

domain1 is the default domain used by the tutorial examples. Start it in the foreground first so startup messages remain visible:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo -u glassfish /opt/glassfish/bin/asadmin start-domain --verbose

If you are testing as your own account, omit sudo -u glassfish. Successful startup leaves the process running and prints messages showing the domain and listener status. Stop the foreground process with the server’s normal stop command from another SSH session, or press the documented interrupt only after you understand how the process was launched.

For a background start after the first boot succeeds, use:

sudo -u glassfish /opt/glassfish/bin/asadmin start-domain

Stop the default domain with:

sudo -u glassfish /opt/glassfish/bin/asadmin stop-domain domain1

List domains and their states:

sudo -u glassfish /opt/glassfish/bin/asadmin list-domains

Use list-domains after a reboot, an upgrade, or a failed deployment to distinguish a stopped domain from a server that started and then exited.

Verify listeners, logs, and the first response

The documented defaults are HTTP port 8080 for applications and administration port 4848 for the Administration Console. While the domain is running, check the local HTTP response:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -I http://127.0.0.1:8080/

The response can be a redirect, an error page, or a GlassFish response before an application is deployed; the important first check is that something is listening. Confirm the ports at the operating-system level if needed:

sudo ss -ltnp | grep -E ':8080|:4848'

Read the domain log when startup or deployment fails:

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
sudo tail -f /opt/glassfish/glassfish/domains/domain1/logs/server.log

The exact path assumes the standard installation layout. If you selected another domain directory, locate its logs/server.log beneath that domain. Search the log for Java version errors, bind failures, permission errors, deployment exceptions, and out-of-memory messages rather than relying only on the final console line.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Secure the administrator account and console

The Administration Console is available at http://localhost:4848/ when GlassFish is running. Tutorial examples commonly use the administrator name admin; older or default examples may have no password. Treat that state as an initial setup condition, not an acceptable production configuration.

Change the administrator password interactively:

sudo -u glassfish /opt/glassfish/bin/asadmin change-admin-password --domain_name domain1

Follow the prompts and store the new credential in an approved password manager. Do not place it in shell history, a world-readable script, or a source repository. If the command syntax differs in the maintenance release you selected, run asadmin help change-admin-password and follow that release’s prompt sequence.

GlassFish supports secure administration. After setting a password, review the release documentation for enabling secure administration, run the command in a maintenance window, and restart the domain as requested by the tool. Enabling it can change how administrative clients authenticate and may require trusted certificates for noninteractive scripts, so test asadmin from the administration host before closing your existing SSH session.

Open only the traffic the application needs

Do not publish port 4848 to the entire internet merely to make the console convenient. Prefer an SSH tunnel:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ssh -N -L 4848:127.0.0.1:4848 ubuntu@SERVER_IP

Leave that SSH session open and browse to http://localhost:4848/ on your workstation. The browser connection terminates locally; SSH carries it to the VPS. If another local process already uses port 4848, choose another local port, such as 8484, and forward it to remote port 4848:

ssh -N -L 8484:127.0.0.1:4848 ubuntu@SERVER_IP

Then open http://localhost:8484/. This approach avoids adding an internet-facing administration rule and works even when the VPS firewall blocks 4848 externally.

Configure the host firewall according to the final traffic path. A simple UFW starting point for SSH and direct application testing is:

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
sudo ufw allow OpenSSH
sudo ufw allow 8080/tcp
sudo ufw enable
sudo ufw status verbose

Only allow 8080 when clients genuinely need direct access. If a reverse proxy will be the public entry point, expose the proxy’s HTTP and HTTPS ports instead and keep 8080 bound to a private interface or protected by firewall rules. Never add a broad 4848/tcp rule when an SSH tunnel or a tightly restricted source-address rule is sufficient. Coordinate UFW with the VPS provider’s external firewall; traffic must be permitted at both layers.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Deploy a Jakarta EE application

You can deploy through asadmin or the Administration Console. The command-line path is repeatable and works well with controlled release scripts. Copy the application archive to the server, then run:

sudo -u glassfish /opt/glassfish/bin/asadmin deploy /path/to/application.war

Use an EAR file when the application is packaged that way. The deployment command may prompt for administrator credentials depending on the domain’s security configuration. For a replacement deployment, undeploy the existing application only when your release plan permits downtime, or use the deployment options documented for your GlassFish branch.

List deployed applications:

sudo -u glassfish /opt/glassfish/bin/asadmin list-applications

The application’s context root determines the URL. If the archive is named orders.war, the default context is commonly /orders, but an explicit application setting can change it. Test the resulting address through port 8080:

curl -i http://127.0.0.1:8080/your-context/

Use the Administration Console when you need to inspect resources, connection pools, server configuration, or deployment status visually. The console is an administration tool, not a substitute for application-level authentication and authorization.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Put a reverse proxy and TLS in front when required

GlassFish can serve application traffic on 8080, but a public production site commonly terminates TLS and handles the public hostname at a reverse proxy. The proxy forwards to the GlassFish application listener on a private address or local socket-equivalent network path. The exact proxy product, certificate authority, headers, health checks, websocket settings, upload limits, and timeout values depend on the application, so they must be designed rather than copied as a universal GlassFish setting.

When using a proxy, verify all of the following:

  • The proxy forwards the correct Host, scheme, and client-address headers expected by the application.
  • Only the proxy’s public ports are allowed through the VPS firewall.
  • Direct access to 8080 is blocked or restricted to the proxy and monitoring network.
  • TLS certificates are renewed automatically and renewal failures are monitored.
  • Large uploads, long requests, websocket connections, and idle timeouts match the application requirements.

Make startup persistent without assuming one universal service file

The commands above start a domain for the current session or as a background process; they do not by themselves guarantee startup after a reboot. A production VPS normally needs a service manager entry, but the correct unit depends on the GlassFish path, service account, JAVA_HOME, domain directory, restart policy, resource limits, and whether a reverse proxy must start first.

Before creating a service definition, prove the exact command manually as the intended account:

sudo -u glassfish /opt/glassfish/bin/asadmin start-domain domain1
sudo -u glassfish /opt/glassfish/bin/asadmin list-domains
sudo -u glassfish /opt/glassfish/bin/asadmin stop-domain domain1

Then build and test a service that calls the same full paths, sets JAVA_HOME explicitly, runs with the dedicated account, writes logs where the account can write, and stops the domain cleanly. Test enablement with a controlled reboot or a service restart, inspect the service journal and server.log, and make sure an application failure does not create an endless restart loop. The official installation material does not prescribe one universal Ubuntu unit file or VPS size, so copying an unrelated unit can create permission, environment, or shutdown problems.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot common installation failures

Symptom Likely cause What to check
asadmin reports an unsupported Java version The active JDK is older than the selected GlassFish branch requires. Run java -version, select the intended JDK with update-alternatives, and set JAVA_HOME for service launches.
Startup fails with an address or bind error Another process already uses 8080, 4848, or a configured GlassFish port. Run ss -ltnp, stop the conflicting process, or change the GlassFish listener deliberately and update firewall and proxy settings.
Permission denied while starting or deploying The runtime account cannot write the domain, logs, generated files, or deployed application. Check ownership and permissions under the domain directory; grant access to the dedicated account instead of running the whole server as root.
The console works locally but not remotely The firewall blocks 4848, the console is not publicly bound, or the wrong address is being used. Use the SSH tunnel, verify the local listener, and inspect both VPS-provider and UFW firewall rules.
The application returns an error after deployment Application compatibility, missing resources, namespace mismatch, or an application exception. Run list-applications, inspect server.log, verify the Jakarta EE and Java target, and check application-specific configuration.
The domain disappears after reboot No tested service-manager configuration starts it automatically. Install a release-specific service definition, set its environment and account, enable it, then test a controlled restart.
Requests fail through a reverse proxy but work on 8080 Incorrect forwarded headers, hostname handling, timeout, path, or TLS configuration. Compare direct and proxied request headers, proxy logs, GlassFish logs, and the application’s expected context root.

Production checklist

  • Confirm that the selected GlassFish branch matches the application’s Jakarta EE level.
  • Confirm java -version shows JDK 21 or newer for GlassFish 8.
  • Keep the installation and domain paths stable and document their ownership.
  • Change the initial administrator password before production use.
  • Use an SSH tunnel or a narrowly restricted network rule for port 4848.
  • Expose only the application path that must be public; do not leave 8080 open unnecessarily.
  • Inspect domain1/logs/server.log after startup and every deployment.
  • Back up application artifacts, domain configuration, certificates, and any database separately.
  • Set JVM heap and garbage-collection options from measured workload requirements rather than copying arbitrary values.
  • Test restart, rollback, certificate renewal, firewall recovery, and restoration procedures before relying on the VPS.
  • Monitor disk space, memory, CPU, listener availability, application health, and repeated deployment or restart failures.

Useful command summary

Task Command
Start with visible startup output /opt/glassfish/bin/asadmin start-domain --verbose
Start in the background /opt/glassfish/bin/asadmin start-domain
Stop the default domain /opt/glassfish/bin/asadmin stop-domain domain1
List domain state /opt/glassfish/bin/asadmin list-domains
Deploy an archive /opt/glassfish/bin/asadmin deploy /path/to/application.war
List deployed applications /opt/glassfish/bin/asadmin list-applications
Change the administrator password /opt/glassfish/bin/asadmin change-admin-password --domain_name domain1
Forward the console through SSH ssh -N -L 4848:127.0.0.1:4848 ubuntu@SERVER_IP

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.