This is an internal documentation. There is a good chance you’re looking for something else. See Disclaimer.

Setup a DevOps Work Machine

Enable Full Disk Encryption (FDE)


  • Simply enabling encryption for your home directory is not enough.

  • If you already installed your OS and it doesn’t allow enabling FDE after installation, reinstall. No exceptions!

  • Remember that you need to type the selected passphrase on every boot. Select a reasonably-easy-to-type passphrase.

Example, enabling FDE on Ubuntu 22.04:

  1. Select Advanced features….


    Installation type screen of installer

  2. Select LVM and enable encryption.


    Advanced features screen of installer

  3. Overwrite old OS

    If you have used another OS on the machine without FDE enabled, select Overwrite empty disk space.


    Choose a security key screen of installler

Set up SSH

Create a Key

ssh-keygen -t ed25519
cat ~/.ssh/ # copy key and paste in the next step

Distribute Key

Add key on (Your name (top right corner) → SettingsSSH Public KeysAdd Key …)

You also want to give the content of ~/.ssh/ to someone of operations. To that regard, you can post the public key in the Operations Public channel and ask for it to be granted access.


For admins: How to allow access is documented in Server Access (SSH/KVM/noVNC)

Set up Wireguard VPN

Configure VPN

  1. Install Wireguard:

    apt install openresolv wireguard wireguard-tools


    macOS users:

    Install client from Do not install CLI tools listed at the bottom which are unmaintained and outdated.

  2. Generate private / public key pair:

    (private=$(wg genkey); public=$(wg pubkey <<<$private); echo "private_key: $private; public_key: $public")


    macOS users:

    Add a new empty Tunnel in the “Manage WireGuard Tunnels” Menu:


    Allow adding of VPN Configurations:


    This will generate an “empty” VPN configuration with a public and private key:

  3. Submit the public_key to Operations Public channel and ask to be granted VPN access.

    Make sure you keep the private_key, you’ll need it.

  4. You’ll get a VPN config back. Replace the XXX placeholder in it with your private_key and then store it at /etc/wireguard/wg-tocco.conf.


    macOS users:

    Add this configuration to your previously created VPN tunnel:


    Make sure to not overwrite the private key when pasting this configuration!



This is a per-device key. Generate a fresh key if you need access on an addational device. Using the same key on two devices will not work.


For admins: see Wireguard VPN.

Test VPN

  1. Enable VPN:

    wg-quick up wg-tocco


    macOS users: Simply activate the config:

  2. Test connection:

    ping -A -c 3
    ping -A -c 3 2001:8e3:5396:c9b::1
    ping -A -c 3


    macOS users:

    ping -A -c 3
    ping6 -c 3 2001:8e3:5396:c9b::1
    ping -A -c 3
  3. Disable VPN:

    wg-quick down wg-tocco


    macOS users: Simply deactivate the config:


Set Up Dotfiles

  1. Clone the tocco-dotfiles repository:

    cd ~/src
    git clone
  2. Link authorized_keys_tocco into SSH config directory:

    mkdir -p ~/.ssh
    ln -s ~/src/tocco-dotfiles/ssh/known_hosts_tocco ~/.ssh/

    Adjust the path if your repository clone is located elsewhere.

  3. Add scripts to $PATH by adding this to ~/.profile:

    export PATH


$PATH is adjusted only on newly opened terminals. Run the commands manually or restart your terminal should you need any commands added to $PATH.

Configure SSH

  1. Include config and set user name:

    cat >>~/.ssh/config <<EOF
    # First entry wins. So, override settings here, at the top.
    Host *
        User \${FIRST_NAME}.\${LAST_NAME}
    # Comment in if you want to login as 'tadm' by default instead as 'tocco' (root permissions required).
    # Host *
    #     User tadm
    Host *
        Include ~/src/tocco-dotfiles/ssh/config

    Replace ${FIRST_NAME}.${LAST_NAME} like this: peter.gerber.

    Adjust the path following the Include directive if the repository clone you created previously, in Set Up Dotfiles, is located elsewhere.

