Clockify comes as a plug-and-play Docker image, so all you need to do is download the installation file and your license, and run it using Docker.

Installation steps #

  1. Log in to your Server Admin portal
  2. Click "Configure" and enter:
    1. URL domain - the URL from which your users will access Clockify
    2. Email domains - users that have those email domains will be able to use your Clockify account
  3. Click "Download installation file"
  4. Put the file you've downloaded ("docker-compose.yml") on your server
  5. Make sure you have Docker and Docker Compose installed
  6. Log-in into Clockify docker repository by running "docker login docker.clockify.me" using your Server Admin email and password (the same one you use for logging into the Server Admin Portal)
  7. Run Clockify on the server with this command: "docker-compose up -d"

Accessing and setting up Clockify #

Once you have Clockify up and running, you can access the client application via the URL domain you've entered in the Server Admin portal (installation step 2).

Default login credentials for the app (which you can change in Profile settings inside the app):

  • User name: admin@clockify.me
  • Password: (check your welcome email)

To set up SSO, email delivery, default workspace, and other aspects of the system, use Admin Panel.

To manage license (billing, users seats, email domains), use Server Admin portal.

Server recommendations #

  • Ubuntu Server Linux
  • 4GB RAM 
  • 50GB hard drive

Backups #

We recommend making regular backups using scripts.

Example:

sudo docker-compose exec db sh -c 'mongodump -u "$MONGO_INITDB_USERNAME" -p "$MONGO_INITDB_PASSWORD" -d "$MONGO_INITDB_DATABASE" --archive' > clockify-$(date -I).dump

Editable environment variables #

web:
    FRONTEND_URL: Address where your Clockify instance can be reached at
    SITE_ADDRESS: If set to be same as FRONTEND_URL, it will start Clockify as HTTPS, by default using Let's Encrypt certificate. Setting it to :80 it will start Clockify as HTTP only. If you don't want to use Let's Encrypt certificate, you can place your own .pem file (.key + .crt bundle) in the same folder with docker-compose.yml
Installing Legacy version (Non-Docker)

Clockify consists of 3 main parts: API server, database server, and Web server. They can be on the same machine, but depending on the available resources you might want to deploy them on separate machines.

Database server #

You should first set up the database server, as API can’t run without it. API expects an instance of MongoDB v 4.2.

Creating a database user

If we assume that:

$domain=mydomain
$username=admin
$password=AdminPasswordYouChoose

We should add the appropriate user with the following commands:

 mongo --host $host
> use admin
> db.createUser({user:"$username", pwd:"$password", roles:[{role:"root", db:"admin"}]})
> use clockify
> db.createUser({user:"$username", pwd:"$password", roles:[{role:"readWrite", db:"clockify"}]}) 

API server

API server uses Java. You need Oracle Java 8 or OpenJDK 8. Clockify API ships in a form of a JAR file that needs to be run with appropriate parameters.

Running API server

If we assume that:

$profile=default,selfhosted
$mongoConnectionString=mongodb://$username:$password@$domain:$port/clockif
$tokenKey=SomeRandomString

We should run the API with the following command:

sudo java -jar -Dspring.profiles.active=$profile  clockify-1.0.jar --authentication.token.xauth.key=$tokenKey --database.mongoDb.url=$mongoConnectionString

Successfully configured API server will produce the console output similar to this:

INFO [main] [] com.clockify.BackendApplication : Started BackendApplication in 10.579 seconds (JVM running for 11.03)

Logs are stored on

/var/log/clockify/latest.log

It is recommended to run the Java process in the background. How you will configure this depends on your operating system.
API needs to be accessible from outside network under the /api path (for example time.mydomain.com/api). Again, configuration of this depends on the operating system and the web server in place.

Web server #

Web server hosts the static files that make the JavaScript frontend. Frontend ships as a compressed package that should be uncompressed and configured as a root of the web server of choice. How you will configure it depends on your web server.