A small launch.
A space of your own.

Bring a machine with Docker. We’ll bring the pastebin.

Get it running.

You’ll need Docker Engine with the Docker Compose plugin (or Docker Desktop), plus Git.

Clone the app’s main branch and start it:

Build and start the app
git clone --branch main https://github.com/mubix/pastyspace.git
cd pastyspace
docker compose up -d --build

Open http://localhost:8000. Running it on another machine? Use that machine’s hostname or IP address and port 8000.

Choose New paste, add something, and click Save & lock. Or give the terminal a turn:

Create a test paste
echo "hello, space" | curl --data-binary @- http://localhost:8000/

You’ll get a new paste URL back. Open it to see your first saved paste.

Make it yours.

The included docker-compose.yml builds one container, publishes port 8000, and mounts a named volume for your data.

Setting Default & behavior
PASTY_MAX_MB 50. Maximum request size in MB, including text, all files, and upload overhead.
PASTY_DB /data/pastyspace.db in Docker. Keep the database under the mounted /data directory so it survives container replacement.
Published port 8000:8000. Change the left-hand number to use a different port on your server.

Need more room?

Edit the existing environment entry in docker-compose.yml. For a 100 MB request limit:

docker-compose.yml — environment setting
    environment:
      PASTY_MAX_MB: "100"

Then recreate the container with the new configuration:

Apply configuration changes
docker compose up -d

A shell variable or .env file alone won’t override the value hardcoded in the supplied Compose file.

Keep your little space running.

Pastes and attachments live in SQLite, in the named Docker volume pastydata (usually prefixed with the Compose project name). Paste bodies are stored as text; attached files are base64-encoded.

Normal stops, restarts, and container rebuilds retain this volume. There’s no automatic expiry.

Follow application logs
docker compose logs -f pastyspace
Stop the app and keep its data
docker compose down
Start the app again
docker compose up -d

Updating the app

Back up any data you want to keep, then run this in your app checkout. Resolve local changes before pulling.

Update your app checkout and rebuild
git pull --ff-only
docker compose up -d --build

For a file-level database backup, stop the app first and copy the database directory from the volume. For a backup while running, use SQLite’s backup API; don’t copy only the live .db file because recent writes may still be in its WAL file.

Resetting all pastes
This deletes your data.

docker compose down -v removes the named volume and every paste and attachment inside it. Only use it when you deliberately want a fresh start.

Decide who gets a link.

The supplied Compose file publishes port 8000 on the host’s interfaces. Anyone who can reach the app can create pastes and read URLs they know, including attachment URLs. There’s no built-in login, password protection, or rate limiting.

For a personal or team instance, use a trusted network or add authentication at your reverse proxy. For an internet-facing deployment, use HTTPS, set appropriate request limits at the proxy, and keep the app port behind it.

When your proxy runs on the same host, bind the app to loopback by changing the port mapping to 127.0.0.1:8000:8000. A proxy in another container needs its own network configuration.

The included server command trusts forwarded headers. Let only your trusted proxy reach it and have the proxy set those headers itself. Serve PastySpace at the root of its own hostname; its app routes assume /.

HTTPS also makes browser clipboard features, such as copying an image, work reliably. Localhost works for testing.

Your terminal is invited.

Replace http://localhost:8000 with your instance’s address. Text uploads return a URL that you can open or share.

Claim a named URL
echo "all systems go" | curl --data-binary @- \
  http://localhost:8000/mission-notes

Already claimed? The server responds with 409 Conflict. Existing pastes can’t be overwritten through the app.

Upload a file with optional notes
curl -F "file=@screenshot.png" -F "body=Here is the screenshot" \
  http://localhost:8000/

Repeat -F "file=@another-file" to attach more files. Add -F "syntax=markdown" or a language such as python to choose the text format.

Read a paste as plain text
curl http://localhost:8000/raw/mission-notes

A few things to know.

Can I edit or delete a saved paste?

There are no edit or delete controls. Make a new paste to share a revision. The server owner still controls the database; the app’s write-once rule is not tamper-proof storage.

Why does an unused URL return 404?

That’s intentional. PastySpace serves the claim editor with a 404 status when a URL has no saved paste. Save it to create the paste. Use the home page at / for a basic availability check.

What names can I claim?

Names are lowercase and up to 100 characters. Start with a letter or number, then use letters, numbers, dots, underscores, or hyphens. Some names are reserved for app routes. You only claim the URL when you save, so someone else could save there first.

Why was my upload rejected?

The default limit is 50 MB for the entire request, including multipart overhead. Text and all attachments share it. Check both PASTY_MAX_MB and any upload limit at your reverse proxy.

Can I run it without Docker?

Yes. Install the packages in requirements.txt into a Python virtual environment and run with a production WSGI server such as the included Gunicorn. Direct execution defaults to data/pastyspace.db in the application directory, unless PASTY_DB is set. The included Docker configuration is the simplest documented setup.

More detail: app source, Docker Compose up, and Docker Compose down.

You’ve made some space.

Now put something in it. Your next good snippet deserves a URL.