Local AI Server on Raspberry Pi 5

Deploy Ollama and n8n on a Pi 5 and control your AI server from iPhone.

Introduction

30 Second Summary

Cloud AI services are powerful, but they come with recurring costs, data privacy concerns, and internet dependency. Imagine having your own AI server sitting on your desk, always available, completely private, and controllable from your phone.

In this project, you will turn a Raspberry Pi 5 into a local AI automation server that you can command from your iPhone.

What You'll Build

A Raspberry Pi 5 running two Docker containers (Ollama for local LLM inference and n8n for visual workflow automation) that communicate over a shared network, with iOS Shortcuts on your iPhone as the mobile control interface.

By the end of this project, you'll have:

  • A Docker Compose stack running Ollama and n8n on your Raspberry Pi with a local Qwen3 model pulled and ready for inference.
  • A working n8n webhook workflow that accepts natural language descriptions and uses the local LLM to generate AI-powered automation plans.
  • Two iOS Shortcuts that trigger the n8n webhook and run SSH commands to manage the Pi from your iPhone.
  • Secret Mission: Build a Pi Management shortcut suite that checks system stats, restarts Docker containers, and pulls new AI models from your iPhone.

Are there any prerequisites?

This project requires a Raspberry Pi 5 (8GB) with Ubuntu Desktop 24.04 LTS installed and SSH enabled, a Mac on the same local network for SSH access, and an iPhone with the Shortcuts app.

You do not need any prior Docker or AI experience. The project walks you through every installation and configuration step.

Install Docker on Your Raspberry Pi

Your Raspberry Pi 5 is powered on and running Ubuntu, but it has no way to run containers yet. Docker turns your Pi into a container host that can run isolated services side by side.

In this step, you will install Docker Engine on the Pi, configure permissions so you can run containers without sudo, and write a docker-compose.yml file that defines your two-container AI stack.

In this step, get ready to:
  • SSH into your Raspberry Pi and install Docker Engine.
  • Add your user to the docker group for sudo-free commands.
  • Create a Docker Compose file that defines both containers on a shared network.
SSH into the Pi and install Docker Engine

Before you can install anything on the Pi, you need a remote terminal session from your Mac. SSH gives you command-line access to the Pi over your local network.

  • Open Terminal on your Mac by pressing Cmd+Space and typing Terminal, then press Enter.
  • Connect to your Raspberry Pi over SSH by running this command:
ssh [[PI_USER="your Pi username"]]@[[PI_IP="your Pi's local IP address"]]
  • When prompted, enter your Pi user's password and press Enter.

Find your Pi's IP address

On your Pi, open a terminal and run hostname -I to see its local IP address. It will look something like 192.168.1.42.

You should see a welcome message and a new command prompt showing your Pi's hostname.

  • Download and run Docker's official convenience script by running these commands:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

What does this command do?

The first line downloads Docker's install script from get.docker.com. The second line runs it with sudo privileges, which detects your Linux distribution and installs Docker Engine automatically.

This takes a minute or two as it downloads packages and sets up the Docker daemon.

  • Once the script finishes, verify Docker is installed by running:
docker --version
  • You should see a version number in the output, confirming Docker Engine is installed.
  • Verify Docker Compose is also available by running:
docker compose version

You should see a Compose version number printed to the terminal.

Command not found?

If docker --version returns an error, make sure the install script completed without errors. Scroll up in your terminal to check for any failure messages during installation.

If docker compose version fails, the Compose plugin may not have installed. Try running the install script again with sudo sh get-docker.sh.

help me troubleshoot Docker installation on my Raspberry Pi 5 running Ubuntu

Add your user to the docker group

By default, Docker commands require sudo to run. Adding your user to the docker group removes this requirement so every future command is simpler.

  • Add your current user to the docker group by running:
sudo usermod -aG docker $USER
  • Apply the new group membership to your current session by running:
newgrp docker

What does this command do?

The usermod -aG docker $USER command appends (-a) your user to the docker group (-G). The newgrp docker command refreshes your session so the change takes effect immediately without logging out.

  • Confirm it worked by running a Docker command without sudo:
docker ps

You should see an empty table with column headers like CONTAINER ID and STATUS. No containers are running yet, but the lack of a permission error confirms your group membership is active.

Still seeing permission denied?

If docker ps returns a permission error, try closing your SSH session completely and reconnecting. The group change sometimes requires a full logout to take effect.

help me fix Docker permission denied errors after adding my user to the docker group

