Open-source project

auto-photo-upload

Upload photos from your DSLR to Pixelliott as you take them. A Raspberry Pi connected to your camera sends every frame to your account, so a failing SD card doesn't take your shoot with it, and clients can see photos while the shoot is still going.

What auto-photo-upload is

auto-photo-upload is an open-source project that we wrote and published on GitHub. It lets you upload photos to Pixelliott directly from your DSLR, using a Raspberry Pi that sits between the camera and the internet.

github

Open source

Written by Pixelliott and published on GitHub, so you can read the code, run it yourself and change it.

cloud

Automatic

Plug your DSLR into a Raspberry Pi and photos are uploaded to your Pixelliott account as you take them. There is nothing to press.

sd

A second copy

Each photo leaves the camera soon after it is taken, so a card that fails later does not take the photos you have already uploaded with it.

bolt

Fast

Clients, second shooters and anyone back at base can see photos shortly after they are taken, which suits weddings and events.

raspberry

Low cost

A Raspberry Pi Zero 2 W costs around £14 and uses very little power, so it is cheap to keep in the camera bag.

heart

Free to try

It works with a Pixelliott creator account, and signing up on the Basic plan is free.

Why upload as you shoot

Many photographers still get photos off the camera the same way: take out the card, find a reader and copy the files across. That works until the day it doesn't.

  • SD cards fail. Corruption, a bad write or a lost card can wipe out a shoot you cannot repeat, and uploading as you go means photos are already stored somewhere else.
  • There are no card swaps. You do not need to stop shooting, find a card reader or copy files across at the end of the day.
  • It is quick. Photos appear in your Pixelliott album shortly after you take them, so you can share an album with a client or guests while the event is still going.
  • You stay in control. You choose which album photos go to, and whether new albums and photos are visible and show their location.

How it works

  1. 1

    Connect the camera to the Pi

    A USB cable runs from your DSLR to the Raspberry Pi. The camera needs a USB interface and support in libgphoto, the library the project uses to talk to cameras.

  2. 2

    A script watches for new photos

    A Node 20 script running in a Docker container on the Pi checks the camera for newly captured photos. If it cannot reach the camera, it tries again every 10 seconds.

  3. 3

    Photos are uploaded to Pixelliott

    Using the Pixelliott sign-in details you set up in advance, each new photo is uploaded to the album you configured, either an existing album by its ID or a new one by name.

  4. 4

    It keeps running

    The container is set to restart automatically, so it starts again whenever the Pi is powered on and you do not need to log in to start it.

  5. 5

    Photos are in your library

    Uploaded photos appear in your Pixelliott library, where you can organise, share and sell them like any other photo.

What you need

The hardware is small and inexpensive. If you already own a compatible DSLR, a Raspberry Pi Zero 2 W is the main cost.

raspberry

A Raspberry Pi

Our guide uses a Raspberry Pi Zero 2 W because it is small, has Wi-Fi, is cheap and uses little power. The project is written for a Raspberry Pi running 64-bit Raspberry Pi OS with Docker.

camera

A DSLR with USB

The camera needs a USB interface and must be supported by libgphoto, with Image Capture listed under Additional Abilities in the libgphoto support table. Our guide uses a Canon 4000D.

usb

A USB cable

It connects the camera to the Pi. The Canon 4000D setup in our guide uses a short Micro USB to Mini USB cable.

sd

A micro SD card

For the Pi's operating system, Raspberry Pi OS Lite (64-bit).

wifi

An internet connection

Wi-Fi is the easiest option. When you are shooting on location, use a dedicated mobile connection or share your phone's mobile data.

battery

Power

For mobile use you need a battery. Allow roughly 500 mAh for every hour a Pi Zero 2 W has to run. We do not recommend powering the Pi from the camera battery.

users

A Pixelliott creator account

This is where photos are uploaded. Signing up on the Basic plan is free.

Setting it up

From scratch, allow 30 to 60 minutes. Here is the outline, and our step-by-step installation guide has every command.

  1. 1

    Write the operating system

    Use Raspberry Pi Imager to write Raspberry Pi OS Lite (64-bit) to the SD card. In the customisation options, set a hostname, a username and password, your Wi-Fi details and enable SSH.

  2. 2

    Connect over SSH

    Power on the Pi and connect to it from your computer, for example with PuTTY on Windows. Then update the system and expand the filesystem.

  3. 3

    Install Docker

    Install Docker Engine from Docker's official repository. The step-by-step guide lists every command.

  4. 4

    Download auto-photo-upload

    Download the project from GitHub straight onto the Pi.

  5. 5

    Set your details

    Edit the environment variables in the Dockerfile with your Pixelliott sign-in details and the album you want photos to go to.

  6. 6

    Build and run

    Build the Docker image and start the container. From then on it runs by itself.

