Misuse of Digitalocean

After distributing the packs to the students, Github decided to use 100 bucks in Digitalocean with a sense, or rather, as a cloud storage - rocking all kinds of little things. The memory, of course, in droplets is not so much (20 - 40 GB in budget options), but they are small things that weigh a little. The usual Ubuntu 14.04 x32 was chosen as the image, transmission with its convenient web face was chosen as the rocking chair, and apache2 with webdav was taken as a way to share data . It turned out Yandex.Disk on steroids (ssd, torrent downloading directly to disk, the ability to configure more buns), but with less hard disk space.

To start, a droplet with a bare system was created . Following it, ssh was accessed and the necessary programs installed.

sudo apt-get update
sudo apt-get install apache2 transmission-daemon

Next, a folder was created, which will store the data:

mkdir /webdav

Then everything went in 2 stages: setting up apache2 and setting up transmission.

Configuring apache2 was as follows:
First, apache modules related to webdav were activated for bash:

sudo a2enmod dav
sudo a2enmod dav_fs

Then, in the /etc/apache2/sites-enabled/000-defaut.conf file, I wrote the following contents:

        Alias /webdav /webdav
            DAV On
            Allow from all
            Satisfy any

At the end of the configuration, apache was rebooted:

sudo service apache2 restart

Next, transmission was configured, it was necessary to turn off whitelist IP addresses and change the login password of web muzzle users, as well as set the download folder - / webdav (the folder that we created earlier and specified in apache). The problem arose in that when editing the transmission-daemon configuration, the config data was not saved. The problem was explained in /etc/transmission-daemon/README.json - upon exit, the configuration files were overwritten, so first you had to stop the daemon, then edit the config, then start the daemon.

sudo service transmission-daemon stop

The lines of the .config / transmission-daemon / settings.json file where the changes were made:

"rpc-authentication-required": true,
"rpc-whitelist-enabled": false,
"rpc-username": "",
"rpc-password": "",
"download-dir": "/webdav",

Then the daemon was launched:

sudo service transmission-daemon start

All! The server is running, the web face is available on port 9091 (can be changed in settings.json).

Further operations to mount the folder were different on different systems, but overall it was something like

mount_webdav http:///webdav /mount/

I did not measure the droplet speed, but the 500 MB archive was downloaded in a couple of minutes, which I poured coffee.

Also popular now: