Databases 6 min read

How to Deploy and Use SQLite-Web: A Web‑Based SQLite Database Manager

This guide introduces SQLite‑Web, a Python‑based web interface for SQLite, explains how to build and run its Docker image, details the command‑line options for configuring ports, hosts, authentication, and other features, and shows how to manage, query, and export SQLite databases through the browser.

Open Source Tech Hub
Open Source Tech Hub
Open Source Tech Hub
How to Deploy and Use SQLite-Web: A Web‑Based SQLite Database Manager

Overview

SQLite is popular for its lightweight footprint and ease of configuration, but managing databases without a graphical tool often requires cumbersome command‑line operations, especially for browsing, editing, and exporting data.

Project Introduction

SQLite‑Web is a Python‑written, web‑based SQLite database browser that simplifies database administration, allowing developers to avoid complex CLI commands and manage SQLite databases efficiently through a browser.

Installation

Build the Docker image

git clone https://github.com/coleifer/sqlite-web.git

cd docker/

docker build -t coleifer/sqlite-web .

Run the image

docker run -it --rm \
    -p 8880:8080 \
    -v e:/docker/data:/data \
    -e SQLITE_DATABASE=db_filename.db \
    coleifer/sqlite-web
Note: The default container port 8080 was occupied on the host, so port 8880 is used instead.
Access the interface at http://127.0.0.1:8880/

The tool supports existing SQLite databases and can also help create new ones. Users can add or delete tables, columns (including support for older SQLite versions), and indexes, as well as export data to JSON or CSV and import from those formats. Additional features include data browsing, row insertion, updates, deletions, executing arbitrary SQL queries, and exporting query results.

Command‑line Options

The syntax for invoking sqlite-web is:

$ sqlite_web [options] /path/to/database-file.db

Available options include: -p, --port: default port is 8080. -H, --host: default host is 127.0.0.1. -d, --debug: enable debug mode (default false). -l, --log-file: name of the application log file. -x, --no-browser: do not automatically open a browser when starting. -P, --password: prompt for a password or read it from the SQLITE_WEB_PASSWORD environment variable. -r, --read-only: open the database in read‑only mode. -R, --rows-per-page: set pagination on content pages (default 50 rows). -Q, --query-rows-per-page: set pagination on query pages (default 1000 rows). -T, --no-truncate: disable truncation of long text values. -e, --extension: path or name of an extension to load; repeat -e [path] for multiple extensions. -f, --foreign-keys: enable foreign‑key pragma. -u, --url-prefix: URL prefix for the application, e.g., "/sqlite-web". -c, --cert and -k, --key: specify SSL certificate and private key. -a, --ad-hoc: run with a temporary SSL context.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DockerPythonSQLite
Open Source Tech Hub
Written by

Open Source Tech Hub

Sharing cutting-edge internet technologies and practical AI resources.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.