### Custom Startup Script Example (run.sh) Source: https://github.com/docs/docs/blob/master/docs/packages/lamp.md This is a basic example of a custom startup script that can be placed at `/app/data/run.sh`. The script runs before the application starts, allowing for pre-start tasks or configurations. ```bash #!/bin/bash echo "This script is called before the app starts" ``` -------------------------------- ### Install Cloudron Setup Script Source: https://github.com/docs/docs/blob/master/docs/backups.md Download and make the Cloudron setup script executable. Ensure the version specified matches your backup version for a successful restore. ```bash wget https://cloudron.io/cloudron-setup chmod +x cloudron-setup ./cloudron-setup --version x.y.z ``` -------------------------------- ### Extension Installation Log Output Source: https://github.com/docs/docs/blob/master/docs/packages/directus.md Example output from the extension installation script. If the script fails with 'Killed', increase the app's memory limit. ```log added 1 package in 1s Restart Directus to enable the extension ``` -------------------------------- ### Example Checklist Configuration Source: https://github.com/docs/docs/blob/master/docs/packaging/manifest.md Defines a list of post-installation tasks for users. The 'sso' flag determines visibility based on authentication setup. ```json "checklist": { "todo-for-admins": { "message": "Please do this and that after installation" }, "first-user": { "sso": true, "message": "SSO Example: First user becomes admin" }, "change-password": { "sso": false, "message": "NoSSO Example: Change admin password on first use" } }, ``` -------------------------------- ### Install Cloudron App Source: https://github.com/docs/docs/blob/master/docs/packaging/tutorial.md Installs a Cloudron app from the current directory. The CLI uploads the source, builds the Docker image on the server, and starts the app. ```bash # switch to the package dir cd tutorial-nodejs-app # install the package cloudron install No build detected. This package will be built on the server. Location: tutorial App is being installed. => Queued . => Registering subdomains => Registering location tutorial.example.com ....... => Building image => Waiting for propagation of tutorial.example.com .. => Wait for health check App is installed. ``` -------------------------------- ### File Ownership and App Startup Source: https://github.com/docs/docs/blob/master/docs/packaging/cheat-sheet.md Ensure correct file ownership for `/app/data` before starting the application. This example shows how to change ownership to the 'cloudron' user and then start an npm application. ```shell # Change ownership of files chown -R cloudron:cloudron /app/data # Start the app gosu cloudron:cloudron npm start ``` -------------------------------- ### Install Cloudron Script Source: https://github.com/docs/docs/blob/master/docs/installation/index.md Run these commands on a fresh Ubuntu Noble 24.04 (x64) server to download, make executable, and run the Cloudron setup script. ```bash wget https://cloudron.io/cloudron-setup chmod +x cloudron-setup ./cloudron-setup ``` -------------------------------- ### Addons Configuration Example Source: https://github.com/docs/docs/blob/master/docs/packaging/manifest.md Example of how to configure addons like localstorage and mongodb within the manifest. ```json "addons": { "localstorage": {}, "mongodb": {} } ``` -------------------------------- ### Start Local Development Server Source: https://github.com/docs/docs/blob/master/README.md Starts a local development server for live preview. Changes are reflected without server restart. ```bash yarn start ``` -------------------------------- ### Get Installed Etherpad Plugins Source: https://github.com/docs/docs/blob/master/docs/packages/etherpad.md Use this bash command in a web terminal to list all installed Etherpad plugins, typically prefixed with 'ep_'. This is useful for troubleshooting startup issues. ```bash npm ls 2> /dev/null | grep ep_ ``` -------------------------------- ### One-time Initialization Script Source: https://github.com/docs/docs/blob/master/docs/packaging/cheat-sheet.md Use this shell script pattern to perform one-time initialization tasks on app install. It checks for a flag file in `/app/data` to ensure setup runs only once. ```shell if [[ ! -f /app/data/.initialized ]]; then echo "Fresh installation, setting up data directory..." # Setup commands here touch /app/data/.initialized echo "Done." fi ``` -------------------------------- ### Install Built App on Cloudron Source: https://github.com/docs/docs/blob/master/docs/packaging/tutorial.md Installs the Docker image that was previously built and pushed to a registry. This command initiates the installation process on your Cloudron instance. ```bash # install the built app cloudron install Location: tutorial App is being installed. => Queued . => Registering subdomains => Registering location tutorial.example.com ....... => Downloading image => Waiting for propagation of tutorial.example.com ... => Wait for health check App is installed. ``` -------------------------------- ### Initialize New MySQL Installation Source: https://github.com/docs/docs/blob/master/docs/troubleshooting.md Recreate the MySQL data directory and initialize a new MySQL installation. The root password will be logged to `/var/log/mysql/error.log`. ```bash mv /var/lib/mysql /var/lib/mysql.old mkdir /var/lib/mysql chown -R mysql:mysql /var/lib/mysql mysqld --initialize # This will dump the MySQL root password in /var/log/mysql/error.log ``` -------------------------------- ### Cloudron CLI Global Options Example Source: https://github.com/docs/docs/blob/master/docs/packaging/cli.md Example demonstrating the use of global options like `--server` and `--token` before a subcommand. These options must precede the command they apply to. ```bash cloudron --server my.example.com --token 001e7174c4cbad2272 update --app blog.example.com --image username/image:tag ``` -------------------------------- ### Install Nextcloud Desktop Client on Ubuntu Source: https://github.com/docs/docs/blob/master/docs/packages/nextcloud.md Download the latest Nextcloud desktop client as an AppImage. Ensure you have wget installed. ```bash sudo wget -nv https://download.nextcloud.com/desktop/releases/Linux/latest -O Nextcloud.AppImage ``` -------------------------------- ### Cloudron Troubleshooting Tool Output Example Source: https://github.com/docs/docs/blob/master/docs/troubleshooting.md This is an example output from the `cloudron-support --troubleshoot` command, indicating the status of various Cloudron components. ```bash Vendor: Hetzner Product: vServer Linux: 6.8.0-50-generic Ubuntu: noble 24.04 Processor: AMD EPYC Processor BIOS NotSpecified CPU @ 2.0GHz x 3 RAM: 3911360KB Disk: /dev/sda1 57G [OK] node version is correct [OK] IPv6 is enabled and public IPv6 address is working [OK] docker is running [OK] docker version is correct [OK] MySQL is running [OK] nginx is running [OK] dashboard cert is valid [OK] dashboard is reachable via loopback [OK] box v8.2.0 is running [OK] netplan is good [OK] DNS is resolving via systemd-resolved [OK] Dashboard is reachable via domain name [OK] Domain smartserver.io is valid and has not expired [OK] unbound is running ``` -------------------------------- ### Install Pretix Plugin via Bash Source: https://github.com/docs/docs/blob/master/docs/packages/pretix.md Use this command to install plugins from the Pretix Marketplace. Ensure you activate the virtual environment first. ```bash source /var/pretix/venv/bin/activate (venv)$ pip install ``` -------------------------------- ### Install Dependencies with Yarn Source: https://github.com/docs/docs/blob/master/README.md Installs project dependencies using Yarn. This is the first step before running any other commands. ```bash yarn ``` -------------------------------- ### Install YOURLS Plugin using Web Terminal Source: https://github.com/docs/docs/blob/master/docs/packages/yourls.md Plugins can be installed by unpacking them into the /app/data/user/plugins/ directory using the web terminal. Ensure correct ownership is set for the plugin files. ```bash cd /app/data/user/plugins git clone https://github.com/apelly/YourlsBlacklistDomains.git chown -R www-data:www-data YourlsBlacklistDomains ``` -------------------------------- ### Install Nextcloud Client from PPA on Ubuntu Source: https://github.com/docs/docs/blob/master/docs/packages/nextcloud.md Install the latest Nextcloud client from a PPA. This method requires adding a repository and updating package lists. ```bash sudo add-apt-repository ppa:nextcloud-devs/client sudo apt-get update sudo apt-get install nextcloud-client ``` -------------------------------- ### Capabilities Example Source: https://github.com/docs/docs/blob/master/docs/packaging/manifest.md Requests additional Linux capabilities for the app, such as network administration. ```json "capabilities": [ "net_admin" ] ``` -------------------------------- ### Dockerfile: Add and Set Start Script Source: https://github.com/docs/docs/blob/master/docs/packaging/cheat-sheet.md This Dockerfile snippet demonstrates how to add a custom start script to the app's code directory and set it as the default command to be executed when the container starts. ```dockerfile ADD start.sh /app/code/start.sh CMD [ "/app/code/start.sh" ] ``` -------------------------------- ### Example Cloudron Manifest Source: https://github.com/docs/docs/blob/master/docs/packaging/manifest.md A complete example of a CloudronManifest.json file, showcasing various configuration options. ```json { "id": "com.example.test", "title": "Example App", "author": "Girish Ramakrishnan ", "description": "This is an example app", "tagline": "A great beginning", "version": "0.0.1", "healthCheckPath": "/", "httpPort": 8000, "addons": { "localstorage": {} }, "manifestVersion": 2, "website": "https://www.example.com", "contactEmail": "support@clourdon.io", "icon": "file://icon.png", "tags": [ "test", "collaboration" ], "mediaLinks": [ "https://images.rapgenius.com/fd0175ef780e2feefb30055be9f2e022.520x343x1.jpg" ] } ``` -------------------------------- ### Create GitLab Backup (From Source) Source: https://github.com/docs/docs/blob/master/docs/packages/gitlab.md If GitLab was installed from source, use this command to create a backup. This command is relevant for custom installations. ```bash gosu git:git bundle exec rails gitlab:backup:create RAILS_ENV=production ``` -------------------------------- ### Install NFS Server Source: https://github.com/docs/docs/blob/master/docs/guides/nfs-share.md Installs the NFS kernel server package on the system. This is the first step to enabling NFS shares. ```bash sudo apt install nfs-kernel-server ``` -------------------------------- ### Start MySQL Service Source: https://github.com/docs/docs/blob/master/docs/guides/community/mysql-recovery.md Start the MySQL service after configuring it for forced recovery. ```bash systemctl start mysql ``` -------------------------------- ### Install unbound-anchor Source: https://github.com/docs/docs/blob/master/docs/guides/upgrade-ubuntu-24.md Install the unbound-anchor package, which may not be automatically installed on some VPS environments, to ensure proper DNS resolution after the upgrade. ```bash apt install unbound-anchor ``` -------------------------------- ### Install Surfer CLI Tool Source: https://github.com/docs/docs/blob/master/docs/packages/surfer.md Install the Surfer command-line interface using npm. This tool is used for managing files and configurations. ```bash npm -g install cloudron-surfer ``` -------------------------------- ### Install NodeBB Plugin via Bash Source: https://github.com/docs/docs/blob/master/docs/packages/nodebb.md Use this command in the Web Terminal to manually install NodeBB plugins or themes. After installation, restart the app and activate the plugin in the NodeBB dashboard. ```bash cd /app/code /usr/local/bin/gosu cloudron:cloudron npm install nodebb-theme-timuu ``` -------------------------------- ### Example Web Terminal Output Source: https://github.com/docs/docs/blob/master/docs/apps.md This is an example of the output displayed in the web terminal after customizing the .bashrc file. ```bash Welcome to https://docs.cloudron.io APPID: 3d5ad25e-3741-4506-9be2-f18b482a7800 Workdir: /app/code Datadir: /app/data Time: 01.07.2025 10:25 Use 'printenv | grep -i CLOUDRON' to get all platform variables ``` -------------------------------- ### Install The Lounge Theme via CLI Source: https://github.com/docs/docs/blob/master/docs/packages/thelounge.md Install custom themes for The Lounge using the `thelounge install` command. Ensure you have the theme name from npm and run the command within the app's web terminal. ```bash gosu cloudron:cloudron thelounge install thelounge-theme-custom ``` -------------------------------- ### GitLab Runner Registration Example Source: https://github.com/docs/docs/blob/master/docs/packages/gitlab.md An example of the interactive prompts and responses when registering a GitLab Runner. This demonstrates how to provide the coordinator URL, token, description, tags, and executor type. ```log Running in system-mode. Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/): https://gitlab.cloudron.xyz Please enter the gitlab-ci token for this runner: xzdZgdsXq5uSFCyAK7pP Please enter the gitlab-ci description for this runner: [localhost]: Shell Jobs Runner Please enter the gitlab-ci tags for this runner (comma separated): Whether to lock the Runner to current project [true/false]: [true]: false Registering runner... succeeded runner=xzdZgdsX Please enter the executor: docker, docker-ssh, shell, ssh, virtualbox, docker-ssh+machine, parallels, docker+machine, kubernetes: shell Runner registered successfully. Feel free to start it, but if it is running already, the config should be automatically reloaded! ``` -------------------------------- ### Install ownCloud Client on Ubuntu Source: https://github.com/docs/docs/blob/master/docs/packages/owncloud.md Installs the ownCloud client on Ubuntu 16.04 by adding the official repository. Ensure to verify repository compatibility as packages can become outdated. ```bash sudo wget -nv https://download.owncloud.com/repositories/desktop/Ubuntu_16.04/Release.key -O Release.key sudo apt-key add - < Release.key sudo sh -c "echo 'deb http://download.owncloud.com/repositories/desktop/Ubuntu_16.04/ /' > /etc/apt/sources.list.d/owncloud.list" sudo apt-get update sudo apt-get install owncloud-client ``` -------------------------------- ### Install Missing Packages Source: https://github.com/docs/docs/blob/master/docs/guides/upgrade-ubuntu-22.md Run this script to install any packages that may be missing after the Ubuntu upgrade. ```bash /home/yellowtent/box/scripts/init-ubuntu.sh ``` -------------------------------- ### Install Custom LAMP Multidb App Source: https://github.com/docs/docs/blob/master/docs/guides/multiple-databases-lamp.md Install the built custom LAMP app onto your Cloudron instance using the 'cloudron install' command. This makes the app available at a specific subdomain. ```bash ~/lamp-multidb-app$ cloudron install Location: lamp-multidb App is being installed. => Queued => Registering subdomains => Downloading image .... => Setting up addons .............. => Creating container => Wait for health check ........ App is installed. ``` -------------------------------- ### Install npm Packages Source: https://github.com/docs/docs/blob/master/docs/packages/lamp.md Install Node.js packages using npm in your application's public directory. ```bash npm install ``` -------------------------------- ### Install Kimai Plugin via Web Terminal Source: https://github.com/docs/docs/blob/master/docs/packages/kimai.md Use this command to install a Kimai plugin by cloning its git repository into the plugins directory and then reloading Kimai. ```bash cd /app/data/plugins git clone https://github.com/Keleo/DemoBundle.git chown -R www-data.www-data . cd /app/code sudo -u www-data bin/console kimai:reload ``` -------------------------------- ### Start MySQL and Set Root Password Source: https://github.com/docs/docs/blob/master/docs/guides/community/mysql-recovery.md Start the MySQL service and then set a new root password. Ensure to replace '' with the actual password found in the error log. ```bash systemctl start mysql ``` ```bash mysql -uroot -p # there is no space between p and the password. e.g -pAS23kdI ``` ```sql ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'; ``` -------------------------------- ### Install Cloudron CLI Source: https://github.com/docs/docs/blob/master/docs/packaging/cli.md Install the Cloudron CLI globally using npm. This command is intended for your local machine, not the server. ```bash sudo npm install -g cloudron ``` -------------------------------- ### Install Directus Extension Source: https://github.com/docs/docs/blob/master/docs/packages/directus.md Use this helper script to install Directus extensions. Ensure the extension name is correct. Restart Directus to enable the extension. ```bash /app/pkg/install-extension.sh directus-extension-wpslug-interface ``` -------------------------------- ### Example: Local Port Forwarding Source: https://github.com/docs/docs/blob/master/docs/guides/ssh-tunnel.md This example forwards local port 8000 to port 4000 on the remote server's localhost. Ensure the destination service is accessible on port 4000. ```bash ssh -L 8000:127.0.0.1:4000 user@remote_server_ip ``` -------------------------------- ### Install BigBlueButton Backend Source: https://github.com/docs/docs/blob/master/docs/packages/greenlight.md Use this bash command to install the BigBlueButton backend on an Ubuntu 20.04 server. Ensure the server meets the minimum requirements of 4GB memory and 4 CPU. ```bash wget -qO- https://raw.githubusercontent.com/bigbluebutton/bbb-install/v2.7.x-release/bbb-install.sh | bash -s -- -w -v focal-270 -s bbb.example.com -e info@example.com ``` -------------------------------- ### Example GitLab Restore Output Source: https://github.com/docs/docs/blob/master/docs/packages/gitlab.md This is an example of the output you can expect when a GitLab backup restore process is running. It shows the progress of restoring various components. ```log `/home/git` is not writable. Bundler will use `/tmp/bundler20210927-435-134v1je435' as your home directory temporarily. . . . 2021-09-24 06:22:36 +0000 -- done 2021-09-24 06:22:36 +0000 -- Restoring uploads ... 2021-09-24 06:22:36 +0000 -- done 2021-09-24 06:22:36 +0000 -- Restoring builds ... 2021-09-24 06:22:36 +0000 -- done 2021-09-24 06:22:36 +0000 -- Restoring artifacts ... 2021-09-24 06:22:36 +0000 -- done 2021-09-24 06:22:36 +0000 -- Restoring pages ... 2021-09-24 06:22:36 +0000 -- done 2021-09-24 06:22:36 +0000 -- Restoring lfs objects ... 2021-09-24 06:22:36 +0000 -- done ``` -------------------------------- ### Start Apache with exec for SIGTERM Handling Source: https://github.com/docs/docs/blob/master/docs/packaging/cheat-sheet.md Start Apache using `exec` as the last command in start.sh. This ensures that SIGTERM signals are correctly forwarded to the Apache process, allowing for graceful shutdowns. ```sh echo "Starting apache" APACHE_CONFDIR="" source /etc/apache2/envvars rm -f "${APACHE_PID_FILE}" exec /usr/sbin/apache2 -DFOREGROUND ``` -------------------------------- ### Install App from Specific Image Source: https://github.com/docs/docs/blob/master/docs/packaging/tutorial.md Installs an app using a specific Docker image from a registry. This is useful for private registries or when you need to specify a particular version or tag. ```bash cloudron install --image docker.io/username/myapp:1.0.0 ``` -------------------------------- ### Install Redmine Theme Dependencies and Build Source: https://github.com/docs/docs/blob/master/docs/packages/redmine.md Commands to clone a theme repository, install its dependencies, and run the build script. This is typically done within the themes directory. ```bash cd /app/data/themes/ git clone https://github.com/hardpixel/minelab.git cd minelab bundle install ./bundle.sh ``` -------------------------------- ### Initialize Restic Backup Repository Source: https://github.com/docs/docs/blob/master/docs/guides/community/restic-rclone.md Sets up a new restic backup repository. Use `--repository-version 2` for compression support. A subfolder can be specified. ```bash restic -r rclone:REPOSITORY init --repository-version 2 ``` ```bash restic -r rclone:REPOSITORY:subfolder init --repository-version 2 ``` -------------------------------- ### Subdomain Multisite .htaccess Configuration Source: https://github.com/docs/docs/blob/master/docs/packages/wordpress-developer.md Replace the contents of `/app/data/public/.htaccess` with this configuration for subdomain-based multisite installations. This handles URL rewriting for the multisite setup. ```htaccess RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] # Add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*\.php)$ $1 [L] RewriteRule . index.php [L] ``` -------------------------------- ### pgloader Migration Configuration Source: https://github.com/docs/docs/blob/master/docs/packages/mattermost.md Example configuration for pgloader, specifying connection parameters for MySQL and PostgreSQL. Ensure these details match your old and new Mattermost installations. ```ini [pgloader] mysql_user=f1b2b6873b4dad41 mysql_password=f1c879c56c68abb03f77ef26e20b5898fc9bfeb2f87ae358 mysql_address=mysql:3306 source_schema=f1b2b6873b4dad41 pg_user=userbec36139a3c04f7a97394a5348d4ea87 pg_password=d307edc09a68a3a8cd6b7d4a614a4c5bcb2dbe98bef0b7c86ceab55a97691f15c9c246e82e01b2e9f1db44d8d9de0c58cad3de13c169fafcaace2c7b289c6033 postgres_address=postgresql:5432 target_schema=dbbec36139a3c04f7a97394a5348d4ea87 ``` -------------------------------- ### Send Email with PHPMailer (PHP) Source: https://github.com/docs/docs/blob/master/docs/packages/lamp.md This example demonstrates how to send an HTML email using the PHPMailer library. Ensure you have installed PHPMailer via Composer and are using the correct environment variables for SMTP configuration. ```php SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output $mail->isSMTP(); //Send using SMTP $mail->Host = getenv('CLOUDRON_MAIL_SMTP_SERVER'); //Set the SMTP server to send through $mail->SMTPAuth = true; //Enable SMTP authentication $mail->Username = getenv('CLOUDRON_MAIL_SMTP_USERNAME'); //SMTP username $mail->Password = getenv('CLOUDRON_MAIL_SMTP_PASSWORD'); //SMTP password $mail->SMTPSecure = ''; $mail->Port = getenv('CLOUDRON_MAIL_SMTP_PORT'); //Recipients $mail->setFrom(getenv('CLOUDRON_MAIL_FROM'), 'Mailer'); $mail->addAddress('test@cloudron.io', 'Cloudron Test'); //Add a recipient //Content $mail->isHTML(true); //Set email format to HTML $mail->Subject = 'Here is the subject'; $mail->Body = 'This is the HTML message body in bold!'; $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; $mail->send(); echo 'Message has been sent'; } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } ``` -------------------------------- ### Build Custom Jupyter Notebook Image Source: https://github.com/docs/docs/blob/master/docs/packages/jupyterhub.md Example Dockerfile to build a custom Jupyter notebook image. Install additional packages like git-lfs using conda. Push the image to Dockerhub and then specify it in `customconfig.py`. ```docker FROM quay.io/jupyter/all-spark-notebook RUN conda install --yes -c conda-forge git-lfs ``` -------------------------------- ### Initialize Project Directory for Quotas Source: https://github.com/docs/docs/blob/master/docs/guides/per-app-storage-limit.md Initialize a project directory with a specific project name. This prepares the directory for quota management. ```bash xfs_quota -x -c "project -s lamp1" "/mnt/volumes/af0b5df5b3254d6db4c3018885cb45d7/" ``` -------------------------------- ### Create Projects and ProjID Files Source: https://github.com/docs/docs/blob/master/docs/guides/per-app-storage-limit.md Initialize the necessary files for project quota management. These files map project IDs to directories and names. ```bash touch /etc/projects /etc/projid ``` -------------------------------- ### Run App with Specific User using gosu Source: https://github.com/docs/docs/blob/master/docs/packaging/cheat-sheet.md Use the `gosu` tool to execute a command as a specific user and group, typically done in a start script to run the main application process with least privilege after root-level setup. ```shell /usr/local/bin/gosu cloudron:cloudron node /app/code/.build/bundle/main.js ``` -------------------------------- ### Configure Docker Data Root with Systemd Source: https://github.com/docs/docs/blob/master/docs/server.md Create a systemd drop-in file to change the default data root for Docker images. This example sets the new location to '/mnt/docker'. Ensure the directory exists and has correct permissions before starting Docker. ```bash [Service] ExecStart= ExecStart=/usr/bin/dockerd -H fd:// --log-driver=journald --exec-opt native.cgroupdriver=cgroupfs --storage-driver=overlay2 --data-root=/mnt/docker --experimental --ip6tables ``` -------------------------------- ### Create and Enable Swap File Source: https://github.com/docs/docs/blob/master/docs/server.md This sequence of commands creates a 2GB swap file, sets appropriate permissions, formats it, and activates it. It also includes the necessary entry for `/etc/fstab` to make the swap persistent across reboots. ```bash dd if=/dev/zero of=/extra.swap bs=1024 count=2097152 chmod 600 /extra.swap mkswap /extra.swap swapon /extra.swap ``` ```bash /extra.swap none swap sw 0 0 ``` -------------------------------- ### Install Grafana Plugin Source: https://github.com/docs/docs/blob/master/docs/packages/grafana.md Use this command to install Grafana plugins via the CLI. Ensure the paths are correct for your Grafana installation. ```bash /app/code/bin/grafana cli -homepath /app/code -config /run/grafana/custom.ini plugins install grafana-worldmap-panel ``` -------------------------------- ### Load Demo Data for Superset Source: https://github.com/docs/docs/blob/master/docs/packages/superset.md Run these commands in the app's web terminal to load demo data and create an admin user. This process can be time and memory consuming. ```bash source /app/pkg/env.sh superset fab create-admin --username admin --firstname Superset --lastname Admin --email admin@cloudron.local --password changeme superset load_examples ``` -------------------------------- ### Install Custom Node Modules Source: https://github.com/docs/docs/blob/master/docs/packages/n8n.md Installs custom node modules by listing them in PKG_EXTRA_NODE_MODULES and whitelisting them in NODE_FUNCTION_ALLOW_EXTERNAL in env.sh. Restart the app to install. ```bash # Note: this is a space separated list export PKG_EXTRA_NODE_MODULES="handlebars@4.7.7 jsonata@2.0.2 marked@4.3.0" ``` ```bash # Note: this is a comma separated list export NODE_FUNCTION_ALLOW_EXTERNAL=handlebars,jsonata,marked ``` -------------------------------- ### Create Shared Directory for Notebooks Source: https://github.com/docs/docs/blob/master/docs/packages/jupyterhub.md Set up a shared directory for notebooks by creating `/app/data/shared` and setting appropriate permissions. This is done via the Web Terminal. ```bash mkdir /app/data/shared chmod 0777 /app/data/shared ``` -------------------------------- ### Gitea CLI: Display Help Source: https://github.com/docs/docs/blob/master/docs/packages/gitea.md Execute the Gitea CLI with the `--help` flag to view available commands and options. Ensure the correct configuration file path is provided. ```bash sudo -u git /home/git/gitea/gitea -c /run/gitea/app.ini --help ``` -------------------------------- ### Upload Video using PeerTube CLI Source: https://github.com/docs/docs/blob/master/docs/packages/peertube.md Use the `peertube-cli` to upload videos. Ensure you have the correct file path, instance URL, username, and password. ```bash peertube-cli up --file /tmp/video.wmv --url https://peertube.cloudron.club --username root --password changeme --video-name "sample video" Uploading Sample video video... Video Sample video uploaded. ``` -------------------------------- ### Create Ext4 Filesystems Source: https://github.com/docs/docs/blob/master/docs/guides/per-app-storage-limit.md Format multiple partitions with the ext4 filesystem. This loop iterates from 1 to 5, creating an ext4 filesystem on each /dev/sdc partition. ```bash for i in {1..5}; do mkfs.ext4 /dev/sdc$i done ``` -------------------------------- ### Install Drush with Composer Source: https://github.com/docs/docs/blob/master/docs/packages/lamp.md Switch to the 'www-data' user and navigate to your PHP code directory to install Drush using Composer. ```bash su - www-data cd /app/data/public # this is where PHP code resides composer require drush/drush ``` -------------------------------- ### Woodpecker Agent Log Output Example Source: https://github.com/docs/docs/blob/master/docs/packages/woodpecker.md Example output from Woodpecker agent logs, showing initialization and readiness for execution. ```json {"level":"debug","time":"2023-04-27T09:06:42Z","message":"loaded docker backend engine"} {"level":"debug","time":"2023-04-27T09:06:42Z","message":"request next execution"} ``` -------------------------------- ### Set Sample Public Page as Default Source: https://github.com/docs/docs/blob/master/docs/packages/yourls.md Use the web terminal to copy the sample public page to index.php, making the URL shortener available to all users. Be aware this may attract spammers. ```bash cp /app/code/sample-public-front-page.txt /app/data/index.php ``` -------------------------------- ### JSON Output Example Source: https://github.com/docs/docs/blob/master/docs/packages/ip2location.md Example of the JSON response structure returned by the IP2Location service, containing detailed geolocation information. ```json {"city":{"geoname_id":5344157,"names":{"en":"Dublin","ru":"Дублин","zh-CN":"都伯林"}},"continent":{"code":"NA","geoname_id":6255149,"names":{"de":"Nordamerika","en":"North America","es":"Norteamérica","fr":"Amérique du Nord","ja":"北アメリカ","pt-BR":"América do Norte","ru":"Северная Америка","zh-CN":"北美洲"}},"country":{"geoname_id":6252001,"iso_code":"US","names":{"de":"USA","en":"United States","es":"Estados Unidos","fr":"États-Unis","ja":"アメリカ合衆国","pt-BR":"Estados Unidos","ru":"США","zh-CN":"美国"}},"location":{"accuracy_radius":50,"latitude":37.7201,"longitude":-121.919,"metro_code":807,"time_zone":"America/Los_Angeles"},"postal":{"code":"94568"},"registered_country":{"geoname_id":6252001,"iso_code":"US","names":{"de":"USA","en":"United States","es":"Estados Unidos","fr":"États-Unis","ja":"アメリカ合衆国","pt-BR":"Estados Unidos","ru":"США","zh-CN":"美国"}},"subdivisions":[{"geoname_id":5332921,"iso_code":"CA","names":{"de":"Kalifornien","en":"California","es":"California","fr":"Californie","ja":"カリフォルニア州","pt-BR":"Califórnia","ru":"Калифорния","zh-CN":"加利福尼亚州"}}]} ``` -------------------------------- ### Manual Docker Build and Push Source: https://github.com/docs/docs/blob/master/docs/packaging/tutorial.md Provides full control over tagging and the build process by using `docker build` and `docker push` directly. The image is then passed to `cloudron install` using the `--image` flag. ```bash docker build -t username/myapp:1.0.0 . docker push username/myapp:1.0.0 cloudron install --image username/myapp:1.0.0 ``` -------------------------------- ### Changelog File Format Example Source: https://github.com/docs/docs/blob/master/docs/packaging/manifest.md Illustrates the format of a changelog file, using version sections delimited by [version] headers. ```markdown [1.0.0] * Change 1 * Change 2 [0.9.0] * Previous version changes ``` -------------------------------- ### Loomio Rails Console Output Example Source: https://github.com/docs/docs/blob/master/docs/packages/loomio.md An example of the output when connecting to the Loomio Rails console, indicating the loaded Rails environment. ```ruby Loading production environment (Rails 7.0.7.2) irb(main):001:0> ``` -------------------------------- ### Surfer CLI Help Source: https://github.com/docs/docs/blob/master/docs/packages/surfer.md Display the help information for the Surfer CLI, showing available commands and options. ```bash surfer Usage: surfer [options] [command] Options: -V, --version output the version number -h, --help display help for command Commands: login Set default server logout Unset default server config|configure [options] Configure default server put [options] Uploads a list of files or dirs to the destination. The last argument is destination dir get [options] [file|dir] Get a file or directory listing del [options] Delete a file or directory help [command] display help for command ``` -------------------------------- ### JSON Output for Specific IP Example Source: https://github.com/docs/docs/blob/master/docs/packages/ip2location.md Example of the JSON response when a specific IP address is queried using the 'ip' parameter. ```json {"continent":{"code":"NA","geoname_id":6255149,"names":{"de":"Nordamerika","en":"North America","es":"Norteamérica","fr":"Amérique du Nord","ja":"北アメリカ","pt-BR":"América do Norte","ru":"Северная Америка","zh-CN":"北美洲"}},"country":{"geoname_id":6252001,"iso_code":"US","names":{"de":"USA","en":"United States","es":"Estados Unidos","fr":"États Unis","ja":"アメリカ","pt-BR":"EUA","ru":"США","zh-CN":"美国"}},"location":{"accuracy_radius":1000,"latitude":37.751,"longitude":-97.822,"time_zone":"America/Chicago"},"registered_country":{"geoname_id":6252001,"iso_code":"US","names":{"de":"USA","en":"United States","es":"Estados Unidos","fr":"États Unis","ja":"アメリカ","pt-BR":"EUA","ru":"США","zh-CN":"美国"}}} ``` -------------------------------- ### Open Cloudron App Source: https://github.com/docs/docs/blob/master/docs/packaging/tutorial.md Opens the installed Cloudron app in the default web browser. This is useful for quickly accessing the app after installation or updates. ```bash # open the app in the browser cloudron open ``` -------------------------------- ### List Existing API Keys Source: https://github.com/docs/docs/blob/master/docs/packages/translate.md View all currently active API keys using the ltmanage command. Activate the virtual environment before running. ```bash source /app/code/venv/bin/activate ltmanage keys --api-keys-db-path /app/data/db/api_keys.db ``` -------------------------------- ### Create Mount Directories Source: https://github.com/docs/docs/blob/master/docs/guides/per-app-storage-limit.md Create parent directories for mounting multiple partitions. This command creates directories /mnt/lamp1 through /mnt/lamp5. ```bash mkdir -p /mnt/lamp{1,2,3,4,5} ``` -------------------------------- ### Test LDAP Setup Source: https://github.com/docs/docs/blob/master/docs/user-directory.md Use this command to test your LDAP setup by searching for users in the specified base DN. You will be prompted for the LDAP password. ```bash $ ldapsearch -x -b "ou=users,dc=cloudron" -D "cn=admin,ou=system,dc=cloudron" -W -H ldaps://my.example.com:636 Enter LDAP Password: # Extended LDIF # # Ldapv3 # base with scope subtree # Filter: (objectclass=*) # Requesting: ALL # # Uid-0cfbd3d8-6547-4332-9415-dadfe8b78ac4, users, Cloudron dn: cn=uid-0cfbd3d8-6547-4332-9415-dadfe8b78ac4,ou=users,dc=cloudron objectclass: user objectclass: inetorgperson objectclass: person objectcategory: person ... ``` -------------------------------- ### List Installed Apps Source: https://github.com/docs/docs/blob/master/docs/packaging/cli.md Display a list of all installed applications on the Cloudron server. The `Id` and `Location` fields can be used with the `--app` argument for other commands. ```bash cloudron list ``` -------------------------------- ### Deploy Website using SSH Source: https://github.com/docs/docs/blob/master/README.md Builds the website and pushes it to the 'gh-pages' branch using SSH. Requires SSH key setup. ```bash USE_SSH=true yarn deploy ``` -------------------------------- ### Create EXT4 filesystem on disk Source: https://github.com/docs/docs/blob/master/docs/guides/per-app-storage-limit.md Use this command to create an EXT4 file system on a block device. Ensure the device path is correct to avoid data loss. ```bash mkfs.ext4 /dev/sdc ``` -------------------------------- ### Nextcloud Internal Calendar URL Example Source: https://github.com/docs/docs/blob/master/docs/guides/community/nextcloud-oidc-dav-sync.md This is an example of an internal calendar URL in Nextcloud. Replace placeholders with your actual domain, username, and calendar name. ```text https://YOUR.DOMAIN.TLD/remote.php/dav/calendars/my.DOMAIN.tld-USER.NAME/hackradt/ ``` -------------------------------- ### Create Recording Directory and Set Permissions Source: https://github.com/docs/docs/blob/master/docs/packages/guacamole.md Use the Web Terminal to create a directory for session recordings and set appropriate ownership and permissions. This ensures Guacamole can write recordings to the specified location. ```bash mkdir -p /app/data/recordings chown -R cloudron:tomcat /app/data/recordings chmod 2750 /app/data/recordings/ ``` -------------------------------- ### Install Fail2Ban for SSH Protection Source: https://github.com/docs/docs/blob/master/docs/security.md Install Fail2Ban to automatically block IP addresses that exhibit malicious behavior, such as repeated failed SSH login attempts. ```bash apt install fail2ban ``` -------------------------------- ### Install Discourse Plugin Source: https://github.com/docs/docs/blob/master/docs/packages/discourse.md Use these commands in the web terminal to clone a plugin repository into the plugins directory. Ensure correct ownership and restart the app. ```bash cd /app/data/plugins git clone chown -R cloudron:cloudron ```