Install tor on debian 9 stretch

Add to source:
/etc/apt/sources.list.d/tor.list:

deb http://deb.torproject.org/torproject.org stretch main
deb-src http://deb.torproject.org/torproject.org stretch main

Now install keys and tor:

gpg --keyserver keys.gnupg.net --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
apt-get install tor deb.torproject.org-keyring

Add backports repo.
Create /etc/apt/sources.list.d/backports:
deb http://httpredir.debian.org/debian jessie-backports main contrib non-free
Now update apt cache:
sudo apt-get update
So that failed
Installing from source:
apt-get install libevent-dev
wget https://www.torproject.org/dist/tor-0.3.0.8.tar.gz
tar xvf tor-0.3.0.8.tar.gz
cd tor-0.3.0.8


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Install MediaWiki a self hosted wikipedia like app on your server

Install php-apcu:

sudo apt-get install php5-apcu

Now download the latest package and install it:

wget https://releases.wikimedia.org/mediawiki/1.28/mediawiki-1.28.2.tar.gz
tar xvf mediawiki-1.28.2.tar.gz
mv mediawiki-1.28.2 wiki
chown -R www.www *

Now visit yoursite.com/wiki and complete installation there.
In your shell, create a mysql database, user and grant access:

mysql -u root -p
MariaDB [(none)]> create database if not exists mydbname;
use mydbname;
create user 'dbusr'@'localhost' identified by 'password';
grant all on mydbname.* to 'dbusr'@'localhost';
FLUSH PRIVILEGES;
quit;

Now use these auth details on the site.

After installation is done, to change password:
Find user by email id:

mysql -u root -p
show databases;
use oscewiki;
show tables;
SELECT user_name FROM wikiuser WHERE user_email = [email protected]';
quit;
cd maintenance
sudo php changePassword.php --user=myusername --password=newpassword

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Doing a security audit of linux system

I just discovered lynis which can be done on the local system-it’s a simple script which can be run on the shell without any installation.

Get it from https://cisofy.com/lynis/

wget https://cisofy.com/files/lynis-2.4.8.tar.gz
tar xvf lynis-2.4.8.tar.gz
cd lynis
./lynis audit system

The final log is saved to /var/log/lynis.log


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Import files to seafile from cli

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8756C4F765C9AC3CB6B85D62379CE192D401AB61
echo deb http://dl.bintray.com/seafile-org/deb jessie main | sudo tee /etc/apt/sources.list.d/seafile.list
sudo apt-get update
apt-get install seafile-cli

Now setup cli:
# choose a folder where to store the seafile client settings e.g ~/seafile-client

mkdir ~/seafile-client            # create the settings folder
seaf-cli init -d ~/seafile-client  # initialise seafile client with this folder
seaf-cli start
seaf-cli is command line interface for seafile client.
Subcommands:
    init:           create config files for seafile client
    start:          start and run seafile client as daemon
    stop:           stop seafile client
    list:           list local liraries
    status:         show syncing status
    download:       download a library from seafile server
    sync:           synchronize an existing folder with a library in
                        seafile server
    desync:         desynchronize a library with seafile server
    create:         create a new library
Detail
======
Seafile client stores all its configure information in a config dir. The default location is `~/.ccnet`. All the commands below accept an option `-c <config-dir>`.
init
----
Initialize seafile client. This command initializes the config dir. It also creates sub-directories `seafile-data` and `seafile` under `parent-dir`. `seafile-data` is used to store internal data, while `seafile` is used as the default location put downloaded libraries.
    seaf-cli init [-c <config-dir>] -d <parent-dir>
start
-----
Start seafile client. This command start `ccnet` and `seaf-daemon`, `ccnet` is the network part of seafile client, `seaf-daemon` manages the files.
    seaf-cli start [-c <config-dir>]
stop
----
Stop seafile client.
    seaf-cli stop [-c <config-dir>]
