This python-home-server called "ultron-server" is a simple command line server. It can be used as an alternative to NAS or FTP servers. As its completely written in python, it can be easily improved and new features can be added by the user. The server itself handles files between the client and the server. All actions are symmetric encrypted with the primary key generated by the setup script. Options provided by the server are described in the help section of uc.py. Ultron-server has the possibility to serve as a package manager to install important tools the user may needs on any device. The packages will be downloaded and integrated in the system.
git clone https://github.com/rysecx/python-home-server && cd python-home-server
To setup the server on a device run the installation wizard:
sudo python3 installation-wizard.py
The program generates a user token for authentification and adds it to the valid-tokens.txt file where all valid users are stored in.
NOTE: The user token has to be copied to the same directory where the installation-wizard is located if one already exists! Otherwise the client setup will generate a new user token.
You can now start the server:
sudo us --a [ADDRESS] --p [PORT]
The server creates a err_log.txt file for errors occurred during runtime and a conn_log.txt file for logging incoming connections.
You can run ultron-server as background daemon when using systemd by running the following instructions:
sudo mv ultron.service /etc/systemd/system/ultron.service
sudo systemctl daemon-reload
sudo systemctl enable ultron.service
sudo systemctl start ultron.service
Ensure daemon is running:
sudo systemctl status ultron.service
To setup the client run once again the installation wizard:
sudo python3 installation-wizard.py
You can now run the command uc -h
to see all available options. By running the script for the first time the programm will guide you through the server configuration.
Run the following command to check if the authentification token is valid:
uc --auth /etc/ultron-server/token.txt
usi.py is an optional security script. It creates integrities of the files key.txt, token.txt and valid-token.txt. Therefore it can be excluded that these files have been compromised. You can use it by the following command:
sudo python3 usi.py
ultron package manager can be used to download necessary tools from the server. As an example you can use the provided packages folder which has to be copied to the server directory /ultron-server/packages