Topic: Let's self-host with:

Let's Self-Host!

Installathon With UBOS

[Nextcloud] [Mediawiki] [Wordpress] ...

Johannes Ernst

mail: · blog:
Mastodon: · Twitter: @Johannes_Ernst



Get (at least) Nextcloud installed and running on your machine

Step -3:
Get UBOS container image

  • Copy from USB stick: ubos_yellow_x86_64-container_XXX.tar.xz
  • To your Linux Desktop
  • Pass on the USB stick!

Interlude 1/4:
why Linux container?

  • Why not? :-)

Interlude 2/4:
why self-host?

  • Everybody spies on you on-line
  • Nobody can kick you off your own server
  • You decide what software to run, not some overlord in the cloud

Interlude 3/4:
why Nextcloud?

  • File storage/sharing, calendaring, contacts, notes, ...
  • Mature, well-developed, security-conscious FLOSS web app
  • Desktop and mobile integration
  • Large community of users

Interlude 4/4:
why UBOS?

  • Saves you tons of time
  • You don't need to be a server admin expert

UBOS comparison example

Typical web server upgrade Web server upgrade with UBOS
  1. Stop web server.
  2. Remember what other daemons may need to be stopped and stop them.
  3. Remember which apps might be installed.
  4. Create a backup for all data of all apps.
  5. apt-get update and fix what broke.
  6. For each installed app, check whether an updated version is available.
  7. Download each app's new tar file.
  8. Read all UPGRADE.txt files (if they exist).
  9. Follow instructions. May include changed Web server setup, database migrations, …

Oh my!

  1. sudo ubos-admin update

... and enjoy the sunshine

UBOS: automate web app admin

# ubos-admin
    ubos-admin backup [<args>...]
    ubos-admin backup-to-amazons3 [<args>...]
    ubos-admin backupinfo [<args>...]
    ubos-admin createsite [<args>...]
    ubos-admin deploy [<args>...]
    ubos-admin hostid [<args>...]
    ubos-admin init-staff [<args>...]
    ubos-admin listnetconfigs [<args>...]
    ubos-admin listsites [<args>...]
    ubos-admin read-configuration-from-staff [<args>...]
    ubos-admin restore [<args>...]
    ubos-admin setnetconfig [<args>...]
    ubos-admin setup-shepherd [<args>...]
    ubos-admin showappconfig [<args>...]
    ubos-admin shownetconfig [<args>...]
    ubos-admin showsite [<args>...]
    ubos-admin status [<args>...]
    ubos-admin undeploy [<args>...]
    ubos-admin update [<args>...]
    ubos-admin write-configuration-to-staff [<args>...]
    ubos-admin --help
    ubos-admin <command> --help

Step -2: Unpack UBOS container image

% cd ~/Desktop
% ls
% mkdir ubos
% cd ubos
% sudo tar xJf ../ubos_yellow_x86_64-container_XXX.tar.xz

Step -1: Setup host networking

% sudo modprobe ip_tables
% sudo modprobe ip6_tables
% sudo systemctl start systemd-networkd
% ip addr
1: lo: ...
2: eth0: ...
3: wlan0: ...
    inet brd scope global dynamic eth0
% sudo sysctl net.ipv4.conf.wlan0.forwarding=1

Step 0: Boot UBOS

% cd ..
% sudo systemd-nspawn -b -n -D ubos
% sudo systemd-nspawn -b -D ubos

(boot log skipped)

Login: root
# systemctl --failed
# ubos-admin update

Step 1: Install Nextcloud

# ubos-admin createsite
** First a few questions about the website that you are about to create:
Hostname (or * for any): *
Site admin user id (e.g. admin): admin
Site admin user name (e.g. John Doe): admin
Site admin user password (e.g. s3cr3t): ...
Repeat site admin user password: ...
Site admin user e-mail (e.g.
** Now a few questions about the app(s) you are going to deploy to this site:
First app to run (or leave empty when no more apps): nextcloud
Downloading packages...
App nextcloud suggests context path /nextcloud
Enter context path: /nextcloud
Any accessories for nextcloud? Enter list: nextcloud-calendar nextcloud-contacts
Downloading packages...
Next app to run (or leave empty when no more apps):
Downloading packages...
Installed site s65313ed42bc66ee1cc926a3edffef9e2b2f04eb9 at http://*/

Step 2: Let's use Nextcloud

# ip addr
1: lo: ...
2: host0@if4: ...
    inet brd scope global dynamic host0
  • In your browser: http://localhost/
  • Log in!
  • Check out files, calendars, contacts ...

Ongoing maintenance

% sudo ubos-admin update
% sudo ubos-admin backup-to-amazons3 --encryptid <gpg-keyid>
% sudo ubos-admin status

What else can UBOS do for me?

  • Root password management via the UBOS Staff
  • Unlimited virtual hosts
  • Automated SSL/TLS certificate setup
  • Automated WiFi setup
  • Automatic firewall configuration
[Docroot] [Known] [Mastodon] [Mattermost] [Mediawiki] [Nextcloud] [phpBB]
[Redirect] [River5] [Selfoss] [Shaarli] [Webtrees] [Wordpress] ...
PC · all Raspberry Pi's · ESPRESSObin
Linux container · VirtualBox/VMware · Amazon EC2

Next steps:

  • Set up a personal server for yourself and your family/friends
  • Leave the cloud overloards and their empires
  • Follow @uboslinux, check out, ask questions on
  • More apps wanted!




Johannes Ernst

mail: · blog:
Mastodon: · Twitter: @Johannes_Ernst