create and start a new container :
lxc-container instruction page
as suggested by @j0n4s82, I forgot to add that ethtool is not installed by default on openwrt on the omnia, therfore:
opkg update
opkg install ethtool
Command for bug dhcliend debian (to be run on turris shell):
ethtool -K br-lan tx off
Enter the container shell by:
lxc-attach -n container_name
On the container shell first renew the dhcp lease and then install minimal utilities:
dhclient -r eth0
apt-get install ssh man apt-utils nano wget unzip tar sudo git
As root, edit the sshd_config file in /etc/ssh/sshd_config:
nano /etc/ssh/sshd_config
Add a line in the Authentication section of the file that says PermitRootLogin yes. This line may already exist and be commented out with a “#”. In this case, remove the “#”.
"#"Authentication:
"#"LoginGraceTime 2m
PermitRootLogin yes
"#"StrictModes yes
"#"MaxAuthTries 6
"#"MaxSessions 10
Save the updated /etc/ssh/sshd_config file.
Restart the SSH server:
service sshd restart
Change host name, edit:
nano /etc/hostname
edit /etc/hosts with domain-name ??? (i’m not sure it’s necessary, remove the [“”] but not the #)
“#”-> xxx.xxx.xxx.xxx yourdomain.com
Installation of nextcloud prerequisites(note down the MariaDB root password as you’ll need it later)
apt-get install apache2 mariadb-server libapache2-mod-php5 php5-gd php5-json php5-mysql php5-curl php5-intl php5-mcrypt php5-imagick
Download and deploy nextcloud in /var/www/
wget https://download.nextcloud.com/server/releases/nextcloud-10.0.1.zip
unzip nextcloud-10.0.1.zip -d /var/www/
Install nextcloud (taken from nextcloud manual installation page ):
Change the ownership of your nextcloud directory to your HTTP user, like this example for Debian/Ubuntu. You must run occ as your HTTP user; see Run occ As Your HTTP User:
sudo chown -R www-data:www-data /var/www/nextcloud/
Use the occ command to complete your installation. This takes the place of running the graphical Installation Wizard:
cd /var/www/nextcloud/
sudo -u www-data php occ maintenance:install --database
“mysql” --database-name “nextcloud” --database-user “root” --database-pass
“password” --admin-user “admin” --admin-pass “password”
Nextcloud is not installed - only a limited number of commands are available
Nextcloud was successfully installed
Change directory to your preferred one and download and install certbot from letsencrypt to obtain certificates for your server for free:
frist add jessie backports to your source.lists or venv.sh will fail:
debian backports instructions:
then
apt-get update && apt-get upgrade
cd certbot
./letsencrypt-auto-source/letsencrypt-auto --os-packages-only
./tools/venv.sh
source ./venv/bin/activate
certbot --apache -d yourdomain.com -d www.yourdomain.com --keep-until-expiring --agree-tos --email youremail@somedomain.com
a permanent fix for the bug in ISC DHCP Client:
apt-get remove isc-dhcp-client && apt-get install dhcpcd5
as advised in this post
Point your browser to yourdomain.com and enjoy!!!