Skip to content

Latest commit

 

History

History
106 lines (68 loc) · 4.15 KB

installation.md

File metadata and controls

106 lines (68 loc) · 4.15 KB
description
Simple tutorial to make your server run with Tevun

Installation

1. Requirements

Verify that your server has the following requirements:

  • Bash (echo ${BASH_VERSION}): +4.x.x
  • Git (git --version): git version +2.10.x
  • Docker (docker -v): Docker version +18.0x.x-ce
  • Docker Compose (docker-compose -v): docker-compose version +1.2x.x

2. Download and install

Access your server using ssh

$ ssh root@<server>

Then create the installation dir, clone repository and create the symlink to use command tevun in terminal (copy and paste the four lines in the terminal, read the instructions - always read what you execute - and then press enter)

mkdir -p /usr/share/tevun && \
git clone https://github.com/tevun/server.git /usr/share/tevun && \
cd /usr/share/tevun && \
ln -s $(pwd)/tevun.sh /usr/bin/tevun

Now we can perform tevun in terminal.

Output command "tevun" when we do not pass parameters

3. Setting up Tevun

Let's configure Tevun on your server. First, let's check the user settings and permissions, and then let's configure Tevun.

3.1. Users and permissions

{% hint style="info" %} if you already have an user with the necessary permissions to run your containers or this is not relevant to your scenario you can just disregard this topic. {% endhint %}

It is important that you avoid using your root user via SSH. It is recommended that you create an user that is limited in order to be able to access your server via SSH. Since we are dealing with docker, we need to have a local user with the same UID that the images will use. Usually this UID is the 1000. To facilitate this operation you can optionally use the command below, where <name> is the name you want to assign to the new user.

sudo tevun user <name>

{% hint style="warning" %} This command will also add the new user to the docker group and sudoers group {% endhint %}

3.2. Access policy via SSH

You can use a single Tevun command to configure a less privileged user to access SSH and disable root access by using the command below.

{% hint style="danger" %} Just use it if you know what it's doing! {% endhint %}

sudo tevun ssh <name>

3.3. Tevun setup

To perform the setup use the following command in the terminal, replacing <user> with the name of the user that will be used to manipulate the containers.

sudo tevun setup <user>

The setup command will ask some stuffs.

  • Host: used to generate the remote paths
  • HTTP Port: sets the HTTP port for the tevun container outside reverse proxy
  • HTTPS port: HTTPS port used outside proxy
  • SSH port: used to generate the remote paths
  • User ID to be used in project: define the owner of projects

After perform this command you can access the your server in port 1080 (the default value for HTTP port) to see if it works.

Accessing outside reverse proxy using a custom port

Access the default Tevun page through the reverse proxy

3.4. What happened in my server?

Setup command created 3 containers to make all stuffs running:

  • nginx-proxy: a nginx instance to make the reverse proxy and allow we up various containers to the same port
  • nginx-letsencrypt: a listener to docker socket that run LetsEncrypt bot to VIRTUAL_HOST property of containers environment
  • tevun: nginx server configured to run CGI and communicate with docker of host

If you are here and is all right you can start creating projects your server! Go to Getting Started to use the resources.

Check How it works session to understand how the Tevun Initiative.

In case you got issues in this process keep in touch. You can open issues in our repo or call in telegram = )