Fullstar

Archives

  • December 2025
  • August 2024
  • July 2024
  • February 2024
  • November 2023
  • August 2023
  • July 2023
  • January 2023
  • November 2022
  • October 2022
  • September 2022
  • February 2022
  • January 2022
  • September 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020

Categories

  • Code
  • Lens
  • Life
0
Fullstar
  • Code

Setting Up and Maintaining a Ubuntu Environment for My Home Server

  • November 24, 2023
  • Brandon

Looking for a Shorter Overview?

AI Summary

Keep an Ubuntu home server clean by using apt for system packages and virtual environments for Python dependencies, never sudo pip. For an N100 mini PC, upgrading to kernel 6.4 restores Wi-Fi, while reloading iwlwifi with 802.11n disabled can resolve troublesome network connections; Bluetooth may need firmware symlinks.

Key Moments

AI-generated
1

Prefer apt and virtual environments

Install system packages with apt first, then use virtualenv and pip inside an isolated environment rather than sudo pip install.
2

Upgrade the kernel for N100 Wi-Fi

Upgrading Ubuntu 22.04.3 to kernel 6.4 restored the missing Wi-Fi option on the N100 mini PC.
3

Disable 802.11n for unreliable Wi-Fi

Reload the iwlwifi module with 11n_disable=1 to connect to the college network, and rerun the command after each reboot.
4

Use Cloudflare Tunnel for secured SSH

Use Cloudflare Tunnel with an existing domain, restrict UFW to OpenSSH, and require SSH key authentication.
Total
0
Shares
0
0
0

Best Practice to Keep the Ubuntu Environment Clean

Package installation

There are normally two ways to install packages, one is apt get, another is pip install. The first difference between them is that the packages installed by apt get are the system-level packages requiring root privilege, and for pip install, you can specify the user by –user to keep from messing up the system environment (ALWAY DO NOT USE sudo pip install). The second difference which can be more important is that when executing sudo apt update && apt upgrade, the packages installed by apt would be upgraded, while the packages installed by pip wouldn’t. So in my view, the best practice to install packages:

  1. Try apt search and install by apt first.
  2. Download virtualenv to manage the Python environment and manage packages.
  3. Install the package by pip inside the virtual env.

System Setting Up

Ok, so I had a hard time fixing my wifi and Bluetooth on my new mini PC. Since the CPU of my PC is n100, just too new to be compatible with the wifi and Bluetooth.

WIFI Fixing Process

Firstly, I downloaded Ubuntu 22.04.3 LTS and noticed that on the desktop, there was totally no wifi label, after searching, I found that I could simply upgrade my kernel to 6.4 to fix this problem (Since I had not wifi, so I had to go this site: https://kernel.ubuntu.com/mainline/v6.4/amd64 and manually downloaded the four deb files and installed them by apt command). However, I could see the wifi label and connect to my phone hotspot network, but I could not get access to my college network. Thankfully, this post gave a solution: https://askubuntu.com/questions/286915/cant-connect-to-specific-wifi-network?rq=1.

sudo ifconfig eth0 down
sudo modprobe -r iwlwifi
sudo modprobe iwlwifi 11n_disable=1

The eth0 should be replaced by your wireless device ID. So the above command simply modifies the mod parameter 11n_disable to 1, disabling the 802.11n support for the iwlwifi module. And I made it a script, since every time you reboot your system, you need to run the commands again.

Bluetooth Fixing Process

I simply followed the method offered in this post: https://github.com/batocera-linux/batocera.linux/issues/9288 and enabled my Bluetooth successfully.

cd /lib/firmware/intel/
ln -s ibt-1040-4150.ddc ibt-0040-1050.ddc
ln -s ibt-1040-4150.sfi ibt-0040-1050.sfi
lsmod | grep '^bluetooth'
bluetooth            1101824  37 btrtl,...
rmmod ...
modprobe ...

Cloudflare Tunnel SSH Setting

Since I already have a domain name, instead of using a tool such as FRP, I finally chose to use Cloudflare Tunnel which is free and easy to implement (https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/). By the way, I quickly set up my ufw and ssh service to only allow the OpenSSH application and accept only ssh key login.

Related Posts

AI-generated

常用工具指令

从Git暂存与分支管理,到GDB断点调试、Makefile依赖和并行构建,再到Docker镜像、容器编排及网络通信,这份命令速查覆盖日常开发中最常用的操作场景。
59.5% match September 18, 2022

华为云鲲鹏服务器安装wordpress

鲲鹏ARM架构让常见WordPress安装教程频频失效;这里整理了从更换yum源、安装Nginx和PHP,到修复403、设置伪静态的关键配置与避坑要点。
45.1% match July 5, 2020

Questions Answered

AI-generated

How should Ubuntu and Python packages be installed safely?

Prefer apt for system packages and isolate pip dependencies in virtual environments.

How can an N100 mini PC regain missing Wi-Fi support?

Upgrade to kernel 6.4 to restore the Wi-Fi option on Ubuntu.

What fixes Wi-Fi that connects to hotspots but not a specific network?

Reload iwlwifi with 802.11n disabled and rerun the workaround after reboots.

How can a home server expose SSH securely?

Use Cloudflare Tunnel, restrict UFW to OpenSSH, and require SSH keys.

Next Up

开发工具速查
鲲鹏部署WordPress
搭建Letta记忆系统
掌握Shell脚本
Total
0
Shares
Share 0
Tweet 0
Pin it 0
Brandon

Previous Article
  • Code

Swift Learning Log

  • August 31, 2023
  • Brandon
View Post
Next Article
  • Code

Golang入门

  • February 4, 2024
  • Brandon
View Post
You May Also Like
View Post
  • Code

Letta部署记录

  • Brandon
  • December 26, 2025
View Post
  • Code

WordPress 后台任务利器:使用 BGRunner 构建可靠的异步处理

  • Brandon
  • December 14, 2025
View Post
  • Code

WordPress image offload

  • Brandon
  • December 14, 2025
View Post
  • Code

ComfyUI应用手册

  • Brandon
  • December 6, 2025
View Post
  • Code

Leetcode Java常用代码

  • Brandon
  • February 17, 2024
View Post
  • Code

Golang入门

  • Brandon
  • February 4, 2024
View Post
  • Code

Swift Learning Log

  • Brandon
  • August 31, 2023
View Post
  • Code

English Learning – Food Related

  • Brandon
  • August 31, 2023

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Fullstar

Input your search keywords and press Enter.

常用工具指令

华为云鲲鹏服务器安装wordpress

Letta部署记录

Linux运行程序与shell编程

Linux shell常用指令

Private: Emacs配置C/C++环境

UP NEXT

常用工具指令

59.5% match September 18, 2022 0