8000 GitHub - apioo/fusio-plant: A server management tool to easily self-host apps on your server.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

A server management tool to easily self-host apps on your server.

License

Notifications You must be signed in to change notification settings

apioo/fusio-plant

Repository files navigation

Fusio Plant

Fusio Plant is an open-source server panel to easily self-host apps on your server. It can be seen as a modern lightweight alternative to cPanel or Plesk with a simple, performant and clean tech-stack.

Goals

  • Run multiple apps cost efficiently on your server
  • Provide a web-based admin panel to manage and monitor all apps
  • Exposes a REST API to control your server
  • Automatically obtain SSL certificates with certbot
  • Keep your server clean and lightweight, we basically only install Nginx and Docker

Non-Goals

  • Run apps across multiple hosts, for this you should take a look at Kubernetes

Installation

To install Fusio Plant on your server you only need to execute the install.sh script as root. Note currently only Ubuntu as OS is supported, we recommend running this script on a fresh Ubuntu installation. Download and run the install.sh script with the following command:

curl -s https://raw.githubusercontent.com/apioo/fusio-plant/refs/heads/main/install.sh -o ./install.sh && chmod +x ./install.sh && ./install.sh

The script installs on your server only Nginx, Docker and the Fusio Plant executor, all other apps and also Plant itself will run as docker container.

Note: On installation the "install" script asks for a domain of your server. Please make sure that the DNS A/AAAA record of your domain already points to your server. The domain is only needed to access the Plant App and API, for the actual apps which you host with Plant you can select different domain names. It is recommended to use a domain which is not easy to guess like server-1ec0bf62.mycontrol.com, in this case you could access the backend with:

  • API: server-1ec0bf62.mycontrol.com
  • App: server-1ec0bf62.mycontrol.com/apps/plant

Choosing such a domain name is just an additional security layer so that it is more challenging to access the backend app and API to control your server. If you access the app, you still need to authenticate with the username and password which was generated by the installation script.

Folder

The following list covers all important folders of your Plant server.

/docker

Contains all projects and each project contains a docker-compose.yml file.

/opt/plant

Contains the plant executor which receives commands through the /opt/plant/input folder and writes responses back to the /opt/plant/output folder. Since the plant app also runs in a container those folders are mounted into the plant app to execute commands on the host. The executor is a simple bash script that listens for file changes in this folder, you can see all available commands at the executor script.

/cache

The cache folder which is used in case Nginx content caching is activated.

Preset

If you create a new project at Plant you can select a preset. A preset is basically a predefined configuration to run a specific app, in this example wordpress s. preset

If you select a preset all configured apps are loaded. To contribute a preset you only need to add a new class to the preset folder.

Deployment

One important concept of Plant is that your server only runs existing docker images, it does not contain any tools to build such an image. In case you want to run your custom app you need a docker image of this app, for this you could use i.e. the GitHub docker registry, but there are also many other alternative ways to build a docker image for your app. This has the great advantage that we don't need to install any build tools on the host and keep our server clean from the build process.

GitHub

On GitHub you can use the following GitHub action to build and push a docker image to the GitHub registry. Then you can use the image ghcr.io/[user]/[repository]:main in your project. For this you only need to add an action .github/workflows/docker.yml with the following config:

name: Docker
on:
  push:
    branches:
      - 'main'
    tags:
      - 'v*'
env:
  REGISTRY: ghcr.io
  IMAGE_NAME: ${{ github.repository }}
jobs:
  push_to_registry:
    name: Push Docker image to Docker Hub
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write
    steps:
      - name: Check out the repo
        uses: actions/checkout@v4
      - name: Log in to the Container registry
        uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
        with:
          registry: ${{ env.REGISTRY }}
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}
      - name: Extract metadata (tags, labels) for Docker
        id: meta
        uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
        with:
          images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
      - name: Build and push Docker image
        uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
        with:
          context: .
          push: true
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}

Note: In case your repository is private you need to login to access the docker registry. It is recommended to use an access token which has only the rights to pull images from the registry.

0