Create the Docker Compose file

Docker Compose lets you define multiple containers in a single file. You will create a project directory and a docker-compose.yml that sets up Ollama (for LLM inference) and n8n (for workflow automation) on a shared network.

  • Create your project directory and move into it by running these commands:
mkdir ~/ai-server
cd ~/ai-server
  • Confirm the directory exists by running:
ls ~/ | grep ai-server

You should see ai-server printed in the output.

  • Create the docker-compose.yml file by running:
nano docker-compose.yml
  • Paste the following configuration into the file:
version: '3.8'

networks:
  ai-net:
    driver: bridge

volumes:
  ollama:
  n8n:

services:
  ollama:
    image: ollama/ollama
    container_name: ollama
    networks:
      - ai-net
    volumes:
      - ollama:/root/.ollama
    ports:
      - "11434:11434"
    restart: unless-stopped

  n8n:
    image: n8nio/n8n
    container_name: n8n
    networks:
      - ai-net
    volumes:
      - n8n:/home/node/.n8n
    ports:
      - "5678:5678"
    restart: unless-stopped
    environment:
      - N8N_HOST=0.0.0.0
      - N8N_PORT=5678
      - N8N_PROTOCOL=http
  • Save the file by pressing Ctrl+O, then Enter, then exit nano by pressing Ctrl+X.

What does this file do?

This file defines your entire AI server stack. The networks section creates a shared bridge network called ai-net so the two containers can talk to each other by name.

The ollama service uses the official ollama/ollama image to run your local LLM on port 11434. The n8n service runs the workflow automation engine on port 5678. Both use named volumes to persist their data across container restarts.

  • Validate that your compose file has no syntax errors by running:
docker compose config

You should see the parsed YAML printed back to the terminal with all the service definitions expanded. If there is a syntax error, Docker will print a specific error message pointing to the problem line.

Seeing a YAML parsing error?

YAML is whitespace-sensitive. Make sure you are using spaces (not tabs) for indentation. Each nested level should be indented by exactly 2 spaces.

Double-check that all strings with colons (like port mappings) are wrapped in quotes. For example, "11434:11434" needs the surrounding double quotes.

help me fix YAML syntax errors in my docker-compose.yml file

✔️ Awesome, I've got everything!

Great. Double check you have saved docker-compose.yml and that docker compose config printed without errors.

ⓧ I'd like to double check the full code

version: '3.8'

networks:
  ai-net:
    driver: bridge

volumes:
  ollama:
  n8n:

services:
  ollama:
    image: ollama/ollama
    container_name: ollama
    networks:
      - ai-net
    volumes:
      - ollama:/root/.ollama
    ports:
      - "11434:11434"
    restart: unless-stopped

  n8n:
    image: n8nio/n8n
    container_name: n8n
    networks:
      - ai-net
    volumes:
      - n8n:/home/node/.n8n
    ports:
      - "5678:5678"
    restart: unless-stopped
    environment:
      - N8N_HOST=0.0.0.0
      - N8N_PORT=5678
      - N8N_PROTOCOL=http

Your Pi now has Docker installed, your user has the right permissions, and your Compose file is ready to go. Next up, you will start both containers and pull your first AI model.

Deploy Ollama and n8n Containers

Your Docker Compose file is ready and waiting. Now it's time to bring your AI infrastructure online.

In this step, you'll start both containers, download a language model into Ollama, and connect n8n to Ollama so they can communicate over your Docker network. Once this is done, your Pi will have a working AI brain that n8n can call on.

In this step, get ready to:
  • Start the Docker Compose stack and verify both containers are running.
  • Pull and test the Qwen3 1.7B model inside the Ollama container.
  • Access n8n from your Mac and configure the Ollama credential.
Start the Docker Compose stack

Your docker-compose.yml defines both services. One command spins up Ollama and n8n together on the shared ai-net network.

  • In your SSH session (still in the ~/ai-server directory), start both containers by running this command:
docker compose up -d

What does this command do?

The -d flag runs the containers in detached mode, meaning they start in the background and free up your terminal. Docker Compose pulls both images (if not already cached), creates the ai-net network, provisions the named volumes, and starts both containers.

  • Verify both containers are running by running:
docker ps

You should see two containers listed: ollama and n8n. Both should show a status of Up with their respective ports mapped.

  • Confirm the Docker network was created by running:
docker network ls

You should see ai-server_ai-net in the list with the bridge driver.

