From 5ba89a39042d4481d763b99be5af6d93fbdc8ddd Mon Sep 17 00:00:00 2001 From: ntrlshrp Date: Sat, 22 Jul 2017 19:39:13 +0000 Subject: [PATCH] Begin detailed instructions for Simple installation --- Simple-installation.md | 220 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 219 insertions(+), 1 deletion(-) diff --git a/Simple-installation.md b/Simple-installation.md index ac50ffb..a994450 100644 --- a/Simple-installation.md +++ b/Simple-installation.md @@ -1,4 +1,222 @@ This page should explain how to set up a small installation for personal use, with: - no HTTP frontend, - an example of plain htpasswd authentication, -- an example of SSL certificate. \ No newline at end of file +- an example of SSL certificate. + + + +# Setup and Verify Test Server on Localhost:5232 + +> This is a small installation on Ubuntu Desktop 16.04 [once this works, will write up necessary edits for small installation on Ubuntu Server 16.04]. All credit to [Radicale Documentation](http://radicale.org/documentation/) + +## Install and Run Radicale + +### Install Dependencies +Open a terminal and enter these commands: + +``` +sudo apt-get install python3-pip +``` + +### Install Radicale +``` +##### -H flag uses root's home rather than USER's home +sudo -H python3 -m pip install --upgrade radicale +``` + +### Launch Radicale in the background +``` +##### Cursor will simply blink in Terminal +sudo -H python3 -m radicale --config "" --storage-filesystem-folder=~/.var/lib/radicale/collections +``` + +## Create first Calendar + +### Connect to Radicale via Browser (No TorBrowser, VPN, Proxy, etc.) +- Open your browser, connect to: http://localhost:5232/ + +### Create calendar +- Enter a Username and click "Next" + - Username: fake +- Click "Create new addressbook or calendar" +- Enter a Calendar Title, Description, Type, and Color and click "Save" + - Title: fakecal01 + - Description: fakecalendar01 + - Type: calendar, journal and tasks [default] + - Color: [default] +- You are now returned to the Radicale "Collections" page in your browser + - Note that collection (Calendar) "fakecal01" has a URL, we will use this in our Calendar Client + - URL: http://localhost:5232/fake/234e38a1-32eg-9e0x-e3tn-eut92930etae/ + +## Modify first Calendar in Thunderbird Calendar Client + +### Create New Calendar in Thunderbird +- Open Thunderbird + - Click "Events and Tasks > Calendar" + - Click "File > New > Calendar" [or right-click "Calendar Pane > Calendar List" area and select "New Calendar"] +- Select "On the Network" in the dialog box and click "Next" +- Select a Format and Location and click "Next" + - Format: CalDAV + - Location: Copy and paste fakecal01's URL (all of it) and add any "USERNAME@" before "localhost" + - e.g., http://fake@localhost:5232/fake/234e38a1-32eg-9e0x-e3tn-eut92930etae/ + - e.g., http://myusername@localhost:5232/fake/234e38a1-32eg-9e0x-e3tn-eut92930etae/ +- Enter a Name, Color, and Thunderbird email account and click "Next" + - Name: First Radicale Test Calendar (FRTC) + - Color: [color you would like to indicate an event on FRTC] + - Email: [default] +- Click "Finish" + +### Modify First Radicale Test Calendar +- Click "Events and Tasks > New Event" + - Select Title, Location, Start and End Time, and Calendar and click "Save and Close" + - Title: First New Event + - Location: 123 Main Street + - Start and End Time: 01 Jan 2000 15:00 to 01 Jan 2000 18:00 + - Calendar: First Radicale Test Calendar + +Hopefully, you do not see a yellow triangle with black "!" in "Calendar Pane > Calendar List" next to First Radicale Test Calendar. Hopefully, "First Radicale Test Calendar" text is not greyed out. Hopefully, no error message upon "Save and Close." + +### Verify Modification of CalDAV backend +- Return to browser, http://localhost:5232/ +- Click URL for "fakecal01" and save .ics file +- Go to folder with .ics file and open .ics file _with a text editor_ +- Enjoy ~50 lines that represent your "First New Event" in your "First Radicale Test Calendar" + + + +# Setup Real Server on PublicIPaddress:5232 + +> This is a small installation on Ubuntu Desktop 16.04 [once this works, will write up necessary edits for small installation on Ubuntu Server 16.04]. All credit to [Radicale Documentation](http://radicale.org/documentation/) + +## Shut down Test Server + +### Logging off +- Return to browser, http://localhost:5232/ + - Click "Logout[fake]" +- Return to Terminal where you launched Radicale in the background (still running) and type Ctrl+C + +``` +##### Cursor will simply blink in Terminal +sudo -H python3 -m radicale --config "" --storage-filesystem-folder=~/.var/lib/radicale/collections +[BLINKING CURSOR] +^C +``` + +## Configure Server with Real Configuration File + +### Configure Secure Users +- Create some users and passwords + +``` +##### Install dependencies for htpasswd command (if needed) +sudo apt-get install apache2-utils +##### Put user "fake" in a new "users" file +sudo htpasswd -B -c /etc/radicale/users fakeuser +New password: +Re-type new password: +##### Add another user +sudo htpasswd -B /etc/radicale/users user2 +New password: +Re-type new password: +##### Install dependencies for bcrypt encryption method +sudo python3 -m pip install --upgrade passlib bcrypt +``` + +- Tell Radicale where to find users by editing the /etc/radicale/config file [remember, you installed Radicale as root with "sudo -H" above] in your Terminal + - Add lines to [auth] section of config file + - Note that your config file should already look finished (~200 lines), not empty + +``` +sudo nano /etc/radicale/config + +##### Add these lines under relevant portions of [auth] section +type = htpasswd +htpasswd_filename = /path/to/users +# encryption method used in the htpasswd file +htpasswd_encryption = bcrypt +``` + +- Add some safety limits to /etc/radicale/config file + +``` +##### Add these lines under relevant portions of [server] section +max_connections = 20 +# 1 Megabyte +max_content_length = 10000000 +# 10 seconds +timeout = 10 + +##### Add these lines under relevant portions of [auth] section +# Average delay after failed login attempts in seconds +delay = 1 +``` + +## Test Configuration +- Run Radicale with our /etc/radicale/config file (rather than blank configuration file for Test Server) + +``` +##### Note that you may need to comment out some sections in /etc/radicale/config if this does not work first by adding a "#" before "[well-known]" and "[git]" if you see similar errors +##### ERROR: Invalid configuration: Invalid section 'well-known' in config +sudo -H python3 -m radicale --storage-filesystem-folder=~/.var/lib/radicale/collections +``` + +- Return to browser, http://localhost:5232/ + - Authentication Required for localhost:5232, enter Username and Password and click "OK" + - Username: fakeuser + - Password: [password you gave to htpasswd] + +## Create second Calendar + +### Create calendar +- Click "Create new addressbook or calendar" +- Enter a Calendar Title, Description, Type, and Color and click "Save" + - Title: fakeusercal01 + - Description: fakeuser's /etc/radicale/config calendar + - Type: calendar, journal and tasks [default] + - Color: [default] +- You are now returned to the Radicale "Collections" page in your browser + - Note that collection (Calendar) "fakeusercal01" has a URL, we will use this in our Calendar Client + - URL: http://localhost:5232/fakeuser/775e38a1-32eg-9e0x-e3tn-fax92930uskl/ + - Note this URL is different from "First Radicale Test Calendar" (i.e., fakecal01) + +## Modify second Calendar in Thunderbird Calendar Client + +### Create New Calendar in Thunderbird +- Open Thunderbird + - Authentication Required for localhost:5232, enter Username and Password + - Username: fakeuser + - Password: [password you gave to htpasswd] + - Click "Events and Tasks > Calendar" + - Click "File > New > Calendar" [or right-click "Calendar Pane > Calendar List" area and select "New Calendar"] +- Select "On the Network" in the dialog box and click "Next" +- Select a Format and Location and click "Next" + - Format: CalDAV + - Location: Copy and paste fakeusercal01's URL (all of it) and add any "USERNAME@" before "localhost" + - e.g., http://fake@localhost:5232/fake/234e38a1-32eg-9e0x-e3tn-eut92930etae/ + - e.g., http://myusername@localhost:5232/fake/234e38a1-32eg-9e0x-e3tn-eut92930etae/ +- Enter a Name, Color, and Thunderbird email account and click "Next" + - Name: Second Radicale Test Calendar (SRTC) + - Color: [color you would like to indicate an event on SRTC] + - Email: [default] +- Click "Finish" + +### Modify Second Radicale Test Calendar +- Click "Events and Tasks > New Event" + - Select Title, Location, Start and End Time, and Calendar and click "Save and Close" + - Title: Second New Event + - Location: 123 Main Street + - Start and End Time: 01 Jan 2000 15:00 to 01 Jan 2000 18:00 + - Calendar: Second Radicale Test Calendar + +Hopefully, you do not see a yellow triangle with black "!" in "Calendar Pane > Calendar List" next to Second Radicale Test Calendar. Hopefully, "Second Radicale Test Calendar" text is not greyed out. Hopefully, no error message upon "Save and Close." + +### Verify Modification of CalDAV backend +- Return to browser, http://localhost:5232/ +- Click URL for "fakeusercal01" and save .ics file +- Go to folder with .ics file and open .ics file _with a text editor_ +- Enjoy ~50 lines that represent your "Second New Event" in your "Second Radicale Test Calendar" + +## Set Up Service +[Something confuses me here???] + +## Serve Calendar to Public WWW (e.g., your computer outside home, your phone via cellular) \ No newline at end of file