Maintenance

Upgrade & Migration Guide

Learn how to safely apply future version updates to your SnapReels platform without overwriting your custom modifications, environment variables, or databases.

0

Pre-Upgrade Backup (Crucial)

Before proceeding with any file replacements, it is highly recommended to secure your existing data.

  1. Database Backup: Create a dump of your MongoDB database to ensure no user data is lost in case of a migration error.
  2. Environment Variables: Backup your .env file. This file contains all your secure API keys and database strings. Never overwrite this file during an upgrade.
  3. Android Backup: Copy your google-services.json and your release Keystore file (.jks).
1A

Web Update (GadoHost Users)

If you are hosting your app on GadoHost, the update process is incredibly simple and done entirely through your browser.

  1. Download the latest source zip from CodeCanyon.
  2. Go to your GadoHost File Manager and navigate to your application root directory.
  3. Upload the code.zip file.
  4. Right click the uploaded code.zip and select Extract. When the extraction policy prompt appears, make sure to select Replace Overlaps.
GadoHost Extraction Policy
Select Replace Overlaps when extracting
  1. Once extracted, find and delete the .next folder in your file manager (this clears the old build cache).
  2. Go to your Node.js apps dashboard. Click Stop on your app, wait a few seconds, and then click Re-launch. Your app will automatically rebuild and start!
GadoHost Re-launch App
Click Re-launch to rebuild and apply the update
1B

Web Update (Traditional VPS Users)

If you manage your own VPS via SSH, follow these terminal commands to safely upgrade.

  1. Download the latest code.zip and upload it to your VPS (e.g. /var/www/snapreels).
  2. Navigate to your project directory:
    cd /var/www/snapreels
  3. Extract the zip file over your existing files. Ensure it replaces overlaps but do not delete your .env file!
    unzip -o code.zip
  4. Delete the old build cache folder:
    rm -rf .next
  5. Install any new dependencies and rebuild the application:
    npm install npm run build
  6. Restart your background PM2 process:
    pm2 restart snapreels
2

Android App Update

Updating your Android app involves merging the latest source code while preserving your custom string names, application IDs, and API configurations.

  1. Before opening the new Android project, keep a backup of your current AppConfig.kt.
  2. Open the newly downloaded Android folder in Android Studio.
  3. Restore your API Link and Security API Key inside AppConfig.kt.
  4. If you changed the package name (e.g. com.yourname.app), you will need to re-apply the package rename refactoring in the new project.
  5. Generate your new signed release APK/AAB utilizing the same keystore file (.jks) you used initially. If you lose or change the keystore, Google Play will reject the update.
  6. Upload the new AAB bundle to the Google Play Console as a new release track version.