DEV Community

Cover image for How I Customized and Deployed Flarum 2.0 to Shared Hosting With AI DevOps Agents
fx0
fx0

Posted on

How I Customized and Deployed Flarum 2.0 to Shared Hosting With AI DevOps Agents

TL;DR

I downloaded and customized Flarum 2.0 to build Handwerker.forum, a German-speaking community for tradespeople, homeowners, and DIY enthusiasts.

Instead of provisioning a VPS or manually configuring the hosting environment, I connected my existing shared hosting account through its cPanel API.

OpsCrew, the open-source AI DevOps tool I'm building, handled the entire deployment pipeline for me.

  • Open-source Flarum 2.0 forum software
  • Customized interface and practical calculators
  • Traditional shared web hosting
  • Automated configuration through the cPanel API
  • Automated deployment pipeline
  • No additional VPS or Docker infrastructure

I focused on building the community. OpsCrew handled the deployment.


Table Of Contents


In my previous deployment project, I used OpsCrew to deploy a fully custom Laravel 13 freelancer marketplace to shared hosting.

This time, I wanted to explore a different scenario.

What happens when you take existing open-source software, customize it for a specific audience, and let AI DevOps agents handle the deployment?

Instead of building another application from scratch, I downloaded Flarum 2.0 and used it as the foundation for a new online community.

The result is Handwerker.forum.

The Project: Handwerker.forum

Handwerker.forum is a German-speaking online community focused on skilled trades, construction, renovation, and home improvement.

The idea is to create a place where professional tradespeople, homeowners, and DIY enthusiasts can exchange practical knowledge, ask questions, and share their experiences.

The community covers topics such as:

  • Heating systems and heat pumps
  • Electrical installations
  • Solar energy and photovoltaics
  • Construction and renovation
  • Flooring and tiling
  • Roofing
  • Tools and equipment
  • DIY projects

I also wanted the platform to offer more than traditional forum discussions.

That's why I integrated practical calculators that visitors can use for their construction and renovation projects.

The application is live at:

https://handwerker.forum


Why I Chose Flarum 2.0

There are many excellent open-source forum platforms available.

I chose Flarum because of its clean interface, extensible architecture, and PHP-based ecosystem.

For this project, I didn't want to spend time reinventing functionality that already exists in mature forum software.

Flarum provides a foundation for:

  • User registration and authentication
  • Discussion management
  • User profiles
  • Categories and tags
  • Notifications
  • Moderation
  • Permissions
  • Extensions
  • Community administration

Its extension architecture makes it possible to adapt the software to a specific use case.

Instead of developing an entire forum system myself, I could focus on creating a platform specifically designed for the skilled trades community.

Getting Flarum 2.0

Flarum can be downloaded as a prepared archive or installed using Composer.

For developers who prefer Composer, the official installation command for the 2.x release series is:

composer create-project flarum/flarum:^2.0.0 .
Enter fullscreen mode Exit fullscreen mode

Flarum 2.0 requires PHP 8.3 or newer, alongside a compatible database and the necessary PHP extensions.

The hosting environment needs to support these requirements before deployment.

You can find the official installation instructions here:

https://docs.flarum.org/install/


Customizing Flarum for My Community

Downloading forum software is easy.

Turning it into a useful product for a specific audience is where the interesting work begins.

I wanted Handwerker.forum to feel like a dedicated community for tradespeople rather than a generic forum installation.

My focus was on creating a clean, accessible experience that would also work for visitors who aren't particularly technical.

The customization included the community's appearance, structure, navigation, and additional functionality.

Adding practical calculators

One of the features I integrated into Handwerker.forum is a collection of practical calculators.

These include tools for calculating:

Calculator Purpose
Flooring Estimate required flooring materials
Concrete Calculate concrete quantities
Paint Estimate paint consumption
Terrace slope Calculate terrace gradients

The idea is to combine community knowledge with practical tools.

A visitor might arrive looking for help calculating flooring materials, then discover related discussions and experienced tradespeople who can answer additional questions.

