New server setup
Actualitzat 391 Day(s) AgoPúblic

CommonsCloud servers share this basic setup

Let's say this is your new server:

  • FQDN:
  • Public IP:
  • SSH port: 22344 We don't use port 22. It just helps keep the logs a bit cleaner.

The username you decide to use on all servers: alice

Add the info to the ansible hosts file. Edit ~/CommonsCloud/ansible/hosts

    ansible_user: alice
    ansible_port: 22344


export SERVERNAME=""

Open a terminal on your PC

export SERVERNAME=""

Create the first user

At the moment 'root' is the only user. Here we create a user 'alice' (this should be your own personal default user account on the server) with password 'hello' and sudo permission. gets added to the new /home/alice/.ssh/authorized_keys file on the server

cd users
ansible-playbook createuser.yml -i ${SERVERNAME}, -e "hostname=${SERVERNAME}" --extra-vars "ansible_port=22 ansible_ssh_user=root user=alice password=hello"

Now login with the new user account and change password. See if sudo works for you.

Run basic server config

cd base
ansible-playbook webarch.yml -e "hostname=${SERVERNAME} ansible_port=22" -K

Now check if you can login with ssh -p 22344

Install firewall

cd firewall
ansible-playbook basicfirewall.yml -e "hostname=${SERVERNAME}" -K

Install postfix

cd sendmail
ansible-playbook postfix.yml -e "hostname=${SERVERNAME}" -K

Run mutt on the server and send an email

Install Zabbix agent

cd zabbix
ansible-playbook agentyml -e "hostname=${SERVERNAME}" -K
Últim autor