Documentation Overview

  1. Operation documentation
    1. UBOS Linux installation
      1. Run UBOS on a PC (64bit)
      2. Run UBOS from a boot stick on a PC (64bit)
      3. Run UBOS in a VirtualBox virtual machine (64bit)
      4. Run UBOS with Docker
      5. Run UBOS on an Amazon Web Services EC2 virtual server
      6. Run UBOS on Raspberry Pi 5
      7. Run UBOS on ESPRESSObin
      8. Run UBOS in a Linux container on a PC (64bit)
      9. Run UBOS in an AArch64 Linux container
    2. Setting up your first Site and App
    3. Setting up networking and DNS
    4. How to create a website secured by SSL/TLS
    5. How to set up a website as a Tor hidden service
    6. Managing Sites and Apps
    7. Backup and restore
    8. Upgrading and keeping your Device current
    9. The UBOS Staff
    10. App-specific notes
      1. Reliably send e-mail via Amazon Web Services’ Simple E-mail Service: amazonses
      2. Static website hosting with rsync-based upload: docroot
      3. Notes on Mastodon
      4. Notes on Nextcloud
      5. Notes on Redirect
      6. Notes on Wordpress
    11. Device-specific Notes
      1. ESPRESSObin
      2. Raspberry Pi
    12. Advanced management
      1. Enabling non-standard package repositories
      2. Migrating from one App to another
      3. Pinning resources
    13. FAQ, HOWTOs and Troubleshooting
      1. “Package not found error” when installing a new App or Accessory
      2. A UBOS container comes up degraded
      3. Booting UBOS on a PC starts out fine, but then the screen goes blank
      4. Can I use UBOS without purchasing a domain name?
      5. Cannot access MySQL database. File missing: /etc/mysql/root-defaults-ubos.cnf
      6. Cannot boot UBOS from boot stick on a PC
      7. Cannot connect to the public internet from a UBOS container
      8. Cannot create a temporary backup; the backup directory is not empty
      9. Failed to create file /sys/devices/system/cpu/microcode/reload
      10. How are the various UBOS images different from each other?
      11. How can I install more than one web App on the same Device?
      12. How do I report a bug?
      13. How do I set up WiFi?
      14. How to enable non-standard Package Repositories
      15. How to get help
      16. How to log into your UBOS Device
      17. How to modify the configuration of your Site
      18. How to report a bug or issue
      19. How to use Pagekite to reach your UBOS Device behind a firewall
      20. How to use SSH
      21. I need a Package that isn’t in UBOS
      22. I need root
      23. I own a domain name, and I’d like to use it for my UBOS Device. How do I do that?
      24. I want to move from one device to another, or from/to the cloud to/from a device
      25. I want to run ssh on a non-standard port
      26. I’m running out of disk space, what now?
      27. Installing a new Package or updating fails with a message about “invalid or corrupted package” or “key is disabled”
      28. Installing a new Package or upgrading fails with a message about “unknown trust”
      29. Is it safe to have my Site accessible from the public web?
      30. My non-English keyboard layout is all screwed up
      31. My SD card is much larger than the UBOS image. How do I use the rest of the space?
      32. Nothing happens when UBOS is supposed to be booting
      33. Problems with “IPv6 Packet Filtering Framework”
      34. UBOS is in a “degraded” state
      35. ubos-admin status reports “Systemd unit … has failed”
      36. Verify your downloaded UBOS image
      37. What is the default “root” password?
      38. What text editor can I use on UBOS?
      39. Why did you derive UBOS Linux from Arch Linux, and what is the relationship between UBOS Linux and Arch?
      40. Why does UBOS ask for a domain name when installing a new Site?
      41. Why is it called UBOS?
      42. Writing a disk image to a USB stick or SD card
        1. Writing an image to a USB stick or SD card on Linux
        2. Writing an image to a USB stick or SD card on macOS
        3. Writing an image to a USB stick or SD card on Windows
    14. Command reference
  2. Developer documentation
    1. Developer setup
      1. Developing using Docker (all Intel platforms)
      2. Developing using a systemd-nspawn container (Linux host only)
      3. Developing using Arch Linux on VirtualBox x86_64 with a systemd-nspawn container
      4. Developing using Arch Linux using UTM on Apple Silicon with a systemd-nspawn container
      5. Developing using Arch Linux using Parallels on Apple Silicon with a systemd-nspawn container
    2. Developer tutorials for standalone UBOS Gears apps (not UBOS Mesh)
      1. Build and run your first UBOS Gears App
      2. How to package UBOS Standalone Apps built with a variety of languages
        1. Hello World
        2. Glad-I-Was-Here (PHP, MySQL)
        3. An Accessory for Glad-I-Was-Here (PHP, MySQL)
        4. Glad-I-Was-Here (PHP, Postgresql)
        5. Glad-I-Was-Here (Java, MySQL)
        6. Glad-I-Was-Here (Python, MySQL)
    3. UBOS Gears Reference
      1. UBOS Manifest
        1. Structure of the UBOS Manifest
        2. Info section
        3. Roles section
        4. Customization points section
        5. Appinfo section
        6. Accessoryinfo section
        7. Variables available at deploy or undeploy
        8. Functions that may be applied to variables
        9. Creating random values
        10. Scripts in UBOS Manifests
      2. Site JSON
      3. A complex deployment example
      4. UBOS Networking
      5. Allocating and opening up non-default ports
      6. Logging
      7. UBOS state
      8. UBOS Backup format
      9. Format of the App Status JSON
      10. Testing standalone Apps with “webapptest”
      11. Understanding ubos-admin
        1. Command: ubos-admin backup
        2. Command: ubos-admin backupinfo
        3. Command: ubos-admin createsite
        4. Command: ubos-admin deploy
        5. Command: ubos-admin hostid
        6. Command: ubos-admin init-staff
        7. Command: ubos-admin list-data-transfer-protocols
        8. Command: ubos-admin listnetconfigs
        9. Command: ubos-admin listsites
        10. Command: ubos-admin read-configuration-from-staff
        11. Command: ubos-admin restore
        12. Command: ubos-admin setnetconfig
        13. Command: ubos-admin setup-shepherd
        14. Command: ubos-admin showappconfig
        15. Command: ubos-admin shownetconfig
        16. Command: ubos-admin showsite
        17. Command: ubos-admin status
        18. Command: ubos-admin undeploy
        19. Command: ubos-admin update
        20. Command: ubos-admin write-configuration-to-staff
    4. Release channels and UBOS release process
    5. Miscellaneous
      1. Potentially useful infrastructure for standalone Apps
        1. The UBOS rsync server
      2. Middleware-specific notes
        1. Node.js notes
        2. SMTP notes
      3. Setting up an Arch Linux system
        1. Prepare a PC for installing Arch Linux
        2. Prepare a VirtualBox virtual machine to develop for UBOS using Arch Linux
        3. Continuing the Arch Linux installation on a PC or virtual machine
        4. Finishing the Arch development installation by adding UBOS tools
    6. Developer FAQ
      1. Doesn’t apt / dpkg / yum / pacman etc. does what UBOS Gears does already?
      2. Doesn’t puppet / chef / ansible etc. does what UBOS Gears does already?
      3. Doesn’t Docker do what UBOS Gears does already?
      4. How to profile the UBOS Personal Data Mesh web application
      5. Is it possible to run the other UBOS components on an operating system other than UBOS Linux?
      6. How to create a UBOS development VM for VirtualBox
      7. How to create a UBOS development VM for UTM on Apple computers
      8. How to create a UBOS development VM for Parallels Desktop on Apple Silicon