Containers not showing as running?

  • Check the logs for errors by running docker compose logs. Look for image pull failures (network issue) or port conflicts.
  • If you see a port conflict on 11434 or 5678, another process is using that port. Stop it or change the port mapping in your compose file.
  • Make sure you are inside the ~/ai-server directory where your docker-compose.yml lives.

Help me troubleshoot why my Docker Compose containers aren't starting on my Raspberry Pi

Pull and test the Qwen3 model

The Ollama container is running but has no models yet. You need to download a language model before it can generate any text. Qwen3 1.7B is a 1.4GB model that fits comfortably on the Pi 5's 8GB of RAM alongside n8n and the OS.

  • Pull the Qwen3 1.7B model into the Ollama container by running:
docker exec ollama ollama pull qwen3:1.7b

What does this command do?

This executes the ollama pull command inside the running ollama container. It downloads the Qwen3 1.7B model weights and stores them in the ollama Docker volume. The download is about 1.4GB, so it may take a few minutes depending on your internet connection.

You should see a progress bar as the model layers download. Once complete, it prints success.

  • Test the model is working by running a quick prompt:
docker exec ollama ollama run qwen3:1.7b "Say hello in one sentence"

You should see a short response from the model. The first run may take 10-20 seconds as the model loads into memory.

Model pull failing or timing out?

  • Check that the Ollama container has internet access by running docker exec ollama ping -c 2 google.com. If it fails, your Pi may have a DNS or network issue.
  • If the model loads but produces no output, give it more time. The first inference on ARM64 hardware is slower as the model initializes in memory.
  • If you see an out-of-memory error, make sure no other memory-heavy processes are running on the Pi.

Help me troubleshoot Ollama model pull issues on my Raspberry Pi 5

Access n8n and configure the Ollama credential

With both containers running on the same Docker network, n8n can reach Ollama using the container name as a hostname. You need to tell n8n where to find Ollama by creating a credential.

  • On your Mac, open a web browser.
  • Navigate to the n8n web interface by entering this URL:
http://[[PI_IP="your Pi's IP address"]]:5678
  • n8n displays a signup screen on first access. Enter your name, email address, and a password.

What are the password requirements?

Your password must be at least eight characters long. It must include at least one number and one capital letter.

  • Click Next to create your owner account. n8n logs you in and shows the main dashboard.

You should see the n8n workflow editor interface. Now you'll create the Ollama credential so n8n knows how to connect.

  • Click the Create button in the upper-left corner of the side menu.
  • Select Credential.
  • In the credential modal, search for and select Ollama as the service.
  • In the Base URL field, replace the default value with http://ollama:11434.
  • Click Save. n8n automatically tests the credential when you save it.

Why use ollama instead of an IP address?

Both containers share the ai-net Docker network. Inside that network, Docker's built-in DNS resolves container names to their internal IP addresses. So http://ollama:11434 routes n8n's request directly to the Ollama container without needing to know its IP.

You should see a success message confirming the credential connected. If the test passes, n8n can now communicate with Ollama.

Credential test failing?

  • Double-check that you entered http://ollama:11434 exactly. A common mistake is using localhost instead of the container name ollama.
  • Verify the Ollama container is still running by going back to your SSH terminal and running docker ps. If it restarted, check its logs with docker logs ollama.
  • Make sure both containers are on the same network. Run docker network inspect ai-server_ai-net and confirm both ollama and n8n appear in the containers list.

Help me fix my n8n Ollama credential connection

Both services are running and talking to each other. Next up, you'll build a workflow in n8n that turns this setup into an AI-powered automation engine.

Build the AI Workflow Architect in n8n

Your containers are running and your Ollama credential is connected. Now it's time to build the actual AI workflow that makes this server useful.

In this step, you will wire together three nodes in n8n to create an AI-powered API endpoint. When you send it a description of an automation task, the local Qwen3 model generates a structured plan for how to build that automation.

In this step, get ready to:
  • Create a Webhook trigger node that listens for POST requests.
  • Connect a Basic LLM Chain to an Ollama Chat Model to generate automation plans.
  • Return the AI response via a Respond to Webhook node and test with curl.
Create a workflow with a Webhook trigger

