Guidance on usage: Trac System Server on Ubuntu 18.04

Configuring and connecting to Trac System Server on Ubuntu 18.04

To start the server, run the VM through Azure Portal.

  1. For the connection to the server, you should know the IP address of the VM. You can find it in the personal account of Azure. (You need to select the virtual machine from the list. By clicking the item “Overview”, your IP is displayed in the line “Public IP Address”).
  1. To work, you must open port 80 (TCP) in the network properties in the Azure firewall.
  1. To open the site, go to the following address in any browser convenient for you, http://vm_ip.
  1. You will be asked to select the project. The system has already created one project called “Default project” by default.
  1. For further setup and site operations, see the manuals and setup guides. You can find links at the bottom of the page in the “Starting Point” section or the “Help/Guide” link in the upper right of the page.
  1. To manage with a server, you should connect to a VM.
    1. With the PuTTY application 

To do this, you need the PuTTY application to connect via ssh. You can download it at the following link – Download

Run PuTTY, enter the VM address in the “Host” field (1) and click “Open” (2) to connect.

In the opened console, you will need to enter a username and password that were specified while the VM was being created (you’ll not see the password in the console while entering it). 

  1. With OpenSSH

In the Windows 10 operating system (starting with version 1809), an OpenSSH client is available, with which you can connect to Linux servers via SSH. If Windows 10 is suitable and the OpenSSH client is installed, you can start connecting via SSH. To do this, launch a normal Windows command prompt and enter the command “ssh user@*vm_ip*”, where “user” is the username that was specified while creating the virtual machine and “*vm_ip*” is the VM IP address.

Enter a password that was specified while creating the virtual machine (you’ll not see the password in the console while entering it). 

  1. After logging in, run the following command:

> sudo su (1)

> mkdir -p /var/local/trac/new_project (2)

> trac-admin /var/local/trac/new_project initenv (3)

To replace “new_project”, enter the directory title for your new project

Enter the title of the new project (4) and press “Enter” twice (5)

  1. Stop the Trac service by the following command:

> systemctl stop trac

  1. Open the file in the nano text editor:

> nano /lib/systemd/system/trac.service

  1. Take the following actions in sequence:

Following the default project path, add your new project path (for example, /var/local/trac/new_project).

Press Ctrl+X to exit the file

Press “Y” to save the changes in the file

Press “Enter” to confirm the changes in the file

  1. To apply the changes, enter the following command:

> systemctl daemon-reload

  1. Launch the service again with the following command:

> systemctl start trac

  1. The new project will be displayed on the start page

Adding new users

  1. Connect to the VM via ssh (please see “Creation of new projects” above, Steps 1-6)
  2. Enter the following command:

> su

Command examples for adding a user:

Adding a user to the portal:

htpasswd /var/local/trac/.htpasswd newloginname

Assigning administrative rights for the portal

trac-admin /var/local/trac/default_project permission add newloginname TRAC_ADMINNow you can use, configure and manage Trac System Server on Ubuntu 18.04