ππ¨πππππ‘π π π¦πππ-π ππ‘ππππ πππ ππ‘πππ₯ππ‘ππ ππ‘π©ππ₯π’π‘π ππ‘π§ π’π‘ ππͺπ¦
From a Usage Limitation to a Hands-On AI Infrastructure Project
Technical Project Blog / Case Study
βI donβt always need the best hardware to learn. Sometimes, I just need a problem worth solvingβ
TABLE OF CONTENTS
1. Introduction
2. The Problem I Wanted to Solve
3. Why I Decided to Build
4. My Learning Environment
5. Project Goals
6. Architecture
7. Technology Selection
8. AWS EC2 Setup
9. Linux Server Preparation
10. Installing Ollama
11. Deploying Llama 3.2 3B
12. Installing Docker
13. Deploying Open WebUI
14. Connecting Open WebUI with Ollama
15. SSH Tunneling
16. First Successful Test
17. The 2 + 2 Problem
18. Docker β Ollama Troubleshooting
19. Open WebUI Troubleshooting
20. CPU vs GPU Limitation
21. What I Learned
22. My Troubleshooting Method
23. Cyber Nerds & Mentorship
24. Future Improvements
25. Final Takeaways
- INTRODUCTION
I didnβt start this project because I had the perfect infrastructure. I started because I had a problem.
While experimenting with AI tools, I reached a practical usage limitation. Instead of simply waiting for the limit to
reset, I started thinking about a different question:
Can I build and manage my own LLM environment?
That question became the starting point for this project. My goal was not to train a new language model from
scratch. My goal was to understand what happens behind the interface of an AI application.
I wanted to understand how an LLM runs, where inference happens, how a UI communicates with a model, how
Docker communicates with Ollama, how an application discovers a model, and what happens when something fails.
2. THE PROBLEM I WANTED TO SOLVE
I wanted an AI environment that I could control, experiment with, troubleshoot, access remotely, understand
technically, and modify based on my requirements.
Problem β Research β Architecture β Implementation β Testing β Failure β Troubleshooting β Working
Environment.
3. WHY I DECIDED TO BUILD
I didnβt want to just consume AI. I wanted to understand the infrastructure behind it.
Using an AI application is one experience. Building the environment that runs an AI model is a completely different
learning experience.
When something works, I learn why it works. When something fails, I learn why it failed.
4. MY LEARNING ENVIRONMENT
My journey at Sri Shanmugha College of Engineering and Technology has given me an environment where I
could learn, experiment, ask questions and work on technical projects.
My exposure to Cyber Nerds influenced the way I approach problems β not just looking for an answer, but
understanding the reason behind the answer.
I was also motivated by Sakthi Bro, whose guidance and encouragement helped me maintain a mindset of
continuous learning and experimentation.
5. PROJECT GOALS
Deploy an LLM runtime; run a language model on the cloud server; deploy a web interface; connect the interface to
the model runtime; access it securely from my MacBook; test the complete request flow; and troubleshoot failures
layer by layer.
6. ARCHITECTURE
The project combines a MacBook client, an SSH tunnel, an AWS EC2 server, Docker, Open WebUI, Ollama and
Llama 3.2 3B
π MacBook
β
β SSH Tunnel
βΌ
βοΈ AWS EC2 Server
β
βββ Ubuntu Linux
β
βββ Docker
β β
β βββ Open WebUI
β
βββ Ollama
β
βΌ
π§ Llama 3.2 3B
β
βΌ
Inference
β
βΌ
AI Response
β
βΌ
MacBook
7. TECHNOLOGY SELECTION
AWS EC2 β Cloud compute
Ubuntu β Server operating system
Docker β Containerization
Open WebUI β User interface
Ollama β Model runtime
Llama 3.2 3B β Language model
SSH β Secure remote administration
SSH Tunnel β Secure local access
ServerCat β Server management/access
8. AWS EC2 SETUP
My working environment used an m7i-flex.large EC2 instance with 2 vCPUs, 8 GiB RAM, Ubuntu, and 50 GiB gp3
storage.
One constraint was working within AWS Free Tier resources. I therefore did not have access to the GPU-backed
compute I would normally prefer for high-performance inference. I treated this as an engineering constraint rather
than a blocker.
9. LINUX SERVER PREPARATION
Before installing the AI components, I verified the server resources and operating environment.
sudo apt update
uname -a
free -h
df -h
lscpu
10. INSTALLING OLLAMA
Ollama acts as the runtime layer responsible for serving the language model and exposing an API that applications
can communicate with.
curl -fsSL https://ollama.com/install.sh | sh
ollama β version
sudo systemctl status ollama
11. DEPLOYING LLAMA 3.2 3B
Llama 3.2 3B is the language model. Ollama is the runtime used to run and interact with that model. Keeping those
concepts separate was an important part of understanding the stack.
ollama pull llama3.2:3b
ollama list
ollama run llama3.2:3b
12. INSTALLING DOCKER
Docker provides the containerized environment used for Open WebUI. This also introduced a networking boundary
between the application container and the host service.
sudo apt install docker.io -y
sudo systemctl enable β now docker
docker β version
Get ars.udhayanβs stories inΒ yourΒ inbox
Join Medium for free to get updates fromΒ thisΒ writer.
13. DEPLOYING OPEN WEBUI
Open WebUI provides the user-facing chat interface. It does not replace Ollama; it communicates with the model
runtime.
14. CONNECTING OPEN WEBUI WITH OLLAMA
Open WebUI was running inside a Docker container while Ollama was running as a service on the EC2 host. The
two layers therefore needed reliable communication.
15. SSH TUNNELING
SSH login and SSH tunneling are different. The tunnel allowed the MacBook to access the private Open WebUI
service without exposing that service publicly.
ssh -i ~/Downloads/apple.pem -L 3001:127.0.0.1:3000 ubuntu@16.16.56.173
Browser: http://localhost:3001
16. FIRST SUCCESSFUL TEST
After connecting the components, I reached the point where I could open Open WebUI from my MacBook and send
requests to the model running on the AWS server.
17. THE 2 + 2 PROBLEM
One of the most interesting moments came during a simple validation test. I asked: What is 2 + 2?
During an earlier test, Open WebUI unexpectedly responded that it did not understand the context. Instead of
assuming that the model was broken, I tested the model directly through Ollama.
Prompt: Reply with only the number: 2 + 2 =
Response: 4
This changed the debugging direction. The model itself was able to perform the task, so I started investigating the
layers between the UI and the model.
18. DOCKER β OLLAMA TROUBLESHOOTING
Instead of saying βOpen WebUI is not workingβ, I broke the problem into layers: Ollama, API, Docker, Open WebUI,
SSH and MacBook.
Each layer was tested independently. This made it possible to distinguish service failures from communication
failures.
sudo systemctl status ollama
curl http://127.0.0.1:11434/api/generate
sudo docker exec open-webui curl -s http://host.docker.internal:11434/api/generate
19. OPEN WEBUI TROUBLESHOOTING
When Open WebUI showed a load-related problem, container logs became an important source of evidence. The
logs showed successful API requests alongside an error related to initial chat title generation.
A useful lesson was that a log error does not automatically mean the entire application is down. The next step is to
determine whether the failure is critical or non-blocking.
sudo docker logs β tail 80 open-webui
sudo docker ps
sudo docker restart open-webui
20. CPU VS GPU LIMITATION
The current workload runs on CPU-based compute without dedicated GPU acceleration, so inference latency is
noticeably higher.
That limitation helped demonstrate that LLM performance is not only about the model. Infrastructure, compute,
memory, quantization, concurrency and hardware acceleration also matter.
21. WHAT I LEARNED
Cloud: compute resources form the foundation for an AI workload.
Linux: services, processes, ports and logs matter.
Docker: containers have their own networking and communication requirements.
Networking: localhost, ports, TCP, SSH and tunneling are practical building blocks.
AI Infrastructure: UI, API, runtime, model and inference are separate layers.
22. MY TROUBLESHOOTING METHOD
1. Reproduce β Can I reproduce the issue?
2. Isolate β Which layer is failing?
3. Test β Can I test that layer independently?
4. Observe β What do logs and API responses say?
5. Fix β Change only the required component.
6. Validate β Did the fix actually solve the problem?
7. Document β What caused it and what did I learn?
23. CYBER NERDS & MENTORSHIP
Technical growth doesnβt happen in isolation.
My learning environment at Sri Shanmugha College of Engineering and Technology gave me opportunities to
explore different technologies.
My exposure to Cyber Nerds encouraged me to think beyond simply completing I also want to acknowledge Sakthi Bro for the motivation and guidance that encouraged me to keep learning,
experimenting and improving.
24. FUTURE IMPROVEMENTS
Future iterations could explore GPU-backed compute, better memory resources, model comparison, quantization
experiments, response-latency benchmarking, stronger access controls, HTTPS/reverse proxy, authentication
hardening, monitoring, metrics and automated deployment.
25. FINAL TAKEAWAYS
This project started with a simple problem: I reached a usage limitation while experimenting with AI. But the solution
became much bigger than the original problem.
I learned how to deploy an LLM runtime, run a model, connect a web interface, troubleshoot Docker networking, use
SSH tunneling and debug an AI system layer by layer.
Most importantly, I learned that limitations can become learning opportunities.
I didnβt have the fastest hardware. I didnβt have a GPU. I didnβt have production-grade AI infrastructure. But I had
curiosity β and I had a problem worth solv
APPENDIX β WORKING ENVIRONMENT SUMMARY
Component-Configuration
β β β β β β β β β β β β β β β β β β β β β β β β
Cloud Platform -AWS EC2
Instance Type -m7i-flex.large
CPU-2 vCPU
Memory -8 GiB RAM
Storage -50 GiB gp3
Operating System -Ubuntu Linux
Container Platform -Docker
Web Interface- Open WebUI
LLM Runtime- Ollama
Language Model -Llama 3.2 3B
Remote Access -SSH
Secure Access -SSH Tunnel
Client Device -MacBook
Server Management -ServerCat
β β β β β β β β β β β β β β β β β β β β β β β β