This makes the platform more than just another discussion board.

Building on open source

One of the things I appreciate about Flarum is that it provides a solid starting point without requiring me to build everything from scratch.

I can concentrate on the functionality that makes Handwerker.forum useful while benefiting from the existing forum ecosystem.

For long-term maintenance, keeping custom functionality separate from upstream core files wherever possible also makes future updates easier to manage.


My Technology Stack

Technology Purpose
Flarum 2.0 Open-source forum software
PHP Backend application runtime
Composer Dependency and extension management
JavaScript Frontend functionality
CSS Interface styling and customization
GitHub Source code and release management
GitHub Actions Automated build and release pipeline
Shared hosting Production hosting environment
cPanel API Hosting configuration and automation
OpsCrew AI-powered deployment automation

The interesting part is what this architecture doesn't require.

No dedicated virtual server.

No Docker daemon.

No Kubernetes cluster.

Just a customized PHP application, an existing hosting account, and an automated deployment pipeline.


Why Shared Hosting Instead of a VPS?

Most modern DevOps tutorials focus on cloud servers, Docker containers, and infrastructure orchestration.

These technologies solve important problems, but they aren't necessary for every project.

Flarum is a PHP application that can run on compatible traditional shared hosting.

Since I already had access to shared web hosting with cPanel, I wanted to use that environment instead of provisioning additional infrastructure.

For a project like this, shared hosting offers a few practical advantages:

  • No operating system maintenance
  • No separate server provisioning
  • Existing PHP runtime
  • Built-in hosting management
  • Database management
  • Lower infrastructure complexity

Of course, shared hosting still has resource limits and provider-specific restrictions.

The challenge was not finding somewhere to host Flarum.

The challenge was creating a modern deployment workflow for traditional hosting.

That's where OpsCrew comes in.


Connecting OpsCrew to cPanel

Traditionally, deploying a PHP application to shared hosting involves switching between multiple tools and interfaces.

You might upload files manually, create a database, configure PHP, update environment settings, and adjust the document root.

Then you need to figure out how to handle future releases.

Instead, I connected OpsCrew directly to my hosting account through the cPanel API.

The connection uses three environment variables:

export OPSCREW_HOSTING_URL="https://your-cpanel-host:2083"
export OPSCREW_HOSTING_USER="your-username"
export OPSCREW_HOSTING_TOKEN="your-api-token"
Enter fullscreen mode Exit fullscreen mode

You can generate a cPanel API token from:

Security → Manage API Tokens

These credentials allow OpsCrew to communicate with the hosting control panel and configure the deployment environment.

Security considerations

A cPanel API token can grant broad access to the hosting account, including other websites and databases.

For that reason:

  • Never commit API tokens to Git.
  • Keep credentials out of screenshots and terminal logs.
  • Set an expiration date for API tokens.
  • Revoke tokens when they are no longer required.

OpsCrew uses the hosting token locally during infrastructure configuration.

The subsequent deployment pipeline is designed to work without requiring that original cPanel API token.


The Automated Deployment Workflow

The deployment architecture is relatively simple:

      Flarum 2.0
           |
           v
  Customization and development
           |
           v
     GitHub repository
           |
           v
      OpsCrew agents
           |
           v
       cPanel API
           |
           v
    Shared web hosting
           |
           v
    handwerker.forum
Enter fullscreen mode Exit fullscreen mode

Instead of manually connecting all the infrastructure components, I used OpsCrew to handle the deployment pipeline.

The following commands illustrate the standard OpsCrew workflow for a shared hosting deployment.

Step 1: Analyze the application

npx opscrew init
npx opscrew analyze
Enter fullscreen mode Exit fullscreen mode

OpsCrew analyzes the repository to understand the application's technology stack and deployment requirements.

For an existing open-source PHP application like Flarum, relevant information includes:

  • Composer dependencies
  • Required PHP version
  • Required PHP extensions
  • Application directory structure
  • Public document root
  • Persistent storage requirements
  • Database connectivity

