This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Getting Started

Here you will learn step by step how to set up your own 2log instance.


2log is a free OpenSource project that can be used freely and without charge under the terms of the GPL v.3/ AGPL v.3. This means that the authors of do not accept any liability for any damage or infringement of valid rights caused by the use of


In order to operate 2log, certain technical requirements must be met.

Server and Network

To run your own 2log instance, a Docker-enabled computer with x86-64 architecture is recommended. Since 2log is implemented in a very resource-efficient way, a headless Linux server with a 1.4GHz dual core and 4GB memory is sufficient.

The 2log hardware components communicate with the server via WiFi. Accordingly, the server and the IoT devices must be able to reach each other over a 2.4GHz network.

For the operation of 2log the server must be able to send e-mails. For this purpose, an SMTP mail server is required.

Machines and devices

Since the 2log Switch controls access to the devices by connecting and disconnecting power, it is important to ensure that all connected machines can handle this. Since 2log detects via power consumption whether the machine is in stand-by mode or actually working, it is ensured that a machine is never switched off from operation.

Depending on the smart sockets used for the 2log switches, it must be ensured that the machines do not draw more current than is supported by the connectors.

1 - Setup the Server Application

Learn how to set up a 2log instance

The easiest way to set up your 2log instance is to use Docker.

Using Docker

The easiest way to set up your 2log instance is to use the Dockerfile provided in the repository. First, make sure that Docker is installed with the associated tool docker-compose.

mkdir ~/2log
cd ~/2log
docker-compose up

By default, the WebAssembly frontend can be reached via Port 8080. If the server is running on your local machine, just visit http://localhost:8080 in your web browser and the UI should come up. You can now login into your instancy by accessing the WebSocket service which is by default accessible via port 4711. To check your instance is up and just type ws://localhost:4711. The initial default login is “admin” with passwort “password”. Don’t forget to change the password after the first login!

Setup Mail Server

The mail server can be configured directly via the environment variables. The easiest way to define these settings is directly in the docker-compose file.

#--------- Mail Server config
#- MAIL_USER=admin
#- MAIL_PASS=password
#- //sender eMail address
#- // readable sender name (optional)
#- MAIL_PORT=587
Variable Description Example
MAIL_HOST How to reach the mailserver
MAIL_USER The login string admin
MAIL_PASS The mail server password xF5s42F1337@r!
MAIL_ADDR Sender eMail Adesse
MAIL_CONNECTION_TYPE Security settings. Supported are TLS, SSL or TCP TLS
MAIL_PORT The port where the mail server is listening 587

Update the instance

To get the latest features and bug fixes it is recommended to update the 2log server regularly.

Updating the 2log instance when using the Docker Compose file is very simple. Just enter the following commands in the command line:

docker-compose pull 2log
docker-compose up

Backup data

All operational data of the 2log instance is stored in the folder ./ It is strongly recommended to back up the folder at regular intervals.

2 - Let your community grow!

Learn how to add or import members to your instance

To add new members you can either use the web portal or the 2log Admin app.

2log has two separate user administrations. Members and administrators are managed separately and independently. This page is only about adding members.

Add a single member

The easiest way to add a new member is via the app or web portal. The procedure is identical for both variants.

  1. Log in to your 2log instance with your admin account.
  2. Switch to the “User” menu item
  3. Click “New user”
  4. Fill in the form fields.
    • The alias field is optional. The alias must be unique and can be used by the members besides the email address to log in. If there is already a user with this alias, an error message will be displayed. The alias can also be used to call the user by his nickname.
    • The eMail address is mandatory and must be unique. If there is already a user with this email address, an error message will be displayed.
    • Currently there are three different roles: “Member”, “employee” and “guest”. Unlike “employee”, “guest” is not yet used productively. The role Employee is relevant for the machine time accounting where there is the option “Free for employees”.
  5. In the “Account balance” box, a starting balance can be set and an RFID card can be added.
    • If you use the app on an RFID-enabled smartphone, you can scan the new card directly with your phone.
    • Alternatively, the use of an “Admin Dot” is possible. This can be set up in the “Administration” area and allows convenient reading of cards from the web app.
  6. Grant access rights to individual machines or groups
  7. Click on “Create user”.

Congratulations! This is your first community member.

Add members with the CSV importer

If many users are created at once, for example when the new class starts the semester, the CSV Importer is the better choice.

  1. Log in to your 2log instance with your admin account.
  2. Switch to the “User” menu item
  3. Click “CSV Import”
  4. Download the sample template to see an example of a valid import file.
    • The importer uses the labeling of the header, i.e. the first line, to assign the individual fields. Accordingly, it does not cause any problems if additional fields or a different order is used.
  5. Upload your CSV File. You will now see a preview of the records found.
    • If no role has been assigned yet, you can assign one using the button in the header of the preview. The same applies to the group. It is possible to add a group permission to a record uploaded via CSV.
  6. Confirm the import with a click on “start import”.

3 -