igoryakus

ShotHost

The fastest way to share screenshots.

Take a screenshot and its link is already in your clipboard. Meanwhile the file uploads in the background to your own server, with no public image hosts, ads or captchas.

On a Mac it is a native menu bar app: all settings in one window, pause, manual file upload, recent links and a notification with an "Open" button. For Windows there is a PowerShell script.

macOS app Windows Your own VPS Open source
01
Screenshot saved SCR-20261011-jvpl.png
02
Link in the clipboard yakus.ru/shothost/SCR-20261011-jvpl_2af3a7d3
03
Uploading to your server

Features

  • Instant uploadThe screenshot goes to the server the moment the file is written to disk.
  • Link right awayThe link is in your clipboard before the upload finishes, so you can share it right away.
  • Top speedDirect upload to your VPS, with none of the queues and delays of public image hosts.
  • Your serverImages live on your own VPS, fully under your control.
  • Menu bar appA native macOS app: setup in one window, connection check, launch at login.
  • No adsNo banners, pop-ups, watermarks or captchas.
  • Kept foreverFiles stay until you delete them yourself, nothing disappears automatically.
  • Open sourceAll the code is on GitHub under the MIT license: the server in PHP, the app in Swift.

Setup guide

Your own server, an SSH key and a client on your computer. Seven steps, and your screenshots fly to your VPS.

  1. 01

    Prepare the VPS

    You need your own VPS. Make sure you have SSH access with root or sudo rights.

  2. 02

    Set up SSH key access

    Secure, automatic screenshot upload needs SSH key access.

    Create a key:

    • macOS / Linux: Open Terminal and run ssh-keygen -t ed25519. Press Enter until it finishes.
    • Windows: Open PowerShell or Command Prompt and run ssh-keygen -t ed25519 as well.

    Install the key on the server:

    Run this on your computer (replacing user and ip):

    ssh-copy-id -i ~/.ssh/id_ed25519.pub user@your_server_ip

    If ssh-copy-id is not available, copy the contents of your .pub file into ~/.ssh/authorized_keys on the server by hand.

  3. 03

    Install Nginx, PHP and Git

    Run these commands on the server:

    sudo apt update
    sudo apt install nginx php-fpm git
  4. 04

    Clone the project

    Go to the web server directory and clone the project. The files folder must be owned by the user you log in with over SSH, otherwise the client can’t upload to it. The www-data group and 2775 permissions let Nginx serve the files and give new files the same group:

    cd /var/www/html
    sudo git clone https://github.com/igoryakus/shothost.git
    sudo chown -R $USER:www-data /var/www/html/shothost
    sudo chmod 2775 /var/www/html/shothost/files
  5. 05

    Configure Nginx

    Edit the site configuration (usually /etc/nginx/sites-available/default):

    location /shothost/ {
        try_files $uri $uri/ /shothost/index.php?$args;
    
        location ~ \.php$ {
            include snippets/fastcgi-php.conf;
            fastcgi_pass unix:/var/run/php/php8.3-fpm.sock; # Check your PHP version    }
    }

    Then restart Nginx: sudo systemctl restart nginx

  6. 06

    Set up the client (macOS)

    1. Download ShotHost for macOS from the Download section above. You can also build the app yourself: ./macos-app/build-app.sh (needs Xcode Command Line Tools).

    2. Open ShotHost.dmg and drag ShotHost.app to Applications. Launch ShotHost from Applications. The app is signed without an Apple certificate, so the first time macOS blocks it and shows a warning: click "Done", open System Settings → Privacy & Security, scroll to the Security section, click "Open Anyway" next to "ShotHost was blocked" and confirm with your password or Touch ID. You only need to do this once. If the button is missing, launch ShotHost again to make it appear.

    3. On first launch the settings window opens. Fill in the fields:

    • Folder: where macOS saves screenshots, for example ~/Pictures/Screenshots. You can set it in the Screenshot app (Shift+Cmd+5) → Options → Save to.
    • Server: the IP address or domain of your VPS.
    • SSH port: 22 unless you changed the SSH port.
    • User: the user you log in with over SSH (step 2).
    • SSH key: the private key from step 2, for example ~/.ssh/id_ed25519 (the file without .pub).
    • ShotHost folder: the folder of the cloned project on the server. With the setup from step 4 it is /var/www/html/shothost/. Files are uploaded to its files subfolder. If the project lives elsewhere, get the path on the server with cd path/to/shothost && pwd.
    • Site: the domain or IP where ShotHost opens, without a path, for example https://example.com. The link is built from the site and the folder name: https://example.com/shothost/screenshot_name. An example link is shown below the fields.
    • Show a window with the link after upload: after an upload a window appears, and its "Show" button opens the screenshot in the browser. The window closes by itself after 10 seconds. Turn it off to get a notification instead.

    Click "Test connection". If a green check mark appears, click "Save". The app is in Russian for now, so the error reads «Соединение есть, но папка … не найдена или недоступна для записи»: SSH works, but the folder doesn’t exist or the user can’t write to it. Check the folder on the server with ls -ld /var/www/html/shothost/files: the owner must be your user. If it isn’t, run the chown and chmod commands from step 4.

    The app has no window, only a menu bar icon. If you don’t see the icon (for example, it is hidden behind the notch), launch ShotHost from Applications again and the settings will open.

    4. To keep the app running all the time, turn on "Launch at login" in the settings.

  7. 07

    Set up the client (Windows)

    1. Download the Windows script shothost.ps1 from the Download section above.

    2. Open it in a text editor and set the variables at the top of the file (folder paths, server details).

    3. To run it, open PowerShell and run the script. To keep it running in the background, create a shortcut in the Startup folder (Win+R → shell:startup) with this command:

    powershell.exe -WindowStyle Hidden -File "C:\path\to\shothost.ps1"

    Note: make sure running scripts is allowed. You can check the current policy with:

    Get-ExecutionPolicy -List

    If CurrentUser or LocalMachine is not set to RemoteSigned or Unrestricted, allow running scripts:

    Set-ExecutionPolicy RemoteSigned -Scope CurrentUser