Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
Lutim
Lutim
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Fiat Tux
  • Hat softwares
  • LutimLutim
  • Wiki
  • installation

Last edited by Armando Lüscher Oct 11, 2020
Page history

installation

Installation

Want to update your Lutim instance? Have a look at the update page.

Installation

After installing Carton:

git clone https://framagit.org/fiat-tux/hat-softwares/lutim.git
cd lutim

If you don't want to use the LDAP authentication system, add the following argument to the commands below:

--without=ldap

If you don't want to use the htpasswd authentication system, add the following argument to the commands below:

--without=htpasswd

If you don't want to use the cache system, add the following argument to the commands below:

--without=cache

If you don't want to use the memcached-based cache system, add the following argument to the commands below:

--without=memcached

If you don't want to use the minion job queue, add the following argument to the commands below:

--without=minion

If you want to use SQLite:

carton install --deployment --without=test --without=postgresql

If you want to use PostgreSQL:

carton install --deployment --without=test --without=sqlite

If Carton can't install modules whose name begins with Mojolicious::Plugin::FiatTux::, see this comment.

Then:

cp lutim.conf.template lutim.conf
vim lutim.conf

You can go to the configuration page or just read the self-documented configuration file.

After configuring Lutim, you can start it from command line:

carton exec hypnotoad script/lutim

But it's easier to use your system's init.

Init files

InitV

cp utilities/lutim.init /etc/init.d/lutim
cp utilities/lutim.default /etc/default/lutim
chown root:root /etc/init.d/lutim /etc/default/lutim
vim /etc/default/lutim

You need to change LDIR and USER in /etc/default/lutim to fit your installation. Then:

/etc/init.d/lutim start

Systemd

cp utilities/lutim.service /etc/systemd/system/
vim /etc/systemd/system/lutim.service

You need to change User, WorkingDirectory and PIDFile in /etc/systemd/system/lutim.service to fit your installation. Uncomment the part about postgresql.service if you want to use Lutim with PostgreSQL. Then:

systemctl daemon-reload
systemctl enable lutim.service
systemctl start lutim.service

If you want to use Lutim with Minion:

cp utilities/lutim-minion@.service /etc/systemd/system/
vim /etc/systemd/system/lutim-minion@.service

Same thing, you need to do some changes: User and WorkingDirectory.

systemctl daemon-reload
systemctl enable lutim-minion@1.service
systemctl start lutim-minion@1.service

What you put after the @ does not matter. A template service like this allows you to add as many workers as you need (if one worker is not enough to process the job queue):

systemctl enable lutim-minion@2.service
systemctl start lutim-minion@2.service

And so on…

Upstart

cp utilities/lutim_upstart.conf /etc/init/lutim.conf
cp utilities/lutim.default /etc/default/lutim
vim /etc/default/lutim

You need to change LDIR and USER in /etc/default/lutim to fit your installation. Then:

start lutim

Putting Lutim behind Nginx

Lutim is served by hypnotoad, a production-ready web server, but there's a good chance you want to serve other web sites on your server too. Your best shot is to use Nginx.

Here's a valid Nginx configuration:

server {
    listen 80;
    # No need to have a `root` parameter.

    # This is important for user's privacy !
    access_log off;
    error_log /var/log/nginx/lutim.error.log;

    # This is important ! Make it OK with your Lutim configuration
    client_max_body_size 40M;

    location ~* ^/(img|css|font|js)/ {
        try_files $uri @lutim;
        add_header Expires "Thu, 31 Dec 2037 23:55:55 GMT";
        add_header Cache-Control "public, max-age=315360000";

        # HTTPS only header, improves security
        #add_header Strict-Transport-Security "max-age=15768000";
    }

    location / {
        try_files $uri @lutim;

        # HTTPS only header, improves security
        #add_header Strict-Transport-Security "max-age=15768000";
    }

    location @lutim {
        # Adapt this to your configuration
        proxy_pass http://127.0.0.1:8080;

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        # If you want to log the remote port of the image senders, you'll need that
        proxy_set_header X-Remote-Port $remote_port;

        proxy_set_header X-Forwarded-Proto $scheme;

        # We expect the downsteam servers to redirect to the right hostname, so don't do any rewrites here.
        proxy_redirect off;
    }
}

If you use Lutim under a subdirectory like /lutim/, change the prefix configuration option and prefix the Nginx locations with /lutim (or whatever you choose).


You can now go to the cron jobs page or go back to wiki's homepage.

Clone repository
  • Clients
    • libraries
  • api
  • broadcast message
  • configuration
  • contribute
  • create theme
  • cron jobs
  • dependencies
  • Home
  • installation
  • memcached
  • migrate from sqlite to postgresql
  • social networks integration
  • softwares integration
  • update