Notes on Nextcloud

/docs/operation/apps/nextcloud/

On Nextcloud “apps” and UBOS Accessories

First, let’s be clear about our terminology:

  • In UBOS terminology, Nextcloud is an App, like Wordpress or Mediawiki as Apps.

  • In UBOS terminology, anything that adds functionality to an App is called an Accessory.

  • Nextcloud doesn’t call itself an “app”. Instead, it calls code that adds functionality to Nextcloud (like the Nextcloud calendar or address book) an “app”. However, in UBOS terminology, that is called an Accessory.

How to install Nextcloud “apps”

Armed with this understanding, how does one install what Nextcloud calls an “app”, which is what UBOS calls a Nextcloud Accessory? Usually, you would log into your Nextcloud installation as administrator, navigating to the “apps” pages, and pick install new ones from there.

This is not how it works on UBOS.

When you run Nextcloud on UBOS, you need to specify your Accessories at the time you create your Site, or by redeploying the Site later with an updated configuration.

Example: let’s say you want to use the Nextcloud “Calendar” “app” for your Site. When you create the Site with ubos-admin createsite, you specify nextcloud as your App, and nextcloud-calendar as an Accessory. You can specify multiple Accessories as you like.

Here’s the reason why: UBOS cannot manage Apps that change their code base without UBOS knowing, and that’s what would be happening if Nextcloud got to add “apps” aka Accessory by itself.

