Post

ENG | The Self-Hosting Chronicles: Updates in 2nd half of 2023

Introduction

This article builds on top of 2023-07-11-eng-self-hosting-recap and 2023-06-26-eng-podman-files.

Not much have changed. I updated many articles such as NextCloud recovery and update.

I separated podman files into several ones.

Some notes about ZimaBoard and messing with grub have been added.

Hosting is not going exactly as expected. I found that I’m using my home server a lot for stuff such as writing small python scripts (both work-related and side projects) using Visual Studio Code and Remote-SSH. And I’m using Gitea server actively. Advantage is that I can use that from anywhere and I don’t need to share stuff between computers and it’s all centralized.

Nextcloud rant/issues

On the other hand NextCloud Android client is a piece of shit. I’m getting synchronization errors since some Septemeber update and there’s github issue with hundred of comments on this topic which is not resolved.

Some people are posting that we should stop complaining and downgrade version instead, by using 3rd party android package manager. This makes it basically useless for automatic backup of photos. Synchronization is causing file conflicts on files that have been uploaded just five minutes ago, on the other hand, sometimes when upload fails, photos are not uploaded at all.

Docker image lscr.io/linuxserver/nextcloud had it’s own issues with updates.

It’s useful for file sharing and having access to some older stuff. Not much else.

Files collection

Docker compose was broken into two files. Gitea was always seperate and it’s documented in article about gitea.

~/docker/docker-compose.yml

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
version: "3.5"

# Changes:
# 2023-04-21: installed fedora
# 2023-04-21: removed npm - first it can run on zimaboard, second it should be replaced by cloudflare tunnel
#             removed networks
# 2023-04-21: copied old volumes
# 2023-04-22: cloudflared added
# 2023-05-02: nginx/jekyll added (ressurection from 2017)
# 2023-05-05: .env file added
# 2023-06-02: cloudflare-ddns added
# 2023-06-04: hardcoded nextcloud version cause latest is broken (required `podman exec -it nextcloud-app occ upgrade` afterwards
# TODO: heimdall for easy local access on port 80
# 2023-09-01: nextcloud moved to other compose file
# 2023-10-25: pe5 (no DDNS, only tunnel)
#
# To stop/update/start service (defined in ~/.config/systemd/user/podman-compose.service) use:
#
# systemctl --user stop podman-compose.service
# podman-compose pull
# podman image prune
# systemctl --user start podman-compose.service

volumes:
  nginx-config:
  nginx-config-pe5:

services:

  # Cloudflared
  # https://hub.docker.com/r/cloudflare/cloudflared
  # https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/tunnel-useful-commands/
  # https://github.com/Erisa/cloudflared-docker/tree/main
  cloudflared:
    container_name: cloudflared
    image: docker.io/cloudflare/cloudflared:latest
    restart: unless-stopped
    environment:
      - TUNNEL_TOKEN=${CF_TOKEN}
    command: tunnel --no-autoupdate run

  cloudflare-ddns:
    container_name: cloudflare-ddns
    image: docker.io/favonia/cloudflare-ddns:latest
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=100
      - CF_API_TOKEN=${CF_API_TOKEN}
      - DOMAINS=pavelp.cz
      - PROXIED=false
      - IP6_PROVIDER=none

  # Nginx for jekyll
  nginx:
    container_name: nginx
    image: lscr.io/linuxserver/nginx:latest
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Europe/Prague
    volumes:
      - nginx-config:/config
    ports:
      - 8080:80
    restart: unless-stopped

  # Nginx for pe5.cz
  nginx-pe5:
    container_name: nginx-pe5
    image: lscr.io/linuxserver/nginx:latest
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Europe/Prague
    volumes:
      - nginx-config-pe5:/config
    ports:
      - 8090:80
    restart: unless-stopped

~/docker/docker-compose-nextcloud.yml

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
version: "3.5"

# Changes:
# 2023-09-01: initial version based created from docker-compose.yml as separate
volumes:
  nextcloud-db:
  nextcloud-app-data:
  nextcloud-app-config:

services:

  # Maria DB for nextcloud
  # https://github.com/linuxserver/docker-mariadb/
  # https://github.com/linuxserver/docker-baseimage-alpine/
  nextcloud-db:
    image: lscr.io/linuxserver/mariadb:latest
    container_name: nextcloud-mariadb
    restart: unless-stopped
    environment:
      - PUID=1000
      - TZ=Europe/Prague
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=${NC_MYSQL_PASSWORD}
      - MYSQL_ROOT_PASSWORD=${NC_MYSQL_ROOT_PASSWORD}
    volumes:
      - nextcloud-db:/config
    env_file:
      - /home/pavel/docker/.env

  # Nextcloud application
  # https://hub.docker.com/r/linuxserver/nextcloud
  # https://github.com/linuxserver/docker-nextcloud/tree/master
  # https://github.com/linuxserver/docker-baseimage-alpine-nginx
  # https://github.com/linuxserver/docker-baseimage-alpine/
  nextcloud-app:
    image: lscr.io/linuxserver/nextcloud:26.0.2-ls246
    container_name: nextcloud-app
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Europe/Prague
    volumes:
      - nextcloud-app-config:/config
      - nextcloud-app-data:/data
    restart: unless-stopped
    ports:
      - 8081:80
    depends_on:
      - nextcloud-db
    env_file:
      - /home/pavel/docker/.env

~/docker/.gitignore

1
2
.env
volumes

~/docker/volumes

symlink to ../.local/share/containers/storage/volumes

~/bin

files are unchanged since july

1
2
3
4
5
6
7
8
~/bin/backup-devlog.sh
~/bin/backup-gitea.sh
~/bin/backup-nextcloud.sh
~/bin/podman-images-update.sh
~/bin/podman-jekyll-update.sh
~/bin/podman-pe5-update.sh
~/bin/shelly_monitor.sh
~/bin/shelly_plot_data_light.sh
This post is licensed under CC BY 4.0 by the author.