The Webhook node gives your workflow a URL that external services can call. When a request hits that URL, it kicks off the workflow and passes along whatever data was sent.

  • Switch back to the n8n web interface in your browser at http://<pi-ip>:5678.
  • Click the + Create Workflow button (or the + icon) to start a new workflow.
  • Rename the workflow to AI Workflow Architect by clicking the workflow name at the top.
  • Click the + button on the canvas to add your first node.
  • Search for Webhook and select it.
  • In the Webhook node settings, set HTTP Method to POST.
  • Under Path, replace the auto-generated path with ai-architect.
  • Set the Respond option to Using 'Respond to Webhook' Node.
  • Note the production webhook URL shown in the node. It follows the format http://<pi-ip>:5678/webhook/ai-architect. You will use this URL later to trigger the workflow.

What are the test and production URLs?

n8n provides two separate webhook URLs. The test URL only works while you have the workflow open in the editor and click Listen for Test Event. The production URL is the one that works when the workflow is active (published), which is what you want for real use.

Add the Basic LLM Chain with Ollama Chat Model

The Basic LLM Chain node sends a prompt to an LLM and returns the response. You will connect it to the Ollama Chat Model sub-node so it uses your local Qwen3 model for inference.

  • Close the Webhook node and click the + connector on its right side to add a new node after it.
  • Search for Basic LLM Chain and select it. n8n automatically connects it to the Webhook node.
  • In the Basic LLM Chain node, find the Prompt setting and change it from Take from previous node automatically to Define below.
  • In the Prompt (User Message) text area, paste the following prompt:
You are an AI Workflow Architect. Given the following automation task description, generate a structured automation plan.

Task: {{ $json.body.task }}

Provide your response as a structured plan with these sections:
1. Triggers - What event starts this automation
2. Steps - The sequence of actions to perform
3. Tools needed - What services or integrations are required
4. Error handling - How to handle failures gracefully

Be specific and actionable in your recommendations.

What does this prompt do?

The expression {{ $json.body.task }} pulls the task field from the incoming webhook POST body. When someone sends a JSON body like {"task": "Send me a daily weather summary"}, that text gets inserted into the prompt.

