A Java-based GUI application designed to streamline the deployment of JAR files to multiple VPS instances. It simplifies the process of uploading, managing, and restarting Java applications across different servers.
- User-Friendly GUI: Simple and intuitive Swing-based interface.
- Profile Management: Create, save, and manage multiple VPS profiles. Each profile stores:
- Host IP / Port
- Authentication (Username & Password)
- Remote File Path
- Local JAR File Path
- Restart Preference
- Secure Uploads: Uses SCP (Secure Copy Protocol) via SSH to safely transfer files.
- Batch Deployment: Select multiple profiles to upload and restart applications on multiple servers simultaneously.
- Real-time Progress: Detailed progress bar showing upload speed (MB sent/total) and overall batch progress.
- Automatic Restart: Optional feature to automatically restart the application on the remote server after upload.
- Stops the existing process (
pkill). - Starts the new JAR in the background (
nohup). - Redirects output to a
.logfile for easy debugging.
- Stops the existing process (
- Java Runtime Environment (JRE): Java 8 or higher is required to run the application.
- SSH Access: You must have SSH access (username/password) to the target VPS instances.
You can run the pre-built JAR file directly:
java -jar jar-vps-uploader-1.0-SNAPSHOT.jarNote: Ensure the target directory or the jar file location is correct.
- Launch the application.
- Fill in the Profile Details form:
- Profile Name: A unique name for this server (e.g., "Agent Node 1").
- Host IP: The IP address of your VPS.
- Port: SSH port (default is 22).
- Username: SSH username (e.g.,
root). - Password: SSH password.
- Remote File Path: Full path where the JAR should be placed (e.g.,
/opt/quantumdar/agent.jar). - Local Jar: Browse and select the JAR file from your computer.
- Restart Application: Check this if you want the app to restart the service automatically.
- Click Save / Update Profile. The profile will appear in the list on the left.
- Click on a profile in the list to select it.
- Click Upload Selected (or ensure it's the only one selected).
- Monitor the logs and progress bar.
- Hold
Ctrl(orShift) and click to select multiple profiles in the list. - Click the green Upload Selected button.
- The application will process each selected server one by one, uploading the file and executing the restart command.
When "Restart Application" is enabled, the app executes the following command sequence on the VPS:
pkill -f [jar_name] || true
sleep 2
nohup java -jar [full_path] > [dir]/[jar_name].log 2>&1 < /dev/null &This ensures:
- The old process is killed.
- The port is released.
- The new process runs in the background even after the SSH session closes.
- Logs are saved to a
.logfile next to your jar (e.g.,agent.log).
Profiles are saved locally in a uploader_profiles.json file in the same directory as the application.
- Security Note: Passwords are stored using basic Base64 encoding. Do not share your configuration file.
- Java Swing: GUI Framework.
- JSch: Java Secure Channel for SSH/SCP implementations.
- Gson: For saving and loading JSON configuration profiles.