Outline
This outline has the bullets for the Alfredo usage guide. It guides the documentation for non-technical users and the development guide for developers.
Install your first app
First, we need to get a server in our dashboard.
- Server requirements: This is a sensible default. Depending on the provider and Apps you want to run, you might need more or less resources.
- 2 CPU
- 4 GB RAM
- 40 GB Disk
- Supported OS versions: Ubuntu 24.04 (Probably Ubuntu 22.04 works fine as well, but all tests are done on 24.04)
The key principles
- We need a Server with a non-root user with sudo access, password-protected. This user connects to the server with an SSH-key, and then to run commands at sudo (administrator) level needs password access. This is important for security reasons. We don’t want to have a root user with SSH access. This is a bad practice, and we don’t want to support it.
- The server SSH access should be made only by SSH keys. Password access is not allowed.
- The root user should be disabled for SSH access. This is important for security reasons. You can access the server with Root user via the console in the cloud provider’s backoffice.
- The cloud provider needs to support Firewalls. We rely on them to only have the HTTP/HTTPS ports open to the internet. We may have the SSH port open as well, or for hardening purposes, we may configure an intermediate jump server to access the server.
With these topics secured, we can now configure the server with Alfredo. Under the hood, all it does is to connect to the server via SSH and apply configurations and commands for you. All the necessary things will be on the server, there is no vendor lock-in by Alfredo.
Things to ensure you have on the cloud provider before starting:
- Server recovery console via your admin area on the cloud provider - direct root login without SSH
- Cloud provider Firewalls This is something typically all cloud providers have, but it’s important to be aware of.
Provisioning the server
As we’ve seen above, we need to have a server with a non-root user with sudo access, password-protected.
We can do this in the following methods:
Add existing server with non-root User
There is already a server with a created a non-root User, password protected for sudo.
- In Alfredo, we click on the “Add existing server with non-root User” function.
- It then generates a key, and shows a command to install it.
- We copy the command, and we paste it ourselves on an SSH session, while running as that user, in the server.
- Click on “Start managing server”.
There is already a server with Root user only
There’s an existing server with a root user only, and we want to create a non-root user with sudo access, password-protected.
We easily do this by running the following command on the server. The following commands will:
- Create a new user called
alfredo
and set a password for it. You can replacealfredo
with any username you prefer.- Ensure to choose a strong password: 14+ characters, with lower case, capitals, numbers and symbols.
- Add it to the
sudo
group.
adduser --gecos "" alfredousermod -aG sudo alfredo
We can now proceed to add the server in Alfredo, like in the setup above (non-root user).
There is no server yet
There is no server yet, and we want to create a new one. While we most probably will support to create servers via integration with API tokens, the initial version also makes it very easy to create the server manually, by using Cloud-Init.
With this process, we just pick have to pick the server general specifications, and paste the Cloud-Init config, generated by Alfredo.
- In Alfredo, we click on the “Create new server” function.
- Pick the “Generate CloudConfig” option
- Copy the Cloud-Init config
- Paste it in the cloud provider’s option, when creating the server.
- Click on “Create server”.
- Wait for the server to be created.
- Click on “Start managing server”.