Setup Git

Install Git

Debian-Based Systems

apt install git

OSX Systems

If you are running OSX, you have git already installed. You can check the installed version using git -v.

If the installed version is not to your liking (or you are unable to update your OSX for some reason), you can create a separate git installation using brew and keep that on the version that you prefer. Brew will overwrite the linking of the git command for you, so that the brew version will be executed instead of the system version.

Configure Git

git config --global "${USERNAME}"  # replace ${USERNAME} with pgerber, …
git config --global "${YOUR_NAME}"  # replace ${YOUR_NAME} with "Peter Gerber", …

Ignore some files in all repository by default:

Debian-Based Systems

mkdir -p ~/.config/git
cat >>~/.config/git/ignore <<EOF

OSX Systems

The first command creates a new global gitignore file and the second command tells your git to use this new file for global ignores.

touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
cat <<EOT >> ~/.gitignore_global

Setup IDEA

Install IDEA

Download the latest version and extract it:

cd ~/Download
cd ~/install   # or wherever you want to install it
tar xf ~/Download/ideaIC-XXXX.X.X.tar.gz
ln -s ~/Download/ideaIC-XXXX.X.X idea
mkdir -p ~/bin
ln -s ~/install/idea/bin/ ~/bin/idea
rm ideaIC-XXXX.X.X.tar.gz

If an update is released that forces you to download a new *.tar.gz file, extract it and replace the link in ~/install/ using ln -sfn ideaIC-XXXX.X.X idea.


This assumes that ~/bin is in your $PATH which is the case on most Linux-based systems. If you had to create ~/bin, you may have to close and reopen the terminal for it to be added to $PATH.

If necessary, add it manually to $PATH by adding this to ~/.profile:

export PATH="$HOME/bin:$PATH"

Create Desktop Entry

open idea and find ToolsCreate Desktop Entry… (or ConfigureCreate Desktop Entry… on the welcome screen).

Change default encoding for properties files

Open FileSettingsEditorFile Encodings and change Default encoding for properties files to UTF-8

