A webui/sync program to change your wallpapers.
Find a file
2025-08-23 10:26:55 +02:00
client Client downloads are now async 2024-08-31 22:15:00 +02:00
scripts Update README.md 2025-07-20 14:44:31 +02:00
server Commented 2024-08-31 09:05:44 +02:00
.gitignore saving progress 2024-09-06 23:50:40 +02:00
Cargo.toml Client downloads are now async 2024-08-31 22:15:00 +02:00
docker-compose.yml nginx 2024-08-31 08:41:13 +02:00
Dockerfile docker 2024-08-31 00:05:21 +02:00
LICENSE Initial commit 2024-08-29 11:38:48 +02:00
nginx.conf nginx 2024-08-31 08:41:13 +02:00
README.md Update README.md 2025-08-23 10:26:55 +02:00

DynamicWallpaper

A web UI and synchronization program to change your wallpapers.

(Yes, rsync is simpler and better. Anyway, it was fun to program DynamicWallpaper.)

Explanation 🧩

The server and web UI let users add and delete images.

The client sync tool should be run at intervals to keep local images in sync with the server. Then use any wallpaper program (such as feh) to set your wallpaper from the local collection.

Simply Put

  • Upload images through the web UI. You can delete them too.
  • Run the client. Images from the server are synced to a local directory.
  • Use your favorite wallpaper tool to pick a random image from that local directory.

Why

  • Learning opportunity.
  • Lets multiple computers and friends share the same wallpaper collection.

Installation 🧰

Server (Docker) 🐳

Tip

For a non-Docker installation, follow the standard Rust build workflow inside the server directory. Click here for more information.

Requirements

  • Docker and Docker Compose

Steps

  1. Clone the repo

    git clone https://github.com/Urpagin/DynamicWallpaper.git
    
  2. Create a .env file next to docker-compose.yml and add:

    PORT=<exposed port>
    NGINX_USER=<user for web UI auth>
    NGINX_PASSWORD=<password for web UI auth>
    
  3. Start the containers

    sudo docker compose up -d --build
    

Tip

The --build flag rebuilds the image so code updates are reflected.

  1. Open http://127.0.0.1:<PORT> to access the app.

Note

Once the stack is running, the wallpapers_server directory will contain the wallpapers.

Client 🖥️

This part is a little more hazardous. You can try running scripts/install_arch_linux_systemctl.py. This script requires systemd and has been tested only on Arch Linux.

Note

Recommended approach

Build the client component manually (see the tip in the Server (Docker) section). Then copy scripts/update_wallpaper_feh.sh somewhere convenient, make it executable, and have it autostart.

cargo build --release -p client
chmod +x /path/to/update_wallpaper_feh.sh

On X11, invoke the script from a startup file like ~/.xinitrc or ~/.xsession. On Wayland with Hyprland, add a line like exec-once = /path/to/update_wallpaper_feh.sh & to ~/.config/hypr/hyprland.conf.

You can also manually invoke the client binary directly with these arguments:

Note

The example assumes you are protecting the server behind NGINX basic auth.

./client \
  --endpoint "https://wallpapers.yourdomain.com" \
  --directory "/path/to/downloaded/images" \
  --user "<optional basic auth user>" \
  --password "<optional basic auth password>"

Security 🔒

I am a beginner, so I cannot guarantee there are no vulnerabilities.

The provided Docker Compose setup includes a simple password-protected proxy using NGINX.