Notes on Nextcloud “social”

UBOS makes the Nextcloud “Social” “app” available because users have requested it. However, it is still marked as “alpha” by its developers, and in our experience, this assessment is correct. In other words, if you decide to deploy it, do not rely on it working.

How to install OnlyOffice and the corresponding document server

This requires two accessories:

  • nextcloud-onlyoffice, and
  • nextcloud-documentserver-community.

You may receive the message “ONLYOFFICE cannot be reached. Please contact admin”. This is because you accessed your Nextcloud through a hostname or IP address different from what the Nextcloud installation expected.

To set the address at which the document server is available, go to the OnlyOffice Settings in the Nextcloud user interface (as administrator, go to Settings, section Administration, select ONLYOFFICE), and edit the Document Editing Service address. The URL there must start with the same protocol, hostname and path as the URL you are using to access Nextcloud.

You may also need to set this the first time you access Nextcloud after initial deployment.

This is a limitation of the current Nextcloud/OnlyOffice integration.

This requires three accessories:

  • nextcloud-fulltextsearch,
  • nextcloud-files-fulltextsearch, and
  • nextcloud-fulltextsearch-elasticsearch.

UBOS will automatically run all required daemons and associated commands.

How to skip a Nextcloud version during upgrade

If you don’t update your UBOS Device regularly, it may happen that you missed an entire major Nextcloud release by the time you do finally upgrade. For example, if you deployed your Site originally with Nextcloud 21, and waited a while to upgrade, the current version may now be Nextcloud 23. This is a problem because Nextcloud does not support skipped upgrades.

You may first experience this issue when you finally performed a Device update, and you got an error message saying that UBOS cannot upgrade your Nextcloud for this reason. In this case, when accessing Nextcloud with your web browser, Nextcloud will say that it is in maintenance mode.

This issue is a known Nextcloud issue, and really needs to be solve by the Nextcloud developers. We can only provide workarounds. The best one, of course, is to regularly update your UBOS Device, so you do not end up in this situation. But if you do anyway, here is a possible workaround:

  • First create a backup of your Nextcloud installation with ubos-admin backup with suitable arguments. Which arguments to use depends on your situation, such as how many Sites you have on your Device. If you have only one Site on your Device, you might want to run:

    % sudo ubos-admin backup --all --backuptofile mybackup.ubos-backup

  • Undeploy the Site running Nextcloud with ubos-admin undeploy. Depending how you have set up your Site or Sites, it might be easiest to undeploy the entire Site, or all Sites on your Device, with a command such as:

    % sudo ubos-admin undeploy --all

Warning

Make triply sure first that you have a backup for everything you will undeploy!

  • Upgrade your Device with sudo ubos-admin update.

  • Now restore your backup, while telling UBOS to replace package nextcloud with the package that contains the Nextcloud version that you skipped. UBOS provides older Nextcloud packages that are still supported by Nextcloud, with version numbers appended, such as nextcloud22 for Nextcloud version 22.

    The additional arguments to the ubos-admin restore command are --migratefrom nextcloud --migrateto nextcloud22 if you skipped Nextcloud 22. So the full invocation may be:

    % sudo ubos-admin restore --migratefrom nextcloud --migrateto nextcloud22 --in mybackup.ubos-backup

  • Once you have done that, you need to migrate from the skipped Nextcloud version to the current version. So we go through backup and restore one more time: ubos-admin backup as above, undeploy the restored Site now running the skipped Nextcloud version, and finally migrate to the current one by using flags --migratefrom nextcloud22 --migrateto nextcloud with the ubos-admin restore command.

  • Now you should be back and running. You can clean up by removing the skipped Nextcloud version’s package with pacman -R nextcloud22.

  • If you skipped more than one version, you may have to go through this process more than once, starting with the oldest skipped version and migrating to the next one one at a time, e.g.

    • --migratefrom nextcloud --migrateto nextcloud21 ...
    • --migratefrom nextcloud21 --migrateto nextcloud22 ...
    • --migratefrom nextcloud22 --migrateto nextcloud ...

Sorry for the complications, but this is the best we can do. Best is to regularly update your UBOS Device.

Note

You can ignore any error message about AbstractSystemdItem::_switchOff ... smtp-server22@... that might be printed under some circumstances.

Nextcloud Social

If you use the Nextcloud Social app, you may see the message:

.well-known/webfinger isn't properly set up!

This is an incorrect error message, and you can ignore it. It requires a fix upstream in Nextcloud Social (see this issue).