How To Install Cloudron On Ubuntu 20.04 Server
If you’re running a fresh Ubuntu 20.04 LTS server and want to spin up a self‑hosted app stack with minimal fuss, Cloudron is worth a shot. In this quick guide I’ll walk through the steps that actually get the box working, plus a few things you might have missed.
Prerequisites: What You Need
- A machine with Ubuntu 20.04 (or later) installed and internet access.
- Root or sudo privileges; Cloudron will pull a Docker image and bind to privileged ports.
- At least 2 GB of RAM – Cloudron’s web UI is surprisingly memory‑hungry, so I’d rather not be fighting with an out‑of‑memory error the first time around.
Update and Secure Your Server
sudo apt update && sudo apt upgrade -y sudo ufw enable sudo ufw allow OpenSSH
Running apt upgrade pulls in the latest security patches, and enabling UFW protects your server from brute‑force attempts while you’re setting up Cloudron.
Install Docker – the Backbone of Cloudron
sudo apt install -y docker.io sudo systemctl enable --now docker sudo usermod -aG docker $USER
Docker is required because Cloudron ships as a container. Adding your user to the docker group lets you run containers without sudo, which saves a lot of typing later.
Pull the Cloudron Image
docker pull cloudron/cloudron:latest
Pulling from Docker Hub ensures you get the most recent stable build. If you’re on a bandwidth‑constrained host, consider pinning to a specific tag instead of latest.
Create a Data Volume and Start Cloudron
sudo mkdir -p /opt/cloudron docker run -d \ --name cloudron \ --restart unless-stopped \ -p 80:80 -p 443:443 -p 4443:4443 \ -v /opt/cloudron:/data \ cloudron/cloudron
Why these options matter:
- --restart unless-stopped keeps Cloudron alive across reboots.
- The three port mappings expose the web UI (80/443) and the Cloudron control panel (4443). If you skip 4443, you’ll get SSL cert errors when the installer tries to talk to itself.
- Persisting /data outside the container means your apps survive a Docker wipe.
Initial Web Setup
Navigate to https://your‑server‑ip/. Cloudron will ask for:
- Domain: The public hostname that points at this machine. If you’re testing on a local IP, use localhost or 127.0.0.1.
- Admin email: Cloudron uses Let’s Encrypt to generate certificates; the email is needed for renewal notices.
Once you hit “Create”, Cloudron will pull several other Docker images in the background (WordPress, Nextcloud, etc.). Give it a minute – I’ve seen installs stall around 5 % when the machine has just 2 GB of RAM and the container starts allocating memory for each app it plans to support.
Common Gotchas
- Swap space: Cloudron doesn’t like swap. If you have a VPS with only 1 GB of RAM, add a small swap file (sudo fallocate -l 512M /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile).
- SELinux/AppArmor: The default Ubuntu profile is permissive enough, but if you’re running custom security modules, make sure Docker isn’t blocked from binding to privileged ports.
- Kernel version: Cloudron requires at least kernel 4.19. On older kernels you’ll see “unknown filesystem type” errors when mounting the data volume.
Updating Cloudron
From the UI go to Settings => Updates and hit “Check for updates”. The installer will pull a new image, stop the container, replace it, and restart – all without dropping your apps. If Docker itself is upgraded (sudo apt upgrade docker.io), you might need to rebuild the container because of ABI changes.
Final Thoughts
That’s it. Your server is now a mini‑cloud that can host everything from blogs to email in a few clicks. If something hiccups, start with docker logs cloudron – those messages are usually crystal clear.