Once Docker is installed, the project itself takes these commands on the Pi:

curl -sL https://github.com/pixelliott/auto-photo-upload/archive/master.tar.gz | tar xz
cd auto-photo-upload-master
sudo nano Dockerfile
sudo docker build -t auto-photo-upload-image .
sudo docker run -it -d --restart always --name auto-photo-upload --privileged -v /dev:/dev auto-photo-upload-image

Configuration

You set everything as environment variables in the project's Dockerfile before you build the image.

AUTO_PHOTO_UPLOAD_PROVIDER
Set to Pixelliott, which is currently the only supported provider.
AUTO_PHOTO_UPLOAD_USERNAME
The email address you sign in to Pixelliott with.
AUTO_PHOTO_UPLOAD_PASSWORD
Your Pixelliott password.
AUTO_PHOTO_UPLOAD_ALBUM_NAME
The name of the album that photos are uploaded to.
AUTO_PHOTO_UPLOAD_ALBUM_ID
Optional. The ID of an existing album to upload to.
AUTO_PHOTO_UPLOAD_ALBUM_VISIBLE
true or false. Whether the album is visible.
AUTO_PHOTO_UPLOAD_ALBUM_VISIBLE_LOCATION
true or false. Whether the album shows its location.
AUTO_PHOTO_UPLOAD_PHOTO_VISIBLE
true or false. Whether uploaded photos are visible.
AUTO_PHOTO_UPLOAD_PHOTO_VISIBLE_LOCATION
true or false. Whether uploaded photos show their location.

Troubleshooting

terminal

See what it is doing

Attach to the container with sudo docker attach auto-photo-upload to watch the script's output as it runs.

camera

The camera will not connect

The script retries every 10 seconds. If the output says it cannot connect, the cause is most likely the camera or the cable, so check the USB connection and that the camera is switched on.

wifi

Canon 4000D

On the Canon 4000D we had to turn off the camera's own Wi-Fi before it would connect over USB.

Before you start

auto-photo-upload suits photographers who are comfortable with a little tinkering. These are the things worth knowing first.

code

Some technical comfort helps

You will use SSH, Linux, a Raspberry Pi and Docker. From scratch, allow 30 to 60 minutes, and a little longer if those are new to you.

camera

Check your camera first

Support comes from libgphoto, so look up your camera model in its support table before you buy anything.

wifi

It needs a connection

Photos only reach Pixelliott while the Pi has internet access, so plan your Wi-Fi or mobile connection for the venue.

lock

Keep the Pi secure

Your Pixelliott sign-in details are stored in the Dockerfile on the Pi. Keep the Pi secure and never publish your edited copy of the project.

shield

The container is privileged

It runs with access to the Pi's devices so that it can reach the camera over USB. That is normal for this kind of project, but only run it on a Pi you control.

Frequently asked questions

What is auto-photo-upload?

auto-photo-upload is an open-source project, written by Pixelliott, that uploads photos from your DSLR to your Pixelliott account as you take them. It runs on a Raspberry Pi that is connected to the camera with a USB cable.

Which cameras does auto-photo-upload work with?

The camera needs a USB interface and must be supported by libgphoto, with Image Capture listed under Additional Abilities in the libgphoto support table. Our guide uses a Canon 4000D. Check your own model in the support table before you start.

Do I need a Raspberry Pi?

Yes. The project is built to run in Docker on a Raspberry Pi that is connected to your camera. We recommend the Raspberry Pi Zero 2 W because it is small, has Wi-Fi, costs around £14 and uses little power.

Does it protect my photos from SD card corruption?

Photos are uploaded shortly after they are taken, so ones that have already been uploaded are safe if the card later fails or is lost. It is an extra copy, not a replacement for your normal backups, and photos can only be uploaded while the Pi has an internet connection.

Is auto-photo-upload free?

The project is open source, and you can create a Pixelliott creator account on the Basic plan for free. You pay for the hardware, and uploaded photos count towards your plan's storage allowance.

How long does setup take?

Allow 30 to 60 minutes from scratch. It takes longer if you have not used SSH, Linux, Raspberry Pi or Docker before. Our step-by-step guide covers every command.

Can I choose which album my photos go to?

Yes. You can set an existing album by its ID or give the name of an album to upload to. You can also choose whether the album and the uploaded photos are visible and whether they show their location.

Can I use it away from Wi-Fi?

Yes, if the Pi has some other internet connection, such as a dedicated mobile connection or your phone's mobile data. For shooting on location you will also need a battery for the Pi.

Read more on our blog