Skip to main content
Deploying open-source projects on cloud platforms is not as easy as it seems, especially when you want to customize the application while staying current with upstream updates. The fork-and-deploy approach offers the perfect balance: you get full control over your deployment while maintaining the ability to pull in security patches and new features from the original project. This guide demonstrates how to deploy any GitHub-hosted open-source project on Upsun using Snipe-IT (an IT asset management system built with Laravel) as our example. The principles and techniques apply to most open-source web applications, regardless of their technology stack.

What you’ll learn

  • Fork and configure open-source projects for Upsun deployment
  • Adapt application configuration for cloud deployment
  • Manage environment variables and service dependencies
  • Keep your fork synchronized with upstream changes
  • Deploy production-ready open-source applications

Prerequisites

Before starting, ensure you have:

Forking the target repository

Start by creating your own fork of the open-source project you want to deploy. This gives you full control over the codebase while maintaining the ability to pull updates from the original project. Using Snipe-IT as our example:
  1. Navigate to the Snipe-IT repository on GitHub
  2. Click the Fork button in the top-right corner
  3. Choose your GitHub account as the destination
  4. Wait for GitHub to create your fork
Once forked, clone your repository locally:
For other projects: Replace the repository URL with your target open-source project. The forking process remains identical across all GitHub repositories.

Adding Upsun configuration

Every application needs specific configuration to run on Upsun. We’ll create the necessary configuration files to define our application, services, and deployment process. The configuration approach varies by technology stack, but the core concepts remain the same. Here’s how to configure a Laravel application (Snipe-IT), with notes on adapting for other frameworks.

Create the Upsun configuration

Create the .upsun/config.yaml file in your repository root. This example shows a Laravel/PHP configuration, but adapt the runtime, extensions, and build process for your specific technology stack:
Key configuration concepts:
  • Runtime: Specify your application’s language and version (php:8.2, node:18, python:3.11, etc.)
  • Extensions: Add required language extensions for your application
  • Services: Define databases, caches, and other dependencies
  • Build/Deploy hooks: Commands to build assets and initialize the application
  • Mounts: Writable directories for user uploads, logs, and cache files

Create environment configuration

Create a .environment file to map Upsun service variables to your application’s expected format. This example shows Laravel environment mapping:
For other frameworks:
  • Django: Map to DATABASE_URL, REDIS_URL, etc.
  • Node.js/Express: Set DATABASE_URL, REDIS_URL, PORT, etc.
  • Rails: Configure DATABASE_URL, REDIS_URL, RAILS_ENV, etc.
  • WordPress (Bedrock): Map to DB_HOST, DB_USER, DB_PASSWORD, WP_CACHE_KEY_SALT, etc.

Commit the configuration

Add and commit your new configuration files:
Note: Most projects use main instead of master as the default branch. Adjust accordingly.

Creating your Upsun project

Now create a new Upsun project and connect it to your GitHub repository.

Using the Upsun Console

  1. Log in to the Upsun Console
  2. Click Create Project
  3. Choose Import from GitHub
  4. Select your forked Snipe-IT repository
  5. Choose your preferred region (select green regions for extra discounts)
  6. Configure your project settings:
    • Project name: Give your project a descriptive name
    • Production branch: master or main (depending on your repository)
    • Build and deploy immediately: Check this option
If this is your first time using our GitHub integration, you will redirected to authorize the Upsun GitHub app to access your desired repositories.

Using the CLI (Alternative)

Alternatively, create the project using the Upsun CLI:
Please notice with use the --default-branch=master flag as the Snipe-IT GitHub project still uses master instead of the new default main.

Configuring environment variables

Most open-source applications require environment variables for proper operation. The specific variables depend on your application, but common categories include app configuration, database connections, API keys, and feature flags. Here are examples for Snipe-IT (Laravel), with notes on what to adapt for other applications:

Generating application secrets

Many applications require unique keys or secrets. For Laravel applications like Snipe-IT, generate the APP_KEY locally:
Use the generated key in your APP_KEY variable (see <ARTISAN-KEY> below). For other frameworks:
  • Django: Generate SECRET_KEY with python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
  • Node.js: Generate random strings for session secrets using crypto libraries
  • Rails: Use rails secret to generate SECRET_KEY_BASE

Essential variables

Set these variables at the project level:

First deployment

If you are using the GitHub integration, Upsun will automatically trigger deployments based on your GitHub repository events. If not, you can start your first deployment:
  1. Via Console: Navigate to your project and click Deploy
  2. Via Git: Push changes to your master branch
  3. Via CLI: Use upsun redeploy
Upsun will:
  • Build your application with the appropriate package manager
  • Compile frontend assets (if configured)
  • Run database migrations and initialization scripts
  • Configure services (databases, caches, etc.)
  • Generate SSL certificates
The deployment typically takes 2 to 5 minutes depending on your application size. Monitor progress in the Upsun Console or with:

Accessing your deployment

Once deployed, access your application through the provided URL. Most open-source applications require initial setup: For Snipe-IT:
  1. Create your admin account
  2. Configure company settings
  3. Set up asset categories and models
  4. Configure LDAP (if needed)
  5. Customize appearance and branding
For other applications: Check the project’s documentation for first-run setup instructions. Common steps include creating admin accounts, running database seeds, or configuring integrations.

Adding a custom domain

For production use, add your custom domain:
  1. In the Upsun Console, go to Domains
  2. Click Add Domain
  3. Enter your domain name
  4. Configure DNS with the provided CNAME record
  5. Wait for SSL certificate provisioning

Keeping your fork updated

Open-source projects receive regular updates for security patches, bug fixes, and new features. Keep your fork synchronized to benefit from these improvements:

Setting up upstream remote

Syncing updates

Regularly sync with upstream changes. Thanks to Upsun, you can preview and test these updates to avoid any issue with breaking changes:

Handling conflicts

If you’ve customized the application, you may encounter merge conflicts during sync:
  1. Review conflicts: Use git status to identify conflicted files
  2. Resolve manually: Edit files to resolve conflicts
  3. Test changes: Ensure functionality remains intact
  4. Commit resolution: git add . and git commit

Automated sync with GitHub Actions

Consider automating upstream sync with GitHub Actions:

Getting help

  • Check your project’s official documentation
  • Review Upsun documentation for platform-specific issues
  • Search the project’s GitHub issues for similar problems
  • Ask in the Upsun Community Forum or project-specific support channels
  • Check framework-specific resources (Laravel, Django, Rails, etc.)

Conclusion

You now have your open-source application running on Upsun with a robust deployment pipeline. Your setup includes:
  • Production-ready services (database, cache, etc.)
  • SSL certificates and custom domain support
  • Automated upstream synchronization strategy
  • Scalable infrastructure that grows with your needs
This fork-and-deploy approach provides the perfect balance between customization control and staying current with upstream improvements. You can modify the application to fit your specific needs while easily pulling in security patches and new features from the original project.
Last modified on May 13, 2026