tinfoil-hat.net-relaunch/content/posts/proxmox-docker-workstation.md
2024-05-30 19:24:56 +02:00

127 lines
3.2 KiB
Markdown

---
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)