Introducing cozy_management, a new tool to manage your server

Our goal at Cozy is to allow everyone to take back the control of her personal data by owning its own cloud. According to your expertise and your wish, you can choose to host your server yourself or to rent a server from a hosting company. We want to make self-hosting easier, so we keep trying to improve the tools we provide to install and manage your Cozy. For example, we provide an image for Raspberry π and packages for Debian and Ubuntu.

This makes installation a lot easier, but configuring and managing your server requires sometimes to use some commands that may look intimidating to people not familiar with GNU/Linux, and to often have a look at the documentation, to find the right syntax. Fortunately, our colleague Nicolas, which manage the servers we host ourselves, is pretty lazy, he dislikes typing long commands with lots of parameters. So, every time he has to, he creates tools that wrap the complexity into an easier command. And so is born cozy_management, a tool that will assemble everything you need to manage your server.

the matrice in a console

You can install this tool from our Debian or Ubuntu repositories: the package is called python-cozy-management. If you’re using another distribution, you can install it with the package manager of Python: pip install cozy_management or from Github. (but please note that we only support amd64 on Debian and Ubuntu, and Debian on the Rapsberry π. This tool may not work as expected with other distibutions).

Here’s a quick overview of what you can already do with cozy_management:

  • install Cozy on a Debian or Ubuntu server: all you need to do is install cozy_management, then run cozy_management install_cozy;
  • manage the database: reset_token allows to reset the parameters used to connect to the database;
  • manage the certificates: generate_certificate creates and installs a self-signed certificate;
  • diagnose the state of your server:
    • ping_couchdb will tell you if the database is up;
    • show_diag and show_reporting display short or detailed reports that you can send us to help diagnose problems;
  • backup and restore all your data with the backup and restore subcommands.

cozy_management also provide tools for some rare use cases (build all dependencies of all your applications when you upgrade node.js or choose which application should be stopped first when memory becomes low) and low level functions to be used in shell scripts. To get a full list of available commands, just type cozy_management --help or read the documentation.

One last thing… Nicolas already started hacking a graphical UI allowing to use some of this commands without opening a console on your server. Give it a try! (it requires Node.js 4 or higher).

Soon, you will only need to know two tools to administrate your server:

  • cozy_management for the hosting server;
  • cozy-monitor for the applications installed in your Cozy.

Please note that this is a work in progress: each time we encounter a new need or you ask us for some new feature, we’ll be adding new commands to cozy_management. Using the “Release early, release often” approach, we’ve released this application while it’s still in its early development stage, in order to gather feedback. This tool is far from being complete for now, but we’ll improve it as we go. Try it, tell us what do you think, help us make it grow to he best satisfy all your need. We are counting on you!