This is important because deployment automation should adapt to the application rather than expecting every application to use the same infrastructure configuration.

Step 2: Define the deployment requirements

npx opscrew interview
Enter fullscreen mode Exit fullscreen mode

The deployment requirements for this project were straightforward:

  • Use my existing shared hosting account.
  • Connect through the cPanel API.
  • Deploy the customized Flarum 2.0 application.
  • Avoid introducing unnecessary server infrastructure.
  • Establish an automated workflow for future releases.

Step 3: Design the deployment

npx opscrew design
Enter fullscreen mode Exit fullscreen mode

The design stage establishes how the application should run on the selected hosting environment.

Unlike a VPS, shared hosting doesn't necessarily provide root access, custom system services, or unrestricted background processes.

The deployment needs to respect those restrictions.

For Flarum, it is particularly important to check PHP compatibility, required extensions, database support, URL rewriting, and the application's public directory.

Step 4: Provision and deploy

npx opscrew provision
Enter fullscreen mode Exit fullscreen mode

For cPanel deployments, OpsCrew uses an approval-based provisioning workflow.

It prepares the hosting-side deployment agent, checks the available runtime environment, and configures the application based on the approved plan.

Depending on the application's requirements, the cPanel integration can automate:

  • Domain and document root configuration
  • Database and database user creation
  • Compatible PHP version selection
  • Deployment agent installation
  • Cron job configuration
  • Application settings
  • HTTPS certificate checks
  • Deployment workflow generation

Rather than manually configuring every component through the hosting dashboard, I let OpsCrew handle the deployment pipeline.

The result is a customized Flarum application running on traditional shared hosting.


Building a CI/CD Pipeline Without Docker

For me, getting the first version online is only part of the deployment problem.

The bigger question is what happens when I want to change something.

What if I want to improve the interface, add another calculator, update an extension, or release a new feature?

I don't want to manually upload files every time I make a change.

OpsCrew's shared hosting deployment architecture addresses this with a lightweight deployment agent running through cron.

The release workflow looks like this:

     Application changes
              |
              v
       Push to GitHub
              |
              v
       GitHub Actions
              |
              v
    Prepare application release
              |
              v
    Sign and publish release
              |
              v
     Hosting deployment agent
              |
              v
     Validate and activate
              |
              v
         Health checks
              |
              v
      Updated application
Enter fullscreen mode Exit fullscreen mode

The build runs outside the shared hosting environment, while the hosting-side agent retrieves and activates the prepared release.

This means the production hosting account doesn't need to behave like a dedicated CI/CD server.

OpsCrew's release mechanism also supports application release rollback when verification fails.

Database migrations still require separate recovery considerations.

The important point is that traditional shared hosting can benefit from automated release management without requiring Docker or a dedicated deployment server.


Handling Persistent Data and Updates

Deploying forum software introduces a different challenge compared to deploying a static website.

A community platform contains valuable persistent data.

This includes:

  • User accounts
  • Discussions and comments
  • User-uploaded files
  • Forum configuration
  • Extension settings
  • Moderation records

A deployment should never accidentally overwrite or remove this information.

For Flarum, particular attention must be paid to the application's configuration file, writable directories, uploaded assets, and database.

These need to survive application releases.

OpsCrew's shared hosting architecture supports keeping application settings and configured persistent directories separate from individual releases.

For customized Flarum installations, those persistent paths need to be configured according to the application's actual directory structure.

Updating Flarum

Because Flarum uses Composer, dependencies and extensions can be managed through the project's Composer configuration.

However, updating an application with existing users requires care.

A sensible update process includes:

  1. Review compatibility between Flarum and installed extensions.
  2. Test dependency updates.
  3. Create a database backup.
  4. Prepare the new application release.
  5. Apply the required migrations.
  6. Clear application caches when necessary.
  7. Verify that the forum works correctly.

Flarum provides commands such as:

php flarum info
php flarum migrate
php flarum cache:clear
Enter fullscreen mode Exit fullscreen mode

