# Let's play with cloud [part 1]


```python
print "Hello World!"
``` 


In my first article I want to present to you an introduction to **Rancher** and **Hetzner** - this is required for the next my articles.

Why Rancher with Hetzner?
Answer is very simple - self-hosted and cheap cloud.
This is for dev's who know not only how to configure domain DNS

Let's start right now :D

1. Create account on  [Hetzner](https://hetzner.cloud/?ref=5I77nv2sLh9V)  if you don't have yet
2. When you login to Hetzner, create 1 server (name: CX21) with 2vCPU and 4GB RAM, don't forget to select Ubuntu (is default)
3. When server was created login to root and run:
```bash
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
``` 
4. Install `docker-compose`
```bash
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
``` 
5. Create dir for rancher
```bash
mkdir ~/rancher-docker && cd ~/rancher-docker && mkdir volume
``` 
6. Create new file `docker-compose.yml` and paste config:
```yml
version: "3"
services:
  rancher:
    image: rancher/rancher:v2.5.2
    privileged: true
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./volume:/var/lib/rancher
    restart: always
    #command: "--acme-domain your.domain"
``` 
*Uncomment `command` if you want SSL*
7. Run **Rancher**
```bash
docker-compose up -d
``` 
8. Watch logs:
```bash
docker-compose logs rancher -f
``` 

Go to your server ip or domain if you configured and create admin account in Rancher


Now we can do something in next articles :)





