summaryrefslogtreecommitdiff
path: root/content/posts/proxmox-docker-workstation.md
blob: d10a027beba76363bbc99116dc817041047f5ea5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
---
title: "Proxmox Docker Workstation"
date: 2023-10-23T05:50:36+02:00
draft: false
tags: ["Linux","Server","Technology"]
categories: "Technology"
---

## Install Linux Mint Debian Edition 6

I am assuming, that you want to use a Debian based Operating System (not Ubuntu based) and you want Proxmox, Docker and GPT4All installed on your Laptop. Here I am using Linux Mint Debian Edition 6

### let's get started:

Go trough installation process

![mintinstall](/images/mint-install.png)

## Install Proxmox VE

Upgrade the system and install some basic tools
```bash
sudo apt update && sudo apt dist-upgrade -y
sudo apt install vim git curl wget htop ssh netcat-traditional openvpn
```
Cerate a Interface used for LXC Containers:
edit ```/etc/network/interfaces```

```bash
auto lo
iface lo inet loopback

auto enp2s0
iface enp2s0 inet static
        address 10.10.20.254/24

        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up iptables -t nat -A POSTROUTING -s '10.10.20.0/24' -o enp0s3 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '10.10.20.0/24' -o enp0s3 -j MASQUERADE

source /etc/network/interfaces.d/*
```

Edit hosts file, needed to install proxmox successfully
```vim /etc/hosts```

```bash
127.0.0.1       localhost
10.10.20.254   devstation.proxmox.local devstation
```

```hostname --ip-address```  
127.0.0.1  10.10.20.254 # should return your IP address here

Add Proxmox Repos and gpg key
```bash
echo "deb [arch=amd64] http://download.proxmox.com/debian/pve bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg 
```
Upgrade Packagebase, Install Proxmox Kernel and reboot
```bash
apt update && apt full-upgrade
apt install pve-kernel-6.2
systemctl reboot
````
Install Proxmox, remove Debian Kernel, update Grub bootloader and remove os-prober
```bash
apt install proxmox-ve postfix open-iscsi chrony
apt remove linux-image-amd64 'linux-image-6.1*'
update-grub
apt remove os-prober
```

We log into the webinterface with root user, so it needs to have a password
```bash
sudo -i
passwd
```
Now navigate to your browser with this URL
https://127.0.0.1:8006

Accept the security exception and enter your root password


![exception](/images/exception.png)

Now you should see this dashboard

![dashboard](/images/dashboard.png)

## install Docker and Portainer

```bash
sudo apt install docker.io docker-compose
sudo docker volume create portainer_data
sudo docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
```

Now you can navigate to the Docker Webinterface

https://127.0.0.1:9443

you should see something like this

![portainer](/images/portainer.png)

## Install GPT4All

comes in very hand for basic questions

```bash
wget https://gpt4all.io/installers/gpt4all-installer-linux.run
sudo chmod +x gpt4all-installer-linux.run
mkdir ~/Desktop
./gpt4all-installer-linux.run
mv ~/Desktop/GPT4All.desktop ~/.local/share/applications/
```

Now download a Language Model via GUI:

![models](/images/models.png)

**GPT4All is now ready to answer your questions**

![gpt4all](/images/gpt4all.png)