Myazo is a self-hosted Gyazo alternative. It allows you to take a screenshot of part of your screen and automatically upload it to your own server.
It is comprised by a cross-platform client in Python which defers the actual taking of screenshot to OS built-in tools (macOS and Windows) or common utilities (GNU/Linux distributions). The server script, designed with cheap shared hosting in mind, is written with the ubiquitous PHP. Both the client and server are single files. You may separate the settings from the code if you wish.
It can also function as a mere Gyazo client, uploading directly to Gyazo's servers. In that case, you simply need the client and to set the configuration option
True. This mode won't send additional metadata like Gyazo's proprietary clients.
- Python >= 3.8 (check with
The following OSes have off-the-shelf compatibility. You can add more back ends for missing systems or configurations.
- GNU/Linux (presets for
- Windows 10 >= 1703 Creators Update (check with
winver- Build >= 10.0.15063.251)
- PHP >= 7.1 (check with
php -r 'echo phpinfo();')
- Install Python 3 and choose the version matching your CPU arch (x86 or x86-64);
- Install client requirements:
pip3 install -r requirements.txt
Alternatively, you can use poetry:
pip3 install poetry cd client/ && poetry install
You'll have to ensure that the python script is then ran with
- Choose or generate a secret key and fill in the variable
- Hash the secret key with bcrypt and fill in the variable
server/src/upload.php; You can do so with PHP itself:
php -r "echo password_hash('yoursecrethere', PASSWORD_DEFAULT);"
If you don't have access to a php cli, create a
hash.php file on your web server with
<?php file_put_contents(__FILE__, '<?php ' . password_hash('yoursecrethere', PASSWORD_DEFAULT)); and open it on your browser. Then, grab the hash from the
hash.php source and delete the file.
server/src/upload.phpto your web server;
- Disable directory listing so the list of uploaded screenshots isn't visible. For Apache, this can be done by uploading
server/src/.htaccessto your web server's web root (or possibly any other directory, as long as it is a parent of the one where screenshots are stored).
- Enter the full public url of the
server/src/upload.phpscript in the variable
There are two ways of configuring Myazo: either change the options in the scripts themselves, or use an external config file.
If an external file is found, Myazo extends the default config with the provided values. The following tables contain all options and where the user config file must be placed.
- Example Config:
- Placement Path:
~refers to the user directory)
|gyazo_server||False||Controls whether to use Gyazo's servers|
|gyazo_direct_link||True||Controls whether to open Gyazo direct image url|
|upload_script||'https://myazo.example.com/upload.php'||Full path to the upload.php file|
|clear_metadata||True||Controls clearing screenshot metadata before upload|
|open_browser||True||Controls open url in default browser after upload|
|copy_clipboard||True||Controls copy url to clipboard after upload|
|output_url||True||Controls print url to stdout after upload|
Please note that if
gyazo_server is set to
secret are ignored.
- Example Config:
- Placement Path:
|secretBcrypt||''||Bcrypt hashed secret|
|saveDirName||'/data/'||Writable directory where screenshots will be stored|
|maxScreenshotSize||2 * 1048576||Maximum size in bytes of uploaded screenshot|
|screenshotMimeType||'image/png'||MIME type of uploaded screenshot|
Please note that
maxScreenshotSize may be capped externally by PHP and the web server.
Make sure the file is executable by running
chmod +x /path/to/myazo.py.
[Desktop Entry] Name=Myazo Comment=Screenshot Exec=/path/to/myazo.py Terminal=false Type=Application Icon=applets-screenshooter Categories=Utility;Graphics; StartupNotify=false
myazo.pyw and create a new shortcut with target
pythonw.exe C:\path\to\myazo.pyw. Optionally, you can change the icon to a more fitting and better looking one (
shell32.dll's scissors one is decent). You can then pin the shortcut to the taskbar or start menu.
License.md for further information.