Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Ubuntu Server + Nginx + Dropbox + uwsgi Apps


Create a websites user.

sudo adduser --disabled-password --home /src/websites websites

Login and install dropbox.

sudo -s su - websites
cd ~ && wget -O - "" | tar xzf -

Logged as the websites user, install the dropbox cli tool

mkdir bin
cd bin
chmod +x

Setup your DNS

Add a Website

Share a Website

# dropbox
description "starts the dropbox client"
start on runlevel [2345]
stop on shutdown
umask 0027
export LANG=en_US.UTF-8
exec su -s /bin/sh -c /srv/websites/.dropbox-dist/dropboxd websites
end script
map $http_accept_language $lang {
default es;
~en en;
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
index index.html index.htm;
server_name ~^(www\.)?(?P<domain>.+)$;
root /srv/websites/Dropbox/Hosts;
location = /favicon.ico {
access_log off;
log_not_found off;
location ~ /[._]+ {
deny all;
return 404;
location / {
root /srv/websites/Dropbox/Hosts/$domain;
index index.html index.$lang.html;
autoindex on;
access_log /var/log/nginx/$domain.log;
error_log /var/log/nginx/$domain.log error;
try_files $uri $uri/ =404;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment