Introduction

I got the board several days ago, and now it’s time to get it to work. However I got stuck on WiFi configuration again though I did it many times before. So I write this post to make the steps more clear in my mind.


About the board

It’s Orange Pi Zero 3, a really small and powerful single-board computer! Here is its introduction from official:

Orange Pi Zero 3 is powered by Allwinner H618 quad-core Cortex-A53 processor, Arm Mali-G31 MP2 GPU, supports OpenGL ES 1.0/2.0/3.2, OpenCL 2.0, Vulkan 1.1, etc.,with 1GB/1.5GB/2GB/4GB memory options, decoding of multiple video formats is supported, and the Micro-HDMI output supports 4K display. In addition, Orange Pi Zero 3 can also be extended with headphones, TVout, USB2.0, IR reception and other functions via 13Pin expansion ports with an adapter board, in addition to the 26Pin expansion function port on the board, further enriching the functional interface of the motherboard.

In my case, it has 4GB LPDDR4 which makes it sufficient for my various services.

Here is what I got:

It’s easy to setup, and here is finally what I got:

Burn the image

There are several images on official site:

  • Orange Pi OS(Arch)
  • Ubuntu Image
  • Debian Image
  • Android Image
  • OpenWRT

I chose debian as it’s one of my most familiar distros, there are also imaging tools on official site:

Burning…

Insert sd card and power on:

Finally got to the shell (BTW, the default password for orangepi is orangepi):

Basic setup

WiFi

The first thing to do about this new sever must be setting up wifi connection cause I don’t have another net cable.

There are generally three choices or tools on command line to manage wifi connections: iwconfig, wpa_supplicant and nmcli. After asking chatgpt for assistance, I finally decide to leave all of them behind and just edit /etc/network/interfaces to setup the wifi.

Actually when I asked chatgpt about how to setup wifi connection on linux, it didn’t mention editing /etc/network/interfaces. I happened to know it when I was configuring network for pve, and it is really a simple and basic way to setup wifi connections. And this time, I happened to know that I can setup a roaming wifi, so it can auto connect to different wifi if the current wifi connection corrupts, it’s useful but I don’t need it for the moment.

Edit /etc/network/interfaces and add following like this

1
2
3
4
auto wlan0
iface wlan0 inet dhcp
wpa-ssid <wifi-name>
wpa-psk <password>

Save and then restart, then the wifi will automatic be connected and got an ip:

Mirror source

The default mirror source is rather slow, so I change /etc/apt/sources.list to the following:

1
2
3
4
5
6
7
8
9
10
11
deb http://mirrors.ustc.edu.cn/debian bookworm main contrib non-free non-free-firmware
#deb http://repo.huaweicloud.com/debian bookworm main contrib non-free non-free-firmware
#deb-src http://repo.huaweicloud.com/debian bookworm main contrib non-free non-free-firmware

deb http://mirrors.ustc.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware
#deb http://repo.huaweicloud.com/debian bookworm-updates main contrib non-free non-free-firmware
#deb-src http://repo.huaweicloud.com/debian bookworm-updates main contrib non-free non-free-firmware

deb http://mirrors.ustc.edu.cn/debian bookworm-backports main contrib non-free non-free-firmware
#deb http://repo.huaweicloud.com/debian bookworm-backports main contrib non-free non-free-firmware
#deb-src http://repo.huaweicloud.com/debian bookworm-backports main contrib non-free non-free-firmware

and remove the useless source in /etc/apt/sources.list.d/docker.list.

Shell

It surprised me that the image preinstalled zsh and oh-my-zsh, also tools like tmux, git, docker. here is the default .zshrc file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH

# Path to your Oh My Zsh installation.
export ZSH=/etc/oh-my-zsh
export ZSH_CACHE_DIR=~/.oh-my-zsh/cache

# Set name of the theme to load --- if set to "random", it will
# load a random theme each time Oh My Zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="mrtazz"

# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates
# zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time

# Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13

# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(evalcache git git-extras debian tmux screen history extract colorize web-search docker)

source $ZSH/oh-my-zsh.sh

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# Set personal aliases, overriding those provided by Oh My Zsh libs,
# plugins, and themes. Aliases can be placed here, though Oh My Zsh
# users are encouraged to define aliases within a top-level file in
# the $ZSH_CUSTOM folder, with .zsh extension. Examples:
# - $ZSH_CUSTOM/aliases.zsh
# - $ZSH_CUSTOM/macos.zsh
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

I leave the shell configurations be cause it is well enough.

Docker

Note that it’s defaultly installed docker, however, I can’t use docker compose to start a container from compose file cause it said docker: 'compose' is not a docker command..

I have to reinstall the docker. It’s rather easy, just run:

1
curl -fsSL https://get.docker.com | sh

After waiting for a while, it’s done. Now I can use docker compose to start a container from compose file.


Summary

Orange Pi Zero 3 is small, powerful and flexible. I can burn different images to different sd cards to achieve easily switching to different operating systems and performing various expriments which would be a quite fancy journey.

In this blog post, I just present the most basic use case for the Orange Pi Zero 3 and explore its capabilities and there are a lot more to be explored. Wish it can help those who are new to Orange Pi Zero 3.

Feel free to leave comments below! :)

References