Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. App Packaging & Development
  3. Building custom packages

Building custom packages

Scheduled Pinned Locked Moved App Packaging & Development
6 Posts 5 Posters 2.2k Views 6 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • girishG Offline
    girishG Offline
    girish
    Staff
    wrote on last edited by girish
    #1

    This is a concise guide to building and installing custom packages. For a more detailed explanation, see https://cloudron.io/documentation/packaging/tutorial/.

    Prerequisites

    1. Make sure you have docker installed. Also, sign up for a docker hub account (https://hub.docker.com/) and use docker login to login to the docker hub account.

    2. Install the Cloudron CLI tool: npm install -g cloudron. This requires you to install nodejs for npm to work.

    Log into cloudron

    $ cloudron login my.example.com
    Username: girish
    Password: *********
    2FA Token (if enabled): 
    Login successful.
    
    $ cloudron list
    <will list your apps>
    

    Build the app

    All our app packages are open source. You can get them here - https://git.cloudron.io/cloudron (repos with the -app suffix).

    For this tutorial, we will build the ghost app.

    $ git clone https://git.cloudron.io/cloudron/ghost-app
    $ cd ghost-app
    $ cloudron build
    Enter repository (e.g registry/username/org.ghost.cloudronapp2): girish/ghost
    

    The above will build the docker image and push it into docker hub as girish/ghost repository.

    Install the app

    $ cloudron install
    Location: blog
    

    This will install the app you just built into blog.example.com.

    Update the app

    If you make any changes, you have to rebuild the app and update the cloudron with the latest image.

    $ git pull # get latest repo changes
    $ cloudron build
    $ cloudron update --app blog
    

    The update command will update the blog.example.com app with the image we just built.

    That's it!

    1 Reply Last reply
    4
    • A Offline
      A Offline
      alphagroup
      wrote on last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • d19dotcaD d19dotca referenced this topic on
      • d19dotcaD d19dotca referenced this topic on
      • d19dotcaD d19dotca referenced this topic on
      • d19dotcaD d19dotca referenced this topic on
      • girishG girish referenced this topic on
      • E Offline
        E Offline
        ericsanchez
        wrote on last edited by
        #3

        Hello Girish thank you for this explainer,

        Which CLI are you putting these commands in, your local machine, the Cloudron CLI, or the Linux server's?

        Also, if you want to install a custom build at a url location that is not the url from my.example.com but has been verified in the Cloudron dashboard and is able to have other Cloudron apps installed - how does one do that via this CLI method?

        My first guess would be

        Location:
        
        app.otherdomain.com
        

        Would this be correct?

        Also, When you said Docker has to be installed, is that on your Cloudron, your local machine, or your Linux server? One more thing, would custom builds use the CLoudron's MySQL database?

        Thank you!

        timconsidineT 1 Reply Last reply
        1
        • E ericsanchez

          Hello Girish thank you for this explainer,

          Which CLI are you putting these commands in, your local machine, the Cloudron CLI, or the Linux server's?

          Also, if you want to install a custom build at a url location that is not the url from my.example.com but has been verified in the Cloudron dashboard and is able to have other Cloudron apps installed - how does one do that via this CLI method?

          My first guess would be

          Location:
          
          app.otherdomain.com
          

          Would this be correct?

          Also, When you said Docker has to be installed, is that on your Cloudron, your local machine, or your Linux server? One more thing, would custom builds use the CLoudron's MySQL database?

          Thank you!

          timconsidineT Offline
          timconsidineT Offline
          timconsidine
          App Dev
          wrote on last edited by
          #4

          @ericsanchez

          • the cloudron CLI needs to be installed on your local machine (not the server)

          • yes you can put app.otherdomain.com as the location providing otherdomain.com has been added to Domains & Certs

          • Docker needs to be installed on your local machine for the app building/packaging process

          • custom builds can use cloudron's MySQL if you specify it as an add-on in the CloudronManifest.json for the app you are building. You will need to reference the credentials in the Dockerfile you are building.

          1 Reply Last reply
          2
          • F frei referenced this topic on
          • GrienauerG Offline
            GrienauerG Offline
            Grienauer
            wrote on last edited by
            #5

            @girish I have 2 questions:

            1. Ist there any chance, that one can add a new folder to the "local storage addon" (persistence layer)?
              Because currently only /app/data is a thing to use here. This is quite narrow/specific, as other applications maybe need other folders.
            2. is it possible to have more than one container for an application? some Apps are build to work with multiple, and there is no chance to move that together upstream.

            Drupal CMS and Open Source Expert, Mautic Community lead Secretary

            girishG 1 Reply Last reply
            1
            • GrienauerG Grienauer

              @girish I have 2 questions:

              1. Ist there any chance, that one can add a new folder to the "local storage addon" (persistence layer)?
                Because currently only /app/data is a thing to use here. This is quite narrow/specific, as other applications maybe need other folders.
              2. is it possible to have more than one container for an application? some Apps are build to work with multiple, and there is no chance to move that together upstream.
              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #6

              @Grienauer

              1. We haven't yet had a case where different data directories of apps cannot be symlinked to a subdirectory /app/data . It keeps backup/restore logic simple if we limit to one folder. Do you have an app in mind which cannot do this?

              2. Usually, we manage to change apps to use supervisor and thus package multiple containers into one. I guess it's possible to implement this, we haven't yet.

              1 Reply Last reply
              0
              • J joseph referenced this topic on
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Bookmarks
              • Search