# Self-host Shaarli

> A minimalist personal bookmark manager, link sharer and microblog with no database. zlib licensed. On first open, the install page asks you to create the admin login.

- Page: https://levelrail.com/templates/shaarli/
- JSON: https://levelrail.com/templates/shaarli.json
- Category: Productivity
- Licence: Zlib (Permissive license)
- Source: https://github.com/shaarli/Shaarli
- Upstream docs: https://shaarli.readthedocs.io/

## Requirements
- Memory: about 128 MiB
- amd64: published, arm64: published
- Needs configuration before start: no
- Pinned image tag: v0.16.10

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| shaarli | ghcr.io/shaarli/shaarli | v0.16.10 | 80 | data -> /var/www/shaarli/data; cache -> /var/www/shaarli/cache |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| shaarli | TZ | preset |

## Deploy

### CLI

```bash
levelrail-cli templates install shaarli --name my-shaarli
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain shaarli=app.example.com.

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/shaarli/install \
  -d '{
    "name": "my-shaarli"
  }'
```

Create a token in the dashboard first. Name, env and domains are the request fields.

## Questions

### Can I deploy Shaarli on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Shaarli, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image ghcr.io/shaarli/shaarli:v0.16.10 is what you deploy there.

Self-host Shaarli, Shaarli docker compose file, deploy Shaarli on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
