Linux serverlinux web serverNETWORK ADMINISTRATIONS

Host YOUR OWN WEBSITE! w/ Proxmox, Portainer, Nginx, Pork Bun! (Start TO Finish FULL GUIDE)

Don’t pay anyone ever again to host your website! HOST it YOURSELF straight from your HOME LAB!

Hosting your own website doesn’t have to be difficult at all. Follow this full guide step by step and you will have your own website hosed in no time!
Before getting to hosting, you will need to of purchased a domain name, downloaded ubuntu server and will have to do some port forwarding in your router, we show all this in the guide above!

Once the virtual machine running ubuntu server is up and running, we will install docker on the server then proceed to install portainer. (Dockers GUI). Then will wright a stack for WordPress (Website builder 100% FREE) then set up a proxy manger that directs traffic to our chosen domain name to the IP address of the server running the website. All commands and links are below to the ubuntu server and install docker and portainer, the word press stack is also below to copy and past!.

We will have to SSH into the server to copy and past commands, we use putty to do this.

Once portainer is installed go to the settings and replace the application template link to get nginx:
https://raw.githubusercontent.com/SelfhostedPro/selfhosted_templates/portainer-2.0/Template/template.json

#hosted #website #linux #server #wordpress #proxmox #nginx #putty #ssh #porkbun #portainer #docker #selfhosted #domain

Ubuntu Server: https://ubuntu.com/download/server
Putty: https://www.putty.org/
Pork Bun Domain Names: https://porkbun.com/

Installing Docker and Portainer:
# update software repositories
apt update
# install available software updates
apt upgrade -y
# clean apt cache
apt clean
# reboot the container
reboot now

DOCKER INSTALL:
# install prerequisites
apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common -y
# add docker gpg key
curl -fsSL https://download.docker.com/linux/$(awk -F’=’ ‘/^ID=/{ print $NF }’ /etc/os-release)/gpg | apt-key add –
# add docker apt repository
add-apt-repository “deb [arch=$(dpkg –print-architecture)] https://download.docker.com/linux/$(awk -F’=’ ‘/^ID=/{ print $NF }’ /etc/os-release) $(lsb_release -cs) stable”
# update software repositories
apt update
# install docker
apt install docker-ce docker-compose containerd.io -y
You now can run docker containers from the command line

Portainer:
# create a working directory for portainer
mkdir ~/docker/portainer_data -p
# run the portainer container
docker run -d -p 8000:8000 -p 9000:9000 –name=portainer –restart=always -v /var/run/docker.sock:/var/run/docker.sock -v ~/docker/portainer_data:/data portainer/portainer-ce
# output the ip docker host address
ip addr

WordPress Stack:
version: ‘3’

services:
# Database
db:
image: mysql:5.7
volumes:
– db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
networks:
– wpsite
# phpmyadmin
phpmyadmin:
depends_on:
– db
image: phpmyadmin/phpmyadmin
restart: always
ports:
– ‘8080:80’
environment:
PMA_HOST: db
MYSQL_ROOT_PASSWORD: password
networks:
– wpsite
# WordPress
wordpress:
depends_on:
– db
image: wordpress:latest
ports:
– ‘8977:80’
restart: always
volumes: [‘./:/var/www/html’]
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
networks:
– wpsite
networks:
wpsite:
volumes:
db_data:

Stay Connected with US!
Facebook: https://www.facebook.com/homelabnetworks
Instagram: https://www.instagram.com/homelabnetworks/
Twitter: https://twitter.com/homelabnetworks

source

by Home-Lab-Networks

linux http server

8 thoughts on “Host YOUR OWN WEBSITE! w/ Proxmox, Portainer, Nginx, Pork Bun! (Start TO Finish FULL GUIDE)

  • Anyone else get an error pasting the wordpress stack? There is an error in the yaml syntax: YAMLSemanticError: Implicit map keys need to be on a single line

  • All of that to end using wordpress… such a good taste until the end.
    Lol, just messing with you. Cool stack! I'm looking into something like this.

  • Hello, thank you so much for your hard work. Please tell me, I started making a website (so far I only need it inside the network, without access to the outside world) I stopped at the fact that I can't go to the IP:81/login page, NGINX asks for an email and password. I can't figure out what email and password are there

  • Hi, I am using Ubuntu 20.04 on Virtual Box.
    Next JS – Docker Container
    NGINX – Docker Container
    Node Backend – Docker Container
    MYSQL – Docker Container.

    I have been able to successfully deploy the containers and access my App on http://localhost. I then purchased a domain and updated the A record to point to my Public IP Address of the machine (Ubuntu VM). I am getting an Invalid Host Header error. Any idea ?

    Pings work file and point to the machine ip address…

  • Run WP on docker is best for performance? i think install web server directly on VM for speed better?

  • I need to start playing with Docker again. I should finish modifying a part so I can mount a PSU in the chassis, set up a second node for Proxmox, cluster them, setup Docker VMs and cluster them also. poof High availability.. kinda. Kinda because I only have one ISP. 🤣

Comments are closed.