Installing on Linux

Download ManicTime Server

Download ManicTimeServer.tar.gz file and extract it to some folder (or use Docker image).

Install ManicTime Server

Run

./setup

Setup will open a browser at http://localhost:8080. It will only listen for connections from localhost, so you will only be able to see the setup from a browser on the same machine.

If you want to run setup on a different port, run the setup with

./setup -p 8090

Then go to setup at http://localhost:8090.

If you are installing it on a Linux without GUI, you can run it with:

./setup -publicurl

Then it will listen for all connections on some random url, which is seen in the console log when you start the setup.

Database

By default, ManicTime Server will use SQLite database, which we recommend you use only for testing or for personal server. If you want to use PostgreSQL or MS SQL, then you need to install chosen database engine before you run ManicTime Server installer. Which database to choose?

Administrators

During install you will have an option to create administrators. We suggest you create at least one, so that you can then connect to ManicTime Server and make other changes to default settings.

Run ManicTime Server

When setup ends start the server with:

./ManicTimeServer

[Optional] Using HTTPS

ManicTime Server on Linux does not offer native SSL support, but you can still use SSL with reverse proxy. These settings are needed for reverse proxy:

Reverse proxy headers

Reverse proxy must be configured to forward following headers to ManicTime server:
X-Forwarded-Proto: <protocol> More info

X-Forwarded-Host: <host> More info

Example:

X-Forwarded-Proto: https
X-Forwarded-Host: demo.manictime.com

Trusting reverse proxy

ManicTime server only trusts forwarded headers by known proxies. By default, only loop-back addresses are configured as known proxies (127.0.0.1). If reverse proxy has a different IP address, it needs to be configured in ManicTimeServerSettings.json using CIDR notation:

{
    "web": {
        "reverseProxy": {
            "addresses": [
                "<proxy ip address>"  
        
            ],
            "networks": [
                "<proxy network>"  
        
            ]
        }
    }
}  

Example 1: trust all proxies on all networks

{
    "web": {
        "reverseProxy": {
            "addresses": [  
                "*"
            ],
            "networks": [  
                "*" 
            ]
        }
    }
}  

Example 2: trust only proxies on a known IP address (IPv4 and IPv6)

{
    "web": {
        "reverseProxy": {
            "addresses": [
                "10.0.0.1",
                "::ffff:10.0.0.1" 
            ]
        }
    }
} 

Example 3: trust only proxies on a known network (IPv4 and IPv6)

{
    "web": {
        "reverseProxy": {
            "networks": [
                "10.244.0.0/16",
                "::ffff:10.244.0.0/16"
            ]
        }
    }
}  

Nginx

You can find more information on how to setup reverse proxy with Nginx here.

Troubleshooting

Problem 1: You get error 'Unknown error: invalid_request' when testing connection:

Solution 1: If you have configured redirects from HTTP to HTTPS, make sure you are using temporary redirects (HTTP status code 307) and not permanent redirects (HTTP status code 301).

Still having problems? Take a look at this guide.

Running ManicTime Server at startup

You can use Systemd to run ManicTime Server at startup.

  1. Create a file named manictime-server.service with the following contents:

    [Unit]
    Description=ManicTime Server
    [Service]
    Type=notify
    ExecStart=/<path to ManicTime Server folder>/ManicTimeServer
    Restart=on-failure
    RestartSec=10
    [Install]
    WantedBy=multi-user.target
    

    ExecStart needs to point to ManicTimeServer file on your drive.

  2. Copy the file to /etc/systemd/system, which you can usually only do with admin rights. Use something like

     sudo cp <path to file>/manictime-server.service /etc/systemd/system
    
  3. Once file is in /etc/systemd/system, in Terminal run:

     sudo systemctl daemon-reload
    

    It will reload Systemd service.

  4. Check the status of the service with:

     sudo systemctl status manictime-server
    

    It should show that the service is loaded, but not yet running.

  5. To start the service:

     sudo systemctl start manictime-server
    

    Now you should be able to go to a browser and navigate to a localhost:8080 (or different port if you changed the default).

  6. Next enable it, so it will start at next system startup:

     sudo systemctl enable manictime-server
    

    Next time you restart the system, ManicTime Server should be up and running.

Connecting ManicTime clients

Chances are, you installed ManicTime Server on a machine within your network somewhere. So any device on the network can now connect to it. Local network addresses usually start with 192.16*... Just use the correct IP:port and it should be accessible from any device on the same network.

If you want to connect from a device which is outside of your network, then you need to configure port forwarding or use some other way, so that the machine is visible outside of your network. (try googling "port forward < router model>" to see how to enable port forwarding on your router).

Making a connection from ManicTime manually

Before you try connecting from any ManicTime Client, first open a browser on that device and try to open a ManicTime Server web page. Once you have successfully connected to ManicTime Server, proceed with creating a connection from ManicTime Client.

If you have any problems or questions, please send an email to support@manictime.com