Install Gerrit Plugin

  1. Install Plugin under FileSettingsPlugins and search for Gerrit

  2. Restart IDEA

  3. Configure the plugin under FileSettingsVersion ControlGerrit

    • Web-URL:

    • Login: swuersten (your email address without

    • Password: ******

    • Enable “Push commits to Gerrit by default”

Increase Memory Available to IDEA

  1. HelpEdit Custom VM Options…

  2. Say Yes to create a config file

  3. Set max. memory (-Xmx) to something sensible (e.g. -Xmx3096m)

Increase Watch Limit (Linux only)

Create the file /etc/sysctl.d/50-idea.conf with the following content:


Then load it with this command:

sysctl -p /etc/sysctl.d/50-idea.conf

Install Java

Required Java versions:

Java Version

Nice Versions


3.1 - 3.9


3.10 -

Debian-Based Systems

Install default JDK:

apt install default-jdk

… or install a particular version:

# install Java 17
apt install openjdk-17-jdk

Alternative sources:


Most recent Java LTS version are usually available via backports:

cat >>/etc/apt/source.list.d/backports <<EOF
deb $(lsb_release -cs)-backports main

apt update

# install Java 11
apt install openjdk-11-jdk

Any Linux distribution:

Setup Gradle

There is no installation of gradle necessary as the gradle wrapper is used.

Repository Access

Create a file ~/.gradle/ and copy the content from Bitwarden.

Increase Max. Number of Open Files

Create /etc/security/limits.d/open_file_limit.conf with this content:

*                -       nofile          1000000


Only effective once you logged out and in again.

Install Dependencies

On Ubuntu install the following dependencies:

apt install libjpeg62 libpng16-16

(there libraries are dynamically loaded by wkhtmltopdf)

On Ubuntu 22.04 and newer install the following dependencies. If there is a newer version released already, the version numbers in the command need to be adjusted.

sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb

This fixes the issue “cannot open shared object file: No such file or directory”.

On macOS add the gradle property wkhtmltopdfClassifier=osx to ~/.gradle/

Clone and Build Nice2

mkdir ~/src
cd ~/src
git clone ssh://${USERNAME}  # replace ${USERNAME} with pgerber, …
cd nice2
scp -p -P 29418 ${USERNAME} .git/hooks/  # replace ${USERNAME} with pgerber, …
git checkout ${BRANCH} # replace ${BRANCH} either with integration/master or integration/releases/${VERSION} where ${VERSION} is for example 2.29


Recent versions of scp have switched to sftp as underlying protocol. Gerrit does not currently support this protocol and you may see this error:

subsystem request failed on channel 0
scp: Connection closed

In such a case, enable the legacy protocol via -O flag:

scp -O -p -P 29418 ${USERNAME} .git/hooks/  # replace ${USERNAME} with pgerber, …

Build nice

Test if Gradle build works:

cd ~/src/nice2
./gradlew build -x test

Create IDEA Project (Nice2 Integration)

open idea and find FileNewProject from Existing Sources… and follow the steps described below

  1. select root directory of your nice2 clone (e.g. ~/tocco/src/nice2-2.25)

  2. click OK

  3. choose option Import project from external modelGradle

  4. click Finish

  5. open new project either in a new window or in the existing window


It is recommended to create different git clone and idea project for each available version. For example one clone and project for master, one for v2.24, one for v2.25 and so on.


Note that there is already a run configuration for customer test ready to use (called “Start Nice2 (customer ‘test’)”).

If you need to run a different customer, just duplicate that run config and change the directory in the field Gradle project to your customer.

From version 3.5 on, the Nice instance gets a max memory of 1.2G (see -PjvmArgs=’-Xmx1200m’ in the run command in the run config). If this isn’t enough for your task at hand, you can increase the max memory by changing the number in the run config.


However, you shouldn’t carelessly increase the number if you’re running out of memory locally - it is probable that there’s something wrong, as 1.2G should be plenty enough to run any process within the Nice instance.

Setup OpenShift Client

Install Client


If you are running MacOS, just run brew install openshift-cli and ignore the rest of this chapter.

Download the client from the OpenShift Command Line Tools Page, extract it and move the oc binary into $PATH:

cd ~/Download
tar xf oc.tar
mkdir -p ~/bin
mv oc ~/bin/
ln -s ~/bin/oc ~/bin/kubectl
rm oc.tar

Enable Autocompletion

cat >>~/.bashrc <<EOF
eval \$(oc completion bash)

Install Docker (Optional)

Find your OS here and follow the instructions.

S3 Access Key

Ask operations (e.g. via Operations Public channel) to issue you an access key for our S3 storage. Once you retrieved the key, add it to ~/.aws/credentials like this:


The section must be called nice2, the name is hardcoded in Nice2.


For admins: how to issue a key is described in Create User.

S3 Access via s3cmd (Optional)

Install s3cmd:

apt install s3cmd

Configure s3cmd:

s3cmd --configure

Select the default for all options.

Adjust the following configuration entries in ~/.s3cfg:

host_base =
host_bucket = %(bucket)

The access and secret keys are the keys you obtained in the previous step.

Test access:

s3cmd info s3://tocco-nice-test >/dev/null
# no output expected

GitLab Account

  1. Create a GitLab Account

    You can create/reuse your personal account or create a Tocco-specific one. This is up to you.

  2. Add your SSH key

    Retrieve key: cat ~/.ssh/

  3. Enable 2FA

    You can use an authenticator app like andOTP for this or a U2F device (if you own one).

  4. Publish your username in the Slack channel public_operations and ask to be added to the group toccoag.

Setup Ansible


The following instruction have been tested on Debian, for other operating systems make sure you have this installed:

  • Python3

  • Ansible >= 2.7

And these Python packages:

  • dnspython

  • boto3

  • openshift

  • psycopg2

  1. Install Ansible and dependencies:

    apt install ansible python3-boto3 python3-dnspython python3-psycopg2 python3-openshift python3-passlib


    python3-openshift has only been available since Debian 12 “bookworm” and Ubuntu 22.10 “kinetic”. Install from pip on older versions:

    apt install python3-pip
    pip3 install openshift
  2. Clone the repository:

    mkdir -p ~/src
    cd ~/src
    # Access to group "toccoag" required
    git clone
  3. Get Ansible Vault password(s)

    Ansible Vault is used to store sensitive data (password, API keys) encrypted. You need a password to access them.

    There is two Vaults:

    1. One Vault that expects a file containing the password at ~/.ansible-password. This Vault is needed for server management and you generally only need it if you’re a part of the operations team.

    2. The second Vault expects a file containing the password at ~/.ansible-tocco-password. This Vault is need to manage our application and is generally needed by devs and ops.

    Ask one of your colleagues to get the Vault passwords and store in said files. Be sure to set proper permission on the files:

    (umask 0077; echo ${PASSWORD_GOES_HERE} >~/.ansible-password)
    (umask 0077; echo ${PASSWORD_GOES_HERE} >~/.ansible-tocco-password)

Setup Postgres

  1. Install Postgres:

    sudo apt install postgresql


    If you are running macOS, it is recommended that you install the multi-version app. This app allows you to run multiple postgres versions simultaneously and makes switching between versions easy. To install this app, browse to and download the first installer under “Additional Releases” called “ with all currently supported versions (Universal/Intel)”.

  2. Setup Postgres for use with Ansible:

    sudo apt install zstd
    sudo -u postgres psql -c "CREATE ROLE \"$(id -un)\" WITH LOGIN SUPERUSER"
    psql -c "CREATE DATABASE \"$(id -un)\"" postgres

    The above is required to make sure Ansible can be used to copy databases. This creates a Postgres user with admin rights and with the same name as the Linux user. This allows to login via Unix socket without providing credentials.

  3. Setup Postgres for local development

    Initially create role and user:


    Add an file to the customer (path customer/NAME/src/main/resources):


    See Copy Database on how to copy a database to your local postgres server. If the database name is not the same as defined in also set hibernate.main.databaseName.

Setup tco (Optional)

tco is a helper tool for anyone and contains many useful commands. See the tco repository for installation instructions.


On some machines, installation was not possible until the following packages were installed.

sudo apt install libssl-dev pkg-config build-essential

Setup Tocco Client (Optional)

See Setup

Setup Thunderbird as Mail Client (Optional)

Personal Inbox

  1. Enter your full name

  2. Enter mail address (<your-name>

  3. Skip password

  4. Select Configure manually

  5. Use these settings:

    Incoming server:

    • protocol: IMAP

    • server name:

    • port: 993

    • security: SSL/TLS

    • authentication method: OAuth2

    • Username: <your-name>

    Outgoing server:

    • protocol: SMTP

    • server name:

    • port: 587

    • security: STARTTLS

    • authentication method: OAuth2

    • Username: <your-name>

  • Click Done

  • Enter your password

Check all Folders for Incoming Mail

If you wish for Thunderbird to check all folders for mail:

  1. Go to PreferencesAdvancedGeneralConfig Editor…:

  2. Set mail.server.default.check_all_folders_for_new to true. Inbox (DevOps / Admins Only) is a shared inbox used by Operations.

  1. Open Account Settings

  2. Account ActionsAdd Mail Account…

  3. Enter your full name

  4. Enter as mail address

  5. Skip password

  6. Select Configure manually

  7. Use these settings:

    Incoming server:

    • protocol: IMAP

    • server name:

    • port: 993

    • security: SSL/TLS

    • authentication method: OAuth2

    • Username:

    Outgoing server:

    • protocol: SMTP

    • server name:

    • port: 587

    • security: STARTTLS

    • authentication method: OAuth2

    • Username:

  • Click Done

  • Select Sign in with other account and use your regular username (i.e. <your-name> and password to log in.