The rest of the prompt gives the model its persona and output structure. This ensures the LLM returns a consistent, useful automation plan every time.

  • Now connect the Ollama Chat Model sub-node. At the bottom of the Basic LLM Chain node, click the + Chat Model button.
  • Select Ollama Chat Model from the list.
  • In the Ollama Chat Model sub-node, select your Ollama credential (the one you configured earlier with base URL http://ollama:11434).
  • Set the Model dropdown to qwen3:1.7b.
  • Under Options, click Add Option and select Temperature.
  • Set Temperature to 0.7.
  • Close the Ollama Chat Model sub-node.

Why set temperature to 0.7?

Temperature controls how creative the model's responses are. A value of 0.7 gives a good balance between creativity and consistency. Lower values (closer to 0) make the model more deterministic. Higher values (closer to 1) make it more creative but less predictable.

Add the Respond to Webhook node and test the workflow

The Respond to Webhook node takes whatever data flows into it and sends it back as the HTTP response to the original webhook caller. This closes the loop so your curl request gets the AI-generated plan back.

  • Click the + connector on the right side of the Basic LLM Chain node.
  • Search for Respond to Webhook and select it.
  • In the Respond to Webhook node, set Respond With to All Incoming Items.
  • Close the node. Your workflow should now show three nodes connected in sequence: Webhook -> Basic LLM Chain -> Respond to Webhook.
  • Activate the workflow by toggling the Active switch in the top-right corner of the editor. It should turn green.

Now test the workflow from your Mac terminal. Open a new terminal tab (or use your existing local terminal window).

  • Send a test request to your workflow by running this command from your Mac terminal:
curl -X POST http://[[PI_IP="your Pi's IP address"]]:5678/webhook/ai-architect \
  -H "Content-Type: application/json" \
  -d '{"task": "Send me a daily weather summary every morning at 7am"}'

What should I see?

After 10-30 seconds (the Qwen3 model needs time to generate on the Pi), you should see a JSON response in your terminal containing an AI-generated automation plan. The response includes sections for triggers, steps, tools needed, and error handling.

You can also verify the execution in n8n by clicking Executions in the left sidebar. You should see a successful execution entry for your workflow.

Not getting a response?

If you get a timeout or connection refused error, check that the workflow is toggled to Active (green toggle in the top-right). Only active workflows respond on their production URL.

If you get an empty or error response, open the Executions panel in n8n and click the failed execution to see which node had the error. A common issue is the Ollama Chat Model credential not being selected or the model name not matching.

Make sure you are running the curl command from your Mac terminal (not inside the Pi's SSH session), and that your Pi's IP address is correct.

Help me debug my webhook workflow

Your AI Workflow Architect is live. Next up, you will build iOS Shortcuts that let you trigger this workflow and manage your Pi directly from your iPhone.

Build iOS Shortcuts to Trigger Your AI Server

Your AI Workflow Architect is live and tested from the terminal. Now it is time to move the controls to your pocket.

In this step, you will build two iOS Shortcuts that turn your iPhone into a remote interface for your Pi. One shortcut sends task descriptions to the n8n webhook and displays AI-generated automation plans. The other connects over SSH to show real-time container status.

In this step, get ready to:
  • Build an "AI Architect" shortcut that sends tasks to your webhook and displays AI responses.
  • Build a "Pi SSH Command" shortcut that checks container status directly from your iPhone.
  • Test both shortcuts to confirm end-to-end connectivity.
Create the AI Architect shortcut

The Shortcuts app on your iPhone can make HTTP requests natively. You will chain together actions that prompt for input, POST it to your webhook, and return the AI response.

  • On your iPhone, open the Shortcuts app.
  • Tap the + button in the top-right corner to create a new shortcut.
  • Tap the name at the top and rename it to AI Architect.
  • Tap Add Action and search for Ask for Input. Select it.
  • In the Ask for Input action, tap the Text field and type Describe the automation task as the prompt.
  • Tap + below the Ask for Input action to add another action. Search for URL and select it.
  • In the URL action, type your n8n webhook URL: http://your Pi's IP address:5678/webhook/ai-architect.
  • Add another action. Search for Get Contents of URL and select it.
  • In the Get Contents of URL action, tap Show More (or the arrow to expand advanced options).
  • Change the Method from GET to POST.
  • A Request Body section appears. Set it to JSON.
  • Tap Add new field. Set the key to chatInput and the value to the Provided Input variable (tap and select it from the variable suggestions above the keyboard).

What does chatInput do?

The n8n Basic LLM Chain node expects a field called chatInput in the incoming JSON when set to "Take from previous node automatically" mode. This is how it picks up the text to send to the LLM.

Don't see Request Body options?

Make sure you tapped Show More in the Get Contents of URL action first. The Method and Request Body fields only appear in the expanded view.

Why can't I see the JSON body options in Get Contents of URL?

Extract and display the AI response

The webhook returns a JSON dictionary. You need to pull out the text value that contains the automation plan and display it on screen.

  • Add another action after Get Contents of URL. Search for Get Dictionary Value and select it.
  • Set the key to output. This is the field where the Basic LLM Chain stores the AI-generated response.
  • Add one more action. Search for Show Result and select it.
  • Confirm that Show Result is set to display the Dictionary Value from the previous action (it should be auto-connected).

What does this shortcut do end to end?

  • Ask for Input prompts you to describe an automation task.
  • URL and Get Contents of URL send that text as a POST request with a JSON body to your n8n webhook.
  • Get Dictionary Value extracts the output key from the returned JSON.
  • Show Result displays the AI-generated automation plan on your screen.

Now test the shortcut.

  • Tap the play button (triangle) at the bottom of the shortcut editor.
  • When prompted, type Send me a daily weather summary every morning at 7am and tap Done.
  • Wait 10-30 seconds for the Pi to generate a response (the Qwen3 1.7B model runs locally, so inference takes a moment on ARM hardware).
  • You should see a structured automation plan appear with triggers, steps, tools, and error handling.

Shortcut fails or shows no result?

Make sure your iPhone is on the same Wi-Fi network as your Raspberry Pi. The webhook URL uses a local IP that is only reachable on your home network.

Check that the n8n workflow is still toggled to Active in the n8n web interface. Inactive workflows do not respond to production webhook requests.

Help me debug my iOS Shortcut that connects to n8n

Create the Pi SSH Command shortcut

Your second shortcut will connect directly to the Pi over SSH and run a Docker command. This gives you a quick way to check on your containers without opening a terminal on your Mac.

  • Go back to the Shortcuts main screen and tap + to create another new shortcut.
  • Rename it to Pi SSH Command.
  • Tap Add Action and search for Run Script Over SSH. Select it.
  • In the Host field, enter your Raspberry Pi's IP address.
  • Set Port to 22 (the default SSH port).
  • Enter your Pi's username in the User field.
  • Enter your Pi's password in the Password field.

What is Run Script Over SSH?

This is a built-in iOS Shortcuts action that opens an SSH connection to a remote machine, runs a script, and returns the standard output. No third-party app is needed.

It accepts a host, port, username, password, and a multi-line script. The return value is whatever the script prints to the terminal.

  • In the Script field, enter the following command:
docker ps --format "table {{.Names}}\t{{.Status}}"
  • Add another action after Run Script Over SSH. Search for Show Result and select it.
  • Confirm it is set to display the Shell Script Result from the previous action.

What does this command show?

The docker ps command lists running containers. The --format flag formats the output as a clean table showing only container names and their status (e.g., "Up 2 hours"). This keeps the iPhone display concise.

Now test the shortcut.

  • Tap the play button to run the shortcut.
  • If this is your first SSH connection from Shortcuts to this host, you may see a prompt to trust the host key. Tap OK or Continue to accept.
  • You should see a table with two rows: ollama and n8n, both showing an "Up" status.

SSH connection fails?

Double-check the IP address, username, and password. The username is the same one you use to SSH from your Mac.

Make sure your iPhone is on the same local network as the Pi. SSH connections over cellular will not reach a local IP address.

Help me troubleshoot SSH from iOS Shortcuts to my Raspberry Pi

You now have a mobile command center for your AI server. Next up, you will expand this into a full management suite in the Secret Mission.

Secret mission

Build a Pi Management Shortcut Suite

You have two separate shortcuts on your iPhone. One talks to your AI server, the other checks container status. What if you could combine everything into a single command center? In this secret mission, you will build a unified Pi Command Center shortcut that lets you monitor system health, restart containers, pull new AI models, and trigger your AI Workflow Architect from one menu.

Clean Up Your Resources

Clean Up Your Resources

Decide whether to keep your resources running, pause them to come back later, or delete them entirely. This project runs entirely on your Raspberry Pi, so there are no ongoing cloud costs. The only cost is electricity (roughly 5-10W idle).

Resources you used:

  • Two Docker containers (Ollama and n8n) running on the Raspberry Pi.
  • Docker volumes storing the Qwen3 model (~1.4GB) and n8n workflow data.
  • The ~/ai-server project directory with your docker-compose.yml file.
  • Three iOS Shortcuts on your iPhone (AI Architect, Pi SSH Command, Pi Command Center).

Keep everything running

No action needed. Choose this if you want your AI server available at all times.

  • Your containers are configured with restart: unless-stopped, so they automatically restart when the Pi reboots.
  • The Pi consumes minimal power (5-10W idle), making it practical as an always-on home server.
  • Your iOS Shortcuts will keep working as long as the Pi is on and connected to your local network.

Pause - I'll come back to this later

Stop the containers to free up RAM and CPU, but keep all data intact so you can resume later.

  • SSH into your Pi and stop the containers by running:
cd ~/ai-server
docker compose stop
  • When you want to resume, start them again by running:
cd ~/ai-server
docker compose start

Your model data, n8n workflows, and iOS Shortcuts all remain intact.

Delete - I don't want to use this again

Remove all project resources from your Pi and iPhone to start fresh.

  • SSH into your Pi and remove the containers, network, and volumes by running:
cd ~/ai-server
docker compose down -v

What does this command do?

The -v flag tells Docker Compose to remove the named volumes (ollama and n8n) along with the containers and network. This deletes the Qwen3 model data and all n8n workflow data permanently.

  • Remove the project directory by running:
cd ~
rm -rf ~/ai-server
  • On your iPhone, open the Shortcuts app.
  • Long-press on AI Architect and tap Delete.
  • Repeat for Pi SSH Command and Pi Command Center.
  • Verify everything is removed by running:
docker ps -a
docker volume ls
ls ~/ai-server

You should see no containers listed, no ollama or n8n volumes, and a "No such file or directory" message for the project folder.

Nice Work!

Nice Work!

You just built a fully local AI automation server on a Raspberry Pi 5 and wired it up to your iPhone. No cloud subscriptions, no API bills, no data leaving your network.

You've learned how to:

  • Deploy Docker on a Raspberry Pi 5 and create a multi-container stack with Docker Compose, connecting services over a shared network.
  • Run a local LLM (Qwen3 1.7B) via Ollama in a Docker container on ARM64 hardware.
  • Build and activate an n8n webhook workflow that uses a local LLM as an AI Workflow Architect to generate structured automation plans.
  • Connect iOS Shortcuts to your self-hosted AI server using both HTTP webhooks and SSH.
  • Secret Mission: Built a complete Pi management command center shortcut with system monitoring, container management, and AI model management from your iPhone.

Ready to quiz yourself?