👨💻 about me home CV/Resume News 🖊️ Contact Codeberg Github LinkedIn 🏆 Best of LuaX (tools) pub bang ypp panda lsvg ldc yreq Fizzbuzz Calculadoira TPG picfg Belenos (intro) 🔀 Git Repos
Made in Europe
I don't like GAFAM's way of eating my personal data. So I decided to self-host my personal cloud to protect my privacy and have full powers on my data instead of Google.
Warning: picfg is a reduced version of
rrpi that
just provides file synchronization with Syncthing instead
of Nextcloud.
This page describes a basic Raspberry Pi installation:
All being run on a small pretty Raspberry Pi ;-)
The server will run 24/7 so running on a regular desktop PC is no good idea. We are going to install it on a Rapsberry Pi connected to the local network.
For this you will need:
Just plug everything and let's continue with the software setup.
The software setup is completely made from a Linux PC connected to the same local network than the Raspberry Pi (Ethernet or WiFi).
The whole installation is scripted. My script is available here: picfg.
picfg connects to the Raspberry Pi with ssh. The
Raspberry Pi hostname shall be given on the command line. The default
host name is raspberrypi.local. The script shows a menu for
a step-by-step installation.
WARNING: This script is provided for free and with no guaranty. Please read it before using it. It may fail and you may have to fix issues that are not described here.
picfg expects an optional argument to define the
Raspberry Pi host and user names. The default hostname is
raspberrypi.local and the default username is
pi.
picfg HOST: HOST is the new hostname.picfg USER@HOST: HOST is the new hostname
and USER the new user name.picfg and select Prepare.~/raspios).picfg and select Flash.picfg should auto-detect
it).We will start by configuring the Raspberry Pi with
raspi-config.
picfg and select Configurepi user password
and choose a strong password.picfg in the next steps,
e.g. mypi).To connect with SSH keys instead of password, you need to push your keys to the Raspberry Pi.
ssh-keygen to create your SSH keys if you don't
have one.picfg and select Keys to push your
public key to the Raspberry Pi.Ssh to try your SSH configuration. You should
now be connected to the Raspberry Pi.sudo reboot to reboot with the new configuration
(hostname, ...).From now on you shall start picfg with the right
hostname (e.g. picfg mypi.local).
The following steps use a configuration files that must be created on the Linux PC used to configure the Raspberry Pi:
~/conf.tomlThis file is a Lua script that defines the following parameters:
[picfg]
caddy = [
{ server = "public host name", root = "path to the local files" },
...
]picfg will install some CDSoft programs precompiled for
Raspberry Pi:
and also some great tools:
Run picfg mypi.local and select
Install.
This will install some Debian packages:
and configure:
Forgejo can be used to host and manage Git repositories on the Raspberry Pi.
picfg mypi.local and select
Forgejo.The Caddy web server can be used to host an HTTPS server on the Raspberry Pi.
picfg mypi.local and select
Caddy.The Debian packet minidlna can be used to store and
shared media files (music, video, ...). Shared files will be stored in
/home/pi/dlna.
picfg mypi.local and select UPnP.GitHub and GitLab are great but if you need private repositories, you may want better privacy and control over your data.
And Git can be installed locally on a Raspberry Pi.
The procedure described here is a summary of Build your own Raspberry Pi Git Server.
Connect to the Raspberry Pi
ssh pi@piEnsure git is installed
sudo apt update
sudo apt upgrade
sudo apt install gitCreate a directory
mkdir -p /home/pi/git/hello
cd /home/pi/git/helloInitialize the Git repository
git init --bareCreate the repository
git init
git remote add hello pi@git.example.com:/home/pi/git/helloPush the first commit
git add .
git commit -m "Initial commit"
git push hello masterClone the repository on another PC
git clone pi@git.example.com:/home/pi/git/helloThis document describes a home network that supports local web development and self-hosting, Git collaboration, and markdown-based note editing and sharing.
192.168.1.0/24.| Device | Editor | Sync Method | Network Access |
|---|---|---|---|
| Desktop PC | Neovim | Syncthing | LAN |
| Laptop | Neovim | Syncthing | LAN |
| Smartphone | Markor | Syncthing | Internet (relay/NAT) |
| Raspberry Pi 1 | N/A (host) | Syncthing | LAN (sync hub) |
| Raspberry Pi 2 | N/A (host) | Syncthing | LAN (sync hub) |
192.168.100.5).This script is constantly updated and the documentation may be outdated. The best is always to read the sources and change them to fit your requirements.
This site is powered by LuaX, bang, ypp, cdsoft.css and Pandoc.
Mirrors: cdelord.fr – christophe.delord.free.fr – cdsoft.codeberg.page