Giter VIP home page Giter VIP logo

syno-cli's Introduction

Synology CLI

Unofficial wrapper over Synology API in Go.

Focus on administrative tasks.

Supports:

  • X86-64 and ARM builds
  • Universal docker image (arm and amd64)
  • As CLI and as library

Installation

  • Pre-built binaries from releases
  • Docker (universal): ghcr.io/reddec/syno-cli:<release> (see releases)
  • From source (requires latest Go): go install github.com/reddec/syno-cli/cmd/syno-cli@latest

Usage

Each command supports --help option.

main

Usage:
  syno-cli [OPTIONS] <cert>

Unofficial CLI for Synology DSM
syno-cli 0.0.1, commit none, built at 2022-01-10T14:02:11Z by goreleaser
Author: Aleksandr Baryshnikov <[email protected]>

Help Options:
  -h, --help  Show this help message

Available commands:
  cert  manager certificates (aliases: certificates, certificate, certs, cert, c)

cert

Usage:
  syno-cli [OPTIONS] cert <command>

Help Options:
  -h, --help      Show this help message

Available commands:
  auto    automatically issue and push certificates (aliases: dns01, lego, a)
  delete  delete certificate (aliases: remove, rm, del, d)
  list    list certificates (aliases: ls, l)
  upload  upload certificate (aliases: up, u)

automatic certs

Usage:
  syno-cli [OPTIONS] cert auto [auto-OPTIONS] [domain...]

Help Options:
  -h, --help                   Show this help message

[auto command options]
      -c, --cache-dir=         Cache location for accounts information (default: .cache) [$CACHE_DIR]
      -r, --renew-before=      Renew certificate time reserve (default: 720h) [$RENEW_BEFORE]
      -e, --email=             Email for contact [$EMAIL]
      -p, --provider=          DNS challenge provider [$PROVIDER]
      -D, --dns=               Custom resolvers (default: 8.8.8.8) [$DNS]
      -t, --timeout=           DNS challenge timeout (default: 1m) [$TIMEOUT]
      -d, --domains=           Domains names to issue [$DOMAINS]

    Synology Client:
          --synology.user=     Synology username [$SYNOLOGY_USER]
          --synology.password= Synology password [$SYNOLOGY_PASSWORD]
          --synology.url=      Synology URL (default: http://localhost:5000) [$SYNOLOGY_URL]
          --synology.insecure  Disable TLS (HTTPS) verification [$SYNOLOGY_INSECURE]

Download station

In progress.

API supported:

  • create task
  • list tasks

syno-cli's People

Contributors

alantang888 avatar reddec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

syno-cli's Issues

Domains as aliases

Script is working flawlessly with DSM7.1 however I would prefer to use a single certificate with multiple domains as aliases (in my case the root + wildcard domain). Any chance of this getting implemented?

Timeout Error

Hello, I am not a very professional user. I am using docker for the first time. I tried to do the steps properly and I am getting timepout error as below. I'll be happy if you can help me. Thanks.

Ekran görüntüsü 2024-07-18 112234

Ekran görüntüsü 2024-07-18 131339_Aaaa

CA Certificate

Hello, is it possible to generate a CA certificate via software?

questions from log output

image

It would be nice if there was a log entry that said no cert pull was needed or cert is still valid not pulling a new one. Perhaps giving an ETA until a new cert will be needed if you are already processing the local certificate?

The "server restarted" message is also a tiny bit unclear. I assume it means if the cert was in use by a service in DSM that one (or more) service(s) would be restarted? Could you list the service being restarted if so?

Synology error 407

Hello,

Towards the end of the script, when it comes to setting the certificates, I get this error: "failed push to Synology: login: invoke api: response: API error code: 407". The address is correct and everything else works.

(My NAS has DSM Version 7.2-64570)

Thank you for your help 😄

Store session info for long time non interactive auth

Hello.

Thanks for the CLI it is great way for update certificate on synology.

  1. I don't want to store login/password as plain text
  2. I have enabled 2-factor auth for administrators.

Now CLI doesn't support the cases for use in authomation

What you think about

  1. Add optional otp-code (will use for auth request)
  2. Option for save auth data (session, token) into a file and use the file for next commands

I can create PR with the functions if you are ok.

ignore HTTPS warning

Is there a way to use the "-insecure" flag to ignore a bad SSL cert when using a https URL?

docker compose

I'm trying to use this with Docker Compose and getting an error related to the "cert" command. Do you have any guidance with Docker Compose? Should the "cert" command be an environmental variable instead? Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.