Download
--------
Download a library from seafile server
    seaf-cli download -l <library-id> -s <seahub-server-url> -d <parent-directory> -u <username> -p <password>
sync
----
Synchronize a library with an existing folder.
    seaf-cli sync -l <library-id> -s <seahub-server-url> -d <existing-folder> -u <username> -p <password>

First retrieve the library id by browsing on the server -> it's in the url after "/repo/"

usage: seaf-cli sync [-h] [-c CONFDIR] [-l LIBRARY] [-s SERVER] [-u USERNAME]
                     [-p PASSWORD] [-d FOLDER]

optional arguments:
  -h, --help            show this help message and exit
  -c CONFDIR, --confdir CONFDIR
                        the config directory
  -l LIBRARY, --library LIBRARY
                        library id
  -s SERVER, --server SERVER
                        URL for seafile server
  -u USERNAME, --username USERNAME
                        username
  -p PASSWORD, --password PASSWORD
                        password
  -d FOLDER, --folder FOLDER
                        the existing local folder


desync
------
Desynchronize a library from seafile server
    seaf-cli desync -d <existing-folder>
create
------
Create a new library
    seaf-cli create -s <seahub-server-url> -n <library-name> -u <username> -p <password> -t <description> [-e <library-password>]
'''

Get library id:

seaf-cli list-remote -s  "https://cloud.joel.co.in" -u "[email protected]" -p "mypassword"
Name    ID
My Library d9d122233-43b6-4af3-21dde-59aawwwww45df11

Now download to local folder:

seaf-cli download -l "d9d122233-43b6-4af3-21dde-59aawwwww45df1" -s  "https://cloud.joel.co.in" -d /tmp/lib -u "[email protected]" -p "mypassword"
Starting to download ...
Library d9d122233-43b6-4af3-21dde-59aawwwww45df1 will be downloaded to /tmp/lib

Now add to this directory:

cp /tmp/att/* /tmp/lib/My\ Library/Shanghumukham-April\ 2017/Arun/

You dont need to upload/sync after adding files. The daemon automatically does that. In fact, if you attempt to sync you get an error:

seaf-cli sync -l "d9d122233-43b6-4af3-21dde-59aawwwww45df1" -s  "https://cloud.joel.co.in" -d /tmp/lib -u "[email protected]" -p "mypassword"
Starting to download ...
Traceback (most recent call last):
  File "/usr/bin/seaf-cli", line 832, in <module>
    main()
  File "/usr/bin/seaf-cli", line 828, in main
    args.func(args)
  File "/usr/bin/seaf-cli", line 568, in seaf_sync
    email, random_key, enc_version, more_info)
  File "/usr/lib/python2.7/dist-packages/pysearpc/client.py", line 112, in newfunc
    return fret(ret_str)
  File "/usr/lib/python2.7/dist-packages/pysearpc/client.py", line 25, in _fret_string
    raise SearpcError(dicts['err_msg'])
pysearpc.common.SearpcError: Repo already exists

It may be a good option to desync at the end lest you end up deleting needed folders/files.

Stopping sync:

seaf-cli desync -d /tmp/lib/My\ Library

Syncing to existing local library after desyncing:

seaf-cli sync -l "d9d122233-43b6-4af3-21dde-59aawwwww45df1" -d /root/SeafileLocalSync -s  "https://cloud.joel.co.in" -u "[email protected]"

More information from the Wiki:

Seafile client for a Cli server
Installation
You can follow this documentaion to install Seafile CLI client on various Linux distributions.

Basic Usage
Initialise & start the client

# choose a folder where to store the seafile client settings e.g ~/seafile-client
mkdir ~/seafile-client            # create the settings folder
seaf-cli init -d ~/seafile-client  # initialise seafile client with this folder
seaf-cli start
Download a library from a server

retrieve the library id by browsing on the server -> it's in the url after /repo/
then
seaf-cli download -l "the id of the library" -s  "the url + port of server" -d "the folder where the library folder will be downloaded" -u "username on server" [-p "password"]
seaf-cli status  # check status of ongoing downloads
# Name  Status  Progress
# Apps    downloading     9984/10367, 9216.1KB/s
Note: if you not supply the password parameter in the command, it will be asked later, which is more safe.

Example: `seaf-cli download -l 0536c006-8a43-449e-8718-39f12111620d -s http://cloud.seafile.com -d /tmp -u [email protected]`
Download a library from a server and sync with an existing folder.

# This is the same as download : replace download by sync 
seaf-cli sync -l "the id of the library" -s  "the url + port of server" -d "the folder where the library will be synced with" -u "username on server" -p "password"
Man documentation
seaf-cli is command line interface for seafile client.

Subcommands:

init                Initialize config directory
start               Start ccnet and seafile daemon
stop                Stop ccnet and seafile daemon
list                List local libraries
list-remote         List remote libraries
status              Show syncing status
download            Download a library from seafile server
download-by-name    Download a library defined by name from seafile server
sync                Sync a library with an existing foler
desync              Desync a library with seafile server
create              Create a library
config              Configure seafile client
Running seaf-cli -h will show the above help. For each subcommand, you can also use -h option to get help, e.g. seaf-cli download -h.

Detail
Seafile client stores all its configure information in a config dir. The default location is ~/.ccnet. All the commands below accept an option -c <config-dir>.

init
Initialize seafile client. This command initializes the config dir. It also creates sub-directories seafile-data and seafile under parent-dir. seafile-data is used to store internal data, while seafile is used as the default location put downloaded libraries.

seaf-cli init [-c <config-dir>] -d <parent-dir>
A file named seafile.ini will be created under ~/.ccnet to record the location of seafile-data directory.

If you want to run multiple instances of Seafile cli client in the same machine, you can specify different config-dir and parent-dir when initializing different client instances. Then the instances can run without interfering each others. When starting the instances, just specify ccnet config directories with the -c option.

start
Start seafile client. This command start ccnet and seaf-daemon, ccnet is the network part of seafile client, seaf-daemon manages the files.

seaf-cli start [-c <config-dir>]
stop
Stop seafile client.

seaf-cli stop [-c <config-dir>]
Download
Download a library from seafile server

seaf-cli download -l <library-id> -s <seahub-server-url> -d <parent-directory> -u <username> [-p <password>]
sync
Synchronize a library with an existing folder.

seaf-cli sync -l <library-id> -s <seahub-server-url> -d <existing-folder> -u <username> [-p <password>]
desync
Desynchronize a library from seafile server

seaf-cli desync -d <existing-folder>
create
Create a new library on server

seaf-cli create [-h] -n library-name -t description [-e library-password] -s server -u username -p password
Skip SSL certificate verify
If you're using self-signed certificate on the server, you should ask the client to skip verifying certificate.

seaf-cli config -k disable_verify_certificate -v true
Set Transfer Speed Limit
Set upload speed limit to 1MB/s :

seaf-cli config -k upload_limit -v 1000000
Set download speed limit to 1MB/s :

seaf-cli config -k download_limit -v 1000000

To sync your Dropbox folder to a new library in Seafile, create a library in Seafile named Dropbox. Then install Dropbox headless on the server and start the daemon:

64-bit:

cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -

Next, run the Dropbox daemon from the newly created .dropbox-dist folder. You will need to authorize after starting the daemon:

~/.dropbox-dist/dropboxd
Dowload the Dropbox helper python script if you want fine grained control:
wget https://www.dropbox.com/download?dl=packages/dropbox.py
mv download\?dl\=packages%2Fdropbox.py dropbox.py
chmod +x dropbox.py
./dropbox.py

Now create a library in Seafile, note its library id (the sequence after /lib/)
Make seafile sync to existing Drobox directory

seaf-cli sync -l [libid] -s "https://cloud.yoursom.com" -u [Username] -d ~/Dropbox

To sync Google Drive:
First install the cli:
apt-get install git cmake build-essential libgcrypt11-dev libyajl-dev \
libboost-all-dev libcurl4-openssl-dev libexpat1-dev libcppunit-dev binutils-dev
git clone https://github.com/Grive/grive.git
cd grive
dpkg-buildpackage -j4 -uc -us
dpkg -i ../grive*deb
mkdir ~/GoogleDrive
cd ~/GoogleDrive
grive -a
seaf-cli sync -l [libid] -s “https://cloud.yoursom.com” -u [Username] -d ~/GoogleDrive
grive &
[/bash]

grive doesnt run as a daemon, so create a cron job to sync files every 5 minutes:

*/5 * * * * cd /root/GoogleDrive && /usr/bin/grive

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

How to create a personal piratebay proxy

You need a VPS. Boot it up, login as root:
cd /root
apt-get install libpcre3 libpcre3-dev zlib1g zlib1g-dev openssl libssl-dev gcc make git socat screen
wget http://nginx.org/download/nginx-1.11.13.tar.gz
tar xvf nginx-1.11.13.tar.gz
git clone git://github.com/yaoweibin/ngx_http_substitutions_filter_module.git
tar xzvf nginx-nginx-1.10.3.tar.gz
cd ~/nginx-1.11.13
./configure –with-http_ssl_module –add-module=~/ngx_http_substitutions_filter_module
make && make install
cd /usr/local/nginx/
./sbin/nginx

Test by going to the ip address of host.

cd /usr/local/nginx/conf
mv nginx.conf nginx.conf-backup
emacs nginx.conf

Add the code:

worker_processes auto;
events {
  worker_connections 1024;
}
http {
  include  mime.types;
  default_type application/octet-stream;
  sendfile on;
  gzip on;
  server {
    listen 80;
    server_name server_ip;

    location / {
    proxy_pass http://127.0.0.1:81/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
	}
  }
}

Start nginx after stopping it:

/usr/local/nginx/sbin/nginx -s stop
/usr/local/nginx/sbin/nginx

Create a daemon:

emacs ~/socat.sh
#!/bin/bash
socat tcp4-LISTEN:81,reuseaddr,fork,keepalive,bind=127.0.0.1 SOCKS4A:127.0.0.1:uj3wazyk5u4hnvtk.onion:80,socksport=9050

Run the daemon

screen -A -m -d -S SOCAT_DAEMON ~/socat.sh

To start it at boot, add to /etc/rc.local

/username/socat.sh

Enjoy

Credits:
1. https://proxybay.one/setup.html
2. http://tor.stackexchange.com/questions/13792/how-can-i-nginx-reverse-proxy-to-onion-site-which-is-on-tor-network/13884


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Log and display correct visitor ip when using cloudflare

Logging Real Visitor IP Addresses: mod_cloudflare for Apache httpd
Because Cloudflare acts as a proxy, you will notice changes to the way that your website visitors’ IP addresses are displayed both in your server logs and web applications – notably that all access appears to be coming from Cloudflare IP addresses. You can read more about the reasons for this in our knowledge base article.

You can change this behavior and log & display the actual visitor IP addresses by using mod_cloudflare.

Install mod_cloudflare:
Download appropriate Debian .deb file from https://www.cloudflare.com/technical-resources/#mod_cloudflare
Eg:

wget https://www.cloudflare.com/static/misc/mod_cloudflare/debian/mod_cloudflare-jessie-amd64.latest.deb
dpkg -i mod_cloudflare-jessie-amd64.latest.deb

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Compile and install nemo file manager on nemo in Ubuntu Xenial.

Edit:
Just run this (As advised by JosephMcc, a nemo contributor):

mkdir nemosrc
cd nemosrc
git clone https://github.com/linuxmint/nemo.git
sudo apt build-dep nemo
sudo apt install gnome-pkg-tools libxt-dev python3-polib
dpkg-buildpackage
sudo dpkg -i ../*deb
git clone https://github.com/linuxmint/nemo-extensions
cd nemo-extensions
./buildall
sudo dpkg -i *deb

Create /etc/apt/sources.list.d/mint.list:

deb http://packages.linuxmint.com/ rosa main

To install python-nemo:

sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 3EE67F3D0FF405B2
sudo apt update
sudo apt-get -f install
sudo dpkg -i *deb

Closely watch for output. Correct output looks like this:

(Reading database ... 194677 files and directories currently installed.)
Preparing to unpack nemo-audio-tab_3.2.1_all.deb ...
Unpacking nemo-audio-tab (3.2.1) over (3.2.1) ...
Preparing to unpack nemo-compare_3.2.1_all.deb ...
Unpacking nemo-compare (3.2.1) over (3.2.1) ...
Preparing to unpack nemo-emblems_3.2.3_all.deb ...
Unpacking nemo-emblems (3.2.3) over (3.2.3) ...
Preparing to unpack nemo-fileroller_3.2.1_amd64.deb ...
Unpacking nemo-fileroller (3.2.1) over (3.2.1) ...
Preparing to unpack nemo-image-converter_3.2.0_amd64.deb ...
Unpacking nemo-image-converter (3.2.0) over (3.2.0) ...
Preparing to unpack nemo-media-columns_3.2.1_all.deb ...
Unpacking nemo-media-columns (3.2.1) over (3.2.1) ...
Preparing to unpack nemo-pastebin_3.2.1_all.deb ...
Unpacking nemo-pastebin (3.2.1) over (3.2.1) ...
Preparing to unpack nemo-rabbitvcs_3.2.1_all.deb ...
Unpacking nemo-rabbitvcs (3.2.1) over (3.2.1) ...
Preparing to unpack nemo-share_3.2.0_amd64.deb ...
Unpacking nemo-share (3.2.0) over (3.2.0) ...
Preparing to unpack nemo-terminal_3.2.1_amd64.deb ...
Unpacking nemo-terminal (3.2.1) over (3.2.1) ...
Setting up nemo-audio-tab (3.2.1) ...
Setting up nemo-compare (3.2.1) ...
Setting up nemo-emblems (3.2.3) ...
Setting up nemo-fileroller (3.2.1) ...
Setting up nemo-image-converter (3.2.0) ...
Setting up nemo-media-columns (3.2.1) ...
Setting up nemo-pastebin (3.2.1) ...
Setting up nemo-rabbitvcs (3.2.1) ...
Setting up nemo-share (3.2.0) ...
Setting up nemo-terminal (3.2.1) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160824-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libglib2.0-0:amd64 (2.48.2-0ubuntu1) ...

To set nemo as default file manager:

xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search

You can check the default with:

xdg-mime query default inode/directory

It will say failed to sign:

dpkg-buildpackage: error: failed to sign .dsc and .changes file

but that’s not an issue.
The .deb packages will be built to ../

Older instructions:

git clone https://github.com/linuxmint/nemo
cd nemo/
./autogen.sh && ./configure && make && make install

If it throws the following error:

./autogen.sh: 25: ./autogen.sh: aclocal: not found

, do:

sudo apt-get install automake gtk-doc-tools gobject-introspection libgtk-3-dev libgail-3-dev libcinnamon-desktop-dev libxml2-dev libnotify-dev libexif-dev libexempi-dev libselinux1-dev

I also had to manually installer older version packages for “tracker support” because it was not recognizing the newer version that came with Ubuntu Xenial:

wget http://security.ubuntu.com/ubuntu/pool/universe/t/tracker/libtracker-sparql-0.16-0_0.16.5-0ubuntu0.2_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/universe/t/tracker/libtracker-miner-0.16-0_0.16.5-0ubuntu0.2_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/universe/t/tracker/gir1.2-tracker-0.16_0.16.5-0ubuntu0.2_amd64.deb
wget http://security.ubuntu.com/ubuntu/pool/universe/t/tracker/libtracker-sparql-0.16-dev_0.16.5-0ubuntu0.2_amd64.deb
sudo dpkg -i *deb
sudo apt-get install -f 

After doing all this I was getting a compiler error:

Makefile:780: recipe for target 'eel-canvas.lo' failed

So I had to pass a flag to ./configure to suppress the error:

/configure --disable-Werror

Next:

make && sudo make install

Now create a shortcut in the menu for Nemo:

cp data/nemo.desktop ~/.local/share/applications/

Now you can launch it by typing “Files” in the menu. If you want to change the name, edit ~/.local/share/applications/nemo.desktop.

[Desktop Entry]
Name=Nemo
Name[en_GB]=Files
Comment=Access and organize files
Exec=nemo %U
Icon=folder
Terminal=false
Type=Application
StartupNotify=false
Categories=GNOME;GTK;Utility;Core;
MimeType=inode/directory;application/x-gnome-saved-search;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=nemo
X-GNOME-Bugzilla-Component=general
X-GNOME-Bugzilla-Version=3.2.2

I submitted an issue on github.

Installing nemo extensions:
Install nemo

sudo apt install nemo
git clone https://github.com/linuxmint/nemo-extensions
cd nemo-extensions
./buildall

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Building and using opticons

Now that glyphicons have been phased out in Bootstrap 4, I needed an alternative and found opticons.

To install it:
First install Node Package Manager (npm):

curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
apt-get install nodejs
wget https://github.com/primer/octicons/archive/v5.0.1.zip
unzip v5.0.1.zip
cd octicons-5.0.1/

Now we need to edit the json to prevent npm from aborting saying that opticons cant be installed as a dependency of itself.
emacs package.json
Change the line:

"name": "octicons",

To

"name": "octicons-test",

Now continue:
npm install octicons –save
npm run build

Now the required files are available at ./build/


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Installing AgenDAV, a self hosted calendar

Create a virtual server.
In the public web directory:

wget https://github.com/adobo/agendav/releases/download/2.0.0/agendav-2.0.0.tar.gz
tar xf agendav-2.0.0.tar.gz
cd agendav-2.0.0/web
curl -s https://getcomposer.org/installer | php
php composer.phar install --prefer-dist --no-dev

Edit /etc/apache2/sites-available/cal.joel.co.in.conf:
Add at the end:

<Location />
   RewriteEngine On
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule ^ index.php [QSA,L]
</Location>

Modify DocumentRoot:

DocumentRoot /home/joel/domains/cal.joel.co.in/public_html/web/public

Create a mysql db and assign a user and password for it.
Set permissions (replace www-data with the virtualhost user):
chown -R www-data:www-data web/
chmod -R 750 web/var/

Edit file settings.php:

cd web/config/
cp default.settings.php settings.php
emacs settings.php

Now migrate databases:

cd /home/joel/domains/cal.joel.co.in/public_html
php agendavcli migrations:migrate

Now try going to the dav url.

Ref:
http://docs.agendav.org/en/stable/admin/installation/


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Install owncloud for own server (Simple method)

First create a virtual host, and go to that directory.
Install dependencies:

sudo apt-get install libapache2-mod-php5 php5-gd php5-json php5-mysql php5-curl php5-intl php5-mcrypt php5-imagick

Download and extract owncloud package (Find latest version here:

wget https://download.owncloud.org/community/owncloud-9.1.3.tar.bz2
tar xf owncloud-9.1.3.tar.bz2 && rm owncloud-9.1.3.tar.bz2
cd owncloud
mv * ../
mv .* ../

Now create a new database, a new user for that database and grant privileges for that user on that database. This can be done manually on the mysql command line or via phpmyadmin.

Go to the publicly accessible url and input these settings for a wizard install of owncloud.

If you want an ssl-only access to owncloud, first setup certificates on the server, and after verifying that the https:// url works fine, enter the following at the start of .htaccess file in the root of public web directory:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://cloud.yoursite.com/$1 [R,L]

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.