Welcome to the repository for documenting my journey in managing an on-premises Ubuntu server using LXC/LXD, Docker and Portainer for containerized application hosting. This repository includes setup instructions, storage configurations, and network configurations.
The primary motivation behind this project is to hone my skills as a DevOps Engineer and to gain hands-on experience in system operations. While cloud-based VMs are managed by providers, I wanted to take on the challenge of managing a server myself.
Docker is used to create, manage, and configure containers on the server, with Portainer providing a web-based interface for easier management. The following are key steps and configurations:
docker run -d --name my-container ubuntu:24.04docker ps| Command | Description |
|---|---|
df -h |
Check available disk space |
free -h |
Display memory usage |
docker ps |
List all running Docker containers |
docker start <container-name> |
Start a specific container |
docker stop <container-name> |
Stop a specific container |
docker rm <container-name> |
Delete a container |
docker volume create <volume-name> |
Create a Docker volume |
docker-compose up -d |
Start services defined in a Docker Compose file |
LXD is used to create, manage, and configure Linux containers (LXC) on the server. The following are key steps and configurations:
snap to ensure the latest stable version.ubuntu:24.04, for each application.The server uses WiFi for network connectivity, which can be complex to configure. The following ports are used for various services:
| Port | Service | Description |
|---|---|---|
| 80 | NGINX (Reverse Proxy) | Forwarding requests for Jenkins and other services. |
| 8080 | Jenkins (Proxied to 80) | Automation server (proxied via NGINX). |
| 8443 | LXD WebUI | LXD Web interface. |
| 8000 | Portainer | Portainer management endpoint. |
| 9443 | Portainer (HTTPS) | Secure management endpoint. |
| 8081 | cAdvisor | Container metrics and insights. |
| 6379 | Redis | In-memory database. |
| 3000 | Grafana | Monitoring and visualization. |
| 9090 | Prometheus | Metrics monitoring system. |
| 9100 | Node Exporter | System metrics for Prometheus. |
This repository is primarily for documenting my learning experience, but contributions or feedback are welcome. If you have suggestions or improvements, feel free to open an issue or submit a pull request.
For any questions or suggestions, feel free to open an issue or contact me directly.