These are useful for inspecting and maintaining an installation.

Migration and cache commands should be integrated into the release process where appropriate, rather than executed blindly against production.

Automating deployments doesn't remove the need for responsible application maintenance.


The Deployment Results

Here is what I achieved with this project:

Requirement Result
Forum software Flarum 2.0
Application type Customized community platform
Custom functionality Practical calculators
Production environment Shared web hosting
Hosting integration cPanel API
Deployment automation OpsCrew
Deployment pipeline Automated
Additional VPS Not required
Docker infrastructure Not required
Production website handwerker.forum

The biggest benefit for me is that I can concentrate on improving the forum instead of repeatedly working on deployment infrastructure.

I can spend more time on:

  • Improving the community experience
  • Adding practical calculators
  • Customizing the interface
  • Organizing discussion topics
  • Improving existing functionality
  • Growing the community

The deployment pipeline is no longer something I need to build manually from scratch for every project.


What This Means for Open-Source Software

There is an enormous ecosystem of existing open-source applications.

Forum software, content management systems, e-commerce platforms, dashboards, project management tools, and many other applications are already available.

You don't necessarily need to vibe-code every product from zero.

Sometimes the better development workflow is:

   Find existing open-source software
                    |
                    v
          Customize the application
                    |
                    v
          Add product-specific features
                    |
                    v
            Deploy with OpsCrew
                    |
                    v
               Live product
Enter fullscreen mode Exit fullscreen mode

This approach combines the advantages of existing open-source software with AI-assisted development and deployment automation.

You can focus on creating value for your specific audience instead of rebuilding authentication, administration, permissions, and other foundational functionality.

For me, Handwerker.forum is a practical example of this approach.

Flarum provides the foundation.

My customization makes it suitable for a specific community.

OpsCrew handles the deployment.


Lessons Learned

1. You don't always need to build from scratch

Existing open-source software can provide an excellent foundation for a new product.

The important thing is selecting software that fits your requirements and can be customized without making future maintenance unnecessarily difficult.

2. Shared hosting is still useful

Not every PHP application needs a VPS, container orchestration, or dedicated cloud infrastructure.

If the hosting account supports the application's requirements, shared hosting can be a practical solution.

3. Deployment automation should adapt to the application

A forum application has different requirements from a static website, a Next.js application, or a custom Laravel marketplace.

The deployment workflow needs to understand those differences.

4. Persistent data matters

A successful deployment isn't just about getting a new version online.

It's also about preserving user accounts, discussions, uploaded files, configuration, and database consistency.

5. AI-assisted DevOps is about reducing repetitive work

I don't want AI to make every infrastructure decision without oversight.

I want it to help prepare and execute the repetitive operational tasks while keeping the important decisions reviewable.

That's the approach I'm taking with OpsCrew.


Final Thoughts

Handwerker.forum is another real-world example of why I'm building OpsCrew.

My previous project involved deploying a fully custom Laravel 13 freelancer marketplace.

This project involved downloading, customizing, and deploying an existing open-source forum application.

Both projects use traditional shared hosting.

Both benefit from deployment automation.

And neither required me to introduce unnecessary infrastructure just to establish a modern deployment workflow.

I think there is a significant opportunity to make modern DevOps practices more accessible to developers using traditional web hosting.

You shouldn't have to become a full-time infrastructure engineer just to launch and maintain a PHP application.

My goal with OpsCrew is to make the journey from application code to a live product as straightforward as possible.

Whether you're building from scratch, vibe coding a new application, or customizing existing open-source software.

Customize. Deploy. Ship.


Useful Links


I'm building OpsCrew in the open and using it to deploy my own real-world projects.

I'd love to hear from other PHP developers, Flarum users, and open-source enthusiasts.

How are you deploying your open-source applications today?

Are you still uploading files manually to cPanel, using a VPS, or running an automated CI/CD pipeline?

Would you use AI DevOps agents to handle your next deployment?

Let me know in the comments.

Feedback, ideas, and open-source contributions are always welcome!

Top comments (0)