NanoPi R4S-RK3399 is a great new OpenWrt device

are these ping spikes normal while pinging the r4s ?
Lately i have lags in games maybe thats the problem. Im using OpenWrt 22.03.0 with only qosify installed and my pc is the only device on the internet. I saw THIS POST but i dont know how to set the r4s into high performance mode (with ssh ?).


To set performance mode, go into LuCI, System menu, Startup menu entry, Local Startup tab, and add the following by copy/paste:

find /sys/devices/system/cpu/cpufreq/ -name scaling_governor | while read GOVERNOR; do
  echo performance > $GOVERNOR

Save and reboot.

If for any reason you want to go back to the default behavior, reverse the steps (just delete those three lines, save and reboot).


I'm trying to install openspeedtest via docker on the nanopi r4s, however it seems that there is an incompatibility with fw4 nftables, So is anyone using docker on this device with fw4?

A lot of packages are still not compatible with fw4, dockerd is one of them as you can see below:

Also in the comments of the "issue" above, there are some ppl talking about docker and about some ways to make it work with fw4.

1 Like

Answer: No
Once you update the squashfs firmware, you are back to 100MB space... that's a shame that the firmware, targeted for the 4GB ,doesn't use that space...

1 Like

I have, in the past, tried to follow this thread and reading that a nanopi r4s 4GB machine is a reasonably good choice for a router I bought 2 (1 for use and a backup).
Now I come to setting up the first one.
I followed

on that page was an 'installation method' (well sorta)

linked to

so I get to the 'squashfs-image' - - - that is under 'Expanding the filesystem'

and now I grind to a halt.
Ask questions

Nanopi R4S (4GB) install problems

where I get told that I'm supposed to have a running nanopi system and then do this and that

      • so my questions
        I have

Nanopi R4S (4GB) install problems

I have the oenwrt-rockchip-armv8-. . . installed on the sd card

How do I get this card so that I can slip it into the sd card slot on the box and then set up my system?

I have a router at already - - - is there an easy way to place this nanopi on something like so there is no conflict?

(I do hope someone out there can help - - - the instructions I have found I followed but I am in limbo and really don't know how to get to home base (a working router).)


Download 22.03.0 squashfs image. Then use something like balena etcher to flash the image to your sd card. Put the sd card into your NanoPi R4S and power it up.

Sure. Disconnect from your router network on, then connect the NanoPi Lan port to your computer's ethernet port instead. You should now be able to reach the NanoPi on

Next, change the static IP address of the NanoPi R4S to something on the same subnet (192.168.1.x). For example:, but not 192.168.2.x - that is a different subnet. Define your router at as your gateway, and identify a DNS server so your NanoPi can reach the internet. You can do this configuring the network lan interface from a web browser using LuCI, or you can log into your NanoPi via a terminal session (e.g., ssh root@ and edit the file /etc/config/network on your NanoPi with vi to have the following lines in the lan interface:

option ipaddr ''
option gateway ''
list dns ''

Next power off your Nano Pi. Reconnect to the network on your router. Power on your NanoPi and connect its lan port to a lan port on your router (or computer). Your router will still be, and your NanoPi will now be reachable at so it does not conflict with your router at Your NanoPi will also have internet access through your router (the gateway) and via DNS translation provided by Cloudflare (

There are other ways to do this, but this should get you started. None of this is NanoPi specific - it's just a matter of learning how to flash OpenWrt to any device that boots from an SD card, and then learning how to configure any OpenWrt device to be reachable through a unique static IP address on your network's lan subnet.

1 Like

That's quite limiting if you want to download software like docker that take some space...
I am really surprise that no PR exist about it

The easiest way is to do a custom build increasing the file system size during the build (option CONFIG_TARGET_ROOTFS_PARTSIZE in .config file, there is also an option for this in make menuconfig UI). I am doing this (squashfs), and the file system increased size is preserved during the upgrade.

1 Like

I'm using an old 120GB SSD over a USB 3.0 to SATA cable and I couldn't be happier. Not using docker yet but the idea is to have the images stored on the SSD too.

Well I didn't jump into making my own image yet... and I don't understand why the official image could not set the size correctly

yeah but if system size remain at 100MB, you could not install no need space for docker images...

Official image is for general usage. I understand that more specific utilities/roles would be normal to require a little bit more of hands on and manual adjustments. Like the Ubound (recursive DNS) I've included on mine.

You can find more about OpenWRT on SD cards and how to expand the filesystem here:

Because the main target of openwrt ever since it was made, are devices which have very limited storage space and low ram, in other words, all-in-one domestic routers. Routers with a lof of ram and storage space came much later with openwrt support and are not the focus of openwrt.

So if you want to understand how to proper upgrade between openwrt builds(Ex: when there is a new release) without losing settings and etc, and also want to know how to expand the device partitions for more space, then you will need to make an effort to learn on how to do all of that.

One easy way to expand storage space is to use ext4 img instead of squashfs and use gparted to do it, its easy, fast and it works!

Now if you don't have the time or if after a lot of time wasted you still can't understand on how to do all of the above and still wants more storage space, then i suggest that you try friendlywrt! Because friendlywrt uses some scripts that will automatically create another partition on the sd card and will expand said partition on first boot, in other words, you will have the full storage capability of the sd card that you are using available to you automatically and right after the first boot.

In some aspects friendlywrt is more noob friendly than openwrt is.


Ok but as soon as you support nanopi r4S 4GB in your targeted firmware, why not putting the right command in the building process to use the 4GB ??

Hey mate, R4S 4GB version has 4GB RAM and it's all ready to use, always.
What needs to be expanded, if that's the case, is the storage that's on the MicroSD card, which in turn is totally unrelated to RAM...


The regular NanoPi R4S (1GB or 4GB of RAM) comes with zero internal storage. It boots only from a MicroSD card of your choice of size and it has two USB ports where you can plug external storage too but you can't boot from it by design.

By 4GB you mean the ram? It already properly recognizes and uses the 4GB of ram, what needs to be adjusted is the storage space on the SD card.


What’s the correlation between ram size and sd size?!

Anyway just us an external drive and it will not be resized when you will flash a new build.

1 Like

Indeed I can and I did install external usb drive… but am I wrong saying that packages will keep installing in the 100MB space which doesn’t permit to install much package…