Install CapRover
Your own small cloud platform with automatic HTTPS certificates, with the cost written out and the default password that must be changed right away.
Last reviewed:
What CapRover is
A small cloud platform of your own that you install on a server. Instead of configuring the web server, certificates and database by hand, you click in an interface and CapRover does the rest. Your website gets a valid HTTPS certificate automatically, and new versions are published with a single command.
So it does roughly what the well-known paid services for web publishing do, but on a server you rent yourself. The difference in price is large, and so is the difference in control.
For a company, this is usually where the web shop or booking page ends up, because CapRover has ready-made installations of the common programs. WordPress, databases and much else start with a few clicks instead of with a compose file.
This requires a server, and it costs money
CapRover is not installed on your own computer. The point is that things should be reachable from the outside around the clock, and that requires a machine that sits with someone else.
You need a server with at least 1 GB of memory, and a real Linux installation, not a shared web hosting plan. One of those costs from about fifty SEK a month from the usual providers. That is a real expense, and it needs to go into the company budget before you start.
You also need a domain name, and it is not enough to just point the domain at the server's address. CapRover requires a wildcard record, that is, an A record for *.er-doman.se that points to the server's IP address, because every app and the admin page gets its own subdomain under the same root. Without the wildcard record, neither captain.er-doman.se nor the apps' own addresses work. A domain name costs a few hundred SEK a year. Without a domain, the automatic certificates do not work, and then half the reason to use CapRover disappears.
Installation
You install on the server, not on your own computer. You log in to it with SSH, which you do from PowerShell on Windows and from Terminal on Linux Mint with the same command: ssh root@serverns-adress.
Docker must be on the server. Most providers offer a ready-made image with Docker installed, and that is the shortest route. If it is missing, follow the Linux part of Install Docker.
Then it is one line:
docker run -p 80:80 -p 443:443 -p 3000:3000 -e ACCEPTED_TERMS=true -v /var/run/docker.sock:/var/run/docker.sock -v /captain:/captain caprover/caprover
Wait a few minutes and then go to http://serverns-adress:3000. The password is captain42 from the start.
Three things to do first
- Change the password immediately. Every bot that scans the internet knows the default password is
captain42, and your server is reachable from the internet the second the installation is done. This is not something to do later in the evening. - Point the domain and turn on the certificates. On the Dashboard page you enter your domain under the root domain configuration, and CapRover fetches certificates from Let's Encrypt at no cost. Then turn on forcing everything to HTTPS. Two clicks, and the address bar stops looking unsafe.
- Install something from One-Click Apps before you build your own. Pick a database or WordPress and watch it start. You learn how the platform fits together in ten minutes, and you need that knowledge when you later deploy your own code.
The most common trap
Believing that the server handles its own backups. It does not. Everything your programs save lives in volumes on the machine, and if you delete an app in the interface, the volume can go with it. If the server breaks, or you forget to pay the bill, everything is gone at the same time.
So turn on backups with the provider, which usually costs about ten SEK a month extra, and also export the database to a file at regular intervals. Put the file somewhere other than on the same server, because a copy that sits on the machine that broke is not a copy.
The other half of the same trap is the port. Port 3000 is the administration interface, and it is open to the internet after installation. Once you have the domain in place, you reach the interface via captain.er-doman.se instead, and then you can close 3000 in the firewall. Do it.